From 541c3febe888a856546bb69f19b9c37af1b8d964 Mon Sep 17 00:00:00 2001 From: Godopu Date: Thu, 8 Oct 2026 09:26:41 +0900 Subject: [PATCH] test(issue-17): the frozen wrapper literals follow _decided/_exit_for (review agy) a670ef5 routed the wrapper's sub-status and exit-code decisions through _decided / _exit_for, but test_tier1_unit G-10 and test_issue5's test_wrapper_exit_code_mapping_literals_are_frozen still looked for the raw `_decide sub-status "$sub_rc"` and `_decide exit-code "$job_status"`. They now pin `_decided job_status sub-status "$sub_rc"` and `_exit_for "$job_status"`. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HCGpJXhSZasJLU38ksDghe --- tests/test_issue5_phase1_delegation.py | 4 ++-- tests/test_tier1_unit.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_issue5_phase1_delegation.py b/tests/test_issue5_phase1_delegation.py index 32abd08..a3b654b 100644 --- a/tests/test_issue5_phase1_delegation.py +++ b/tests/test_issue5_phase1_delegation.py @@ -386,8 +386,8 @@ def test_wrapper_exit_code_mapping_literals_are_frozen(mam_sandbox): wrapper = SKILLS / "multi-agent-mux-delegate-job" / "multi-agent-mux-delegate-job" text = wrapper.read_text(encoding="utf-8") # Issue #17 item 4: the mapping moved to lib_py/delegation/wrapper.py; the - # wrapper reaches it only through `_decide`. - for literal in ('_decide sub-status "$sub_rc"', '_decide exit-code "$job_status"', "--sub-rc \"$sub_rc\""): + # wrapper reaches it only through `_decide`, via _decided / _exit_for (N2). + for literal in ('_decided job_status sub-status "$sub_rc"', '_exit_for "$job_status"', "--sub-rc \"$sub_rc\""): assert literal in text, literal from lib_py.delegation import wrapper as decide # no scripts/ shim: the wrapper calls it with -m assert decide.EXIT_CODES == {"completed": 0, "error": 1, "timeout": 2, "broker_unavailable": 3, "cancelled": 5} diff --git a/tests/test_tier1_unit.py b/tests/test_tier1_unit.py index 66b8e68..7ab91d3 100644 --- a/tests/test_tier1_unit.py +++ b/tests/test_tier1_unit.py @@ -844,7 +844,7 @@ def test_g10_delegate_job_rc3_not_mistaken_for_error(mam_sandbox): """G-10: multi-agent-mux-delegate-job maps rc=3 to broker_unavailable and checks disk status. Issue #17 item 4: the mapping is lib_py/delegation/wrapper.py's sub_status.""" delegate_script = mam_sandbox / "skills" / "multi-agent-mux-delegate-job" / "multi-agent-mux-delegate-job" - assert '_decide sub-status "$sub_rc"' in delegate_script.read_text() + assert '_decided job_status sub-status "$sub_rc"' in delegate_script.read_text() from lib_py.delegation import wrapper reg = mam_sandbox / "g10-reg" reg.mkdir()