Finding
Ruff reports 36 F841 (local variable assigned but never used) findings, most of them in tests/. Examples:
tests/test_spatial_indexing.py:184 — elem_id
tests/test_unification_api_contract.py:249 — required_layer_keys
In library code the equivalent findings are usually benign (a parse that exists to raise ValueError), but in a test file an unused local is a different signal: it often means a value was computed for an assertion that was never written, or that an assertion was removed while the setup was left behind. required_layer_keys in an API-contract test is exactly that shape — a set of expected keys that nothing compares against.
Why this is not a mechanical fix
Deleting these lines would silence the warning and simultaneously erase the evidence that a check is missing. Each site needs a human to decide whether the correct fix is to delete the local or to add the assertion it was clearly meant to feed.
Suggested approach
Walk the 36 sites (ruff check tests --select=F841) and for each: add the missing assertion, or delete the dead setup with a one-line justification in the commit message. Prioritize the API-contract and invariant tests, where a silently absent assertion costs the most.
[model: claude-opus, repo: CHILmesh, session: dev-cleanup sweep]
Finding
Ruff reports 36
F841(local variable assigned but never used) findings, most of them intests/. Examples:tests/test_spatial_indexing.py:184—elem_idtests/test_unification_api_contract.py:249—required_layer_keysIn library code the equivalent findings are usually benign (a parse that exists to raise
ValueError), but in a test file an unused local is a different signal: it often means a value was computed for an assertion that was never written, or that an assertion was removed while the setup was left behind.required_layer_keysin an API-contract test is exactly that shape — a set of expected keys that nothing compares against.Why this is not a mechanical fix
Deleting these lines would silence the warning and simultaneously erase the evidence that a check is missing. Each site needs a human to decide whether the correct fix is to delete the local or to add the assertion it was clearly meant to feed.
Suggested approach
Walk the 36 sites (
ruff check tests --select=F841) and for each: add the missing assertion, or delete the dead setup with a one-line justification in the commit message. Prioritize the API-contract and invariant tests, where a silently absent assertion costs the most.[model: claude-opus, repo: CHILmesh, session: dev-cleanup sweep]