Skip to content

D-GSO-8 follow-up: refuse a reused event seq - #1366

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/gso-8-seq
Oct 6, 2026
Merged

AdaWorldAPI merged 1 commit into
mainfrom
claude/gso-8-seq

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Follow-up to #1363 (merged), addressing the Codex review finding there.

What was wrong

The seal-boundary probe assumes every event's seq is globally unique, but it never checked this. The only check was first_tie over the casts in one batch. Two kinds of reuse got past it:

  • a reused seq on the same row: row coalescing had already reduced the two events to one cast;
  • a reused seq across two seals: each batch on its own has no tie.

Change (crates/lance-graph-planner/examples/seal_boundary_probe.rs)

  • apply now refuses any event whose seq is not greater than the last accepted one (SealError::StaleSeq). The check runs before anything folds.
  • resume_after restores the highest persisted key, so a resumed engine still refuses a reused one.
  • the_seal_binds_base_content_and_order now swaps the two values instead of the two events. The seq stream therefore stays strictly increasing, and the test still checks that order is bound into the seal.
  • New test a_reused_seq_is_refused. It covers a reuse on the same row, a reuse across seals, and a reuse after a resume. It also checks that a fresh, larger seq is still accepted.
  • Board: D-GSO-8 marked Shipped (D-GSO-8: seal boundary (P8) #1363), with the follow-up noted. SUPERSESSION-INDEX regenerated, no change.

Verification

  • cargo test --manifest-path crates/lance-graph-planner/Cargo.toml --example seal_boundary_probe: 7 passed.
  • Disable runs, both red:
    • removing the seq check fails a_reused_seq_is_refused;
    • dropping the last_seq restore in resume_after fails it too.
  • Clippy reports nothing for the probe, and cargo run still prints that replay from the prior seal reproduces the last seal.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DgxrCafsJuAahpBs7oC14R


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 67 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 4f1a0579-d139-42ef-8a03-288ae2064cc8
📥 Commits

Reviewing files that changed from the base of the PR and between 2182388 and ca50dda.

📒 Files selected for processing (2)
  • .claude/board/STATUS_BOARD.md
  • crates/lance-graph-planner/examples/seal_boundary_probe.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Oct 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 78095ef3-7085-4a13-8980-cc30ed8bf917)

The probe's key precondition (each event's seq is globally unique) was
stated but never checked: row coalescing hides a same-row reuse from
first_tie, and a reuse across seals leaves each batch tie-free. apply now
refuses any seq not greater than the last accepted one, and resume_after
restores the highest persisted key. The order-binding test swaps values
instead of events so its stream stays strictly increasing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DgxrCafsJuAahpBs7oC14R
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 6, 2026 15:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T15:20:18.600901Z ca50dda Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Oct 6, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 1690fa55-ad91-45f2-9298-0173cd6cd69c)

@AdaWorldAPI
AdaWorldAPI merged commit 016354f into main Oct 6, 2026
11 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ca50ddaff8

ℹ️ 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".

Comment on lines +194 to +195
let top = s.batch.landings.iter().map(|l| l.stream_position).max();
e.last_seq = e.last_seq.max(top);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Persist the actual event high-water mark

When resuming after a seal, the largest landing position is not necessarily the last accepted event sequence: boundary events never become landings, and internal events whose folds leave a row unchanged are omitted from the batch. For example, after accepting internal seq=5 and boundary seq=6, this restores last_seq as 5, so a resumed engine accepts a reused seq=6, defeating the recovery guarantee this change claims to add. Persist and restore the accepted event high-water mark itself, including the boundary sequence, rather than deriving it from coalesced landings.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants