docs(env): refresh ENVIRONMENT.md — document all 34 drifted env vars#353
Merged
Merged
Conversation
ENVIRONMENT.md says it is "generated from source by scanning every getenv() site", but it had drifted far behind the code. Reconciling the doc against the C sources (the MAINTAINING-DOCS.md procedure) found 34 engine env vars read by the code but undocumented, and nothing stale. Added (defaults/effects taken from source, per the maintenance rules - nothing invented): Performance/tuning (11): COLI_NUMA, PILOT_TWO, COUPLE/COUPLE_K/COUPLE_D, ROUTE_TRACE, COLI_NO_FUSED_PAIR, DISK_SPLIT, I4S, SPEC_PIN, COLI_RAM_OVERCOMMIT CUDA (16): COLI_CUDA_ATTN_SHARD, COLI_CUDA_PIPE/_PIPE_SHARD/_PIPE_S_MIN, COLI_CUDA_MTP, COLI_CUDA_ASYNC, COLI_CUDA_DUAL_PROJ, COLI_CUDA_W4_PACKED, COLI_CUDA_TC_INT4/_TC_MIN_ROWS/_TC_W4A16/_TC_W4A16_MIN, COLI_CUDA_SHARED_W4A16/_SHARED_W4A16_MIN_ROWS, COLI_METAL_UNTRACKED Advanced/debug (7): SCHEMA, EXPERT_BUDGET/_EXPERIMENTAL, TOKENS, SCORE_PREFIX, REPIN_VERBOSE, PPL (olmoe-only), COLI_PROMPT (CLI section) Also bumped the "Generated from" line to dev @ d5327e2 and noted the scan now covers olmoe.c, backend_cuda.cu, backend_metal.mm (not just glm.c). Verified: the code-vs-doc diff is now empty - all 111 distinct C env vars are documented. The reverse diff (doc vars not in C code) is 14 entries, all legitimate: 11 Python-side vars correctly in the Server/CLI section, plus 3 prose constants (IOSQE_ASYNC, O_DIRECT, the VAR format word).
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
docs/ENVIRONMENT.mdclaims to be "generated from source by scanning everygetenv()site" — but it had drifted far behind the code. Running the exact reconciliation procedure documented inMAINTAINING-DOCS.md, I found 34 engine env vars read by the code but undocumented, and nothing stale to remove.What changed
Added all 34 vars to the correct sections. Defaults and effects are taken from the source (the ternary default + inline comment at each call site), per the maintenance rules — nothing invented.
Performance / tuning (11):
COLI_NUMA,PILOT_TWO,COUPLE/COUPLE_K/COUPLE_D,ROUTE_TRACE,COLI_NO_FUSED_PAIR,DISK_SPLIT,I4S,SPEC_PIN,COLI_RAM_OVERCOMMITCUDA (16):
COLI_CUDA_ATTN_SHARD,COLI_CUDA_PIPE/_PIPE_SHARD/_PIPE_S_MIN,COLI_CUDA_MTP,COLI_CUDA_ASYNC,COLI_CUDA_DUAL_PROJ,COLI_CUDA_W4_PACKED,COLI_CUDA_TC_INT4/_TC_MIN_ROWS/_TC_W4A16/_TC_W4A16_MIN,COLI_CUDA_SHARED_W4A16/_SHARED_W4A16_MIN_ROWS,COLI_METAL_UNTRACKEDAdvanced / debug (7):
SCHEMA,EXPERT_BUDGET/EXPERT_BUDGET_EXPERIMENTAL(noting the #303 quarantine),TOKENS,SCORE_PREFIX,REPIN_VERBOSE,PPL(olmoe-only),COLI_PROMPT(in the CLI section)Also bumped the "Generated from" line to
dev @ d5327e2and noted the scan now coversolmoe.c,backend_cuda.cu,backend_metal.mm(not justglm.c).Verification
The code-vs-doc diff is now empty — all 111 distinct C env vars are documented:
The reverse diff (doc vars not in C code) is 14 entries, all legitimate: 11 Python-side vars (
COLI_API_KEY,COLI_DEBUG, …) correctly placed in the "Server / CLI" section (they're read bycoli/openai_server.py, not the C engine), plus 3 prose constants named inside descriptions (IOSQE_ASYNC,O_DIRECT, and theVARformat placeholder).Docs-only change; no build/test impact.