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 — perf(cold-store-reaper): bound memory when Drive ignores Range requests · Issue #6182 · developing-today/code

perf(cold-store-reaper): bound memory when Drive ignores Range requests #6182

New issue
Copy link
New issue
Copy link
Closed
#6233
Closed
perf(cold-store-reaper): bound memory when Drive ignores Range requests#6182
#6233
Copy link
Assignees
dezren39
Labels
app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)kind/performancePerformance problem or optimizationpriority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted teststask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Problem

pkgs/cold-store-reaper/worker/src/index.js:125-146 requests one frame from Google Drive with a Range header. When Drive responds with HTTP 200 instead of 206, rehydrate calls resp.arrayBuffer() for the entire bundle and only then slices out the requested frame. Peak memory therefore scales with the whole remote bundle rather than frame_length.

Required behavior

Handle a range-ignoring 200 response without materializing the entire response in memory. Stream/discard bytes before offset, retain only the requested frame, and stop once the frame is complete; continue to validate exact length, decompression, and SHA-256 before returning bytes.

Acceptance criteria

  • A test stubs Drive to ignore Range and return a large streaming bundle; rehydration returns the correct requested frame without buffering the full response.
  • Short responses and malformed/truncated frames still fail closed.
  • A normal 206 range response retains current behavior and hash verification.

Activity

Next
  1. dezren39
    added
    kind/performancePerformance problem or optimization
    priority/normalOrdinary priority (the default)
    app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

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

    CODE-1796

  3. dezren39
    added
    queue/queuedHas a queued queue task
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  4. github-actions
    assigned
    dezren39
    on Nov 5, 2026
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 5, 2026
  6. developing-today commented on Nov 5, 2026

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

    🤖 Agent note · done (triaged)

    • Agent: queue worker (repo-worker-code), lane code-i
    • Session / ID: task 10465
    • Found via: queue claim
    • Task: Triage issue perf(cold-store-reaper): bound memory when Drive ignores Range requests #6182 at current main
    • Expectation: s — verdict with evidence, fix path scoped
    • Links: follow-up task 10551

    Verdict: CONFIRMED at current main — exactly as filed.

    Evidence: pkgs/cold-store-reaper/worker/src/index.js, rehydrate(job):

    • It requests Range: bytes=${offset}-${offset + frame_length - 1} and accepts HTTP 206 or 200.
    • Then, unconditionally: let frame = new Uint8Array(await resp.arrayBuffer()); — on a Range-ignoring 200 this materializes the entire bundle in memory, and only afterwards frame = frame.slice(offset, offset + frame_length). Peak memory scales with bundle size, not frame_length, as the issue states.
    • The downstream guards the fix must preserve are present and correct: exact-length check (frame.length !== frame_length → 502), decompressFrame with fail-closed 502, and SHA-256 verification before returning bytes.

    Fix path scoped: follow-up task 10551 (small_fix, pilot queue): on a 200, stream the response body, discard bytes before offset, retain only the requested frame, and stop once the frame is complete; 206 behavior unchanged. Acceptance is the issue's own: a test stubbing Drive to ignore Range and stream a large bundle, fail-closed short/truncated cases, and unchanged 206 + hash verification.

  7. developing-today
    added
    queue/queuedHas a queued queue task
    status/triagedTriaged and routed (see agent note)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    on Nov 5, 2026
  8. 7 remaining items

  9. developing-today
    added
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    status/triagedTriaged and routed (see agent note)
    on Nov 5, 2026
  10. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 5, 2026
  11. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · in-progress

    • Agent: queue worker (repo-worker-code), lane code-e
    • Session / ID: task 10551
    • Task: Fix perf(cold-store-reaper): bound memory when Drive ignores Range requests #6182 — canonical PR perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233 (branch queue/10551-6182-range-ignored-stream, head 3394bae) verified fresh this shift: diff matches the packet exactly (stream/discard prefix on Range-ignoring 200 via readStreamedFrame, 206 path untouched, exact-length + SHA-256 checks unchanged), no Codex review findings on the PR to disposition, and laptop verification passed: npm test in pkgs/cold-store-reaper/worker (existing run-local-proof + all 6 new range-ignored checks ok). Duplicate PR ⚡ Bolt: stream Drive range-ignored bundle frames #6220 diffed against perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233 — salvage note posted on perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233; nothing unique to carry over, so ⚡ Bolt: stream Drive range-ignored bundle frames #6220 is being closed as the duplicate. Merging perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233 under the standing criteria.
    • Links: issue perf(cold-store-reaper): bound memory when Drive ignores Range requests #6182 · PR perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233 · duplicate PR ⚡ Bolt: stream Drive range-ignored bundle frames #6220
  12. dezren39
    closed this as completedin #6233on Nov 5, 2026
  13. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 5, 2026
  14. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 5, 2026
  15. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-e
    • Session / ID: task 10551
    • Outcome: fixed_merged — PR perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233 merged (squash, merge commit 61a1250); this issue closed by the merge. Verified this shift: diff matches intent, no undispositioned Codex findings (none filed on the PR), laptop npm test for pkgs/cold-store-reaper/worker passed (run-local-proof + 6/6 range-ignored checks). Duplicate PR ⚡ Bolt: stream Drive range-ignored bundle frames #6220 closed after a diff-level salvage check (nothing unique; note on PR perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233).
    • Links: issue perf(cold-store-reaper): bound memory when Drive ignores Range requests #6182 · PR perf(cold-store-reaper): bound memory when Drive ignores Range requests #6233 · PR ⚡ Bolt: stream Drive range-ignored bundle frames #6220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)kind/performancePerformance problem or optimizationpriority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted teststask/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.