Repository navigation
feat(tools): add the APS5_* and ANYPS5_* environment reference and check it - #6078
Conversation
|
Thanks for this. I checked the rows we use most against the code at the PR's base (f785b88). Most of them match. A few need fixing:
Smaller notes:
These rows match the code: AI-assisted: yes |
4ed20bf to
b6b707f
Compare
|
Thanks, all of it is taken:
|
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Rebased onto current The list is 24 names rather than the 21 in your review:
Two notes on how the rows are written, since they are the part worth re-checking:
On the overlap bot: #6757 adds its |
|
Picking this up while @adriadam10 is away. The 21 names from his review are all documented now, thanks. Main has added 7 more since your rebase ( |
…take the review rows
5071f60 to
5f10ea8
Compare
|
@oneandonlydean thanks for the pass. Rebased onto current The list is 10 names rather than the 7 in your message: Two rows are the reader form the scanner matches, not what the value means:
Two notes on placement:
I also fixed the document's opening line, which still named only Verified at this head: AI-assisted: yes |
|
Thanks for adding the rows, the check now passes on current The scanner doesn't see names read through helper functions, and the stale rule then rejects their rows. On the merged tree these are read but have no row:
Adding a row for any of them fails Optional, but it would stop the two scanners drifting apart: have |
|
One more suggestion: instead of skipping heads without ENVIRONMENT.md, could the conventions rule check only the env names a PR's own diff adds? Then PRs branched before this one can't land undocumented reads, and a later PR doesn't fail for names it didn't touch. |
|
@oneandonlydean thanks, I applied both points. Helpers and wide strings (
Diff-based rule (
One trade-off: with this model, CI no longer catches an undocumented name that reached |
b086b68 to
ea01ee8
Compare
|
Thanks, the diff-based rule matches Dean's suggestion and the earlier checks still pass on current main. Two small things: (1) a PR that deletes a row in docs/dev/ENVIRONMENT.md for a name core still reads isn't reported, because the diff only covers |
|
@oneandonlydean both done, plus the nit. Removed rows ( Registration ( Hunk tracking (
The offer from my previous comment still stands: I can run the full |
The requested changes are done and re-reviewed on the current head.
What
Add a reference for the
APS5_*andANYPS5_*environment variables and a check that keeps it current, as proposed in discussion #1284.docs/dev/ENVIRONMENT.md: every name the code reads throughgetenv,IsEnvironmentSet,kibSetting,MaskFromEnvironment,EnvInt,configured/PipelineSwitch,environmentCount,GetEnvironmentVariableA,GetEnvironmentVariableWandaddWideString(436 today), one table per library, with its kind, the value used when it is unset, the source file and a one-line description.tools/env_reference.py: lists the names the code reads with their kind and default, emits the table rows (--table) and compares them with the document (--check).tools/check_conventions.py: a newenv-referencerule (hard failure, as discussed). It reads the pull request's own diff, so it never executes pull request code and it only checks the names the pull request adds or stops reading: a name the diff adds with no row is reported at the line that reads it, a row whose name the diff stops reading is reported on the document, and a row the diff removes while the head still reads its name is reported on the document.tools/tests/test_env_reference.pyandtools/tests/test_check_conventions_env_reference.py: unit tests; registered inCMakeLists.txt.Tested
Linux and macOS.
python3 tools/env_reference.py --checkreports 436 names, all documented;python3 tools/check_conventions.py --base origin/main --head HEADpasses; the tool's tests pass. Rebased onto currentmainand rechecked on Windows 11 (Python 3.14):python tools/env_reference.py --checkreports 436 names, all documented,python tools/check_conventions.py --base upstream/mainpasses, and the 41 scripts undertools/testspass. The descriptions were written from the call sites, and the rows the code does not settle are the ones to check again at review (theAPS5_HOST_IMPORT_MIBdefault and theAPS5_DUMP_TARGETS/APS5_NO_RESIDENT_TARGETSinteraction among them).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); no silent stubs added.mdfiles or images added to the repository