Skip to content

ci: cancel superseded blacksmith testboxes#34

Merged
vincentkoc merged 1 commit into
mainfrom
ci/blacksmith-burst-guards
Jun 24, 2026
Merged

ci: cancel superseded blacksmith testboxes#34
vincentkoc merged 1 commit into
mainfrom
ci/blacksmith-burst-guards

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What changed

  • add workflow-level cancellation for superseded Blacksmith Testbox runs on the same ref

Why

The org shares GitHub's runner-registration budget. ClawBench is currently green and low-volume, but the Testbox workflow should still avoid stacking stale Blacksmith runner registrations when repeated runs target the same ref.

Evidence

  • org workflow scan found the Blacksmith Testbox workflow missing concurrency
  • ruby -e 'require "yaml"; ARGV.each { |f| YAML.load_file(f) }' .github/workflows/ci-check-testbox.yml
  • git diff --check

@clawsweeper

clawsweeper Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codex review: found issues before merge. Reviewed June 24, 2026, 9:13 AM ET / 13:13 UTC.

Summary
The PR adds a top-level concurrency group with cancel-in-progress: true to .github/workflows/ci-check-testbox.yml.

Reproducibility: yes. from source inspection: the workflow is manually dispatched with a per-session testbox_id, while the PR groups cancellation only by github.ref. A live Blacksmith run was not needed to see that two documented main dispatches would share one concurrency group.

Review metrics: 1 noteworthy metric.

  • Workflow scope: 1 workflow changed, 4 lines added. The whole merge decision turns on the behavior of a single GitHub Actions concurrency block.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🌊 off-meta tidepool
Patch quality: 🧂 unranked krab
Result: blocked by patch quality or review findings.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Decide whether the workflow should allow multiple active sessions on the same ref.
  • If yes, re-key concurrency with an explicit session or supersession identity.
  • [P2] Add or update a focused workflow guard test for the intended cancellation policy.

Risk before merge

  • [P1] Merging as-is would make any later Blacksmith Testbox dispatch for the same ref cancel the older one, including independent documented main sessions with different testbox_id values.

Maintainer options:

  1. Preserve independent Testboxes (recommended)
    Change the concurrency key or dispatch contract so only genuinely superseded Testbox runs cancel each other, not every session on the same ref.
  2. Accept one session per ref
    Merge as-is only if maintainers intentionally want each new Testbox dispatch for a ref to evict any older active session for that ref.

Next step before merge

  • [P2] Manual review is needed because the blocker is the intended Testbox concurrency policy; automation should not guess whether independent same-ref sessions are disposable.

Security
Cleared: The diff only changes GitHub Actions concurrency metadata and does not broaden permissions, secrets access, dependency resolution, or third-party code execution.

Review findings

  • [P1] Narrow Testbox cancellation key — .github/workflows/ci-check-testbox.yml:15-16
Review details

Best possible solution:

Preserve independent Testbox sessions unless maintainers explicitly approve a one-active-session-per-ref policy; if cancellation is still desired, key it on an explicit supersession/session identity rather than only github.ref.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: the workflow is manually dispatched with a per-session testbox_id, while the PR groups cancellation only by github.ref. A live Blacksmith run was not needed to see that two documented main dispatches would share one concurrency group.

Is this the best way to solve the issue?

No, not as-is: a ref-only key is too broad for a session-oriented workflow_dispatch workflow. The narrow maintainable fix is an explicit supersession key, or a maintainer-approved policy that one active Testbox per ref is intentional.

Full review comments:

  • [P1] Narrow Testbox cancellation key — .github/workflows/ci-check-testbox.yml:15-16
    This workflow is dispatched per Testbox session using testbox_id, and the documented Crabbox path runs against --blacksmith-ref main. Keying cancellation only on github.ref means a second independent main-session dispatch cancels the first one instead of only cancelling a superseded registration. Please include an explicit session or supersession identity in the group, or document and get approval for a one-active-session-per-ref policy before enabling cancellation.
    Confidence: 0.89

Overall correctness: patch is incorrect
Overall confidence: 0.87

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning high; reviewed against 18fb855c8ccd.

Label changes

Label changes:

  • add P2: The PR affects repository automation and can cancel active validation sessions, but the blast radius is limited to the Testbox workflow.
  • add merge-risk: 🚨 automation: The diff changes GitHub Actions scheduling semantics by cancelling in-progress Testbox workflow runs after merge.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply because the PR is member-authored and changes workflow scheduling policy rather than an externally demonstrated runtime behavior.

Label justifications:

  • P2: The PR affects repository automation and can cancel active validation sessions, but the blast radius is limited to the Testbox workflow.
  • merge-risk: 🚨 automation: The diff changes GitHub Actions scheduling semantics by cancelling in-progress Testbox workflow runs after merge.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The external-contributor proof gate does not apply because the PR is member-authored and changes workflow scheduling policy rather than an externally demonstrated runtime behavior.
Evidence reviewed

What I checked:

Likely related people:

  • vincentkoc: They introduced the Blacksmith Testbox workflow on main and recently merged adjacent CI runner-serialization work, so they are the strongest routing candidate for this workflow behavior. (role: feature history owner and recent area contributor; confidence: high; commits: fc86dd615523, 18fb855c8ccd; files: .github/workflows/ci-check-testbox.yml, .github/workflows/README.md, .github/workflows/ci.yml)
  • scoootscooob: They introduced the original CI workflow and the repository's existing github.ref concurrency pattern, which is relevant comparison context but not the Testbox session owner. (role: adjacent workflow introducer; confidence: medium; commits: b6f07d9a8796; files: .github/workflows/ci.yml)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc marked this pull request as ready for review June 24, 2026 13:11
@vincentkoc
vincentkoc requested a review from a team as a code owner June 24, 2026 13:11
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 24, 2026
@vincentkoc
vincentkoc merged commit c725622 into main Jun 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant