Repository navigation
fix: preserve downstream Cargo config during daemon observation - #50
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
🟡 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)); |
This was referenced Sep 12, 2026
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
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.tomlwith[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.