Repository navigation
Conversation
… identity comparison
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "test(herdr): cover Windows drive-letter ..." | Re-trigger Greptile |
Adds the regression coverage the review asked for. `cygpath` ships only with Git for Windows, so the cases stub it and therefore run on every platform; the adapter guard matches only `[A-Za-z]:[\/]*`, a shape that cannot occur on Linux or macOS. Three cases: a drive-letter spelling normalizes to the same identity as the POSIX spelling of the same socket, a failed `cygpath` is refused rather than compared half-converted, and empty `cygpath` output is refused. Verified the cases fail for the right reason: with the guard removed, the normalization case reports an empty identity against the expected POSIX path.
|
Added the regression coverage in Three cases in
I checked the cases can fail for the right reason rather than just passing: with the guard removed, the normalization case reports an empty identity against the expected POSIX path. One note in case you see it on your side too. On this host 🤖 Generated with Claude Code |
|
Tested together with #8181 on native Windows (Windows 11, Git for Windows 2.51.0 / MSYS2, no WSL, Herdr 0.9.3). Together they make a Herdr spawn and cleanup work end to end there with a Git Bash pane, clearing the four defects tracked in #3283. Setup. This PR's head ( Results on the combined tree
Control: main + #8181 without this PR. The same spawn is refused before any pane work: So this PR is what lets #8181's Windows fixes take effect. Both need |
|
This PR doesn't carry the no-mistakes attestation that CONTRIBUTING.md requires and hasn't had activity since August, so I've opened #8185 as a no-mistakes replacement: the same two commits, unchanged, with @3min-lang as their author. It pairs with #8181, as verified above. Suggest closing this PR in favour of #8185. @3min-lang, thanks for the fix, and if you'd rather re-push it through no-mistakes yourself, say so and I'll close #8185. |
|
Speaking as Kun's firstmate: Thanks @3min-lang for this fix and for the careful regression cases, and thanks @cr101 for the native Windows run with #8181. I read the whole thread and compared the branches. #8185 carries your two commits unchanged, still authored by you, rebased onto main So we're taking the fix forward on #8185. You don't need to do anything. If you'd rather re-raise it yourself through VISION.md, per rule: aligns on every rule. One captain, one interface: a refused Herdr spawn leaves no usable crew. Authority stays explicit: an unconvertible path is still refused. Scripts own the mechanics. Restart is a non-event: n/a. Delegation with a spine: aligns. The fleet outlives any vendor: it binds to the socket path Herdr actually reports. Scope: backend adapter. |
|
Speaking as Kun's firstmate: Thanks again @3min-lang. Your two commits have landed on main through #8185 (merge 2886bbe), with you still credited as their author. I'm closing this PR as superseded so there's one source of truth for the socket-path fix (#3283 defect 1). Thank you for the fix and the regression cases. |
Problem
On native Windows the herdr server injects and reports drive-letter socket
paths (
C:\Users\...\herdr.sock), while the launcher's claimed socket arrivesin POSIX spelling.
fm_backend_herdr_socket_identitycompares the twoliterally, so the same socket compares unequal. That comparison is the single
owner for the presentation session lock and the launcher-identity
same-session proof, so both reject a socket that is in fact their own.
Fix
Convert a drive-letter path to its POSIX spelling with
cygpath -ubefore theexisting directory resolution, so both sides land in the same form.
The
caseguard matches only[A-Za-z]:[\/]*, a shape that cannot occur onLinux or macOS, so
cygpathis never invoked there and behaviour on thoseplatforms is unchanged. An unresolvable drive-letter path returns 1 rather than
comparing a half-converted string.
Testing and scope
bin/fm-lint.sh bin/backends/herdr.shclean.main:fm_backend_herdr_socket_identitystill comparesthe two spellings literally, so the mismatch this fixes is still present.
Scope note, stated because it limits what this PR can be said to fix: on the
Windows host where this was found,
fm_backend_herdr_presentation_session_lock_pathfails earlier, at
fm_backend_herdr_presentation_lock_namespace_valid, whichrequires mode
700. Git Bash mounts both/cand/tmpwithnoacl, somkdir -m 700is a silent no-op there and the namespace directory reads755.That is a separate defect with a separate cause, and this PR does not address
it. So this change is offered as a correctness fix to the identity comparison
itself, not as an end-to-end repair of presentation locking on Windows.
🤖 Generated with Claude Code