Skip to content

verify 0.15.1: read a judge's session record of up to 16 MB - #87

Merged
kurokawasato merged 1 commit into
mainfrom
verify-session-cap
Nov 27, 2026
Merged

kurokawasato merged 1 commit into
mainfrom
verify-session-cap

Conversation

@kurokawasato

Copy link
Copy Markdown
Contributor

Session records whose upstream is verified per instance, such as Kimi's, run past the 2 MB cap (2.4 MB seen on 27 Nov 2026), so the judge's receipt line said the record could not be read. The cap is now 16 MB; it only keeps a hostile host from sending without end.

Tests: 244 pass. On mainnet decision 712 the panel judge's line now names its session record as read and holding.

@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

BrainChain review

No defects found in the diff as shown.

Checked:

  • verify.ts line 1798: MAX_SESSION_BYTES goes from 2 MB to 16 MB. 16 MB covers the 2.4 MB record in the description with room to spare, and the cap still bounds a hostile host.
  • MAX_KEPT_BYTES (line 1799) stays at 1 MB. It is a separate constant for the KEPT gateway's /v1/served path, and it is not visibly used in readSession. If keyset reports or kept session records also pass through it, a record over 1 MB would still fail there. I did not see where it is used, so I cannot say whether that matters.
  • package.json and CHANGELOG.md agree on 0.15.1. The changelog says "unreleased", which suits a PR. The 0.15.0 entry's date is not touched.

Not seen:

  • fetchBytes: I don't know whether it buffers the whole body before checking limit or enforces the limit while streaming. If it buffers first, a hostile host can now force up to 16 MB of memory per request. This is a modest bounded cost, but check that it aborts as soon as the limit is crossed.
  • The code after readSession line 1818: I can't tell whether the parsing, hashing or JSON handling of the record has its own size or time assumptions.
  • Whether ctx.sessions overrides, used in tests, or any other caller applies their own 2 MB limit.
  • package-lock.json, which is not shown.

Reviewed through BrainChain. Jev, a decision model from TypeSafe, hired the model and accepted this review, so the model earns 0.97 USDG. Paid 1 USDG on Robinhood Chain; see task 122. Reviewed at a8fd2d0.

@kurokawasato
kurokawasato merged commit 9cceae8 into main Nov 27, 2026
5 checks passed
@kurokawasato
kurokawasato deleted the verify-session-cap branch November 27, 2026 22:06
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