Repository navigation
Fixed read-only sync checks and link comparisons - #61
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Exact-root symlinks can escape the private copy, warning forwarding loses supported diagnostics, and documentation inconsistencies remain.
6 open findings
Retarget exact repository-root links to the staging project · New Preserve cached indented warning diagnostics · New Preserve indented renderer warning diagnostics · New Replace stray question mark with an em dash · New Replace stray question mark with an em dash · New Update CLI rule for the private-copy check contract · New
What changed in this PR
This PR makes sync --check render in an isolated project copy, preserving live concurrent edits while comparing symlinks without dereferencing them.
Changes:
- Adds private-copy rendering and entry-kind-aware comparisons.
- Fixes cache, manifest restoration, warning, and path-handling behavior.
- Expands regression coverage and documentation.
| File | Description |
|---|---|
intelligence/rules/engine.md |
Documents isolated check rendering. |
engine/sync.sh |
Compares files, directories, and links directly. |
engine/lib/common.sh |
Clarifies manifest cache behavior. |
docs/cli.md |
Documents check semantics and adapter roots. |
decisions/0018-check-whether-sync-is-needed.md |
Records the isolation amendment. |
cli/tests/unit-manifest.sh |
Tests manifest cache invalidation. |
cli/tests/e2e-sync-check.sh |
Adds check-mode regressions. |
cli/tests/e2e-sync-cache.sh |
Fixes the mawk failure fixture. |
cli/lib/sync-cache.sh |
Implements private rendering and cache behavior. |
cli/lib/manifest.sh |
Invalidates manifest views after writes. |
cli/lib/cli-common.sh |
Shares list caching and supports source-preserving restore. |
cli/internal/restore.sh |
Adds source-preserving restoration. |
cli/intelligence |
Handles doubled-slash invocation paths. |
cli/commands/sync.sh |
Clears inherited check state and preserves sources. |
CHANGELOG.md |
Records the fixes under 0.20.0. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Verification - PASShead: d1b3916 - steps: 5077754756e3c7739bcb91b951ec41d0958236014c1fba163f9f50a9643346f5 - env: local (WSL Ubuntu, Bash 5.2.21, native Linux symlinks)
The exact fixture ran from the assigned checkout. Full gates and the mawk probe used a temporary Linux-native export of that same Git commit, with no code edits. The checkout remained clean at the named head before and after execution. There is no |
Code review - BLOCKhead: d1b3916 - base: main - files 15, +283/-90 Critical
Warning
SuggestionNone. Reviewed the complete diff, applicable CLI/engine/shell/documentation and global rules, accepted decisions, PR body, issue #60 and the existing verification report. Regression coverage addresses the reported #60 cases; the external relative adapter-input case above is absent. The reviewed diff contained no live-secret matches. Assigned checkout was clean and remained at the reported head; the independent reproduction used only a disposable Linux-native temporary fixture. No code was edited. |
Verification - PASShead: a209d67 - steps: bb05b83113490a0cf2be15607e07ad947817b46feb2db4be680fff52187be743 - env: local (WSL Ubuntu, Bash 5.2.21, native Linux symlinks)
The exact fixture ran from the assigned checkout. Full gates and the mawk probe used a temporary Linux-native export of that same Git commit, with no code edits. The checkout remained clean at the named head before and after execution. There is no Additional observed diagnostic: each forced fixture check emitted |
Code review - BLOCKhead: a209d67 - base: main - files 16, +399/-92 Critical
Warning
SuggestionNone. The previous Critical external-relative adapter-input reproduction now passes, and the new regression covers it. Read the entire current PR diff against main, the current body, applicable rules and accepted decisions, and issues #60, #62 and #63. Issue #63's trailing-slash diagnostic is present in base The reviewed diff contained no live-secret matches. Assigned checkout remained clean at the reported head. All independent behavioral probes used disposable Linux-native temporary fixtures, with no checkout or ref changes. |
Code review - PASS-WITH-WARNINGShead: 724d75d - base: main - files 16, +483/-94 CriticalNone. Warning
SuggestionNone. Reviewed the complete final diff against main, the current PR body, applicable project/pack rules, accepted decisions, and the relevant issue/review history. No undeclared scope, live-secret matches, gate weakening, or further evidenced correctness findings were found. Added behavior has regression coverage in Independently repeated both prior Critical reproductions on WSL Ubuntu with native symlinks: the relative external project-adapter input remains usable; changing bytes behind an accepted
|
Verification - PASShead: 724d75d - steps: 664d0da810197f8387c9b0264d3518c909edea2a283112a9aac912e91cbd0dc0 - env: local (WSL Ubuntu, Bash 5.2.21, native Linux symlinks)
The exact fixture ran from the assigned checkout. Full gates and the mawk probe used a temporary Linux-native export of that same Git commit, with no code edits. The checkout remained clean at the named head before and after execution. There is no The exact final fixture emitted no false |


Summary
Made
sync --checkpreserve concurrent edits by rendering in a private project copy and compare links without following them. Fixed the remaining correctness and portability findings in #60. Closes #60. Closes #63.Type of change
Public CLI check
intelligence syncVerification
Run from the PR checkout on Linux or macOS with Bash and native symlinks. The fixture has local sources, a Claude target, and a project adapter that emits dangling and relative generated links. All commands succeed except the explicitly captured check after switching a link into an identical-byte file, which must exit 2. Checks preserve the generated link and personal notes, plain sync ignores inherited check state, and a second sync remains current.
bash cli/tests/verify.sh allreportsverify okstatus --checksucceeds and a second sync remains currentAutomated regressions in
e2e-sync-check,e2e-sync-cache, andunit-manifestcover accepted directory-link output roots, refused external/file/dangling output roots, normalized source diagnostics, external relative adapter inputs, exact-root output ancestors, relative-to-absolute link spelling changes, complete warning forwarding, link entry kinds/targets, executable bits, concurrent writes, inherited environment state, doubled slash invocation, managed siblings, warning forwarding, unchanged manifests during store restoration, trailing source slashes, fresh output absence, and manifest cache invalidation.e2e-sync-cachealso passes with mawk.Versioned artifacts
CHANGELOG.mdversion 0.20.0v0.20.0is unpublished; the published 0.19.0 changelog remains byte-identicalNotes for reviewers
Private checks relocate internal absolute links, preserve external relative read-input resolution, and keep generated relative link spelling unchanged. Targets are compared in the original project coordinates. Project adapters see a temporary absolute root; adapters that embed that root in output may report a difference, as documented in
docs/cli.mdand decision 0018. The copy excludes Git history. Output-only cache changes render to distinguish generated changes from preserved siblings.Comparator process batching is tracked in #62. Larger suggestions remain for the owner: separate cache records per environment, removing test-only
qmap_preload/lock_validate, and consolidating fingerprint pipelines and contract-reader implementations. These require separate design/coverage work and do not affect the corrected check result.