fix(tlon): bound urbit scry JSON response reads#100376
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 10:12 PM ET / 02:12 UTC. Summary PR surface: Source +3, Tests +53. Total +56 across 3 files. Reproducibility: yes. Current main reaches unbounded Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this focused Tlon owner-local fix after normal merge gates are green, then remove the overlapping Tlon slice from the broader response-bounds PR while leaving its unrelated plugin work reviewable. Do we have a high-confidence way to reproduce the issue? Yes. Current main reaches unbounded Is this the best way to solve the issue? Yes. The patch keeps the fix inside the Tlon owner boundary and reuses the existing SDK bounded JSON helper instead of adding a Tlon-specific reader or waiting for a broader multi-plugin sweep. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d2d5911c3296. Label changesLabel justifications:
Evidence reviewedPR surface: Source +3, Tests +53. Total +56 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (8 earlier review cycles)
|
0c3a7fc to
b745eef
Compare
|
Land-ready maintainer proof for exact head
Maintainer decision: accept the repository's shared 16 MiB successful-JSON ceiling for this operator-configured endpoint. Known gap: no production Urbit credentials were available; loopback proof exercises the real Tlon HTTP request/read path. Thanks @hugenshen for the focused fix. |
3ccce22 to
46ea2b0
Compare
|
Maintainer closeout at exact head
Duplicate convergence: #97558 contains a broader overlapping Tlon slice. After this focused fix lands, that slice should be removed while its unrelated work remains independently reviewable. |
7b51402 to
1de4034
Compare
1de4034 to
343355a
Compare
0a97072 to
7db10da
Compare
3b4a52b to
110e0da
Compare
|
Landed as The final merge contains only the three Tlon files: the shared 16 MiB bounded JSON reader now owns successful scry response reads, oversized streams are cancelled, path-specific diagnostics remain, and guarded-fetch resources still release in Proof: sanitized AWS Crabbox run |
* fix(tlon): bound urbit scry JSON response reads * fix(tlon): preserve bounded scry diagnostics * refactor(tlon): tighten scry boundary proof * docs(changelog): stabilize Tlon response entry * docs(changelog): close out maintainer batch * chore(changelog): defer batch closeout --------- Co-authored-by: NIO <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
* fix(tlon): bound urbit scry JSON response reads * fix(tlon): preserve bounded scry diagnostics * refactor(tlon): tighten scry boundary proof * docs(changelog): stabilize Tlon response entry * docs(changelog): close out maintainer batch * chore(changelog): defer batch closeout --------- Co-authored-by: NIO <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Tlon Urbit scry reads could cause out-of-memory failures when a configured ship endpoint returned an oversized JSON body on the success path. Poke error bodies were already bounded, but scry success responses still used unbounded
response.json().Why This Change Was Made
scryUrbitPathnow uses the sharedreadProviderJsonResponsehelper, which caps successful reads at 16 MiB and cancels the upstream body on overflow. The error label retains the exact scry path, and the existingfinallycontinues to release guarded-fetch resources on success and failure.The maintainer pass removed duplicate 18 MiB unit-stream scaffolding while retaining the real loopback HTTP boundary scenario. Urbit documents scry as authenticated HTTP GET returning the requested data; this patch changes only the local response bound.
User Impact
Oversized Tlon scry responses now fail with a bounded, path-specific error instead of risking gateway OOM. Normal small JSON and existing non-success HTTP behavior are unchanged.
Evidence
110e0daea1ad6abfbaa9a77a22f56f704a537b42.cbx_8ae94556bc3b, runrun_3863cc067902: no IAM role, Tailscale, or hydration; 5/5 focused tests passed on behavior-equivalent head3ccce220b4924b6bd17ef5f8557642a0c17c7eb8.28763080955: all required checks passed after attempt 2 cleared an unrelated TUI PTY timing flake.260853298300c82388679cbeef32a104081fffda.@totobusnello), fix(channels): normalize phone identities with stray plus signs #100467 (@morluto), and this fix (@hugenshen) are deferred to one final maintainer changelog PR after this runtime-only branch lands.oxfmtandgit diff --check: pass.urbitFetchand guarded response-reader path.Risk checklist
Related context
AI-assisted disclosure