Repository navigation
post-compress tail respects the kernel's own nudge eligibility (shouldInject) — sub-threshold leftovers stop nagging (#3075) - #3090
Merged
Conversation
…es on sub-threshold leftovers (#3075 / #1387, pi #521) postCompressTail's fallback live recompute (internal lanes with no prepare-time offer) listed compressibleRanges from the kernel's decision struct even when the kernel itself judged the ranges below threshold/floor/cadence (shouldInject === false — reason "max compressible N < threshold M; growth 0 < floor K"). After #3058 shrank the default preserveRecentMessages window 5 → 3, a folded session could leave a 1-message residue outside the protection zone: the receipt advertised it every turn at zero pressure and the stop signal never fired — the exact nag disease #1387 (pi #521) fixed. The tail now lists ranges only when the kernel would actually inject; on clean success with nothing actionable the stop signal fires instead. Real-pressure recompute paths (preflight overflow-compress) keep shouldInject === true and are unchanged. #3084's preserveRecentMessages pins stay: they pin the protection premise itself; two new tests pin the default-config semantic both ways (sub-threshold leftover → stop signal; over-limit leftover → still advertised).
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3517-pr.3090.d799d50This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3090.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.389-master.e66bd31 # this exact build
npm install -g billion-context@master # always the newest merged build
|
ranxianglei
added a commit
that referenced
this pull request
Oct 14, 2026
ranxianglei
added a commit
that referenced
this pull request
Oct 14, 2026
test: regen storage-render goldens for the #3090 fold-turn stop signal
This was referenced Oct 14, 2026
LoveDoLove
pushed a commit
to LoveDoLove-Forked-Projects/billion-context
that referenced
this pull request
Oct 14, 2026
…op signal (ranxianglei#3090 follow-up) ranxianglei#3090 made the post-compress tail honor the kernel's shouldInject verdict: at the drive's fold turn the leftover sits below the kernel's threshold, so the receipt now ends with the stop signal instead of advertising a sub-threshold range. Wire-visible by design (the receipt text is resent history): turn-9 body digests shrink accordingly (-417 B on chat) and the persisted-view section digests (stats/ metadata/stateDigest) shift with the tail content they cover. Landmarks (foldAt/editedAt/summaryFrom) and all other turns are byte-identical. Restores the master test matrix (ranxianglei#3090's CI legs were red on the stale goldens).
Merged
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.
Fixes the semantic half of #3075. #3084 (test pins) fixed the CI red; this closes the behavior hole underneath it.
What was wrong
postCompressTail's fallback path (internal lanes with no prepare-time offer) ran a live recompute and listed anycompressibleRangesthe kernel's decision struct carried — even when the kernel itself had judged those ranges below threshold/floor/cadence (shouldInject === false, reasonmax compressible N < threshold M; growth 0 < floor K).After #3058 shrank the default
preserveRecentMessages5 → 3, a folded session can leave a 1-message residue outside the protection window: the receipt advertised that residue every turn at zero pressure and the stop signal never fired — the exact nag disease #1387 (pi #521) originally fixed. Demonstrated on masterc800ed1b(pre-#3084): both unpinned#1387tail tests red, receipt offeringm00003–m00003 1 msgs 1.3Kwhile the kernel's own reason string said it was below threshold.The fix (host-side; the kernel contract was already right)
NudgeDecision.shouldInjectis the kernel's own eligibility verdict. The tail recompute now lists ranges only whenshouldInject === true; otherwisebase = []and the stop signal fires on clean success (never advertise what the kernel wouldn't nudge). Real-pressure recompute paths (preflight overflow-compress) always haveshouldInject === true— unchanged.Tests
preserveRecentMessages: 5pins are kept untouched — they pin the protection premise of the two original tests, which remains valid.preserveRecentMessages: 3) semantic pin — sub-threshold leftover (m00003, 1 msg 1.3K) is not advertised, stop signal fires.shouldInject === true): remaining range is advertised, stop signal suppressed.Verification
tests/compress-success-tail.test.ts10/10 (8 existing + 2 new)tsc --noEmitclean