Repository navigation
Consumer-path audit proofs: ledger drop-fraction + honest decompress failure for reaped blocks - #2738
Merged
Merged
Conversation
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2983-pr.2738.aec8f63This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2738.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
[bot] 🏷 Reviewing this PR now (branch |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.262-master.c69eff7 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2732 (merged): a systematic audit of every consumer of the signals we hardened this week, checking which consumption paths still lack proofs. Two gaps found, both closed here.
1. Ledger accrual under a sanctioned reasoning drop (proof, #2202/#2732)
The #2202 coverage ledger (
src/cache-ledger.ts) has three proven classes: full coverage (book 1.0/request), verified total loss (freeze), never-present (status quo). The model-switch drop shape — thinking cores permanently off the wire, text cores verbatim forever — sits BETWEEN them and was unproven.New test in
tests/issue2202-coverage-accrual.test.ts: drives the real seam (recordCacheFoldsFromBlocks → reconcileFoldCoverage → recordCacheSample) through a reasoning-ContentType fold; asserts:requestsAfter = 1 + 3*(4/7), monotone)z=0throughout (hardIds denominator) — no false reapSemantics confirmed correct as-is (no src change): counting dropped reasoning as absent is honest accounting.
2. Decompress on a reaped block: honest failure (fix, #2695)
Found by the audit:
reapDestroyedSubstrate(#2707) removes zombie blocks fromstate.blocksbut writes a preCompactionArchive entry.resolveDecompresslooks blocks up in kernel state first — a reaped block misses, falls through the derived path, and returns the generic[Block bN not found]. The archive gate that names the real reason was unreachable for reaped blocks. The model gets here legitimately (citing a ref from a summary it saw), and "not found" tells it the ref never existed.Fix in
src/decompress-shared.ts(host-only, no kernel change): when the block is absent from state, check the same-session preCompactionArchive first and fail with the recorded reason ("…archived block (covered substrate destroyed by unannounced client history rewrite (#2695))…cannot be restored"); same check added per-ancestor in the derived loop. Unarchived unknown ids keep the exact "[Block bN not found]" behavior (#1333 assertions unchanged).Proof: new test in
tests/compaction-archive.test.tsdrives the REAL reap (three total-loss reconcile passes) then decompress — asserts the honest reason, no "not found", blockContents retained (#395 semantics).A/B teeth: on master (worktree @251cb961) the test fails with
[Block bReap not found]; on this branch it passes.Audit table (signal → consumers → proof status)
cRemaining open gaps from the census (bigger items, not in this PR): multi-instance concurrent state writes (#394 class), tool-args adversarial corpus (SSE boundaries × partial_json × retry × rollback).
Config surface
No config changes.
Kernel boundary
No changes under
kernel/— both files are host-side.