Follow-up to PR #1044 (issue #1006), which re-keyed pin retirement on site identity. Its review graded these 🟡 Suggestion and they were not merge-blocking; captured here rather than dropped. Both are about future drift, not current correctness — the change's own negative control (a literal retired at its own site is still reported) was verified before merge and covers today's behavior.
1. The classifier-equivalence coupled invariant has no binding test
test_resolved_target_token_matches_the_classifier_three_shapes asserts _resolved_target_token / _site_retirement_key against hardcoded literals ("docs/x.md", "/__pin_corpus_runtime__/CI_BUNDLE") rather than against what the classifier actually produces. So the two are only coincidentally in agreement: a change to the classifier's target resolution would leave this test green while retirement keying silently diverged from it.
This is the repo's own coupled-invariant hazard — two sites that must agree, with the test asserting one side's literal instead of binding them. The fix is to derive the expected token from the classifier in the test, so a divergence cannot pass.
Why it matters more here than usual: retirement keying is a security-adjacent gate. A silent divergence between "how a target is classified" and "how a retirement is keyed" reopens exactly the class of mismatch #1006 existed to close — a pin poisoned or spared by the wrong key — and it would present as an unsatisfiable finding with no exit, the original symptom.
2. Fail-closed coverage gap: invalid-JSON resolved_target cell
test_malformed_retirement_manifest_site_fields_fail_closed exercises the source-side JSONDecodeError and the non-string source/target arms, but not an invalid-JSON resolved_target cell — the json.loads(row[target_index]) decode-error arm. Bundle-target retirements are the rows that carry a non-trivial target, so this is the arm most likely to meet a malformed cell in practice.
3. Informational — docstring nit
_repo_relative_or_none's docstring calls itself "the one copy of the abspath/commonpath/relpath computation the file otherwise repeats" while the same sentence points at a genuine second, raising copy (_relative_target_path). Behavior-inert; the accurate phrasing is "the non-raising copy".
Acceptance Criteria
Follow-up to PR #1044 (issue #1006), which re-keyed pin retirement on site identity. Its review graded these 🟡 Suggestion and they were not merge-blocking; captured here rather than dropped. Both are about future drift, not current correctness — the change's own negative control (a literal retired at its own site is still reported) was verified before merge and covers today's behavior.
1. The classifier-equivalence coupled invariant has no binding test
test_resolved_target_token_matches_the_classifier_three_shapesasserts_resolved_target_token/_site_retirement_keyagainst hardcoded literals ("docs/x.md","/__pin_corpus_runtime__/CI_BUNDLE") rather than against what the classifier actually produces. So the two are only coincidentally in agreement: a change to the classifier's target resolution would leave this test green while retirement keying silently diverged from it.This is the repo's own coupled-invariant hazard — two sites that must agree, with the test asserting one side's literal instead of binding them. The fix is to derive the expected token from the classifier in the test, so a divergence cannot pass.
Why it matters more here than usual: retirement keying is a security-adjacent gate. A silent divergence between "how a target is classified" and "how a retirement is keyed" reopens exactly the class of mismatch #1006 existed to close — a pin poisoned or spared by the wrong key — and it would present as an unsatisfiable finding with no exit, the original symptom.
2. Fail-closed coverage gap: invalid-JSON
resolved_targetcelltest_malformed_retirement_manifest_site_fields_fail_closedexercises the source-sideJSONDecodeErrorand the non-string source/target arms, but not an invalid-JSONresolved_targetcell — thejson.loads(row[target_index])decode-error arm. Bundle-target retirements are the rows that carry a non-trivial target, so this is the arm most likely to meet a malformed cell in practice.3. Informational — docstring nit
_repo_relative_or_none's docstring calls itself "the one copy of the abspath/commonpath/relpath computation the file otherwise repeats" while the same sentence points at a genuine second, raising copy (_relative_target_path). Behavior-inert; the accurate phrasing is "the non-raising copy".Acceptance Criteria
resolved_targetdecode-error arm is exercised and asserted to fail closed.lib/test/run.shreports zero failures and zero skips.