From b480fcb32c086b451aa3a6130d5ed6e169f18b96 Mon Sep 17 00:00:00 2001 From: Ivan Oparin Date: Mon, 24 Aug 2026 22:28:46 +0400 Subject: [PATCH] fix: name the story that owns the declared script-audit gap The declared gap for script-command audit warning classes named STORY-260822-27ze8z, which scopes manifest module-roots parsing and carries no audit-label surface -- and which closes with the task that added this consumer. The surface is owned by STORY-260822-2evh3p, whose scope explicitly includes declared-only audit labeling for legacy schemas. The reason strings were the one classification in this mechanism no test read, so a gap could rot into an orphan silently. The section classification test now also asserts that every declared gap names an owning story, and the case-ledger row says so. --- .github/ci/candidate-cases.tsv | 2 +- tests/test_schema8_candidate_conformance.py | 23 +++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/ci/candidate-cases.tsv b/.github/ci/candidate-cases.tsv index 357f0a2..db0a56f 100644 --- a/.github/ci/candidate-cases.tsv +++ b/.github/ci/candidate-cases.tsv @@ -30,7 +30,7 @@ tests/test_schema8_candidate_conformance.py::test_the_marker_v4_family_is_consum tests/test_schema8_candidate_conformance.py::test_marker_v4_case linux,darwin,windows every published install-marker-v4 case is read back through the marker reader and round-trips tests/test_schema8_candidate_conformance.py::test_module_root_sections_are_all_classified linux,darwin,windows every section of the published module-roots family is classified, so a new one cannot be ignored tests/test_schema8_candidate_conformance.py::test_module_root_case linux,darwin,windows every published module-roots case drives the go-v1 driver to its own declared failure boundary -tests/test_schema8_candidate_conformance.py::test_script_policy_sections_are_all_classified linux,darwin,windows every section of the published script-worker family is classified, so a new one cannot be ignored +tests/test_schema8_candidate_conformance.py::test_script_policy_sections_are_all_classified linux,darwin,windows every section of the published script-worker family is classified and every declared gap names its owning story, so neither a new section nor an orphaned gap can be ignored tests/test_schema8_candidate_conformance.py::test_script_policy_identity_matches_the_suite linux,darwin,windows the closed policy identity and interpreter set this build hard-codes are the suite's own tests/test_schema8_candidate_conformance.py::test_script_policy_opt_in_case linux,darwin,windows every published opt-in case decides manifest acceptance and the enforced/declared-only classification tests/test_schema8_candidate_conformance.py::test_a_refusal_precedes_every_worker_surface linux,darwin,windows every enforced shape the suite declares is refused with script_execution_policy_unsupported before any install mutation diff --git a/tests/test_schema8_candidate_conformance.py b/tests/test_schema8_candidate_conformance.py index 7dbcb9c..b99c731 100644 --- a/tests/test_schema8_candidate_conformance.py +++ b/tests/test_schema8_candidate_conformance.py @@ -29,6 +29,7 @@ import json import os import posixpath +import re from functools import lru_cache from pathlib import Path, PurePosixPath from typing import Any @@ -68,9 +69,14 @@ "unreachable: this manager refuses enforced script commands before any worker surface" ) # Real surface this build does not carry. Named with its owner so the gap is -# declared rather than silent. +# declared rather than silent. The owner is the story that scopes the missing +# surface -- declared-only audit labeling for legacy schemas -- not whichever +# story happened to add this consumer; a gap parked on a story that never owned +# it and is about to close is a silent gap wearing a label. +DECLARED_GAP_PREFIX = "not implemented: " +DECLARED_GAP_OWNER = re.compile(r"\bSTORY-\d{6}-[0-9a-z]{6}\b") NOT_IMPLEMENTED_YET = ( - "not implemented: script-command audit warning classes, owned by STORY-260822-27ze8z" + "not implemented: script-command audit warning classes, owned by STORY-260822-2evh3p" ) SCRIPT_POLICY_SECTIONS = { @@ -461,6 +467,19 @@ def test_script_policy_sections_are_all_classified() -> None: assert any( reason == CONSUMED_HERE for reason in SCRIPT_POLICY_SECTIONS.values() ) + unowned = sorted( + { + reason + for reason in SCRIPT_POLICY_SECTIONS.values() + if reason.startswith(DECLARED_GAP_PREFIX) + and not DECLARED_GAP_OWNER.search(reason) + } + ) + assert not unowned, ( + f"these classifications declare a gap without naming the story that owns " + f"the missing surface: {unowned}. An unowned gap is never scheduled, so " + f"it is a silent gap with extra ceremony." + ) def test_script_policy_identity_matches_the_suite() -> None: