Skip to content

fix(client): retain the published Unix socket path - #1003

Merged
BunsDev merged 1 commit into
mainfrom
fix/1002-published-socket-path
Sep 10, 2026
Merged

BunsDev merged 1 commit into
mainfrom
fix/1002-published-socket-path

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 10, 2026

Copy link
Copy Markdown
Member

Objective and scope

Refs #1002. Extract the proven two-file repair from draft #931 commit
42f5e7122cf4ef518fa1fc8c14d87b3dc8ab2525 onto main, independently of the
Windows 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 in
crates/coven-client/src/transport/unix.rs, and tests/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 real
socket regression failed natively on macOS with ENOENT after staging removal.
After the production repair:

cargo test --locked -p coven-client --test health
# 41 passed
cargo test --locked -p coven-client --lib -- discovery::tests transport::unix::tests
# 37 passed
cargo clippy --locked -p coven-client --all-targets -- -D warnings
cargo fmt -p coven-client --check

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 34487860355 passed at head
eb180326b86c0095116b7761ec8f62d9d55d9391, testing merge
993c566613b6bbbc043b2ea548e474750e0e5ce5. Linux executed the new regression
and 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.

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
BunsDev marked this pull request as ready for review September 10, 2026 14:34
Copilot AI lite review requested due to automatic review settings September 10, 2026 14:34
@BunsDev
BunsDev merged commit dabeab9 into main Sep 10, 2026
19 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants