GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(core): recover stale event sequence by d4n-sec · Pull Request #51413 · anomalyco/opencode

Conversation

@d4n-sec

@d4n-sec d4n-sec commented Sep 25, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #51411

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Uses the greater of the stored aggregate cursor and the latest persisted event sequence before assigning a local sequence. A stale cursor can no longer retry an already-written sequence forever. The owner-claim path is unchanged.

Running and comparing v1 and v2 is a normal plugin-development workflow. This is defensive recovery for an already damaged shared DB; it complements, rather than replaces, correct versioned data isolation.

How did you verify your code works?

  • bun test test/event.test.ts in packages/core — 45 passed. The new regression first writes events 0 and 1, lowers only the cursor, then confirms a new event receives 2 and retains its owner.
  • bun typecheck in packages/core — passed.
  • bunx oxlint packages/core/src/event.ts packages/core/test/event.test.ts — no errors.
  • Isolated manual path: v1 1.18.32 created a session in an isolated shared DB, latest dev reopened it, and after lowering only that session cursor from 0 to -1, a resume:false prompt was admitted at sequence 1. SQLite integrity check passed; both test servers were stopped.

Screenshots / recordings

Not applicable.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dan dan
fix(core): recover stale event sequence
02eb3bf
@github-actions

github-actions Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@d4n-sec d4n-sec mentioned this pull request Sep 25, 2026
Bug: stale event sequence permanently rejects new session events #51411
Closed
@github-actions github-actions Bot mentioned this pull request Sep 25, 2026
📊 AI CLI 工具社区动态日报 2026-09-26 litang9/big_model_radar#453
Open
This was referenced Sep 26, 2026
fix(core): recover stale event sequence (#51411) kvnloo/opencode#78
Closed
CoS tip: recover stale durable event sequence (#51413) kvnloo/opencode#94
Open
fix(core): recover stale event sequence kvnloo/opencode#95
Open
@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thdxr thdxr closed this Oct 10, 2026
@d4n-sec d4n-sec mentioned this pull request Oct 10, 2026
fix(core): recover stale event sequences in V2 #54397
Closed
3 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: stale event sequence permanently rejects new session events

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@d4n-sec @thdxr
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.