fix: invalidate stale reconciliation proof - #75
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c7d9464029
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a079e5126
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 654c705db2
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33e6b5383f
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b5a29fc63
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b9005621d
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fce5cb2c05
ℹ️ 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 latestStatuses = latestLinkedWorkStatuses({ | ||
| config: args.config, | ||
| state: args.state, | ||
| observations: args.linkedWorkStatuses, | ||
| }); |
There was a problem hiding this comment.
Use the latest status when classifying current signals
When a cumulative evidence export contains an older terminal event and a later reopen for the same issue, this correctly keeps the family out of resolvedSignalFamilies, but the current signal is still classified by dispositionFor, which considers every terminal record and returns resolve-watch; rawQueue consequently marks that signal resolved despite the reopen. Fresh evidence beyond the prior thread is that latestLinkedWorkStatuses is consulted only in this family-resolution path and never influences the current signal's disposition, so the later reopen still removes active work from the queue.
Useful? React with 👍 / 👎.
| if (latest?.ordering === "unknown") { | ||
| if ( | ||
| observation.sourceId === latest.sourceId && | ||
| observation.sourceRecordId === latest.sourceRecordId |
There was a problem hiding this comment.
Allow new records to replace unknown-order legacy status
When migrating pre-change state whose terminal proof lacks observedAt, the synthesized status has ordering: "unknown"; this branch then ignores every new authoritative observation unless it reuses the terminal event's exact record ID. A later reopen normally has a different ID, so the migrated terminal status remains permanent and the family stays falsely resolved. Fresh evidence contradicting the prior thread response is the explicit sourceRecordId equality requirement here, which prevents the claimed supersession by current authoritative observations.
Useful? React with 👍 / 👎.
|
🎉 This PR is included in version 2.29.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Review follow-up
Addresses all four P2 findings from the adversarial review of #74.
Verification
bun test src/reconciliation.test.ts(47 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.