Skip to content

feat(rules): extend WF024 chapel + add cron-drift + inherited-debt detectors (auto-fix wiring) - #422

Merged
hyperpolymath merged 3 commits into
mainfrom
rules/auto-remediation-from-2026-06-02-patterns
Jun 2, 2026
Merged

feat(rules): extend WF024 chapel + add cron-drift + inherited-debt detectors (auto-fix wiring)#422
hyperpolymath merged 3 commits into
mainfrom
rules/auto-remediation-from-2026-06-02-patterns

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Continues today's hardening from hypatia#414. Three patterns we hit manually that should be auto-handled next time: Chapel 5 sharp edges, CodeQL cron drift, inherited main-branch debt. License category remains auto_fixable:false per #415.

Commits

  • 99b7970 WF024 chapel auto-fix wiring + 4 sub-pattern recipes

    • Primary WF024 finding now sets auto_fixable: true + recipe_id: chapel-runs-on-pin-22-04
    • New check_chapel_sharp_edges/1 emits 4 recipes: chapel-manpath-guard, chapel-chpl-llvm-export, chapel-replace-chpl-about-with-version, chapel-find-comm-gasnet (panic-attack#99)
  • 2285685 WF025 CodeQL cron-drift detector

    • Canonical 0 6 1 * * per standards#286
    • Sub-categories route to standards#288 (weekly→monthly) vs standards#324 (non-canonical→canonical)
    • Shared recipe codeql-cron-monthly
  • df4f545 BH008 inherited-main-branch-debt detector

    • Threshold ≥3 open PRs sharing same failing check → flag (:warn, auto_fixable: false)
    • Recommends file_root_fix_pr_on_main instead of N retries

Test plan

  • Each rule has ExUnit coverage under test/rules/
  • Chapel detector test covers all 5 recipe_ids + maximal-bad-workflow case
  • Cron-drift classifier covers canonical / weekly / non-canonical-monthly / malformed
  • Inherited-debt fires at 3 PRs, NOT at 2; honors custom threshold; per-PR-unique failures suppressed
  • CI to verify mix test (local mix env was Elixir 1.14 — couldn't fetch deps); individual files compile clean via elixirc

🤖 Generated with Claude Code

hyperpolymath and others added 3 commits June 2, 2026 18:45
Extends hypatia#414 with auto_fixable + recipe_id annotations so the
gitbot-fleet auto-remediation pipeline can route Chapel CI failures
through targeted recipes without re-deriving the diagnostic.

- WF024 primary finding now carries
  `auto_fixable: true` + `recipe_id: chapel-runs-on-pin-22-04`
- Adds `check_chapel_sharp_edges/1` for the 4 prior Chapel-2.8.0
  sharp edges from panic-attack#99:
    chapel-manpath-guard               (unguarded $MANPATH under set -u)
    chapel-chpl-llvm-export            (CHPL_LLVM unset)
    chapel-replace-chpl-about-with-version
    chapel-find-comm-gasnet            (brittle printchplenv glob)
- ExUnit coverage at test/rules/workflow_audit_chapel_test.exs

License category remains auto_fixable:false per hypatia#415.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Detects any `.github/workflows/codeql.yml` cron entry that diverges from
the canonical `0 6 1 * *` monthly schedule fixed by standards#286.

Sub-category drives gitbot-fleet routing:
  :weekly_to_monthly      → standards#288 (weekly→monthly fan-out)
  :non_canonical_monthly  → standards#324 (non-canonical→canonical)

All variants auto-fix via shared recipe `codeql-cron-monthly` (rewrite
to `0 6 1 * *`). Severity :warn — drift, not breakage.

Public classifier `cron_drift_subcategory/1` exposed for downstream
gitbot routing logic and ExUnit oracle coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…reshold)

Pattern hit 4× during the 2026-06-02 estate sweep: a single broken check
on `main` cascades to every open PR in the repo, none of the PR diffs
are causal, and the right answer is one root-fix PR on main rather than
N retries.

Detector groups failed checks by name across the open PRs supplied by
the caller and emits a `:warn` finding for any check meeting the
threshold (default 3 PRs). Crucially `auto_fixable: false` — the root
cause is workflow / dep / baseline-specific and needs owner direction.

Recommended action: `file_root_fix_pr_on_main`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
hyperpolymath merged commit 35f33db into main Jun 2, 2026
10 checks passed
@hyperpolymath
hyperpolymath deleted the rules/auto-remediation-from-2026-06-02-patterns branch June 2, 2026 17:49
hyperpolymath added a commit that referenced this pull request Jun 2, 2026
## Summary

Reflect recent rule-catalogue PRs in CHANGELOG and STATE.a2ml:

- **#414** — scoped MPL-2.0 carve-outs for upstream-derived submodules
- **#415** — SC-010 transitive_dep_drift flipped to auto_fixable:false
(manual-only)
- **#422** — WF024 chapel_runs_on_drift auto-fix + WF025
cron_schedule_drift + BH008 inherited_main_debt

## Files

- CHANGELOG.md — Unreleased entries
- .machine_readable/6a2/STATE.a2ml — session-history entry

## Test plan

- [x] Markdown renders
- [x] No license/SPDX content touched

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 146 issues detected

Severity Count
🔴 Critical 0
🟠 High 0
🟡 Medium 146
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.

1 participant