Skip to content

Count a catch-up's first refusal id from the page's base - #87

Merged
Oliver-Johnson merged 2 commits into
mainfrom
claude/robustness-security-review-5ir9ye
Oct 10, 2026
Merged

Oliver-Johnson merged 2 commits into
mainfrom
claude/robustness-security-review-5ir9ye

Conversation

@Oliver-Johnson

Copy link
Copy Markdown
Owner

Requested by Oliver · project thread

What this changes

The optionals from the review of #65's round 6, as a follow-up to it.

A catch-up that cannot leave its note (HF).

Before: a page holds a refused width, 410, from a mark with no refusal ids, as one written before #65 had them. Bins, in another tab, saves a new depth, 520. The page is reloaded, and its catch-up for the 520 cannot write the note for its own reload (the tab's storage refuses it), so it stays put. Its first refusal id was made with the base caught up, d 520, while the page went on counting from its own base, d 380. Reloaded again, it counted from the id's base, took its own d 380 for a change of its own, and once there was room saved 380 over the other tab's 520.

After: reloaded again, the page catches up the 520 and keeps its 410, and the next change with room saves both.

How: carry() makes the page's first id with the page's own base, not the base it is handed, which for a catch-up is the one caught up. The catch-up's record still gives that id the caught-up base, and the page keeps its own if it stays put. The reviewer's fix (r6-hf-fix.diff) calls carry() early in catchUp for the same effect; this puts it where the id is made.

A test for the hand-over note's bases.

The note carries each refusal id's base to the next page, and no test failed without it. A new test, from either page, refuses a size, hands over three times with the storage full, goes Back three times, saves the size and sets it back, then goes Forward three times. The fourth page shows the size set back, and its next change keeps it. Without the note's bases it took the size for its own change again, as the reviewer's F4 probe found.

Limits now written down.

  • The 32-id window. A page more than 31 hand-overs before the one whose save went through holds none of the ids that page held, so Back to it counts its change as still to save (the reviewer's DEEPS33 and DEEPJ33). The comment on hold() says so, beside the tab's last 128 landed. Raising the window to 128 would make each record up to four times larger, for chains of more than 32 hand-overs with the storage full, and would leave the window's code with no test that runs in reasonable time.
  • Bases one to an id that are not what the page writes (XB). Only the page's own code writes the address's mark, so a base for each id is taken as it is. The hostile ids test's title and comment now say the bases it covers are those not one to an id, which fall back to the record's base.

Checks

  • I edited the sources in src/, not the generated index.html / bins/index.html
  • I ran node build.js and committed the regenerated pages alongside the sources
  • npm run test:all passes: on 8578fb5, the whole UI suite 817 of 817, and npm test and node test/ci-sim.js clean
  • Each new test fails without its fix:
    • with drawers.js as main has it, or with the first id made with the base handed in: the HF test;
    • with the hand-over note dropping the bases: the three-hand-over test, on either page.
  • The reviewer's probes on 8578fb5, loaded: HF reads OK-410/520 with the note refused and without, and F4 reads OK-400 on either page.

If this touches geometry

It does not.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XjNf7SQF9o4ZVeWiSbWQmk


Generated by Claude Code

carry() made the page's first id with the base it was given, which for
a catch-up is the one caught up. A catch-up that cannot leave its note
stays put with the page's own base, so its records then counted from
the drawer's later depth, and a reload took the page's depth from
before for its own change and saved it over another tab's. The first
id now counts from the page's base, and the catch-up's record still
gives it the caught-up one.

A test hands a refused size over three times and back, and Forward to
the fourth page finds the size set back, which needs the hand-over
note's bases. The comment on hold() says where the 32-id window stops
counting a change as landed, and the hostile ids test says the bases
it covers are those not one to an id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XjNf7SQF9o4ZVeWiSbWQmk
@Oliver-Johnson
Oliver-Johnson marked this pull request as ready for review October 10, 2026 14:18
sw.js takes main's side of the version conflict, and node build.js
regenerates it and both pages.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XjNf7SQF9o4ZVeWiSbWQmk
@Oliver-Johnson
Oliver-Johnson merged commit 2e1acd1 into main Oct 10, 2026
3 checks passed
@Oliver-Johnson
Oliver-Johnson deleted the claude/robustness-security-review-5ir9ye branch October 10, 2026 16:54
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