feat(delphi): acceptance canonicalization — suppress cross-engine ordering artifacts in certify comparer#2648
Draft
jucor wants to merge 1 commit into
Draft
feat(delphi): acceptance canonicalization — suppress cross-engine ordering artifacts in certify comparer#2648jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 22, 2026
Draft
docs(delphi): R1-parity goal docs, journal (2026-07-18 → 07-22 s3), quirks + divergence ledger
#2626
Draft
Draft
…ering artifacts in certify comparer Clojure emits tids/in-conv (and everything positionally aligned to them: pca center/comps rows/comment arrays, base-clusters columns) in hash/insertion order; Python emits sorted. Both blobs are internally consistent, so cross-engine array order is not a semantic divergence. canonicalize_blob() (crosslang.py) normalizes both sides inside project_acceptance: tids sorted with tid-aligned pca arrays re-indexed; in-conv/mod-in/mod-out/meta-tids sorted when lists (None passes through); base-clusters columns re-indexed by sorted id, members sorted; group-clusters sorted by id, members sorted. votes-base is deliberately NOT permuted (already sort-by-:id-aligned on both engines by construction, conversation.clj:593). Kills ~850 of ~1030 step-0 battery divergences as ordering artifacts; the residual real roots (sign convention, votes-base shape, emission gaps) are ledgered in docs/divergences.json. Also canonicalizes run-arbitrary PCA COMPONENT SIGNS: Clojure's first-tick power iteration has no start vectors, so its unseeded init flips component signs between ITS OWN runs (observed on a vw single-cut re-record: comps[1] + base-clusters.y negated vs the prior recording). Each component's sign is fixed deterministically (max-|entry| positive, evaluated after tid alignment) and every component-aligned array flips with it (comps row, comment-projection row, base-clusters x/y, group-clusters center[k]); pca.center is a data mean and never flips. An inconsistent flip (y negated without comps[1]) still diverges. commit-id:d1ae732b
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.
Clojure emits tids/in-conv (and everything positionally aligned to them:
pca center/comps rows/comment arrays, base-clusters columns) in
hash/insertion order; Python emits sorted. Both blobs are internally
consistent, so cross-engine array order is not a semantic divergence.
canonicalize_blob() (crosslang.py) normalizes both sides inside
project_acceptance: tids sorted with tid-aligned pca arrays re-indexed;
in-conv/mod-in/mod-out/meta-tids sorted when lists (None passes through);
base-clusters columns re-indexed by sorted id, members sorted;
group-clusters sorted by id, members sorted. votes-base is deliberately
NOT permuted (already sort-by-:id-aligned on both engines by construction,
conversation.clj:593). Kills ~850 of ~1030 step-0 battery divergences as
ordering artifacts; the residual real roots (sign convention, votes-base
shape, emission gaps) are ledgered in docs/divergences.json.
Also canonicalizes run-arbitrary PCA COMPONENT SIGNS: Clojure's
first-tick power iteration has no start vectors, so its unseeded init
flips component signs between ITS OWN runs (observed on a vw single-cut
re-record: comps[1] + base-clusters.y negated vs the prior recording).
Each component's sign is fixed deterministically (max-|entry| positive,
evaluated after tid alignment) and every component-aligned array flips
with it (comps row, comment-projection row, base-clusters x/y,
group-clusters center[k]); pca.center is a data mean and never flips.
An inconsistent flip (y negated without comps[1]) still diverges.
commit-id:d1ae732b
Stack: