Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no actionable defects were found. Reviews (2) · Last reviewed commit: "fix(herdr): resolve relative eventwait s..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thank you @karanmrn for tracking this down and for the clear before/after reproduction. Connecting by basename from the socket's own directory is a neat way around the AF_UNIX length cap, and the regression test shows the reader failing on main and subscribing with the fix. I read head This is waiting on you. Here's what's needed:
Contract-class: restore. The push-event fast path is the documented default (docs/herdr-backend.md, "Push events and polling fallback"), and a long socket path broke it. VISION: One captain aligns (blocked workers escalate promptly again). Authority: n/a. Scripts own the mechanics: aligns. Restart: n/a. Delegation with a spine: aligns. Vendor: aligns (Herdr adapter transport only, verified against the protocol). Scope: aligns (an adapter fix with regression coverage). Related: #8197 makes the same basename fix for |
AF_UNIX addresses are capped near 104 bytes on macOS. A Herdr session socket under a deep home exceeds that, so herdr-eventwait.py failed to connect with exit 2 and every wait fell back to polling. Connect by basename from the socket directory. Refuse a relative socket path, matching the rule herdr-workspace-move.py already enforces, so the chdir cannot change what the path resolves to.
Herdr reports a relative session socket when XDG_CONFIG_HOME is relative. The reader refused such a path with exit 2, so every supervision wait on that setup fell back to polling. Resolve the path with os.path.abspath before splitting it into the socket directory and basename, and test both a descending relative path and "../herdr.sock".
ce2e22a to
d2ae3f5
Compare
|
Note 🤖 Claude Opus 5.5 responding on behalf of karanmrn Relative socket paths connect again. The new head is d2ae3f5. The live scenario still could not be driven, because the lab's safety check refused to start a session. Relative socket paths (d2ae3f5). The reader resolves the path with It passes now. Live validation. No real Herdr session was run. With Herdr itself reported the default session at that root like this (home prefix shortened): That socket path is 182 bytes. So the helper could not start a lab session, and nothing was provisioned. The long-path and relative-path cases are covered by the regression tests, which drive the real reader against a real AF_UNIX listener. |
|
Speaking as Kun's firstmate: thank you @karanmrn for the re-raise on tip What changed since the last ask. Relative socket paths now resolve with Live validation. A real named Herdr session under a deep Contract-class: restore. The push-event fast path is the documented default. VISION: unchanged and aligns. Related #8197 still does not block this. Where it stands: waiting on CI. Nothing for you to do unless a quick check fails because of this change. Once coverage guard and repo invariants are green, this is a |
|
Hi, a gentle check-in on this one. The 6 Nov triage note says the next step is the |
Intent
Contribute this fork fix to kunchenguid/firstmate as an upstream pull request: Herdr eventwait cannot connect when the Herdr socket path is long. The fix is fork commit d36931b on karanmrn/firstmate. If upstream main already fixes the bug, open nothing and report that.
The referenced fork commit d36931b ("fix(herdr): connect eventwait on long socket paths") changes bin/backends/herdr-eventwait.py to connect to the Herdr control socket by basename after changing into the socket's directory, because AF_UNIX socket addresses are capped near 104 bytes and a Herdr session socket under a deep home exceeds that; it also rejects a relative socket path with exit 2 and a "must be absolute" message. It adds tests: a shell test in tests/fm-backend-herdr.test.sh that connects herdr-eventwait.py to a throwaway AF_UNIX listener beyond the 104-byte limit, a shell test that a relative socket path is refused, and updates the Python unit tests in tests/fm-backend-herdr-eventwait.test.py to pass an absolute socket path and stub the chdir.
What Changed
Risk Assessment
🚨 High: The change contradicts an explicit acceptance requirement and requires human resolution before merge.
Testing
Focused Python checks and real reader CLI scenarios passed against disposable AF_UNIX peers. Baseline failure, target recovery, relative paths, and failure exits were recorded. Real Herdr integration remains untested under the previously accepted tripwire limitation. Cleanup completed.
Evidence: Reader CLI transcript and lab preparation result
Source: Reader CLI transcript and lab preparation result
Evidence: Scenario results
Source: Scenario results
Evidence: Reproducible CLI scenario driver
Source: Reproducible CLI scenario driver
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/backends/herdr-eventwait.py:94- The intent requires that the reader "rejects a relative socket path with exit 2 and a 'must be absolute' message". The changed hunk instead usesos.path.split(os.path.abspath(sock_path)), accepting relative paths and removing the required diagnostic. Related sites are bin/backends/herdr-eventwait.py:22, which documents acceptance, and tests/fm-backend-herdr.test.sh:6248, :6251, :6305, and :6861, which implement and assert relative-path acceptance. This additional acceptance path contradicts the required contract. Remove relative-path support and its test modes, restore the rejection regression, and retain the absolute long-path fix.✅ **Test** - passed
✅ No issues found.
python3 -B tests/fm-backend-herdr-eventwait.test.pypython3 -B ~/.no-mistakes/evidence/01M6PK2DETB7XQAZ2F1YV4X806/drive-eventwait.pyExecuted the base reader from b77b66cb999876c4db19da36b9af5baaacdd52e5 against the same long-path listener to reproduce exit 2.Attemptedbin/fm-herdr-lab.sh preparewith an isolated workspace-local environment.Confirmed the target head, clean worktree, completed driver exit status, reaped listener children, and removed scratch directories.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.