2dfa96939e
The first environment shipped through .claude/workflows/new-environment.js: specification, three adversarial reviews (all 'fixable', none fatal), the Python environment, the TypeScript port, captured rollouts, and the demo page. Eleven agents, no errors. The proof that the platform scales is one line long. Alert Triage has a completely different shape from Word Five — JSON actions, priced lookups, an analyst screen instead of a grid — and the only change under src/components/demo/ is a comment edit, because the isolation lint refused the word "wordle" there. Zero shell code changed. 415 contract checks now pass against two demos, up from 206 against one. The environment is honest by construction. Every alert is synthetic, generated from the seed, and the banner saying so sits inside the board surface. Two of the eleven scenario templates are hidden-suspicious: generated by the same code as their benign twin with the signal overlaid only in lookup data, so the free screen is identically distributed and a screen-only policy STRUCTURALLY cannot tell them apart. The probe ladder measures it: `fast` catches 0.0 of hidden seeds. That is the counterweight made real rather than asserted. Twelve policies, thirteen ladder assertions, a genuine three-way trade: fast 0.846 wins hours (0.85), misses every hidden case targeted 0.894 wins the shipped total thorough 0.820 wins evidence (1.00), spends 2.9 hours None dominates. 92 Python tests, 35 TypeScript tests, 65 fixtures replaying at delta 0, and conformance gated on world + scorer + protocol so the browser shows the same alert for ?seed= that Python generated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mt6sHQHEnEYrJZvoMCJSB
33 lines
1.4 KiB
Python
33 lines
1.4 KiB
Python
"""The cross-language gates. If any of these changes, the TypeScript port must be re-verified."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from alert_triage.conformance import committed, protocol_digest, protocol_trace, scorer_digest
|
|
from alert_triage.generator import world_digest
|
|
|
|
|
|
def test_scorer_digest_matches_the_committed_value() -> None:
|
|
assert scorer_digest() == committed()["scorer"]
|
|
|
|
|
|
def test_protocol_digest_matches_the_committed_value() -> None:
|
|
assert protocol_digest() == committed()["protocol"]
|
|
|
|
|
|
def test_protocol_corpus_exercises_every_rejection_path() -> None:
|
|
trace = protocol_trace()
|
|
reasons = {t["reason"] for case in trace for t in case["turns"] if not t["accepted"]}
|
|
fragments = ["no JSON object", "could not be parsed", "not a JSON object", "unknown action", "unknown lookup",
|
|
"not in the twelve-month window", "already been looked up", "has not appeared", "cites must be",
|
|
"not been shown", "unknown close reason", "unknown typology"]
|
|
for fragment in fragments:
|
|
assert any(fragment in r for r in reasons), fragment
|
|
outcomes = {case["outcome"] for case in trace}
|
|
assert "aborted" in outcomes
|
|
assert any(case["truncated"] for case in trace)
|
|
assert any(len(case["turns"]) == 8 and case["outcome"] in ("solved", "failed") for case in trace)
|
|
|
|
|
|
def test_world_digest_matches_the_committed_value() -> None:
|
|
assert world_digest() == committed()["world"]
|