Skip to content

ci: ratchet the number of distinct ATLAS_* env names (#117) - #118

Merged
AzeezIsh merged 3 commits into
mainfrom
ci/env-var-budget
Nov 2, 2026
Merged

AzeezIsh merged 3 commits into
mainfrom
ci/env-var-budget

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Stops the env-var sprawl from growing (#117). It's the mechanism side of the diet: pruning PRs lower the number, and nothing raises it.

  • scripts/check_env_budget.py (stdlib) counts distinct "ATLAS_…" literals across crates/**/*.rs. That catches knobs read through helpers (opt_in, tunable, env_usize, one, …), not only env::var: 613 names on main vs 497 direct env::var reads.
  • Above the ceiling: fail, with the message "retire one, or make it a CLI flag / MODEL.toml field".
  • Below the ceiling: fail with "lower scripts/atlas_env_budget.txt to N", so each pruning win is locked in.
  • New CI job env-budget, next to the SPDX and kernel-shadow checks.

Draft on purpose; landing order. The #112 train adds 2 names (ATLAS_DFLASH_CTX_CARRY from #104, ATLAS_HIP_MOE_GROUPED_MIN_TOKENS from #80), and #100 adds 2. So this lands right after #112, with the budget re-measured on the merged main (expected 615). #100 would then need to retire two names or move them to flags, per the new CONTRIBUTING rule.

No engine code. CI is the verification.

🤖 Generated with Claude Code

scripts/check_env_budget.py counts distinct "ATLAS_…" string literals across
crates/**/*.rs, which catches knobs read through helpers (opt_in, tunable,
env_usize, …) as well as env::var. It fails above the ceiling in
scripts/atlas_env_budget.txt and asks for the file to be lowered when pruning
brings the count below it, so the number only moves down. Main today: 613
names (497 read directly via env::var).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Status 2026-09-28. This lands after the per-deployment trains #131 and #132. Both add ATLAS_* names, including #127's opt-in deferred-commit switch, so the ceiling in scripts/atlas_env_budget.txt gets re-measured on main after they merge (613 at fdf94c759). It then ratchets from there.

@AzeezIsh

AzeezIsh commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Reworked onto main (head 2ff614897):

Effect once merged: any PR that adds a new distinct "ATLAS_…" literal under crates/ fails CI until it retires one, or raises the ceiling as an explicit, reviewable change. Any PR that removes one has to lower the number.

@AzeezIsh
AzeezIsh marked this pull request as ready for review November 2, 2026 06:37
@AzeezIsh
AzeezIsh merged commit 7b7ac95 into main Nov 2, 2026
26 of 28 checks passed
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.

1 participant