Repository navigation
Closed
Labels
cicdCI/CD: workflows, actions, lockfiles, pins, runners, release gatesenhancementNew capability or improvement to existing behaviour
Description
Detector spec (from hypatia#333 Pattern 5)
Pattern 5 — continue-on-error: true on a job, paired with documentation that says "remove this when X lands"
Severity: medium (gate-quality erosion; the workflow drifts further from green main-line)
Detection (Hypatia.Rules.WorkflowAudit):
- For each job with
continue-on-error: true:- Scan the job's leading comments for phrases like
until #N lands,until #N closes,remove when #N. - If a referenced issue is now closed or merged (via GitHub API), flag as "stale continue-on-error mask".
- Scan the job's leading comments for phrases like
- Bonus: detect
continue-on-erroron a job whose name matches an entry in branch-protection'srequired_status_checks.contexts(structural contradiction).
Worked example (this session):
affinescript/.github/workflows/ci.ymlvscode-smokehadcontinue-on-error: truewith the comment "Remove thecontinue-on-error: trueline when chore(deps): bump bb8 from 0.8.6 to 0.9.1 #104 publishes the adapter to npm." chore(deps): bump bb8 from 0.8.6 to 0.9.1 #104 is still open so this didn't trigger as stale, but the related affinescript#380 fixed the root cause and removed the mask anyway.
Remediation guidance to emit:
If the gating issue has closed, drop
continue-on-error: trueand let the job report accurately. If the issue is still open but the workflow logic has changed (e.g. root cause fixed differently), also drop and update the comment.
Implementation pointers
- Detection algorithm: For each
continue-on-error: truejob, scan leading comments foruntil #N lands/until #N closes/remove when #N; resolve #N via GitHub API; flag if closed/merged. Bonus: contradiction check against branch-protection required contexts. - Real-world example:
affinescript/.github/workflows/ci.ymlvscode-smokehadcontinue-on-error: truewith comment "Remove thecontinue-on-error: trueline when chore(deps): bump bb8 from 0.8.6 to 0.9.1 #104 publishes the adapter to npm." - Landed fix (reference): affinescript#380 (root cause fixed; mask removed even though chore(deps): bump bb8 from 0.8.6 to 0.9.1 #104 still open).
- Rule statement: If the gating issue has closed, drop
continue-on-error: trueand let the job report accurately. If the issue is still open but the workflow logic has changed (e.g. root cause fixed differently), also drop and update the comment.
Acceptance
- Rule encoded in hypatia (file path follows existing rule naming convention —
lib/rules/<name>.exif Elixir, or matching the repo's rule DSL) - Test fixture exercising the positive case + at least one negative case
- Smoke test passes against the cited landed-fix repo
Source cohort: hypatia#333.
Metadata
Metadata
Assignees
Labels
cicdCI/CD: workflows, actions, lockfiles, pins, runners, release gatesenhancementNew capability or improvement to existing behaviour
Activity
hyperpolymath commentedon May 30, 2026
cicd triage 2026-05-30 — scoped plan + park
PR #403 ships the first batch of 4 rules from this cohort (#336, #337, #338, #390). This issue is in the next batch; landing it requires more substantial work than the first four:
Detection scans for
continue-on-error: truejobs, reads leading comments foruntil #N/remove when #N/ etc. patterns, then gh API closed-issue check. Add to lib/rules/workflow_audit.ex as WF023.The issue body is the implementation spec (detection algorithm + worked example + remediation guidance — well-formed). Next-batch PR will pick this up. Leaving open with
cicdlabel.feat(rules): Group-B #333-cohort detectors — SD021/WF023/stale-issue-…
hyperpolymath commentedon May 31, 2026
Detector landed in PR #411 (merged,
d460d6c):Hypatia.Rules.WorkflowAudit.check_stale_continue_on_error/2(WF023) — flags acontinue-on-error: truejob whose "until/remove when #N" comment names an issue in the injected closed-issue set.test/rules/group_b_detectors_test.exsRemaining (keeping this open): it's a standalone
check_*takingclosed_issuesas a parameter (deliberately not wired intoaudit/3, which has no issue-state signal). Wiring the live issue-state lookup into the scan flow + the smoke test are the follow-up. The "bonus" branch-protection-contradiction check is also still open.Generated by Claude Code
hyperpolymath commentedon May 31, 2026
Closed by main's WF023 (
check_stale_continue_on_error) which lands the detector this issue requested. The rule's docstring header explicitly cites this issue. The cohort-superseded variant in hypatia#409 (PR's WF024) was redundant; #409 has been closed as partially superseded.