Skip to content

fix: preserve existing workspace and skill destinations - #44

Merged
ts-76 merged 4 commits into
mainfrom
fix/sync-path-protection-40
Oct 3, 2026
Merged

ts-76 merged 4 commits into
mainfrom
fix/sync-path-protection-40

Conversation

@ts-76

@ts-76 ts-76 commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Protect existing workspace and skill destinations during sync. Only recorded owned symlinks can be replaced or retired; real files/directories and unrelated links are preserved. Atomically retire a leaf before inspecting it, keep recovery data, and stop if a competing writer replaced it. Serialize managed repository/skill-link sync with an exclusive lease, probe case sensitivity on the actual workspace volume, and retain the observed target when a desired repository is unavailable.

Closes #40. Recovery directories are retained for manual inspection. Relative links must be restored to their original parent before use. The lease covers managed links; resources, generated workspace/AGENTS files and arbitrary external writers are outside it. Concurrent replacement of ancestor directories is not claimed safe; this limitation and recovery steps are documented.

Latest audited main (#39) is merged forward. Automatic tags/releases and npm publication remain disabled. Existing Copilot findings are fixed and all threads resolved; fresh review remains unavailable from the earlier quota limit.

Validation at e0fa42742406a8a53e0a59dd46c692f85d2824a8: frozen root/UI installs, lint, root/UI TypeScript, 79 tests, full CLI/UI build and real package tarball checks pass. Root Bun, UI Bun and root npm audits: 0 vulnerabilities. Final-head CI37118177218 and Security37118177211 (audit + CodeQL) both succeed. Earlier independent sync review and built CLI lifecycle results remain documented.

@ts-76
ts-76 marked this pull request as ready for review October 3, 2026 09:31
Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:31

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Copilot review overview

🟡 Changes recommended

Skipped repositories can corrupt ownership metadata, and link removal still has filesystem race conditions.

Review effort: Balanced
Findings: 1 High severity · 2 Medium severity

Open (3)

Comment thread src/workspace/safe-links.ts Outdated
Comment thread src/workspace/safe-links.ts Outdated
Comment thread src/workspace/sync-workspace.ts Outdated
@ts-76
ts-76 merged commit d657654 into main Oct 3, 2026
6 checks passed
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.

Sync時の既存フォルダ・ファイルを保護する

2 participants