Skip to content

fix: preserve downstream Cargo config during daemon observation - #50

Merged
BunsDev merged 1 commit into
mainfrom
fix/daemon-observation-cargo-config
Sep 12, 2026
Merged

BunsDev merged 1 commit into
mainfrom
fix/daemon-observation-cargo-config

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 12, 2026

Copy link
Copy Markdown
Member

Objective

Complete #49 advisory observation setup under the existing scoped authorization #31 (comment). First hosted run https://github.com/OpenCoven/coven-threads/actions/runs/34677886218 failed safely at preflight because the actual daemon includes .cargo/config.toml with [net] git-fetch-with-cli = true. Receipt artifact: https://github.com/OpenCoven/coven-threads/actions/runs/34677886218/artifacts/10292714338. No daemon acceptance is claimed for that run.

Change

Preserve the existing regular config file byte-for-byte and append the local Threads patch in the disposable checkout. Record before/overlay configuration hashes alongside lock hashes. Support legacy config filename without shadowing it; refuse ambiguous filenames, symlinks and Cargo patch conflicts rather than silently overriding. This retains nested metadata behavior and exact-current-checkout proof.

Evidence

40 targeted runner/pin tests pass, including new real-shape downstream config preservation and ambiguous-name refusal; indexed privacy guard and diff whitespace pass. The first failed hosted attempt remains retained, not overwritten by a retry.

Impact and rollback

No runtime authority, Rust API/schema, dependency manifest, stable pin, required check or ruleset change. No human gate change. Revert this follow-up to restore the earlier explicit preflight refusal. After normal landing dispatch a fresh exact-head observation; do not claim green until that execution succeeds. Tracking #31 / threads-cxv.1.

The first hosted observation exposed a real daemon config containing net.git-fetch-with-cli. Preserve that configuration and append the explicit Threads patch rather than rejecting every existing config. Retain config and lock hashes and fail on ambiguous names or conflicting Cargo tables.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 12, 2026 06:22
@BunsDev
BunsDev merged commit df696c3 into main Sep 12, 2026
7 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.

🟡 Changes recommended

A critical fail-closed symlink handling issue remains unresolved.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Preserves downstream Cargo configuration during daemon observation while applying the local Threads patch.

Changes:

  • Supports legacy/current Cargo config filenames and records configuration hashes.
  • Rejects ambiguous configurations and documents overlay behavior.
  • Critical issue: dangling symlinks can bypass fail-closed validation.
File summaries
File Summary
scripts/tests/daemon-canary.test.mjs Tests config preservation, filename handling, and ambiguity refusal.
scripts/run-daemon-canary.mjs Implements configuration overlay and hashing; requires dangling-symlink handling fixes.
docs/testing/e2e-contract.md Documents overlay and evidence requirements.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +104 to +105
const configs = ["config", "config.toml"].map((name) => join(configDir, name))
.filter((path) => existsSync(path));
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