From ac1d30042ff46edd7bce2260ac1172b63a0f7166 Mon Sep 17 00:00:00 2001 From: shaofl <2899218482@qq.com> Date: Sat, 1 Aug 2026 03:21:27 -0700 Subject: [PATCH] docs(tests): complete the retired-invocation guard's scope declaration #119 added the WHAT IT STILL CANNOT SEE section and thereby made a claim about this guard's reach. The claim listed two blind spots; there are four. The suffix filter and the tests/ exclusion were both already there before #119 - the rglob version had the same filter - so this is not a regression, but the commit that declares a scope owns the completeness of that declaration. The third one has live instances rather than hypothetical ones. deploy/systemd/quant-data-update.service exists for the sole purpose of naming a command to run, and pyproject.toml can do the same; neither is scanned. Wiring a retired tool into a unit file would not turn this red. Widening the suffix set would change what the guard reaches, which is a different act from describing what it reaches, so it is not done here and the docstring says so. Verified rather than asserted: an untracked .md probe still turns it red, and an untracked .sh probe with identical content leaves it green, which is exactly what blind spot 3 now claims. --- tests/test_hand_anchor_record.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tests/test_hand_anchor_record.py b/tests/test_hand_anchor_record.py index fef8aff..9dbb102 100644 --- a/tests/test_hand_anchor_record.py +++ b/tests/test_hand_anchor_record.py @@ -299,8 +299,19 @@ def test_no_new_file_starts_instructing_people_to_run_a_retired_tool(): it. Untracked-but-not-ignored IS included on purpose: a newly written file is exactly the case this guard exists for, and it is usually not staged yet. - WHAT IT STILL CANNOT SEE: gitignored files (deliberate — they are not the - codebase), and invocation strings composed at runtime. + WHAT IT STILL CANNOT SEE, all four of them: + 1. gitignored files (deliberate — they are not the codebase); + 2. invocation strings composed at runtime; + 3. any file whose suffix is outside the set below. This one has live + instances: `deploy/systemd/quant-data-update.service` exists to name a + command to run (`ExecStart=`), and `pyproject.toml` can too, yet + neither is scanned. Wiring a retired tool into a unit file or a + pyproject entry point would NOT turn this red. Widening the suffix set + is a change of reach, not a fix to this declaration — do it as its own + change, with its own evidence, or not at all; + 4. `tests/` — excluded because RETIRED_INVOCATIONS itself lives there and + would self-match. Retired calls inside test files are therefore + invisible too. """ repo = Path(__file__).resolve().parents[1]