Repository navigation
Conversation
The storage driver persists fold-anchor SimHash values. Regenerate its four wire goldens after correcting signed-vote overflow. Verification restricts the persisted-state delta to foldAnchors.*.sh; outbound bodies and all other state remain unchanged.
ranxianglei
pushed a commit
that referenced
this pull request
Nov 14, 2026
…n ref-ledger reset detectGenerationBoundary() already proves that the persisted ref ledger belongs to a previous generation: >=2 distinct above-frontier citations at request #1 (ranxianglei#4305). It only recorded a standing note, so the compression ledger was never repaired. Observed on 0.1.212 with a ZCode client (ranxianglei#6061, ranxianglei#5589): acp_status advertised the current generation (highest allocated ref m00314) while compress validated against the stale map (highest allocated ref m159141, 586 blocks) and rejected every live ref with "every ref is unknown to this session [cause: stale-ref]" — 20 consecutive failures, circuit breaker armed, and the nudge kept offering the same unreachable ranges. The detector's verdict is exactly the evidence the native-compaction rebase has always required, so arm it there: markNativeCompactionBoundary() sets pendingRebase, and the next request runs resetSessionCompression() + reserveRefsThrough(), re-anchoring the map onto the generation the client is actually minting. Also honour a pending boundary at the head of the anthropic lane. Its rebase call sits behind the dsh/codex client-side-compaction signature, which a plain model or upstream switch never produces, so an armed boundary would otherwise wait forever on that lane (openai/google/responses reach reconcile through their own branches; responses already reconciles unconditionally). Verified: npm run typecheck clean; tests/generation-boundary.test.ts 12/12. (cherry picked from commit 7a1acae)
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.
Problem
Signed 8-bit counters overflow within the existing 256-feature sampling budget, collapsing repeated-message sketches and causing unrelated messages to collide.
Changes
Use signed 16-bit vote counters while preserving sampling and the serialized sketch format.
Regression coverage
The new suite checks repeated Latin and CJK shingles across 127/128 and 255/256 votes and across stride changes, plus distinct unrelated sketches at the 256-feature cap.
Validation
Passed against exact fork commit
d90c2b6320e58f4b9b7c42d4b22a77d503aa511fin an isolated GitHub Actions checkout: validation job. The targeted regression and related suites,npm run typecheck, andnpm run buildall passed on Node 22. This is targeted verification, not the full upstream CI matrix.Related work
Original feature ranxianglei#2266; no matching overflow correction found.
Purpose of this fork PR
Internal verification only. The upstream PR has not been opened; this fork PR is excluded from contribution and merged counts.