test: review round 1 of Issue #71 (names, row-less stop server, migration retry)

- create with a non-ASCII name: the attach target is the name herdr has;
  bash/Python parity for non-ASCII and option-like names; no python3 is
  an error for a non-ASCII name.
- row-less stop without --herdr-session uses HERDR_SESSION_NAME; an
  unreadable row is not taken for no row.
- a retry (entry point, or any write) repairs a YAML a failed migration
  left in format 1.
- tier3: the "cannot infer agent" case registers its row, as tier1 does.
- S11: base re-pinned to 5cd72d2, which changes the shim's sanitize body.

Refs #71

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GodopuandClaude Opus 5.5 committed 2026-10-25 17:35:58 +00:00
1 parent 9410913da9
commit a6fb39ba9f
3 files changed
+97 -6

No files matched your search

+4
View File
@@ -393,6 +393,10 @@ def test_integration_invalid_arguments_exit_statuses(mam_sandbox, mock_herdr, mo
assert "ERROR: --session required" in res.stderr
# 3. stop_session.sh cannot infer agent from weird session name
# (Issue #71: a session with no row needs no agent kind, so the row is
# registered here, with no agent, suffix or pane.cmd)
(tmp_path / ".mam" / "agent-sessions.yaml").write_text(
"herdr_sessions:\n- name: bad-name\n status: running\n pane: {}\n")
res = subprocess.run(["bash", str(stop_script), "--session", "bad-name"], capture_output=True, text=True, cwd=str(tmp_path))
assert res.returncode == 2
assert "ERROR: cannot infer agent" in res.stderr