Skip to content

Commit 7f53663

Browse files
ychanclaude
andcommitted
refactor(auto-eval): freeze DETERMINISM_TEST_COHORT as tuple
Address review comment #3 on PR #764 Sub-project A: the determinism gate's cohort is a fixed contract and tests shouldn't be able to mutate it. Switching [] → () gives the CI gate the immutability the spec called for at zero runtime cost. Both consumers (auto_eval.compute_cqs and tests/test_determinism.py) iterate the cohort; neither appends or indexes by slice, so the tuple is drop-in compatible. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8486d70 commit 7f53663

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

edgar/xbrl/standardization/tools/auto_eval.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@
3838

3939
# 10-company fixed cohort used by the determinism CI gate
4040
# (tests/xbrl/standardization/test_determinism.py). Sector-spread subset of
41-
# EXPANSION_COHORT_50 with stable baselines.
42-
DETERMINISM_TEST_COHORT = [
41+
# EXPANSION_COHORT_50 with stable baselines. Frozen as a tuple so tests can't
42+
# accidentally mutate the gate's cohort.
43+
DETERMINISM_TEST_COHORT = (
4344
"AAPL", "MSFT", "JPM", "BAC", "XOM",
4445
"WMT", "JNJ", "CAT", "V", "NEE",
45-
]
46+
)
4647

4748
# Threshold = 5 × max(observed_noise, 0.00001). Measured 2026-04-06: observed
4849
# per-company EF-CQS delta was 0.0 on all 10 cohort members, so the floor wins.

0 commit comments

Comments
 (0)