fix: make reconciliation recovery durable - #74
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9bda4bcbd1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const containment = await gitDefaultBranchContainment({ | ||
| commit: pending.recordId, | ||
| config: source, | ||
| projectRoot, | ||
| }); |
There was a problem hiding this comment.
Skip vanished commits during containment rechecks
When a previously scanned non-default-branch commit is removed by a force-push/rebase and later pruned, git merge-base --is-ancestor exits with an error rather than 1; this call propagates that error and aborts the entire reconciliation. Because the unreachable record remains in state.evidence, every subsequent scheduled or manual run retries the same commit and fails permanently instead of continuing with the remaining sources.
Useful? React with 👍 / 👎.
| try { | ||
| handle = await open(path, "wx"); | ||
| } catch (error) { | ||
| if ( | ||
| error instanceof Error && | ||
| "code" in error && | ||
| (error as NodeJS.ErrnoException).code === "EEXIST" | ||
| ) { | ||
| throw new Error( | ||
| `Project enrollment cannot migrate runtime state while another writer holds ${path}` | ||
| ); |
There was a problem hiding this comment.
Recover abandoned enrollment migration locks
If enrollment is terminated after creating either runtime-migration lock, the OS closes the handle but leaves the file behind. Every later enrollment rejects the resulting EEXIST, and the reconciliation lock implementation also has no stale-owner takeover, so reconciliation for that project remains blocked indefinitely until the user discovers and manually deletes the file. Use the existing owner/liveness recovery protocol or otherwise reclaim abandoned coordination locks.
Useful? React with 👍 / 👎.
## [2.29.1](v2.29.0...v2.29.1) (2026-07-29) ### Bug Fixes * make reconciliation recovery durable ([#74](#74)) ([d7c7feb](d7c7feb))
|
🎉 This PR is included in version 2.29.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Verification
bun test src/reconciliation.test.ts(44 pass)bun test src/evolution-loop.test.ts(45 pass)bun test src/projects.test.ts(127 pass)bun run type-checkbun run checkLinear: HACK-1033
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.