GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read · Issue #6578 · developing-today/code

id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read #6578

New issue
Copy link
New issue
Copy link
Closed
Closed
id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read#6578
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

Problem

Residual of #6505 in pkgs/id/src/world_net.rs: the RecordsBudget validation that landed on main (snapshot WIP, repaired in PR #6570) checks records, not pages — so WorldClient::record_pages (:1564) still loops forever on a page shape that carries no records at all, and still treats a malformed cursor as a clean end-of-read.

  1. Empty pages with an advancing cursor loop forever. Each received record is run through RecordsBudget::validate_record (:613, :619), which caps key/value/count/order — but an empty page contributes zero records, so the budget never moves. The cursor checks in the loop are:

    • next_after must equal the page's last key (:1606-1612) — for an empty page there is no last key, and the else branch (:1613-1620) explicitly carves empty pages out, requiring only that this is not the first request (after.is_some());
    • next_after must strictly advance past the cursor sent (:1623-1629) — any larger string satisfies this (z000001, z000002, …).

    Each iteration pushes another (sequence, page) onto the unbounded pages Vec (:1631) and issues another request. There is no page-count bound and no aggregate frame-byte budget on this path (recv_json discards the frame size), so a buggy or malicious host keeps records() / records_sequenced() running forever, growing memory page by page.

  2. A non-string next_after silently ends the read. let next_after = reply["next_after"].as_str() (:1606) yields None for a number, boolean, array, or object cursor exactly as it does for a legitimate JSON null, and the match at :1632 returns Ok(pages) — the caller receives a partial record set presented as complete, with no error. The sibling field in the same reply is handled strictly: sequence is extracted with .as_u64().context("records reply has no sequence")? (:1592-1594).

Neither shape can come from a conforming host: the server side, records_session in src/world_session/mod.rs:1785, sets next_after = more.then_some(last_included).flatten() (:1826), and more is only set after at least one record was included — an honest server never sends an empty page with a cursor, and always sends the cursor as a string or null. The admin-history client path in the same file is the strict oracle: its cursor block (:1740-1755) requires next_after to equal the last received key and to advance past the previous cursor — for an empty page those two requirements contradict each other, so the shape is refused there — and every frame there is charged to a byte budget (budget.add_frame).

Evidence (verified this run, laptop @ origin/main b0c472d)

Probe ~/git/fleet/probe-records-empty-pages (real id crate + rogue iroh host speaking /id-world/1, same harness as the #6505 probe):

  • Control, conforming two pages ({a:1} → next_after:"a", then {b:2} → next_after:null) → Ok, 2 records. ✅
  • Control, empty final page ({a:1} → "a", then {} → null) → Ok, 1 record — the legitimate empty-page shape still terminates. ✅
  • Defect E: first page {a:1} → next_after:"a", every later page {} with next_after:"z<n>" (strictly advancing) → records() was still looping after 3 s; the host saw 55,615 records requests in that window. No error, no return.
  • Defect T: second page {b:2} with next_after:123 (a number) → records() returned Ok with both records, the malformed cursor silently accepted as the terminator.

For contrast, #6505's original shapes are now refused at this HEAD (over-cap page, stuck/non-advancing cursor, out-of-order pages — the budget and the :1606-1629 checks do catch those). This issue is only the two shapes that remain.

Why it matters

The plain records query is the read the CLI uses against worlds the client does not operate (the normal join flow). A host that answers with empty advancing pages — a paging bug is enough; malice is not required — hangs every such read indefinitely with unbounded page accumulation, exactly the hang #6505 set out to close, through the one page shape its fix does not inspect. The non-string cursor case is the quieter twin: a malformed host response is indistinguishable from a complete read, so callers act on a silently truncated record set.

Acceptance criteria

  • record_pages refuses an empty page that carries a next_after cursor (mirroring the admin-history path in the same file), or equivalently bounds the total number of pages / consecutive empty pages with a loud error naming the bound.
  • A present-but-non-string next_after (number, boolean, array, object) is a malformed-reply error, not end-of-pages; only JSON null / absent terminates the loop — the same strictness sequence already gets.
  • Regression tests drive WorldClient against stub/rogue replies covering: empty advancing pages (refused promptly, bounded request count), non-string next_after (error), plus the conforming controls — two-page read and empty final page with next_after: null both still return Ok.
  • Conforming hosts are unaffected: existing world_net / world_session records tests stay green (server pages are non-empty whenever a cursor is present, by construction).

Distinct from #6505 (caps, ordering, and non-advancing cursors in record_pages — those landed and are verified refused at this HEAD): this is the residual page-shape hole in the same loop — empty pages are exempt from the last-key check, and the cursor's type is never checked.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 6, 2026
  2. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-2001

  3. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 6, 2026
  4. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a, run 2026-11-06T17:05Z
    • Found via: filed this run
    • Task: Triage the residual page-shape hole in WorldClient::record_pages (pkgs/id/src/world_net.rs:1564): empty pages with a strictly advancing next_after evade every id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505 RecordsBudget/cursor check (55,615 requests in 3s in the probe), and a non-string next_after is silently treated as end-of-pages.
    • Expectation: effort s — refuse empty pages carrying a cursor (or bound page count) and error on a present-but-non-string next_after, mirroring the admin-history cursor checks in the same file; conforming two-page and empty-final-page reads stay green.
    • Links: issue id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505 (parent finding; its caps/order/stuck-cursor shapes are verified refused at origin/main b0c472d) · probe ~/git/fleet/probe-records-empty-pages (laptop, real id crate + rogue iroh host)
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  6. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo queue worker, lane code-o (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-o run 2026-11-06 11:32 CST; task 11243
    • Found via: claimed task 11243 this shift; execution-lane assignment returned direct — this lane works it.
    • Task: task 11243 for issue id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read #6578 (triage). Fresh check: issue id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read #6578 is OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit). Triaging: verifying the two residual record_pages shapes against current main, then posting a verdict and routing the fix.
    • Expectation: triage verdict comment on issue id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read #6578 plus a fix task enqueued if confirmed; task 11243 completed as triaged.
    • Links: task 11243 · issue id(world_net): record_pages still loops forever on empty pages with an advancing cursor — the #6505 RecordsBudget checks records, not pages, and a non-string next_after silently ends the read #6578 · issue id(world_net): WorldClient records paging trusts host pages — no record caps re-checked, no ordering/cursor validation, a non-advancing next_after loops forever #6505
  7. 125 remaining items

  8. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    state: parked
    task: 14370
    lane: code-p
    queue: repo-health-code-pilot

    Fix landed in PR #8414 (head 3267354, verified by independent reads: pulls API by head branch; Codex review running on that exact commit): record_pages now refuses an empty page carrying a next_after cursor as a malformed reply, mirroring the admin-history path in the same file. Defect T needed no work — already fixed on main under #6778 with its own regression test; this PR closes the remaining Defect E.

    Tests (laptop, worktree /home/user/git/fleet/14370): the three new rogue-host tests pass by name (rejects_empty_page_with_cursor, rejects_empty_first_page_with_cursor, accepts_empty_final_page control); the full test_records_client_* set and the whole world_net:: module exit 0; rustfmt clean on world_net.rs.

    Parked as a CI/review wait: PR #8414 checks queued, Codex running, no findings yet. Resume: disposition any Codex findings, merge PR #8414, verify on main, complete task 14370 and close issue #6578 (both acceptance defects will then be fixed: T by #6778, E by this PR).

  9. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 11, 2026
  10. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    state: parked (CI wait; Codex dispositioned clean)
    task 14370 (small_fix) — issue #6578 — lane code-e, 2026-11-11

    Resumed task 14370 at its recorded next step and re-verified fresh: PR #8414 OPEN, no hard-stop labels. Codex gate (§5): the Codex review summary on PR #8414 (commit 3267354) reports code review COMPLETED with has_any_findings=false and has_unresolved_findings=false — there are no Codex findings to disposition. Check rollup: 10 QUEUED, 1 SUCCESS, 1 SKIPPED, 1 NEUTRAL — the remaining gate is the fleet CI queue stall, not this PR.

    Terminal for this shift: task 14370 parked as a CI wait on PR #8414. Resume: when PR #8414 checks complete, merge PR #8414, verify the fix on main, and complete task 14370 + close issue #6578.

  11. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    state: parked (CI wait; Codex dispositioned clean)
    task 14370 (small_fix) — issue #6578 — lane tmp-code-y, 2026-11-11

    Resumed task 14370 at its recorded next step and re-verified fresh: issue #6578 OPEN, no hard-stop labels, no status/needs-triage; PR #8414 OPEN on branch queue/14370-6578-record-pages-empty-cursor, head 3267354, diff is the single-file world_net.rs fix plus three rogue-host regression tests, matching the issue intent. Codex gate: Codex review summary on PR #8414 for commit 3267354 reports code review COMPLETED, has_any_findings=false, has_unresolved_findings=false — no findings to disposition. Prior verified tests stand: the three new tests pass by name, full test_records_client_* set and world_net module exit 0, rustfmt clean. Check rollup at this read: most checks still QUEUED since 2026-11-11T02:03Z (1 SUCCESS, 1 SKIPPED, 1 NEUTRAL) — a fleet CI queue stall, not a PR failure.

    Terminal for this shift: task 14370 parked as a CI wait on PR #8414. Resume: when PR #8414 checks complete, merge PR #8414, verify the fix on main, then complete task 14370 and close issue #6578.

  12. dezren39
    added a commit that references this issue on Nov 11, 2026

    Merge pull request #8414 from developing-today/queue/14370-6578-recor…

    40d3dfc
  13. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 11, 2026
  14. developing-today
    closed this as completedon Nov 11, 2026
  15. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    state: done (fixed_merged)
    task 14370 (small_fix) — issue #6578 — lane any-d, 2026-11-11

    PR #8414 MERGED at 2026-11-11T05:28:37Z, merge commit 40d3dfc, verified as main HEAD with the fix present at pkgs/id/src/world_net.rs:1919 ("malformed records reply: empty records page carries next_after cursor").

    Resume-from-park verification this shift: issue #6578 OPEN, no hard-stop labels; PR #8414 OPEN/MERGEABLE, single-file diff matching intent. Codex gate clean (prior disposition: review COMPLETED, has_any_findings=false, has_unresolved_findings=false; no Codex review comments on the PR). Targeted tests re-run independently on the laptop worktree: all 12 test_records_client_* pass, including the 3 new rogue-host tests (rejects_empty_page_with_cursor, rejects_empty_first_page_with_cursor, accepts_empty_final_page). PR checks were still QUEUED since 2026-11-11T02:03Z (fleet CI stall, not a PR failure); merged on the locally verified suites per Drew's merge authority (CI runs on main only; finished PRs do not wait). Defect T (non-string next_after) was already fixed on main under #6778; Defect E was the remaining half and is now fixed, so issue #6578 closes with this note.

    Terminal: task 14370 complete, outcome fixed_merged.

  16. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.