Skip to content

feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0#2649

Draft
jucor wants to merge 1 commit into
spr/edge/d1ae732bfrom
spr/edge/0add28f3
Draft

feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0#2649
jucor wants to merge 1 commit into
spr/edge/d1ae732bfrom
spr/edge/0add28f3

Conversation

@jucor

@jucor jucor commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

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


Stack:


⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

This was referenced Jul 22, 2026
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 22, 2026 02:10
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure… feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/d1ae732b July 22, 2026 02:10
@jucor
jucor force-pushed the spr/edge/0add28f3 branch from f5a2c36 to aa5a214 Compare July 22, 2026 02:31
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 22, 2026 03:54
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 22, 2026 06:50
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure… feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/d1ae732b July 22, 2026 06:50
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 22, 2026 08:11
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure… feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/d1ae732b July 22, 2026 08:11
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 22, 2026 09:58
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure… feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/d1ae732b July 22, 2026 09:58
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 22, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 22, 2026 11:21
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure… feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 Jul 22, 2026
@jucor
jucor changed the base branch from edge to spr/edge/d1ae732b July 22, 2026 11:21
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 feat(math): clojure-legacy blob emission + selection parity — Clojure… Jul 24, 2026
@jucor
jucor changed the base branch from spr/edge/d1ae732b to edge July 24, 2026 06:02
@jucor jucor changed the title feat(math): clojure-legacy blob emission + selection parity — Clojure… feat(math): clojure-legacy blob emission + selection parity — Clojure-exact math_main at step 0 Jul 24, 2026
@jucor
jucor changed the base branch from edge to spr/edge/d1ae732b July 24, 2026 06:02
@jucor
jucor requested a review from Copilot July 25, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants