feat(rules): Group-B #333-cohort detectors — SD021/WF023/stale-issue-refs (#363/#364/#366)#411
Merged
Merged
Conversation
…e-refs (#363, #364, #366) Three pure detectors, each taking its external signal as a parameter so they unit-test without live API access; the live-signal scan-flow wiring is the documented follow-up on each issue: - StructuralDrift.check_workflow_branch_refs/3 (SD021, #363): workflow trigger branches not in the repo's live branch list (inline + block form; globs and the default branch exempt). - WorkflowAudit.check_stale_continue_on_error/2 (WF023, #364): continue-on-error masks whose "until/remove when #N" comment names a closed issue. - HonestCompletion.check_stale_issue_refs/2 (#366): comments referencing a closed/merged issue via stale-marker phrasing. test/rules/group_b_detectors_test.exs covers sensitivity + specificity for each; STATE.a2ml records the session's rule work. #339 (phantom required contexts) was already covered by BP008; #361 (optionalDependencies) overlaps build_system_rules and is deferred to avoid a near-duplicate. Verified locally (Elixir 1.14): each module compiles with no new warnings; format-isolation shows pure additions; real compiled modules pass all fixtures. Refs #363 #364 #366 https://claude.ai/code/session_01J8oLNn6MjKDRRUF65e2jLf
This was referenced May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three #333-cohort ("Group-B") detectors. Each is a pure function taking its external signal as a parameter (branch list / closed-issue set), so they unit-test without live API access. The live-signal scan-flow wiring (fetching that signal during a scan) is the remaining follow-up each issue calls out.
StructuralDrift.check_workflow_branch_refs/3(hypatia: detect workflow triggers referencing non-existent branches (from #333 cohort, pattern 4) #363): workflow trigger branches (on.push/pull_request.branches, inline[a, b]or block- aform) that aren't in the repo's live branch list; globs and the default branch are exempt.WorkflowAudit.check_stale_continue_on_error/2(hypatia: detect stale continue-on-error masks tied to closed issues (from #333 cohort, pattern 5) #364): acontinue-on-error: truejob whose "until/remove when #N" comment names an issue in the injected closed-issue set. Standalone (not wired intoaudit/3— it needs the issue-state signal).HonestCompletion.check_stale_issue_refs/2(hypatia: detect stale issue references in workflow/source comments (from #333 cohort, pattern 7) #366): source/workflow comments referencing a closed/merged issue via stale-marker phrasing (until/blocked by/remove when/…).Not implemented (de-dup, per the #390 lesson)
BP008(zero-recent-check-runs detection). Issue already closed.build_system_rules(org-pkg-in-optionalDependencies); the required-check-correlation angle is distinct but partial-duplicate + API-dependent. Deferred to avoid a third near-duplicate — flagging rather than guessing.Tests + docs
test/rules/group_b_detectors_test.exs— sensitivity + specificity for each detector.STATE.a2mlsession-history entry.Verified at source (local Elixir 1.14)
These detectors are public on their modules but not auto-wired into the scan aggregators (they require an injected signal not yet available in the scan flow) — consistent with each issue's "via GitHub API / git index" note. I'll update #363/#364/#366 with this state rather than closing them.
Refs #363 #364 #366
Generated by Claude Code