{"version":3,"term":{"cols":110,"rows":42},"timestamp":1779128036,"command":"core demo anti-regression","env":{"SHELL":"/bin/zsh"}} [0.160, "o", "\r\n================================================================================\r\n Anti-Regression — Three-Gate Defense Against Learning Harm (ADR-0057)\r\n================================================================================\r\n\r\nReference: ADR-0055 (inter-session memory), ADR-0056 (contemplation),\r\nADR-0057 (TeachingChainProposal + replay-equivalence gate).\r\n\r\nWhen a system extends its own knowledge, the gate that decides what to\r\nadmit is the load-bearing part — not the proposer. CORE's reviewed-\r\ncorpus extension path has three independent gates that each must pass\r\nbefore any byte is written to the active teaching corpus:\r\n\r\n S1. Eligibility predicate (mechanical, pre-replay)\r\n Five mechanical checks on candidate shape — polarity in\r\n {affirms, falsifies}, ≥1 source='corpus' evidence pointer,\r\n claim_domain != evaluative (unless --allow-evaluative),\r\n boundary_clean=True, proposed_chain complete.\r\n Ineligible candidates raise ProposalError; they never e"] [0.000, "o", "nter\r\n the proposal log.\r\n\r\n S2. Replay-equivalence gate (mechanical, post-eligibility)\r\n The full cognition lane runs against the active corpus AND\r\n against a transient copy with the proposed chain appended.\r\n Any strict-decrease in a watched metric (intent_accuracy,\r\n surface_groundedness, term_capture_rate, versor_closure_rate)\r\n auto-rejects with the metrics named in the operator note.\r\n Active corpus file bytes byte-identical pre/post.\r\n\r\n S3. Operator review (manual, post-replay)\r\n Even a replay-equivalent proposal only reaches the 'pending'\r\n state. Explicit `core teaching review --accept` is\r\n required to write to the active corpus.\r\n\r\nWhat to expect:\r\n Three scenes, each printed with its CLAIM, candidate, outcome, and\r\n the byte-identical-corpus assertion. Scenes 1 and 3 use the real\r\n replay function; scene 2 injects a controlled replay (via the\r\n documented run_replay= kwarg) to deterministically demonstrate the\r\n auto-r"] [0.000, "o", "ejection lifecycle on a synthetic regression.\r\n\r\nTest gate:\r\n tests/test_anti_regression_demo.py (5 tests — per-scene claim +\r\n active-corpus-byte-identical invariant).\r\n\r\nMachine-readable output:\r\n core demo anti-regression --json\r\n================================================================================\r\n\r\n"] [0.021, "o", "\r\n────────────────────────────────────────────────────────────────────────\r\n S1. Eligibility predicate refuses ineligible candidates\r\n────────────────────────────────────────────────────────────────────────\r\n CLAIM: An undetermined-polarity candidate never enters the proposal log. ProposalError raised; no log row; no replay invocation.\r\n\r\n"] [0.000, "o", " candidate.polarity : undetermined\r\n outcome : ProposalError raised\r\n error : polarity must be 'affirms' or 'falsifies'; got 'undetermined' — undetermined candidates cannot propose\r\n"] [0.000, "o", " proposal log rows : 0\r\n active corpus byte-eq : True\r\n\r\n"] [0.000, "o", "────────────────────────────────────────────────────────────────────────\r\n"] [0.000, "o", " S2. Replay-equivalence gate auto-rejects a regressing chain\r\n"] [0.000, "o", "────────────────────────────────────────────────────────────────────────\r\n"] [0.000, "o", " CLAIM: An eligible candidate whose append would regress the cognition lane is auto-rejected with the named regressed metrics in the operator note. Active corpus byte-identical pre/post.\r\n"] [0.000, "o", "\r\n"] [0.001, "o", " proposal_id : fbd12201819985cb1d3d2f97123c6f0d\r\n baseline metrics : {'intent_accuracy': 1.0, 'surface_groundedness': 1.0, 'term_capture_rate': 0.9167, 'versor_closure_rate': 1.0}\r\n candidate metrics : {'intent_accuracy': 1.0, 'surface_groundedness': 0.9167, 'term_capture_rate': 0.8334, 'versor_closure_rate': 1.0}\r\n regressed_metrics : ['surface_groundedness', 'term_capture_rate']\r\n replay_equivalent : False\r\n"] [0.000, "o", " state : rejected\r\n operator_note : auto_rollback_regression: surface_groundedness,term_capture_rate\r\n"] [0.000, "o", " active corpus byte-eq : True\r\n\r\n"] [0.000, "o", "────────────────────────────────────────────────────────────────────────\r\n"] [0.000, "o", " S3. Real replay gate runs cognition lane; pass → pending\r\n"] [0.000, "o", "────────────────────────────────────────────────────────────────────────\r\n CLAIM: An eligible candidate whose append does not regress reaches 'pending' state. Operator --accept is still required to write to the active corpus; the gate is a precondition, not a permission.\r\n\r\n"] [2.857, "o", " proposal_id : 30585e8e515483c810ad05888e06b572\r\n baseline metrics : {'intent_accuracy': 1.0, 'surface_groundedness': 1.0, 'term_capture_rate': 0.9167, 'versor_closure_rate': 1.0}\r\n candidate metrics : {'intent_accuracy': 1.0, 'surface_groundedness': 1.0, 'term_capture_rate': 0.9167, 'versor_closure_rate': 1.0}\r\n regressed_metrics : []\r\n replay_equivalent : True\r\n state : pending\r\n next step : core teaching review 30585e8e515483c810ad05888e06b572 --accept --review-date YYYY-MM-DD\r\n active corpus byte-eq : True\r\n"] [0.000, "o", "\r\n════════════════════════════════════════════════════════════════════════\r\n RESULT\r\n════════════════════════════════════════════════════════════════════════\r\n all three gates held : True\r\n active corpus byte-eq : True\r\n\r\n Each gate is independent and fails closed. Bad proposals stop at the cheapest applicable gate. The active corpus is never written to anywhere in this demo.\r\n"] [0.000, "o", "\r\n"] [0.015, "x", "0"]