qa: sync gate guards (root-cause taxonomy + corpus manifest) with structural_completeness + narration_no_ooc_leak - #977
Conversation
…_no_ooc_leak checks The taxonomy-drift guard test (qa/test_root_cause_analyzer.py:: test_taxonomy_matches_real_gate_check_names) was RED on main: two chk() names added to qa/assert_behavioral.py were never mirrored into the root-cause taxonomy. - structural_completeness (ENGINE_INVARIANT) — FATAL duo-lane check that a >=10-beat companion session engaged a core relationship/quest system; mapped to the companion/server/questgen engine surfaces, consistent with the sibling party_traveled / world_advanced_time structural checks. - narration_no_ooc_leak (DM_ADHERENCE, #972) — player-facing OOC-leak gate; mapped to the FICTION-ONLY mandate in skills/dungeon-master/SKILL.md + the duo DM prompt, with the leak-regex in assert_behavioral.py as the false-positive tuning point. Pure metadata sync; assert_behavioral.py untouched. Test now 19/19 green.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTwo new check entries are appended to ChangesBehavioral Gate Taxonomy Additions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
…try) test_behavioral_gate_corpus.py::test_manifest_covers_every_fatal_check was RED on main (independent of the taxonomy drift): narration_no_ooc_leak is a FATAL gate check (chk(... fatal=_leak_red)) with no corpus fixture and no TODO manifest entry, so the anti-goalpost coverage audit failed. Ran the canonical sync — python qa/gate_corpus/builder.py — which deterministically regenerated all 18 fixtures (byte-identical, zero churn) and auto-added the TODO__narration_no_ooc_leak manifest entry (a faithful minimal OOC-leak fixture is deferred work). Both guard suites now green: test_behavioral_gate_corpus.py + test_root_cause_analyzer.py = 38 passed, 1 skipped.
…w fix) A 3-agent verification of this PR flagged two MAJOR inaccuracies in the structural_completeness location hints that would misdirect an agent reading a RED gate: - questgen.py was named for the 'quest-resolution/evolution path' but holds ZERO such code (it is the quest-SEED-generation layer; 0 hits for evolves_to/complete_quest). The rule-of-three evolution (_maybe_schedule_quest_evolution, evolves_to write) lives in server.py. Replaced questgen.py with models.py (the field defs). - companion.py was credited with 'the approval/attitude write' but is a deliberately PURE module with no campaign I/O — every attitude_value/adjust_attitude write is in server.py. Kept companion.py but reworded the hint to its real role: it only surfaces approval CAUSES (approval_tags) for the DM to apply. Also disambiguated the 10-beat gate trip (STRUCTURAL_MIN_BEATS) from the >=24-beat authored-campaign validation recommendation. No key/category change; guards still 38 passed, 1 skipped.
…977 TODO) Replaces the TODO placeholder #977 added with a faithful minimal known-RED fixture so the anti-goalpost corpus actually exercises narration_no_ooc_leak's RED path. 6 DM text beats (== MIN_BEATS), 4 leaking the exact OOC patterns the gate bans; isolated so the gate emits exactly `RED: 1 ... [FAIL] narration_no_ooc_leak ... [pervasive => RED]`. Builder regeneration deterministic (zero churn to the other 18 fixtures); assert_behavioral.py untouched. Guards: 39 passed.
Problem
Two QA guard tests were RED on
main(theCI/qa-release-gate-testsjob has been failing onmainfor several commits). Both stem from one root cause: the gate checksstructural_completenessandnarration_no_ooc_leakwere added toqa/assert_behavioral.pywithout updating the guard metadata that's supposed to track the gate.test_root_cause_analyzer.py::test_taxonomy_matches_real_gate_check_names— the root-cause taxonomy (qa/BEHAVIORAL_GATE_TAXONOMY.json) was missing both checks.test_behavioral_gate_corpus.py::test_manifest_covers_every_fatal_check— the gate-corpus manifest had no fixture and no TODO entry fornarration_no_ooc_leak(a FATAL check:chk(... fatal=_leak_red)).structural_completenessalready had a fixture, so only the taxonomy was missing it.Both were pre-existing on
mainand independent of each other; the corpus failure does not read the taxonomy at all.Fix (guard metadata only —
assert_behavioral.pyuntouched)Taxonomy (
qa/BEHAVIORAL_GATE_TAXONOMY.json) — added both entries:structural_completenessENGINE_INVARIANTparty_traveled/world_advanced_time. Locations →companion.py/server.py/questgen.py.narration_no_ooc_leakDM_ADHERENCEskills/dungeon-master/SKILL.md+ duo DM prompt;_NARRATION_LEAK_REas the false-positive tuning point.Corpus manifest (
qa/gate_corpus/manifest.json) — ran the canonical syncpython qa/gate_corpus/builder.py, which deterministically regenerated all 18 fixtures (byte-identical, zero churn) and auto-added aTODO__narration_no_ooc_leakentry (a faithful minimal OOC-leak fixture is deferred work, flagged with a reason).Test
No behavior change to any gate; only the analyzer's RED→actionable-location mapping and the corpus coverage audit gain the two checks.
Summary by CodeRabbit