M5 Phase 3: the demo's review arc names a starter, and says nothing when it cannot find it - #63
Merged
Merged
Conversation
…hen it cannot find it Scoping the last three demo suites turned up the dependency that blocks two of them, and it is the kind this phase exists to remove. demo/app.py declares REVIEW_SOURCE_SCENARIO = "notice-ny", plus a matching scenario id, case id and title. The demo is toolkit (D2), so that is a teaching scenario's name compiled into it. _ingest_review_case is wrapped in `except Exception: pass`, so pointing DULY_DEMO_CONTENT anywhere else makes the arc quietly not appear — no error, no log line, one fewer scenario in a list nobody counts. Degrading quietly is the right behaviour for a missing demonstration. That is precisely why hardcoding *which* demonstration went unnoticed: from outside, "this deployment has no review scenario" and "this deployment has one but we only look for notice-ny" are indistinguishable. I started the fix — derive the source from whichever scenario carries a below-floor extraction, preferring notice-ny so this repository's demo is byte-unchanged — and backed it out. Four constants, nine call sites and one constant test_review_arc.py imports; a half-refactored app.py is worse than a routed finding, and the finding is what the next PR needs to start from. So this PR routes rather than fixes: a plan task (4b(ii)c-0) with the shape of the change, a CLAUDE.md gotcha so it cannot be rediscovered by surprise, and a changelog paragraph on why a silent failure hid a hardcoded name. test_rules_api does not depend on the arc and can go first; the other two cannot. Also: the one example test in test_content_roots is labelled as one — its subject is what this repository happens to ship, so it moves with the six packs rather than being repointed. Verification: 975 passed, 7 skipped; verify 351 byte-for-byte; golden/ and fixtures/ untouched. Documentation pass run per CLAUDE.md's definition of done, including the sweep for every doc naming the constants (one hit, the plan). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scoping the last three demo suites turned up the dependency that blocks two of them — and it is exactly the kind this phase exists to remove.
The finding
demo/app.pydeclaresREVIEW_SOURCE_SCENARIO = "notice-ny", plus a matching scenario id, case id and title. The demo is toolkit (D2), so that is a teaching scenario's name compiled into it._ingest_review_caseis wrapped inexcept Exception: pass, so pointingDULY_DEMO_CONTENTanywhere else makes the arc quietly not appear — no error, no log line, one fewer scenario in a list nobody counts.Why this PR routes rather than fixes
I started the fix — derive the source from whichever scenario carries a below-floor extraction, preferring
notice-nyso this repository's demo stays byte-unchanged — and backed it out. Four constants, nine call sites inapp.py, and one constanttest_review_arc.pyimports.A half-refactored
app.pyis worse than a routed finding, and the finding is what the next PR needs to start from. So: a plan task (4b(ii)c-0) carrying the shape of the change, a CLAUDE.md gotcha so it cannot be rediscovered by surprise, and a changelog paragraph on why a silent failure hid a hardcoded name.Sequencing this settles:
test_rules_api(31 failures, the largest) does not touch the arc and can go first.test_evidence_apiandtest_review_arcboth assert on it and cannot.Also
The one example test in
test_content_rootsis now labelled as one — its subject is what this repository happens to ship, so it moves with the six packs rather than being repointed. Everything else in that file asserts toolkit behaviour and stays.Verification
Documentation pass run per CLAUDE.md's definition of done — including the sweep for every doc naming the constants, piped to
wc -lrather thanhead(one hit, the plan).🤖 Generated with Claude Code