fix(client): retain the published Unix socket path - #1003
Merged
Merged
Conversation
Refs #1002. Extract the repair from 42f5e71 without integration-only changes. Preserve owner, symlink and peer-identity checks while avoiding removed hard-link staging aliases. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
BunsDev
marked this pull request as ready for review
September 10, 2026 14:34
This was referenced Sep 10, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review comments remain, and all supplied assessments approve the change.
Pull request overview
Fixes macOS Unix socket discovery by preserving the published coven.sock path instead of a temporary hard-link alias.
Changes:
- Retains the validated socket leaf beneath the canonical home.
- Adds regression coverage for staging-link removal and authenticated communication.
File summaries
| File | Description |
|---|---|
crates/coven-client/tests/health.rs |
Verifies the endpoint remains usable after staging-link removal. |
crates/coven-client/src/discovery.rs |
Preserves the published socket path during discovery. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective and scope
Refs #1002. Extract the proven two-file repair from draft #931 commit
42f5e7122cf4ef518fa1fc8c14d87b3dc8ab2525onto main, independently of theWindows startup investigation.
On macOS, canonicalizing a hard-linked Unix socket can select its temporary
publication alias. Removing that alias then invalidates the cached endpoint,
although the authenticated socket remains published as
coven.sock.Keep the selected leaf beneath the already-canonical home.
Contracts and authority impact
Consulted
AGENTS.md,README.md,CONTRIBUTING.md, the client manifest,crates/coven-client/src/discovery.rs, Unix connection/peer validation incrates/coven-client/src/transport/unix.rs, andtests/health.rs.Both symlink checks, socket type, ownership, permissions, device/inode binding,
and peer-identity validation remain intact. Transport code is unchanged.
There are no API, dependency, schema, migration, or deadline changes. Fixtures
are synthetic and use the existing isolated home allocator.
Evidence
On current-main base
735e2f056a39eea1312662985fef34526f2ae90c, the new realsocket regression failed natively on macOS with
ENOENTafter staging removal.After the production repair:
Parent independently reviewed the diff and repeated both test selections.
The regression uses real bind, private permissions, hard-link publication,
discovery, alias removal, and an authenticated client request/reply; it does
not mock canonicalization. Native CI
34487860355passed at headeb180326b86c0095116b7761ec8f62d9d55d9391, testing merge993c566613b6bbbc043b2ea548e474750e0e5ce5. Linux executed the new regressionand all 41 health cases; Windows workspace, Linux lint, policy, dependency
audit, and the required PR gate passed. macOS was skipped by CI classification;
the native local macOS red/green evidence is recorded above. The health target
is Unix-only, so Windows compilation cannot count as executing this regression.
The repair already participated in real-daemon journeys in #931, but that
draft's broader acceptance remains open.
Rollback and limitations
Revert the two-file patch; no state migration is required. Reverting can
reintroduce the stale-alias failure. This PR does not resolve Windows startup
reliability, advance the Threads compatibility pin, merge the authority stack,
or provide human coherence/freeze approval.