From 8d26106195a0a24621f140e76389d206332f84c0 Mon Sep 17 00:00:00 2001 From: Godopu Date: Sat, 3 Oct 2026 14:10:59 +0000 Subject: [PATCH] test(issue-42): review R2 - a passthrough code must be in the exit table raised == passthrough forced the declaration, but nothing checked the declared code against the table: dropping create's exit 4 from both the table and the data still passed. Assert passthrough <= table codes. Co-Authored-By: Claude Opus 5.5 --- tests/test_issue42_skill_blocks.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_issue42_skill_blocks.py b/tests/test_issue42_skill_blocks.py index 7989016..0b979cd 100644 --- a/tests/test_issue42_skill_blocks.py +++ b/tests/test_issue42_skill_blocks.py @@ -152,6 +152,8 @@ def test_exit_table_agrees_with_script(script): raised = _scan_exits(script)[1] assert {c: f"{script}:{n}" for c, n in raised.items()} == passthrough, \ f"{script}: SystemExit codes in heredocs {raised} must be declared as passthrough (and in the table)" + assert set(passthrough) <= numeric, \ + f"{script}: passthrough codes {sorted(set(passthrough) - numeric)} missing from the exit table" assert numeric <= literal | set(passthrough), \ f"table codes {sorted(numeric - literal - set(passthrough))} come from nowhere in {script}" for code, ref in passthrough.items():