fix(issue-17): follow-ups - a failed decision ends the wrapper with 1; resume closes herdr 0.9.3's placeholder (v4.8.7) #52

Merged
Godopu merged 9 commits from fix/issue17-followups into main 2026-10-08 02:32:57 +00:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit 541c3febe8 - Show all commits

No files matched your search

+2 -2
View File
@@ -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}
+1 -1
View File
@@ -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()