python-math #44: refactor(math): PR 14b/14c — readable two-phase stats + blob-injection pins - #2673
Draft
jucor wants to merge 1 commit into
Draft
python-math #44: refactor(math): PR 14b/14c — readable two-phase stats + blob-injection pins#2673jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 27, 2026
Draft
Draft
Draft
Draft
Draft
Draft
Draft
This was referenced Jul 27, 2026
Draft
Draft
This was referenced Jul 27, 2026
Draft
This was referenced Jul 28, 2026
Draft
3 tasks
…s + blob-injection pins ## What `GOAL_CUTOVER_READY.md` Phase 3, the clarity refactor (Julien ruling 2026-07-27: land the clean code PRE-cutover; spec in `HANDOFF_PR14_VECTORIZED_REFACTOR.md`). - 14c: `compute_group_comment_stats_df` is split into the plumbing (`_group_comment_vote_counts`: mapping, totals, cross-product, the `other_*` columns) and the statistics recipe (`_comment_stats_from_counts`: pseudocount probabilities, proportion tests on raw counts, representativeness ratios, two-proportion tests, signed metrics, the "repful" pick) — the recipe now reads like the scalar chain it replaced. Pure code motion: identical operations in identical order, with bit-identity guarded by the certification battery (which replays 20 recorded dataset entries through the engine and compares against Clojure reference recordings). - 14b: `TestBlobInjectionStats` injects the CLOJURE result blob's group memberships (unfolded through the blob's own base clusters) plus the dataset votes into the PRODUCTION stats path, and compares every repness entry in the blob per (gid, tid): n-success / n-trials / p-success / p-test / repness / repness-test / repful-for. Green on the `vw` AND `biodiversity` datasets (`repness-test` is compared at 2e-6 relative tolerance because Clojure emits it rounded). ## Also The three sub-threshold cleanups from the collapse-review agent: `CUTOVER_RUNBOOK.md` drops the stale engine-mode env line; the greedy-carry threshold test drops its now-duplicate `improved` parametrize label; two module docstrings updated to collapse-era wording. commit-id:acff8fbe
colinmegill
pushed a commit
that referenced
this pull request
Sep 8, 2026
…queue freshness audit ## Rename stragglers The four stale 'delphi' values for `math_env` — the column that keys each math result row; the server only reads rows matching its own setting — that the #2680 review caught are now 'python': the compose comment, `MATH_POLLER_DESIGN.md` §4, `CUTOVER_RUNBOOK.md` step 2 (which contradicted step 1 mid-runbook), and the `poller/__init__` docstring. ## Doc freshness audit (Julien request) - Improvement-queue item 9 marked (a) DONE (PR #2679: ~70x speedup, bit-identical, verdict serial-OK) with (b) left optional; item 10 marked DONE (PR #2673); item 12 added (persist warm-start state across restores — restart-induced K flips). - The queue header now points at the `improvements/*` park bookmarks (the jj bookmarks holding the deleted improved-mode branches for possible later re-landing). - The row for quirk Q11 — the legacy kmeans distance-cancellation quirk whose exact-0.0 ties decide cluster merges — gains the vectorization addendum: ties preserved bit-exactly; the dgemv/einsum kernels were rejected. - Quirks-row "legacy mode" phrasings are left as history — the preamble declares the mode collapse globally. commit-id:98853895
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
GOAL_CUTOVER_READY.mdPhase 3, the clarity refactor (Julien ruling 2026-07-27: land the clean code PRE-cutover; spec inHANDOFF_PR14_VECTORIZED_REFACTOR.md).compute_group_comment_stats_dfis split into the plumbing (_group_comment_vote_counts: mapping, totals, cross-product, theother_*columns) and the statistics recipe (_comment_stats_from_counts: pseudocount probabilities, proportion tests on raw counts, representativeness ratios, two-proportion tests, signed metrics, the "repful" pick) — the recipe now reads like the scalar chain it replaced. Pure code motion: identical operations in identical order, with bit-identity guarded by the certification battery (which replays 20 recorded dataset entries through the engine and compares against Clojure reference recordings).TestBlobInjectionStatsinjects the CLOJURE result blob's group memberships (unfolded through the blob's own base clusters) plus the dataset votes into the PRODUCTION stats path, and compares every repness entry in the blob per (gid, tid): n-success / n-trials / p-success / p-test / repness / repness-test / repful-for. Green on thevwANDbiodiversitydatasets (repness-testis compared at 2e-6 relative tolerance because Clojure emits it rounded).Also
The three sub-threshold cleanups from the collapse-review agent:
CUTOVER_RUNBOOK.mddrops the stale engine-mode env line; the greedy-carry threshold test drops its now-duplicateimprovedparametrize label; two module docstrings updated to collapse-era wording.commit-id:acff8fbe
Stack: