Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Stamp per-tab tab_seq on browser writes and pass it to saver#387

Merged
JonJagger merged 1 commit into
maincyber-dojo/web:mainfrom
web-stamp-tab-seqcyber-dojo/web:web-stamp-tab-seqCopy head branch name to clipboard
Jul 19, 2026
Merged

Stamp per-tab tab_seq on browser writes and pass it to saver#387
JonJagger merged 1 commit into
maincyber-dojo/web:mainfrom
web-stamp-tab-seqcyber-dojo/web:web-stamp-tab-seqCopy head branch name to clipboard

Conversation

@JonJagger

Copy link
Copy Markdown
Member

Establish the (laptop_id, tab_id, tab_seq) idempotency key end-to-end so
saver can recognise a redelivered or re-fired write and dedup it. This is
the bridge step before the spooler: landing the key now soaks the browser
stamping in production and de-risks saver's contract change ahead of the
durable, ordered forwarding the spooler will add.

The browser owns tab_seq: a monotonic per-tab counter (cd.kata.nextTabSeq)
incremented once per event-write POST - one value per browser action, even
when a [test] commits two saver events. All four write paths stamp it (the
ITE helper, run_tests, auto_revert, checkout). web forwards it through
app.rb into saver_service's nine write methods as a required argument.

Tests pass a required tab_seq too: a monotonic next_tab_seq helper gives a
distinct value per write, since saver only dedups on a truthy tab_seq and a
constant would collapse two same-laptop/same-colour writes. Adds a
forwarding test mirroring the laptop_id one.

  Establish the (laptop_id, tab_id, tab_seq) idempotency key end-to-end so
  saver can recognise a redelivered or re-fired write and dedup it. This is
  the bridge step before the spooler: landing the key now soaks the browser
  stamping in production and de-risks saver's contract change ahead of the
  durable, ordered forwarding the spooler will add.

  The browser owns tab_seq: a monotonic per-tab counter (cd.kata.nextTabSeq)
  incremented once per event-write POST - one value per browser action, even
  when a [test] commits two saver events. All four write paths stamp it (the
  ITE helper, run_tests, auto_revert, checkout). web forwards it through
  app.rb into saver_service's nine write methods as a required argument.

  Tests pass a required tab_seq too: a monotonic next_tab_seq helper gives a
  distinct value per write, since saver only dedups on a truthy tab_seq and a
  constant would collapse two same-laptop/same-colour writes. Adds a
  forwarding test mirroring the laptop_id one.
@JonJagger
JonJagger merged commit 3aaa3a7 into main Jul 19, 2026
8 checks passed
@JonJagger
JonJagger deleted the web-stamp-tab-seq branch July 19, 2026 07:11
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.