python-math #40: feat(math): mode collapse C4 — delete-only improved branches (ban filter, tally sources, blob shape) - #2669
Draft
jucor wants to merge 1 commit into
Draft
python-math #40: feat(math): mode collapse C4 — delete-only improved branches (ban filter, tally sources, blob shape)#2669jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 27, 2026
python-math #43: docs(delphi): s7 goal state + journal — mode collapse executed, battery 20/20
#2672
Draft
Draft
Draft
Draft
Draft
Draft
Draft
Draft
This was referenced Jul 27, 2026
Draft
Draft
Draft
Draft
This was referenced Jul 28, 2026
Draft
3 tasks
…branches (ban filter, tally sources, blob shape) ## What Phase 2, chunk C4 of `GOAL_CUTOVER_READY.md` (the standing goal document for making the Python math engine ready to replace the Clojure one in production). The "mode collapse" removes the engine-mode switch that selected between clojure-legacy behavior (reproducing the old Clojure engine exactly) and improved behavior; this chunk executes the delete-only branches — the ones not parked for later re-landing (inventory in journal session 7). After it, `conversation.py` and `pca_kmeans_rep/` are entirely `engine_mode`-free (grep: 0 hits). ## Deletions — the Clojure-exact behavior is now the only path - Quirk Q1 ban filtering deleted outright. Q1 is the quirk that the Clojure engine never honored participant bans (`participants.mod = -1`); Julien ruled that bans are not a Polis feature, so improvement-queue item 1 is dropped rather than parked. `rating_mat` is now a raw copy of the vote matrix, and the banned-participant set (`mod_out_ptpts`) is still ingested but has no effect — exactly like the Clojure worker. - Repness `tid_order` (the comment ordering in the representativeness output): always the arrival-order tie-break, i.e. ties resolve by first-vote arrival order. - Group-votes tally source: always `raw_rating_mat` (3 call sites). - In-conv — the set of participants counted as "in the conversation" for clustering: always the carry + greedy-floor rule; the improved threshold-only arm is deleted. The JSON result blob (`math_main.data`) serializes the persisted in-conv set when present. - Blob `votes-base`: always the Clojure-exact per-bucket vote vectors. - Group-aware consensus: always the every-group Laplace product, where zero-vote groups contribute the smoothed factor 1/2 (divergence fingerprint FP-b3670cb052). - `to_dict`: `_apply_legacy_blob_shape` runs unconditionally; `from_dict`: the watermark / arrival-order / sign / permutation restore runs unconditionally. - Repness totals: the "rest" comparison domain is always clustered voters only. ## Testing Deleted 18 improved-mode test pins across 6 test files (12 were failing against the collapsed engine, 6 passed only vacuously); 65+34 tests green on the affected files. commit-id:fe2b0bb2
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.
What
Phase 2, chunk C4 of
GOAL_CUTOVER_READY.md(the standing goal document for making the Python math engine ready to replace the Clojure one in production). The "mode collapse" removes the engine-mode switch that selected between clojure-legacy behavior (reproducing the old Clojure engine exactly) and improved behavior; this chunk executes the delete-only branches — the ones not parked for later re-landing (inventory in journal session 7). After it,conversation.pyandpca_kmeans_rep/are entirelyengine_mode-free (grep: 0 hits).Deletions — the Clojure-exact behavior is now the only path
participants.mod = -1); Julien ruled that bans are not a Polis feature, so improvement-queue item 1 is dropped rather than parked.rating_matis now a raw copy of the vote matrix, and the banned-participant set (mod_out_ptpts) is still ingested but has no effect — exactly like the Clojure worker.tid_order(the comment ordering in the representativeness output): always the arrival-order tie-break, i.e. ties resolve by first-vote arrival order.raw_rating_mat(3 call sites).math_main.data) serializes the persisted in-conv set when present.votes-base: always the Clojure-exact per-bucket vote vectors.to_dict:_apply_legacy_blob_shaperuns unconditionally;from_dict: the watermark / arrival-order / sign / permutation restore runs unconditionally.Testing
Deleted 18 improved-mode test pins across 6 test files (12 were failing against the collapsed engine, 6 passed only vacuously); 65+34 tests green on the affected files.
commit-id:fe2b0bb2
Stack: