Skip to content

fix(workflow_hardening): WH007 defers to WF021's cancel-safety gate - #1069

Merged
hyperpolymath merged 4 commits into
mainfrom
claude/wh007-defers-wf021
Nov 13, 2026
Merged

hyperpolymath merged 4 commits into
mainfrom
claude/wh007-defers-wf021

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

Owner ruling (2026-11-13, via the hub): WF021 wins over WH007.

WH007 advised concurrency: … cancel-in-progress: true on every pull_request workflow without a concurrency block, including publishers and mutators (releases, Pages deploys, mirrors, git push) where cancelling an in-flight run is unsafe. WF021 already carries the safety gate: a read-only permissions: block and no publish/deploy/mirror/push step.

wh007_missing_concurrency/1 now fires only where WF021 would.

Evidence

mathesis "Proof Policy Gate" (cancel-in-progress: true) cancelled main runs 43149283881 and 43151544804 on later merges, which left no completed run for PROOF-POLICY receipts. That's the class of harm the gate prevents.

Tests

New test/rules/wh007_defers_wf021_test.exs has 4 cases: a read-only PR check fires; a pushing workflow, a Pages deploy, and a workflow with no permissions block are each skipped. Locally, with workflow_hardening and workflow_audit, 180 tests pass with 0 failures. mix format --check-formatted is clean.

Not changed

WH004 already defers to actions.lock on main (ActionsLock.pinned?/3), and #1064 maps a stale lock ref to "regenerate the lock".


Generated by Claude Code

Owner ruling 2026-11-13: WF021 wins over WH007. WH007 advised
cancel-in-progress on every pull_request workflow without concurrency,
including publishers and mutators where cancelling is unsafe. It now fires
only where WF021's gate holds: a read-only permissions block and no
publish/deploy/mirror/push step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZkGCWGEyedTtdEHAPT

Copy link
Copy Markdown
Owner Author

Build Test Images fails here, but it fails on main too, and the cause isn't in this PR. The container build at Containerfile:58 runs cargo build on a Rust toolchain older than the host CI's, and hits error[E0658]: atomic_try_update and environment variable TARGET not defined in hypatia-cli. This PR only changes lib/rules/workflow_hardening.ex and adds an Elixir test.

The rollups Integration Status and Security Status, plus Rust Dependency Audit (RUSTSEC-2026-0538, quinn-udp), are red on main for the same reasons. Fixing them belongs in a separate PR that aligns the Containerfile toolchain and bumps quinn-udp.


Generated by Claude Code

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 13, 2026 14:57
@chatgpt-codex-connector

This comment was marked as low quality.

Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 13, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 13, 2026
Repository owner deleted a comment from coderabbitai Bot Nov 13, 2026
Repository owner deleted a comment from coderabbitai Bot Nov 13, 2026
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 13, 2026
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 13, 2026 17:14
Repository owner deleted a comment from chatgpt-codex-connector Bot Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath merged commit 709f0ec into main Nov 13, 2026
87 of 88 checks passed
@hyperpolymath
hyperpolymath deleted the claude/wh007-defers-wf021 branch November 13, 2026 17:15
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.

3 participants