Files
clean-architecture-frontend…/tests
DongHyeonkaandClaude Opus 5.5 d758934e9c fix(storage): page orphan GC candidates by digest cursor (R-5.1)
LIST_ORPHAN_CANDIDATES returned at most 100 old chunks in directory order,
committed ones included, and had no way to continue. Once more than 100
day-old committed chunks existed, every reconcile got the same referenced
page, deleted nothing and reported DEADLINE_REACHED; real orphans behind it
leaked quota forever.

The request now takes an optional afterDigest cursor. The worker walks
prefix directories and chunk names in ascending digest order and returns
only digests after the cursor. The coordinator pages on with the last
digest of each page until no more are available or its deadline hits.
The gateway method gets the cursor as a new trailing optional parameter.
Deletion safety checks (journal reference, staging receipts, grace period)
are unchanged.

Verified: new test "R-5.1 orphan GC pages past referenced chunks" wires the
real worker runtime, client gateway and coordinator. Before the fix it
failed with inspected 100, deleted 0, DEADLINE_REACHED; now both orphans
(lowest and highest digest) are deleted and all 150 referenced chunks
remain. The existing listOrphanCandidates call-arity assertion now expects
the extra undefined cursor argument.
Gates: check:architecture, check:types:app/test/web-worker, lint,
test:component pass; test:unit passes except removal-fixture.test.ts,
which needs gitignored release artifacts absent from a fresh worktree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 12:27:48 +09:00
..