P24-02: 操作と通知の全受入

This commit is contained in:
Agent Control Runner
2026-10-17 14:49:39 +09:00
parent bd3a134051
commit 78f7cba7a9
30 changed files with 4729 additions and 38 deletions
@@ -305,6 +305,18 @@ def check_json(path: str, main_text: str, report: dict) -> None:
((base_t, "base"), (main_text, "main"), (p24_t, "p24")))
recon = load_json_strict(recon_t, f"{path}@reconciled")
expected = expect3(base, main, p24)
# Repair5 authority permits exactly this P24 source pin rebind; no schema,
# cleanup policy, non-P24 row or ordered structure is changed.
test = "tests/ui/test_operations_notification.gd"
digest = hashlib.sha256((ROOT / test).read_bytes()).hexdigest()
if path.endswith("completion_marker_contracts.json"):
rows = [r for r in expected["rows"] if r["test"] == test]
if len(rows) != 1:
fail("exactly one P24 marker row required")
else:
rows[0]["source_sha256_at_schema_audit"] = digest
elif path.endswith("suite-policy.json"):
expected["suite_policies"][test]["source_sha256"] = digest
ok = ordered_equal(recon, expected)
if not ok:
fail(f"{path}: reconciled JSON != main snapshot + P24-only additions (value/order)")
@@ -459,7 +471,8 @@ def main() -> int:
report["scope"] = ("Static source preservation only. Not Godot/import/native/OS/full-roster proof and "
"not acceptance. Root owns current-main composition and all execution.")
report["failures"] = failures
EVIDENCE.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
if args.write_evidence:
EVIDENCE.write_text(json.dumps(report, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
summary = {p: {k: (len(v) if isinstance(v, list) else v) for k, v in r.items()
if k in ("missing", "duplicates", "unexpected", "required_count", "reconciled_symbol_count",
"equals_main_plus_p24_only_additions_in_order", "body_issues")}
@@ -33,13 +33,11 @@ class CheckerTests(unittest.TestCase):
def validate(self, rows, **counts):
data = dict(test_suite='tests/ui/test_operations_notification.gd', failures=0, checks=1,
full_roster=dict(results=rows, **counts))
previous = Path.cwd()
try:
os.chdir(self.root)
# Repair5 deliberately resolves suite bytes from the verified T view,
# never from cwd. This TEST-ONLY adapter supplies that isolated view.
with patch.object(checker, 'VERIFIED_ROOT', self.root):
return checker._validate_condition_artifact_content(
'final_validation_review', data, 'json', self.root, {}, {})
finally:
os.chdir(previous)
def test_positive_roster(self):
for counts in ({}, dict(total_suites=3, suites_count=3, failures=0)):