Repository navigation
release v0.0.21: fix over-limit nudge spam + voice (review MAJOR-1/2) - #64
Merged
Merged
Conversation
ranxianglei
added a commit
that referenced
this pull request
Aug 22, 2026
…k-normalization fix(wire): normalize inline demoted thinking into one identity space (issue #64)
This was referenced Aug 22, 2026
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 for review findings on 0.0.20 (MAJOR-1, MAJOR-2, MINOR-1, MINOR-2)
Oracle review of 0.0.20 found 4 issues in the
decideNudgeover-limit force path. This PR fixes all 4 + adds test coverage.MAJOR-1: perpetual nudge spam when nothing is compressible
compress.ts:916—shouldInject = overLimit || injectedTier !== nullfired even when all content was protected/already compressed (injectedTier=nullbutoverLimit=true).Fix: gate on actionable target:
Now
shouldInjectisfalsewhen there's truly nothing to compress — the truncate node (attruncate.threshold) is the safety valve for that case, not a nudge.MAJOR-2: over-limit nudge rendered as gentle
nudge-text.ts:149— voice decided byemergencyOverrideonly; the new[0.75, 0.95)force-nudge band rendered gentle with header "not an overflow warning" — self-contradicting at 94% usage.Fix:
isEmergency = !!breakdown?.emergencyOverride || !!breakdown?.overLimit— over-limit now uses emergency voice.MINOR-1: force loop accepted sub-minCompressRange ranges
compress.ts:907—info.pending < 1accepted any non-zero tier, including ranges belowminCompressRangethatapplyCompressionwould reject.Fix:
info.pending < config.compress.minCompressRange.MINOR-2: misleading comment
Comment claimed
emergencyThresholdPct"trips the truncate node" — they're independent knobs.Fix: rewritten to state independence.
Tests added (3 new, 230 total)
nudge.test.ts: "over-limit fires force-nudge when compressible content exists" + "over-limit does NOT inject when nothing is compressible (MAJOR-1 fix)"nudge-text.test.ts: "over-limit renders with emergency voice (MAJOR-2 fix)"Pre-flight
typecheck clean / 230 tests pass / build success