fix(issue-50): review findings of PR #56 on macOS

- admission: a `submit --dry-run` record is marked dry_run and is not an
  open job of its session (review 1e25cf2f F1)
- create: the monitor-row adoption requires the row's server to be the one
  this create spawned on (review 1e25cf2f F2)
- pane lock: retry only on contention (BlockingIOError); the docs say the
  flock lasts while any fd-9 holder (the claim shell and the shim) lives
  (review 66680d9d)
- tests on macOS: real-herdr box HOMEs under /tmp (sun_path is 104 bytes),
  resolved paths, the fake claude reads non-canonical input (MAX_CANON 1024)
  and the pane is read unwrapped; lock holders exec their sleep so killing
  them frees the lock; the adoption tests name the server

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VCgu9Fa9iT7TbJUSzdq4Ff
This commit is contained in:
GodopuandClaude Opus 5.5 committed 2026-10-12 09:03:08 +09:00
1 parent 320aa9f7a0
commit a9ffedac36
10 files changed
+75 -19

No files matched your search

+4 -2
View File
@@ -1495,8 +1495,10 @@ _herdr_scope_is_pane_inherited() {
# later `agent start` failed with agent_pane_busy. mam_herdr runs the whole
# new-session call holding one lock per server: a flock on fd 9, opened for
# the block below and taken by lib_py.pane_lock (which also bounds the wait,
# MAM_PANE_CLAIM_WAIT_S). It ends with the block or with this process, however
# that ends, so a dead holder leaves nothing behind; the file is the target
# MAM_PANE_CLAIM_WAIT_S). It ends with the block, or when every process that
# holds fd 9 - this shell and the shim it runs - has ended, however that ends,
# so a dead holder leaves nothing behind. Nothing long-lived may inherit fd 9
# (the herdr server is spawned with close_fds; review 66680d9d); the file is the target
# server's, so other servers' creates are not held. The lock lives here, not
# in the shim heredoc, which stays byte-identical (test_issue23_24 S11).
#