Repository navigation
fix: Preserve raw sums for exact style profile updates - #809
Draft
buildingjoshbetter wants to merge 4 commits into
Draft
buildingjoshbetter wants to merge 4 commits into
buildingjoshbetter wants to merge 4 commits into
Conversation
This was referenced Oct 8, 2026
This branch has not been deployed
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.
Scope
Raw-sum foundation for #747, stacked on #807 with the atomic L0 builders from #794 included by a normal prerequisite merge. This draft is preparatory: legacy-profile migration and maintenance routing are still required before release or issue closure.
Problem and correction
The incremental updater multiplied an already normalized profile by its count. Normalization discards the magnitude needed for an exact running sum. For vectors [1, 0], [0, 1], [0, 1], the old incremental result was approximately [0.505449, 0.862856]; batch arithmetic produces [0.447214, 0.894427].
Validation
b95fda3983a90643f7d145d58703f4f48957dead264cbada5629819f72150787.eeac59b7ad372053b78c61dbc16fed8f0a1c71add9d398660d537f8ce763fc35.Release requirements and limits
The migration bridge must rebuild legacy sums from source, preserve the old generation until atomic publication, and avoid appending a triggering message twice when the rebuild snapshot already contains it. Normal startup must not synchronously scan the corpus. Dirty source coverage and failed rebuilds need explicit pending/degraded state. These integration steps are not implemented by this draft.
Arithmetic equivalence is established for the same ordered vectors. Different message accumulation orders are not certified as bit-identical. No native latency, process-memory, MPS or thermal improvement is claimed. Only generated synthetic test data was used; no personal memories, transcripts or credentials. No main merge, issue closure or release.