Repository navigation
Description
Distinct from #351. That issue is about the runtime_log2_ratio rule being symmetric, so genuine speedups fail it. This one is that the same job disagrees with itself on identical code.
Proof
Commit 33ec149, workflow Remaining issue implementation, job Canonical 19/19 KMeans parity:
- run 32125204157, event
push— failure - run 32125227080, event
pull_request— success
Same SHA. Same job. Opposite results.
Corroborating evidence gathered across this campaign:
- PRs perf: look LabelEncoder.transform labels up by search over the sorted classes (Roadmap #92) #364, perf: fit LabelBinarizer classes with the shared sorted-unique pass (Roadmap #89) #365, perf: write LabelBinarizer.transform rows directly instead of cell by cell (Roadmap #90) #366 and perf: select the FunctionTransformer kind once instead of per element (Roadmap #67) #367 all contain
33ec149and all pass the job. - Commits
a5dc732and19e7356each produced one passing and one failing run on identical SHAs. - In the RandomForest stack, perf: RandomForestClassifier.predict reduces over the shared vote kernel (roadmap #19) #340 is fully green while perf: RandomForestClassifier.predict_proba tree-major vote kernel (roadmap #20) #334 and perf: RandomForestClassifier.fit allocation and split-scan cleanup (roadmap #18) #349 on either side of it each show one failure. A check that passes in the middle of a stack and fails at both ends is not responding to the code.
- The failing runs consistently name the same two rows regardless of what the PR touched:
LogisticRegression/digitsruntime log2 ratio, andRidge/diabetesr2 delta1.79e-07 -> 4.77e-07. Those appear on branches that touch neither estimator, includingopt/300-labelencoder-fit,opt/274-featureunion-transformandopt/211-pca-fit. gh run list --branch mainshows the parent workflow failing onmainitself in roughly 3 of the last 5 runs.
Why it matters
Every PR in the current optimization campaign carries this red mark, so the signal is now pure noise. Contributors are being trained to ignore the one gate that would catch a real parity regression, and reviewers cannot tell a genuine failure from the background rate.
Likely causes worth checking
The 4.77e-07 Ridge delta is at the edge of f32 resolution, and absolute_noise_floor in disparity_regression_policy.json is 1e-07, so a noise floor an order of magnitude too tight would explain the score half. The runtime half is wall-clock on a shared runner with no repeat-and-median, unlike run_headline.py which does repeat and take medians.
The push/pull_request split also means the job runs twice per commit, doubling the chance that at least one red mark appears on any given PR.
Related: #351 (symmetric rule), and the freeze-results dependency noted there means a failure on main prevents the baseline refreezing, so drift accumulates.
Activity
godofecht commentedon Aug 18, 2026
Second independent confirmation, from a different agent on a different file (
ensemble.flow, the Bagging stack).Commit
2016062a, same workflow, two minutes apart:push, 11:10:20Z — successpull_request, 11:12:38Z — failureIdentical SHA, opposite results, same
push/pull_requestsplit as the33ec149pair in the issue body.The failing run cites
('LogisticRegression','digits','accuracy') runtime log2 ratio 1.0785 -> -2.1404. Two things make that clearly spurious:LogisticRegressionlives inlinear.flowand is unreachable from anything in the Bagging stack, and the field being compared is wall-clock despite the tuple namingaccuracy.Note the direction here is a drop of 3.2 in log2, i.e. Flow appearing to get dramatically slower on a row nobody touched, which is the runner being noisy rather than any real measurement.
Also worth recording: the same gate is green on PR #387, which carries a genuine 577x change to
bagging_regressor_predict. So the gate passed the one PR in that stack that actually moved a large amount of work, and failed the one that measured flat. That is the opposite of what a working regression detector would do.This is #373, not #351. The two are easy to confuse because they surface as the same red mark, and at least one agent in this campaign attributed this instance to the symmetric-rule bug. Worth keeping them distinct: #351 needs a policy change, this one needs the measurement to stop being wall-clock on a shared runner without repeat-and-median.
fix: pin BLAS threads to 4 rather than 1 in the canonical benchmark
godofecht commentedon Aug 18, 2026
Root cause found, and both hypotheses in my issue body were wrong. Correcting the record.
It is OpenBLAS thread count, left to runtime detection. Not the noise floor, and not the absence of repeat-and-median.
Proven by a CI experiment pinning
OPENBLAS_NUM_THREADS:-1.88sits inside the-1.73..-2.48band that every failing run reported, and at 1 thread the headline drops to8 Flow wins, exactly as those runs logged. Flow's LogisticRegression callscblas_sgemvtwice per LBFGS iteration on a 1437x65 matrix and gains roughly 8x from threads; sklearn gains less, so the ratio swings about 3 log2 units whenever the library changes its mind about thread count.The same experiment moved
KernelRidge_RBF'sscore_abs_difffrom1.79e-07to1.20e-07on identical code, two float32 ulps. That is the same phenomenon as the1.79e-07 -> 4.77e-07moves the gate kept rejecting, so the score half and the runtime half have one cause, not two.My noise-floor hypothesis was directionally useful but wrong about the mechanism:
1e-07IS below the float32 ulp scale of the metric it guards (scores near 0.5, one ulp = 3e-8), so it needed raising regardless. But raising it alone would not have fixed this.Two further findings that matter more than the ones I filed:
environment_idhashes only the software stack, so it readc6f5f30d77c794d7on passing and failing runs alike andsame_environment_only: truenever protected anything. The 40 sampled passing runs split into two hardware classes differing systematically by up to 0.51 log2; two runs of the same branch landed on an EPYC 9V74 and an EPYC 7763.The three
mainfailures I cited in the issue body were not this gate at all. All three werefreeze-resultslosing a concurrentgit pushrace. I confirmed this in the run logs:! [rejected] HEAD -> main (fetch first)in theFreeze validated evidence on mainstep. That is why the baseline went stale, and it is a different defect from the one this issue describes.Fix is in PR #401, which closes this and #351 together since they land in the same rule and code path.
Merge pull request #401 from godofecht/fix/351-373-disparity-gate