feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0#2649
Draft
jucor wants to merge 1 commit into
Draft
feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0#2649jucor 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
…-exact math_main at step 0
Aligns clojure-legacy emission and selection semantics with Clojure's
prep-main blob (conv_man.clj:45-74), per the step-0 battery diagnosis
(journal 2026-07-22 session 3; fingerprints in docs/divergences.json).
Battery effect: vw:uniform8 (8 steps), vw:single-cut and
biodiversity:uniform8 (8 steps) went from DIVERGENCE to full MATCH;
vw:front-loaded6 remains open (base-cluster count edge at small N).
Emission (Conversation.to_dict, legacy-gated, improved unchanged):
- group-clusters: members emitted as BASE-CLUSTER ids (Clojure folded
form); unfolded pids stay under the snake alias group_clusters.
- votes-base: per-base-cluster A/D/S bucket lists over sort-by-id
clustered members (agg-bucket-votes-for-tid, conversation.clj:601-608)
instead of whole-matrix int totals.
- pca: comment-projection + comment-extremity emitted (existing D12 fns).
- Sign parity: pca.center, base-clusters.x/y, group-clusters centers,
comment-projection negated at emission — Delphi's matrix is the
NEGATION of Clojure's (AGREE=+1 vs -1); comps are covariance-derived
and already equal (verified max|clj+py| = 1e-16 on center).
- repness: {gid: [finalize-cmt-stats-shaped entries]} (repness.clj:173),
internal dict preserved under repness_full for from_dict round-trip.
- mod-in/mod-out/lastModTimestamp: null until moderation applied.
- tids emitted in Clojure column (first-vote arrival) order with pca
arrays permuted alongside; from_dict inverts the center sign and
restores the arrival tracker in legacy mode.
Selection/stat parity:
- group-aware-consensus multiplies (A+1)/(S+2) over EVERY group — a
zero-S group contributes 1/2, not skipped (conversation.clj:639-641).
- repness rest-stats sum over the OTHER GROUPS only (repness.clj:125),
excluding unclustered voters from the comparison domain.
- Exact-score ties in repness/consensus selection resolve by Clojure's
stable sort over named-matrix column order: update_votes tracks
first-vote arrival order, conv_repness accepts tid_order and the
selectors iterate as-given in legacy mode.
Also: skip the three math-tree-hashing harness tests in delphi-only CI
images (no /math in the container; run 29881478306's 3 failures).
TDD: tests/test_legacy_blob_shape.py (25 tests, RED observed per fix).
commit-id:0add28f3
Delphi Coverage Report
|
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.
Aligns clojure-legacy emission and selection semantics with Clojure's
prep-main blob (conv_man.clj:45-74), per the step-0 battery diagnosis
(journal 2026-07-22 session 3; fingerprints in docs/divergences.json).
Battery effect: vw:uniform8 (8 steps), vw:single-cut and
biodiversity:uniform8 (8 steps) went from DIVERGENCE to full MATCH;
vw:front-loaded6 remains open (base-cluster count edge at small N).
Emission (Conversation.to_dict, legacy-gated, improved unchanged):
form); unfolded pids stay under the snake alias group_clusters.
clustered members (agg-bucket-votes-for-tid, conversation.clj:601-608)
instead of whole-matrix int totals.
comment-projection negated at emission — Delphi's matrix is the
NEGATION of Clojure's (AGREE=+1 vs -1); comps are covariance-derived
and already equal (verified max|clj+py| = 1e-16 on center).
internal dict preserved under repness_full for from_dict round-trip.
arrays permuted alongside; from_dict inverts the center sign and
restores the arrival tracker in legacy mode.
Selection/stat parity:
zero-S group contributes 1/2, not skipped (conversation.clj:639-641).
excluding unclustered voters from the comparison domain.
stable sort over named-matrix column order: update_votes tracks
first-vote arrival order, conv_repness accepts tid_order and the
selectors iterate as-given in legacy mode.
Also: skip the three math-tree-hashing harness tests in delphi-only CI
images (no /math in the container; run 29881478306's 3 failures).
TDD: tests/test_legacy_blob_shape.py (25 tests, RED observed per fix).
commit-id:0add28f3
Stack: