fix: attach_command from one builder; no kill/start_command; stop closes a row-less session (Issue #71)
- attach_command is `herdr --session <server> agent attach <herdr name>`
(`default` written too), built by lib_py.agents.sanitize.attach_command;
create, resume and reconcile all use it. kill_command and start_command
are no longer written, and status --json drops start_command.
- The two raw kill-session hints (create exit 43, id_order's orphan) print a
stop-skill command with --herdr-session instead.
- stop_session.sh closes a session that has no registry row, herdr only and
without --agent, when herdr runs it inside this workspace; another
workspace's session is refused (exit 5), a missing one is exit 1, one that
survives kill-session is exit 6. The registry is not changed.
- Docs: only the SKILL.md lines these changes made wrong; the skill block
pins follow. Tests that asserted the removed fields keep their intent
(issue50: create's own row; issue21: no control-root path in
attach_command; tier2: the new form and the absent fields). S11 pins the
shim to 4243da5, which changed it on purpose.
Refs #71
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9c21fa4e4f
commit
e4c7c8fe9b
19 files changed
+605
-109
No files matched your search
@@ -1090,7 +1090,9 @@ def test_id_order_dead_owner_marker_blocks_while_its_unregistered_herdr_session_
|
||||
assert marker_a.exists()
|
||||
assert ("srv-x", "orphan-a-agy") in probes
|
||||
err = capsys.readouterr().err
|
||||
assert "HERDR_SESSION_NAME=srv-x herdr kill-session -t orphan-a-agy" in err
|
||||
# Issue #71: the hint is a stop-skill command naming the server
|
||||
assert "bash .agents/skills/multi-agent-mux-stop/scripts/stop_session.sh --session orphan-a-agy --herdr-session srv-x" in err
|
||||
assert "kill-session" not in err
|
||||
|
||||
# No authoritative answer from herdr -> kept and blocks as well
|
||||
unknown_sessions.add("orphan-a-agy")
|
||||
@@ -1137,7 +1139,7 @@ def test_id_order_dead_owner_marker_blocks_while_its_unregistered_herdr_session_
|
||||
assert probes == [("", "same-agy")]
|
||||
assert json.loads(same.read_text())["owner_pid"] == live.pid
|
||||
err = capsys.readouterr().err
|
||||
assert "its herdr session is alive" in err and "kill-session -t same-agy" in err
|
||||
assert "its herdr session is alive" in err and "bash .agents/skills/multi-agent-mux-stop/scripts/stop_session.sh --session same-agy --herdr-session " in err
|
||||
unknown_sessions.add("same-agy")
|
||||
assert wait_same() == 1
|
||||
assert json.loads(same.read_text())["owner_pid"] == live.pid
|
||||
@@ -1188,7 +1190,7 @@ def test_id_order_create_waits_for_orphan_herdr_session_of_a_killed_create(
|
||||
|
||||
res = create_b()
|
||||
assert res.returncode == 1, res.stdout + res.stderr
|
||||
assert name_a in res.stderr and "kill-session -t " + name_a in res.stderr
|
||||
assert name_a in res.stderr and "bash .agents/skills/multi-agent-mux-stop/scripts/stop_session.sh --session " + name_a + " --herdr-session orphan-ws" in res.stderr
|
||||
assert "its herdr session is alive" in res.stderr
|
||||
assert name_b not in _read_rows(mam_sandbox)
|
||||
assert name_b not in json.loads(Path(mock_herdr).read_text()).get("agents", {})
|
||||
|
||||
Reference in new issue
Block a user