PACK-003: idxmaint pack.scan: scan (out full? corrupt?) on every jab status — single-pack scan vs JS-117 multi-pack keeper logs

Now:
OPEN
Sev:
HIGH

jab status in the journal tree prints idxmaint: Error: pack.scan: scan (out full? corrupt?) TWICE before rendering. idxmaint finds keeper logs with no idx coverage and calls ingest.buildIndexpk.scan → native PIDXScan over the WHOLE log; the scan is single-pack/header-count-driven, a JS-117 log with appended packs behind the first header makes it fail. The logs stay unindexed forever, so their objects stay unk/miss — and the warn repeats on EVERY status. Deferred from PATCH-012 ("count-trusting class, needs own repro/ticket"); distinct from JAB-008 (BASS drain — this repros in a FRESH process).

Input

Context

Incident 2026-07-17, ~/src/journal: jab status → the warn twice, then a working status listing (with a miss ?cba10972#README.mkd row). Store ~/.be/journal/: 4 logs 0000000001..4.keeper, ONE 26710JvjCN.keeper.idx run.

Goals

jab status in the journal tree runs warn-free; all 4 logs get idx coverage; the miss rows for objects living in the unindexed logs clear.

Constraints

WIP

Design decisions

Diagnosis OVERTURNED the intro's hypothesis twice: the journal shard is healthy (4 logs fully idx-covered, header count == records, no mid-stream PACK header in ANY store log); the warns come from the beagle SUB store. Failure class is torn/corrupt bytes, so the fix is salvage, not segmentation. CORRECTED 2026-07-17 (STATUS-scan investigation): BOTH warns are ~/.be/beagle — status opens that shard TWICE (status.js:279 emitRepo + status.js:485 divergence→resolve_hash.js:302, two reader instances, maintain unmemoized); ~/.be/beagle.new is NEVER opened by status (shardDir resolves beagle directly; fixture decoy: 0 opens) — its corruption is real but dormant.

TODOs

Blockers and bummers

Root cause of the torn appends is JAB-008 (BASS drain): appendRecords' crash-ordering claim does not hold on the BASS path — resize+idx survive while record bytes are lost.

Outcome

UNCOMMITTED in work/PACK-003 per the no-post order: mod shared/ingest.js (+77/-21); test subrepo: mod CMakeLists.txt (registration line), new test/packsalvage.js; scratch/ holds log copies + diag scripts. Orchestrator re-verified repro + suite. Suggested commit: PACK-003: salvage-index torn keeper logs.