anomalyco / anomalyco/opencode
V1 migration can lower an existing event watermark
Open
@nexxeln is already working on this.
Since Aug 21, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Rebuilding a V1 session projection overwrites event_sequence.seq with the rebuilt message watermark. If that session already has newer durable V2 events, the next event can reuse an existing sequence and violate the aggregate sequence constraint.
Plugins
None
OpenCode version
V2 at 2c8e2a2b2
Steps to reproduce
- Create a legacy V1 session row that requires projection rebuild.
- Give the same session an existing V2 event at a sequence above the rebuilt message watermark.
- Run the V1 migration.
- Observe
event_sequence.seqis lowered below the durable event sequence.
Screenshot and/or share link
N/A (SQLite migration)
Operating System
Any
Terminal
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.