Skip to content

feat(rules): Group-B #333-cohort detectors — SD021/WF023/stale-issue-refs (#363/#364/#366)#411

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/gracious-mendel-WIXFG
May 31, 2026
Merged

feat(rules): Group-B #333-cohort detectors — SD021/WF023/stale-issue-refs (#363/#364/#366)#411
hyperpolymath merged 1 commit into
mainfrom
claude/gracious-mendel-WIXFG

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

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.

Not implemented (de-dup, per the #390 lesson)

Tests + docs

  • test/rules/group_b_detectors_test.exs — sensitivity + specificity for each detector.
  • CHANGELOG (md + adoc) entries; STATE.a2ml session-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

…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
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 103 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 103
View findings
[
  {
    "reason": "Action urin 21 JRE\n        uses: actions/setup-java@be666c2fcd27 needs attention",
    "type": "unpinned_action",
    "file": "verify-proofs.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in ci.yml",
    "type": "missing_timeout_minutes",
    "file": "ci.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in clusterfuzzlite.yml",
    "type": "missing_timeout_minutes",
    "file": "clusterfuzzlite.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants