Repository navigation
test(source): cover URL re-add and shared-cache ownership - #931
Conversation
The PR description includes sufficient real-CLI verification for this runtime change. |
c9ea129 to
bc6f01e
Compare
|
Addressed the old-URL cache finding by combining the URL-specific cache implementation and scoped installation manifests in #929. This branch now includes that complete fix and adds a focused CLI regression: remove alpha, re-add the same alias with beta's URL while alpha's old clone remains, then remove alpha again while beta shares the cache and its remote is offline. The test verifies beta's content, manifest, cache, cleanup, and unchanged successful-pull timestamp. Landing order is #929 first, then this test-only follow-on. Both PRs remain open; the description explains the shared commits and rebasing after #929 lands. Build, typecheck, lint, 74 focused unit tests, and all three source CLI tests pass. Full-suite baseline limitations are documented separately. |
|
Finding
Previous Finding
The PR description includes sufficient representative real-CLI verification. The recorded commit predates the head, but that is non-blocking under the review rules. |
bc6f01e to
919355e
Compare
|
Addressed the shared-physical-destination finding in #929's combined implementation and rebased this dependent test commit on top. New manifests record their destination root, and the shared removal helper checks other active source manifests before deleting a physical path. Both explicit removal and stale cleanup now leave B's skill and manifest intact when A releases its ownership; B's later removal deletes the final owned path. The guard also covers different aliases and symlinked/overlapping destinations. Four new real-CLI shared-HOME cases fail on the prior implementation and pass with the fix. The dependency additionally retains a scoped cleanup path after shared team configuration removes an alias. Landing order remains #929 first, then this regression-only follow-on. Exact verification is recorded in the updated descriptions. |
|
Findings
Previous Findings
The PR description includes sufficient representative real-CLI verification. |
919355e to
fa45902
Compare
|
Addressed the sequential ownership findings together in #929 and rebased #931's regression-only follow-on on top. Different repositories can no longer overwrite an already owned shared destination. Conflicts are checked before any copy; existing working copies survive new target conflicts, and repository replacements cannot relabel historical paths. Push checks actual scanned paths, quarantines ambiguous legacy names, and fails closed for malformed/unreadable ownership records. Source mutations use the existing atomic lock; previews no longer mutate repository caches. Legacy records are deliberately not migrated into deletion authority: their destination is unknown, so doing so would recreate the original unrelated-file deletion risk. They remain preserved, with push quarantine and a documented manual-review path. Missing checkouts are likewise not treated as proof of abandonment. Full concurrent push/source publication isolation remains a documented P2 limitation rather than an unsafe inferred cleanup or a new broad locking protocol. The descriptions include exact final-head verification, 196 focused unit tests, 94 loader regressions, nine real-CLI cases, negative controls, and the separately reproduced sandbox-only full-suite failures. Landing order remains #929 first, then #931. |
|
No findings.
|
fa45902 to
aca8b20
Compare
|
Addressed the remaining ownership-release findings in
Eleven negative-control failures reproduce these cases on the previous implementation. Updated validation: build/typecheck/lint pass; 206 focused tests and 94 read-only-loader tests pass; all 13 real-CLI cases pass on both heads with retries disabled. The full unit run has 6,708 passes, 22 failures, and one skip; all 22 failing test names exactly match the separately reproduced untouched-main sandbox baseline described in the PR body. An isolated loader timeout during concurrent validation passed on its dedicated rerun. The two latest code findings are covered by unit and real-CLI regressions. Conservative legacy/orphan handling and the documented full push/source transaction-isolation limitation remain unchanged. Exact-head hosted CI is still being followed. Landing order remains #929 first, then #931. |
|
Finding
Review Notes
|
aca8b20 to
bd02c10
Compare
|
Both newly reproduced alias transitions are addressed in
The new real-CLI negative controls fail on the previous head: beta rolls revision B back to A, and stale beta removal deletes alpha's replacement URL from YAML. Both pass now. Coverage exercises distinct commits, TTL reuse, offline fallback, removal under both aliases, known/unknown stale identities, and dry-run preservation before any later pull can repair state. Build/typecheck/lint pass; 207 focused tests and all 94 read-only-loader regressions pass. All 16 source real-CLI cases pass on both heads with retries disabled. The full unit run has 6,709 passes, the same 22 untouched-main sandbox failures, and one skip. The cache readers/writers, TTL, alias removal, replacement, and physical-path transitions were reviewed together. Updated docs retain the explicit legacy/orphan and full push/source transaction-isolation limits. Exact-head CI and review are still pending. Landing order remains #929, then #931; #931's unique change remains the 35-line crossover regression. |
|
No findings.
|
bd02c10 to
f2ed4fd
Compare
|
The deletion-authority finding is fixed in Manifest reads now reject empty/root-equivalent, escaping, absolute, drive-relative, and NUL-containing paths, plus unsafe fallback skill names. Invalid records are rejected before source removal changes YAML or files. Cleanup also independently refuses lexical root equality and resolved physical roots/ancestors. Public source names pass the same relative-path safety check before deployment; legitimate nested names remain supported. Twenty negative validator fixtures were accepted by the previous code and are rejected now. The built CLI also rejects eight malformed cleanup attempts while preserving configuration bytes, the invalid manifest, and the installed skill, and releasing its lock. Build/typecheck/lint pass. Validation is now 231 focused tests, 94 read-only-loader tests, and 16 real-CLI cases on each head, with retries disabled. The full unit run has 6,733 passes, the same 22 reproduced untouched-main sandbox failures, and one skip. Independent review of the validator and deletion boundaries found no further concrete bypass. Exact-head hosted CI and the new review are still pending. |
|
Finding
Review Notes
|
f2ed4fd to
afe9001
Compare
|
Addressed the name-priority and removal-order findings in
Ten negative name fixtures and a real-CLI malformed-peer case reproduce the previous failures. Added coverage also preserves team/builtin script directories when a stale nested source is removed, and verifies ordinary canonical nested deployment/withdrawal still works. Build/typecheck/lint pass; 244 focused tests and 94 read-only-loader tests pass. All 16 real-CLI cases pass on both heads with retries disabled. The full unit run has 6,746 passes, the same 22 untouched-main sandbox failures, and one skip. Updated descriptions document the current behavior and existing limits. Exact-head hosted CI/review are being followed; landing order remains #929 then #931. |
|
Findings
Review Notes
|
|
|
||
| Git subscription caches are keyed by repository URL hash and shared across aliases, so the same URL shares its revision and TTL while different URLs remain isolated. Changing the URL uses the newly configured repository’s cache; a failed pull uses only that repository's cache. `source remove` retains repository caches for other installations. | ||
|
|
||
| Git source installations are keyed by team checkout and destination (HOME, project, or worktree). `source remove` releases the current installation and retains shared caches/other owners. It can still clean a scoped record after another destination removed the alias from shared team configuration. If that alias was re-added for a different repository, stale or unidentified records authorize only local cleanup and preserve the new subscription. Physical paths remain until their last source owner releases them. |
There was a problem hiding this comment.
Please do not modify this skill
afe9001 to
8362373
Compare
|
Addressed the nested ownership and provenance findings in
Validation on these heads: build, typecheck, and lint pass; 302 focused tests and 94 read-only loader regressions pass; all 22 real-CLI cases pass on each head with retries disabled. The six new parent/child CLI scenarios fail on the prior implementation and pass with this guard. A built-CLI list/show smoke also verifies nested labels, duplicate aliases, and unrelated-copy isolation. The full local unit run has 6,907 passes, one skip, and the same 22 MCP sandbox failures reproduced on untouched |
|
Finding
All previously reported implementation findings remain resolved. The PR description includes sufficient representative real-CLI verification. Tests were not run, per instruction. |
8362373 to
8dcd8aa
Compare
|
Fixed physical-destination ownership in
All 37 new focused pin regressions pass, including both leaf-link transition negative controls. Three real-CLI negative controls reproduce the previous deletion/overwrite and now pass, with exact YAML/manifest preservation and successful recovery after restoring the original link. Final validation on both heads: all 25 real-CLI cases pass with retries disabled; build/typecheck/lint pass. There are 339 focused passes plus 94 loader passes. Full units: 6,944 passed, one skipped, and exactly the same 22 sandbox failures reproduced on untouched main The core-skill diff remains empty in accordance with the explicit human review instruction. The automated P2 request to add that text back conflicts with this instruction; the bilingual usage guides and directory design carry the safety guidance. Exact-head hosted CI/review are being followed. No PR has been merged or closed. |
|
Finding
All previously reported implementation issues remain resolved. The PR description includes sufficient representative real-CLI verification; its older recorded head is non-blocking. Tests were not run, per instruction. |
8dcd8aa to
ada8cea
Compare
|
Addressed the path-scoped push finding in Modern manifests with complete physical pins are now excluded only by owned physical paths. A Claude source The negative real-CLI case reproduces the previous silent omission. The fixed CLI selects and publishes the independent Codex payload to the fixture's local bare repository, while preserving/excluding Claude's source-owned bytes. Legacy and scoped-unpinned cases remain quarantined. All 21 new focused cases and three CLI cases pass. Final verification: build/typecheck/lint pass; 360 focused tests plus 94 loader regressions pass; all 28 source real-CLI cases pass on each head with retries disabled. The isolated full suite has 6,965 passes, one skip, and exactly the 22 failures reproduced on untouched main The core skill remains unchanged as requested by the human reviewer; the usage guides and directory design retain the documented safety and recovery limits. |
|
Finding
All previously reported implementation findings remain resolved. The PR description includes sufficient representative real-CLI verification. Tests were not run, per instruction. |
ada8cea to
e34c581
Compare
|
Restored safe Codex reconciliation in The first resolver pass remains side-effect free. After every ownership/transition and cleanup-candidate check passes, the existing resolver removes an unowned configured duplicate only when it matches both the shared copy and incoming source. Foreign/current owners, planned paths, physical aliases, repository cache, and resolved inputs are protected. Different local copies keep their conflict warning and remain push candidates; dry-run changes nothing. The same boundary review reproduced source-root link data loss. In-repository root aliases now install concrete directories; outside/dangling/looping root aliases stop before deployment. Previously installed root links keep their manifests and referents for manual review, even when an older pin exists. Ordinary nested names and stable tool-destination symlinks still work. This correction adds no further manifest fields or nested file-link migration. Thirty focused regressions and six new real-CLI cases pass. The full final validation includes 390 focused tests, 94 loader tests, and all 34 real-CLI source cases on each head with retries disabled. Build/typecheck/lint pass. Full units: 6,995 passed, one skipped, and exactly the same 22 MCP sandbox failures reproduced on untouched main Both branches are updated and their dependency remains unchanged: #929 contains the implementation, #931 adds only the 35-line crossover regression. The core-skill diff stays empty as requested by the human reviewer; bilingual usage/design documentation covers the behavior and limits. Following hosted CI and review for these exact heads. |
|
Findings
Review Notes
|
e34c581 to
4706ed7
Compare
|
Finding
Review Notes
|
|
Addressed the remaining P1 about old scoped claims without recorded paths in Validation: 26 focused new cases, 3 new built-CLI cases, and the complete 37-case source CLI suite pass on both heads with retries disabled. The full implementation run has 7,021 passes and the same 22 failures independently reproduced on untouched main in this sandbox; 416 focused plus 94 loader tests, build, typecheck, and lint pass. Hosted checks are following these exact heads. The core skill remains unchanged as requested by the human reviewer; equivalent guidance is in the bilingual usage guides and directory design. #929 remains the implementation to land first, with #931 retaining only its 35-line crossover extension as the unique change. |
4706ed7 to
8d1485d
Compare
|
Resolved the changed-toolPaths P1 in The same missing-history boundary also protected against another checkout: ambiguous foreign scoped and rootless legacy claims now veto equal/parent/child logical names before copying or cleanup. This preserves the old claim without inventing a physical path or allowing same-repository aliases to bypass it. Unrelated names and complete recorded foreign paths retain their usual behavior. All 16 affected real-CLI negative controls reproduced unsafe overwrite/deletion or lost tracking on the older builds and now pass. Final coverage: 481 focused tests, 94 loader tests, and 50 real-CLI source cases on each branch, retries disabled. Build/typecheck/lint pass. The complete unit run has 7,086 passes, one skip, and exactly the 22 failures independently reproduced on untouched main in this sandbox; hosted exact-head checks are following. The human-requested core-skill removal remains honored. Bilingual usage/design documentation explains manual review and the conservative legacy limitation; no automatic destructive migration is claimed. #929 still lands first and #931 still adds only the 35-line crossover regression. |
|
Finding
All previously reported implementation issues remain resolved. The PR description includes sufficient representative real-CLI verification. Tests were not run, per instruction. |
8d1485d to
76f4cf5
Compare
|
Fixed accepted-alias enumeration in All 49 alias-focused cases pass across the six filtered names plus an ordinary control. Both real-CLI negatives reproduce the reported risk on the prior build: a different producer overwrites Final validation: 530 focused tests, 94 loader tests, 52 real-CLI cases on each head, build, typecheck, and lint pass. Full suite: 7,135 passed, one skipped, exactly the same 22 sandbox failures reproduced on untouched main. Both branches retain the #929-first dependency and the unchanged core skill requested by the human reviewer. Following fresh exact-head hosted checks. |
|
Finding
All previously reported implementation issues remain resolved. The PR description includes sufficient representative real-CLI verification; the recorded commit predating the reviewed head is non-blocking. Tests were not run, per instruction. |
|
Final exact-head CI passed for #929 The latest #929 review has no findings; #931 confirms all implementation issues are resolved and retains only the non-blocking skill-doc request already addressed by following the human instruction to leave the core skill unchanged. Both PRs are conflict-free and remain open for maintainer re-review. Land #929 first; #931's unique diff remains its 35-line crossover regression. |
76f4cf5 to
3e776f1
Compare
|
Rebased after #929 merged. Head Build, typecheck, lint, and all 52 real-CLI source cases pass with retries disabled, including the nested-path cases. The full unit run has 7,148 passes, one skip, and 22 failures; I reran the four failing files on untouched current main and confirmed the identical 22 MCP sandbox failures, with no rebased-head-only failure. The description now reflects the merged dependency and current test-only scope. Checking hosted CI for this exact rebased head. |
|
No findings.
|
|
Hosted checks passed for rebased head Automated review reports no findings and confirms the prior skill-documentation concern no longer applies to this tests-only diff. The 35-line regression is conflict-free on main after #929's merge. The PR remains open for human re-review. |
Summary
Test-only follow-on to #929, which merged into
mainase2ca08f. Rebuilt on currentmain(aabf71c) after the squash merge, retaining only the original 35-line crossover regression insrc/__tests__/source-cache-isolation-e2e.test.ts.The regression exercises the source lifecycle through the built CLI:
Scope and dependency
#929 is already merged, so there is no remaining landing dependency. This PR contains one test commit and changes no runtime code or documentation. Existing nested-path behavior remains inherited from
main;skill-data/core/SKILL.mdhas no diff, honoring the human review request.The implementation details and its documented safety limits remain in #929 and the existing usage/design documentation.
Verification
Rebased head:
3e776f1, based onaabf71c.main(aabf71c). They are the existing MCP sandbox failures caused by the temporary-root.gitmarker where the fixtures expect to be outside any repository. No rebased-head-only unit failure remains. This is not an all-green local full-suite result.npm run build npm run typecheck npm run lint env -u CODEX_HOME GIT_DISCOVERY_ACROSS_FILESYSTEM=1 \ ./node_modules/.bin/vitest run --config vitest.e2e.config.ts \ src/__tests__/source-*-e2e.test.ts --retry 0 env -u CODEX_HOME GIT_DISCOVERY_ACROSS_FILESYSTEM=1 \ ./node_modules/.bin/vitest run --maxWorkers 4The CLI tests use temporary HOME directories, the Git provider, local bare repositories with HTTPS URL rewrites, and real
dist/index.jscommands.Hosted results for
3e776f1Exact-head CI passed: all six Linux/macOS Node 20/22/24 test lanes, Build, and fork-safe E2E succeeded. Code Erosion and Tencent scan also passed. The credentialed GitHub-provider full-surface job was intentionally skipped for this fork PR.
Automated review reports no findings, and confirms that the earlier skill-documentation concern does not apply to this tests-only diff. The PR is conflict-free and remains open for human re-review; the previous changes-requested review has not yet been superseded.