env_reference --check and the Conventions env-reference rule took any
backticked APS5_*/ANYPS5_* name in docs/dev/ENVIRONMENT.md as a row.
A name mentioned in another row's description, or in prose, was taken
as documented: deleting the APS5_PROFILE_DRAW row still passed because
the APS5_VERIFY_MASKED_RESULT_MEMO row mentions it, and a description
naming a variable the code no longer reads was reported as a stale row.
Match the name only in the first cell of a table row. Every name in
ENVIRONMENT.md today has its own row, so the check still passes on main.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q3BmiDsmpK7YCTNK2H4tzm
Adds regression tests for a constant-named read, for an identifier bound to two names (no read is reported), for a constant outside the prefixes or never read, and for --check passing when the constant's name has a row. The first and last fail on the parent commit (negative control: run against the pre-fix env_reference.py, the two tests fail), and the two guard tests pass on both.
Reconfigure sys.stdout and sys.stderr with utf-8 encoding and backslashreplace error handling at the entrypoint of main() so environment tables and check outputs do not fail on Windows terminals with non-UTF-8 code pages.
The Windows crash report reads APS5_CRASH_STACK_BYTES through
EnvironmentNumber, which env_reference did not recognize, so the name had
no row in docs/dev/ENVIRONMENT.md and neither the reference check nor the
conventions check reported it. Recognize the reader as an integer reader
and add the row.
A mistyped --root (or running from another directory) was skipped silently,
so --check reported every documented name as stale.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
source_files compared every component of the absolute path against SKIP,
so a --root inside a directory named build or 3rdparty yielded no files.
Only components below the scan root are compared now.
Co-Authored-By: Claude Opus 5.5 <[email protected]>