fix(loop-worktree): prevent manifest entry loss during concurrent ope… - #430
Conversation
…oncurrent-manifest # Conflicts: # tools/loop-worktree/package-lock.json
|
Thanks @AIMindCrafter for contributing a docs improvement — visible, reviewable PRs like this grow the reference for everyone. What happens next
More ways to help — loop-engineering maintainers |
|
The mutex + atomic-write approach here matches the design discussed on #408 — nice touch adding rollback in One gap against the issue's acceptance criteria: the three new tests in |
5ca09ab to
6ac1890
Compare
cobusgreyling
left a comment
There was a problem hiding this comment.
Review
Solid fix for concurrent manifest loss (#408).
What works
- File-lock mutex (
wx+ stale recovery + 30s timeout) serializes create/mark/cleanup/gc mutations - Atomic write via temp file +
renameforwriteManifest - Rollback of git worktree + branch if manifest write fails after
git worktree add - Tests cover concurrent different IDs, same ID (one success / no orphan), and concurrent create+mark
Follow-up (non-blocking for this bugfix)
- Bump
@cobusgreyling/loop-worktreepatch (e.g. 1.3.1) + publish so npm consumers get the fix; main alone does not ship until tagged.
Decision: approve.
|
Merged — thank you @AIMindCrafter! |
…rations (#408)
Summary
Changes
templates/pattern-template.md+ updatedregistry.yaml)Checklist (from CONTRIBUTING)
STATE.md*examples use.examplesuffixdocs/safety.mdnode tools/loop-audit/dist/cli.js .(or on the starter) and addressed findingsTesting / Dogfood
loop-auditpasses on affected starters or this repoScreenshots / Examples (if UI or command output)
This template enforces the high bar this reference is known for.