Widen DeadReferencePointer path resolution before ambient hook rollout #110

Closed
opened 2026-07-23 15:40:44 +00:00 by jared · 2 comments
Owner

DeadReferencePointer's 51-hit scan is dominated by three false-positive classes:

  1. ${CLAUDE_PLUGIN_ROOT}-prefixed paths (runtime-resolved, not resolvable at lint time)
  2. runtime-generated artifacts (e.g. graphify-out/)
  3. bare sibling filenames resolved from the wrong base dir

Resolve these before promoting the cop back to :offense for #108 ambient hook wiring. Cop demoted to :advisory in the meantime.

DeadReferencePointer's 51-hit scan is dominated by three false-positive classes: 1. `${CLAUDE_PLUGIN_ROOT}`-prefixed paths (runtime-resolved, not resolvable at lint time) 2. runtime-generated artifacts (e.g. `graphify-out/`) 3. bare sibling filenames resolved from the wrong base dir Resolve these before promoting the cop back to `:offense` for #108 ambient hook wiring. Cop demoted to `:advisory` in the meantime.
Author
Owner

Fourth false-positive class found during tier-2 A/B verification: invoking bin/aidd-lint with a RELATIVE subject path makes Config.repo_root_for walk the unexpanded path, never finds .git when cwd != repo root, and dead-reference-pointer then false-positives on real files (observed on plugins/os-sdlc/reference/lint-rule-ticket-template.md). Absolute paths unaffected; the PostToolUse hook passes absolute paths, so production risk is low. Fix candidate: File.expand_path at Config entry points.

Fourth false-positive class found during tier-2 A/B verification: invoking bin/aidd-lint with a RELATIVE subject path makes Config.repo_root_for walk the unexpanded path, never finds .git when cwd != repo root, and dead-reference-pointer then false-positives on real files (observed on plugins/os-sdlc/reference/lint-rule-ticket-template.md). Absolute paths unaffected; the PostToolUse hook passes absolute paths, so production risk is low. Fix candidate: File.expand_path at Config entry points.
Author
Owner

This was generated by AI during triage.

Consolidated into #150. Verified live against this checkout: the ${CLAUDE_PLUGIN_ROOT} class is fixed (WHOLE_PATH_PREFIX/truncated-match handling, #162, regression test in path_reference_scanner_test.rb:156). The bare-sibling-filename class (distill.md example) is an intentional design tradeoff per the cop's own comment (dead_reference_pointer.rb:76-86) — repo-wide bare search is deliberately not done outside CLAUDE.md files; fix is tightening the doc, not the cop. The runtime-generated-artifact class still reproduces and is carried into #150 as class 4. Closing as duplicate.

> *This was generated by AI during triage.* Consolidated into #150. Verified live against this checkout: the ${CLAUDE_PLUGIN_ROOT} class is fixed (WHOLE_PATH_PREFIX/truncated-match handling, #162, regression test in path_reference_scanner_test.rb:156). The bare-sibling-filename class (distill.md example) is an intentional design tradeoff per the cop's own comment (dead_reference_pointer.rb:76-86) — repo-wide bare search is deliberately not done outside CLAUDE.md files; fix is tightening the doc, not the cop. The runtime-generated-artifact class still reproduces and is carried into #150 as class 4. Closing as duplicate.
jared closed this issue 2026-08-01 16:47:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#110
No description provided.