Skip to content

fix(ci): prevent workflow lint stdin deadlock - #131982

Merged
steipete merged 1 commit into
mainfrom
fix/actionlint-stdin-deadlock
Aug 28, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/actionlint-stdin-deadlock

Conversation

@steipete

@steipete steipete commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #131903 (draft-proof test performance landing blocked by Workflow Sanity)

What Problem This Solves

Resolves a problem where Workflow Sanity hangs while linting the existing Dispatch publish workflows run block. The same actionlint version is also pinned in pre-commit and the local Go fallback, so retrying CI or using those installation paths does not repair the problem.

Why This Change Was Made

Pin actionlint to upstream commit 011a6d15e749bb3f2d771eed9c7aa0e7e3e10ee7 at all three repository-owned installation surfaces. Workflow Sanity uses the existing SHA-pinned setup-go v7 action with Go 1.25.0, exactly as required by upstream go.mod, and cache: false. It installs into runner temp, verifies v1.7.13-0.20260419144658-011a6d15e749, and adds that bin to GITHUB_PATH.

The root cause is upstream subprocess ownership: v1.7.12 writes all stdin into StdinPipe before starting ShellCheck. Input exceeding the pipe capacity therefore blocks before the reader exists. The fixed commit lets exec.Cmd copy stdin after starting the child. Upstream PR #651 merged on April 19; the latest release v1.7.12, verified during this repair, dates to March 30 and does not contain it.

Remove only actionlint's obsolete release-archive download/checksum path and the obsolete raw release-script size assertion. Keep the bounded, checksummed ShellCheck download, all lint/audit checks, installed-actionlint preference, and pre-commit fallback. Shrinking the release script or disabling ShellCheck would work around the wrong owner; neither is done here.

User Impact

Maintainers and contributors using these owned installs can lint the complete workflows without this deadlock. There is no product runtime change or product dependency change. Release behavior and release workflow bytes, CHANGELOG, versions, schemas, protocol, live Gateway, and secrets are untouched. Existing externally installed actionlint remains operator-owned and may still need updating.

Evidence

Personally inspected exact upstream source:

Local old-versus-fixed proof on 6ddb9f049fb3617fac38a34ea139f435d9133399, macOS arm64 and installed ShellCheck 0.11.0:

  • Installed actionlint v1.7.12 against .github/workflows/openclaw-release-publish.yml: no output, still hung at 20.006 seconds; bounded probe killed its own process group.
  • GOBIN=<disposable-bin> GOTOOLCHAIN=go1.25.0 go install github.com/rhysd/actionlint/cmd/actionlint@011a6d15e749bb3f2d771eed9c7aa0e7e3e10ee7: version output and Go build metadata identify v1.7.13-0.20260419144658-011a6d15e749.
  • That exact binary against all workflows, with installed ShellCheck explicitly selected: exit 0 in 5.128 seconds. Repeated on the final patch: exit 0. A transparent stdin capture forwarding to real ShellCheck recorded 65,538 bytes for the existing release block.
  • The exact checked-in install step was executed in disposable runner temp with Go 1.25.0: version verification and GITHUB_PATH output passed.
  • Upstream GOTOOLCHAIN=go1.25.0 go test -run 'TestProcess' -timeout 30s .: passed (0.595s), including the concurrent large-input regression.
  • New/updated guards demonstrated three intended failures before the fix: old fallback revision, old diagnostic, and missing Go setup.
  • node scripts/run-vitest.mjs test/scripts/check-workflows.test.ts test/scripts/ci-workflow-guards.test.ts test/scripts/package-acceptance-workflow.test.ts test/scripts/check-composite-action-input-interpolation.test.ts test/scripts/check-no-conflict-markers.test.ts: 367 passed, 2 skipped, five files.
  • PATH=<fixed-bin>:$PATH pnpm check:workflows: passed actionlint, zizmor, composite-input and conflict-marker checks.
  • Targeted oxfmt and git diff --check: passed. Changed gate for the six explicit paths passed scripts/root-test typechecks, scripts lint, erasability and all selected guards on Blacksmith Testbox run 33195535020, delegated command exit 0 (5m20.619s). The one-shot lease is confirmed stopped; backing workflow cancellation during cleanup is not the command verdict.
  • Deslop complete; fresh isolated Codex autoreview clean, no accepted/actionable findings. The reviewer could not independently retrieve pseudo-version metadata; the local exact build and executed installation above supply that proof.

Production LOC 0. Workflow +15/-19; tooling/config +4/-4; tests +33/-17. The replacement pin/setup regression covers the owner contract without network installation in tests. No release authority was extracted or moved.

Hosted symptom: pre-fix run spent 377 seconds in lint before a newer main push cancelled it; this is cancellation evidence, not a claimed timeout. The vulnerable pin was carried forward by #112963; the removed size workaround came from #128391. #110562 separately proposes bounding local subprocesses; it does not replace fixing the upstream deadlock.

AI-assisted maintainer repair, explicitly requested. Native prepare/merge and exact-head hosted CI will be recorded before landing.

Exact-head landing update: CI 33196019956, Workflow Sanity 33196003010, Testbox 33196020058, ARM 33196019975, and build artifacts 33196020050 all passed on 9d81d12a723599482bdf8faa3a75688cf70e055c. Hosted actionlint install took 9s; full lint took 7s. The interim pin is explicitly accepted under the maintainer request, addressing the latest ClawSweeper decision and rank-up move.

@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 28, 2026 17:43
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 28, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 1:51 PM ET / 17:51 UTC.

ClawSweeper review

What this changes

The PR pins actionlint to an upstream commit across Workflow Sanity, pre-commit, and the local Go fallback to avoid a large-stdin ShellCheck deadlock.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No introduced correctness defect was found. This maintainer-authored, maintainer-labeled CI repair remains open for the explicit interim dependency decision and exact-head workflow completion.

Priority: P2
Reviewed head: 9d81d12a723599482bdf8faa3a75688cf70e055c
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-aligned CI repair with recorded before/after behavior evidence; exact-head hosted validation is the remaining merge gate.
Proof confidence 🦞 diamond lobster (5/6) Not applicable: This maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix full-workflow actionlint run and an executed install-step check.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix full-workflow actionlint run and an executed install-step check.
Evidence reviewed 6 items Changed CI owner: The actionlint job installs the immutable upstream revision into runner temp, checks its reported version, and exposes it to the later lint step; the job has read-only contents permission and credential-less checkout.
Caller and local fallback: The public check:workflows script invokes the checker, which continues to prefer an already-installed actionlint and otherwise resolves the same pinned revision through Go.
Regression guards: Focused tests assert the local fallback revision and the workflow/pre-commit pin, including setup ordering and the exact version guard.
Findings None None.
Security None None.

How this fits together

Workflow Sanity installs actionlint and ShellCheck before linting repository workflow files in CI. The local workflow checker and pre-commit hook use the same linter revision so developer and CI paths agree.

flowchart LR
  A[Workflow files] --> B[Workflow Sanity]
  C[Local workflow checker] --> D[actionlint revision]
  E[Pre-commit hook] --> D
  D --> F[ShellCheck subprocess]
  F --> G[Lint result]
Loading

Decision needed

Question Recommendation
Should Workflow Sanity temporarily build the specified immutable actionlint commit until upstream releases the deadlock fix? Accept the interim pin: Land after exact-head CI confirms installation and linting, then update to the first upstream release containing the fix.

Why: This is an intentional CI supply and maintenance tradeoff, not a mechanical defect: the release archive path is replaced with a pinned source build before upstream publishes a fixed release.

Before merge

  • Resolve merge risk (P1) - Until actionlint publishes a release containing the fix, Workflow Sanity builds an interim upstream source revision; exact-head CI must confirm that the Go install and subsequent lint step work together.
Agent review details

Security

None.

PR surface

Tests +16, Config -4, Other 0. Total +12 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 33 17 +16
Docs 0 0 0 0
Config 1 15 19 -4
Generated 0 0 0 0
Other 2 4 4 0
Total 6 52 40 +12

Review metrics

Metric Value Why it matters
Production versus test LOC production/tooling +19/-23; tests +33/-17 The operational implementation is net-negative while the test delta adds pin and setup guards.
Owned actionlint resolution paths 3 changed: CI install, local Go fallback, pre-commit Keeping these paths on one revision avoids inconsistent deadlock behavior across repository-managed tooling.

Merge-risk options

Maintainer options:

  1. Accept the pinned interim build (recommended)
    Merge once exact-head Workflow Sanity proves the Go-installed revision completes the full lint path.
  2. Wait for a tagged upstream release
    Defer this PR if maintainers do not want CI to build actionlint from an unreleased source revision.

Technical review

Best possible solution:

Use the one immutable interim actionlint revision at all three repository-owned resolution paths, then return to a released version once upstream publishes the fix.

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

Yes for the described CI defect: the PR body records a bounded old-versus-fixed actionlint run against the existing workflow, and current source shows all repository-owned resolution paths that select the affected linter.

Is this the best way to solve the issue?

Acceptable mitigation: it changes the linter at its owner boundaries rather than shrinking workflow input or disabling ShellCheck. Direct upstream source retrieval could not be repeated here, so the maintainer should rely on the pending exact-head workflow result before accepting the interim pin.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: The deadlock disrupts contributor and release automation but does not affect product runtime.
  • add merge-risk: 🚨 automation: The PR replaces a required workflow tool download with a Go-built upstream source revision.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix full-workflow actionlint run and an executed install-step check.

Label justifications:

  • P2: The deadlock disrupts contributor and release automation but does not affect product runtime.
  • merge-risk: 🚨 automation: The PR replaces a required workflow tool download with a Go-built upstream source revision.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored CI-only PR is exempt from the external-contributor proof gate; its body nevertheless records an after-fix full-workflow actionlint run and an executed install-step check.

Evidence

What I checked:

  • Changed CI owner: The actionlint job installs the immutable upstream revision into runner temp, checks its reported version, and exposes it to the later lint step; the job has read-only contents permission and credential-less checkout. (.github/workflows/workflow-sanity.yml:13, 9d81d12a7235)
  • Caller and local fallback: The public check:workflows script invokes the checker, which continues to prefer an already-installed actionlint and otherwise resolves the same pinned revision through Go. (scripts/check-workflows.mts:118, 9d81d12a7235)
  • Regression guards: Focused tests assert the local fallback revision and the workflow/pre-commit pin, including setup ordering and the exact version guard. (test/scripts/ci-workflow-guards.test.ts:6331, 9d81d12a7235)
  • Current-main and provenance: The fetched current-main snapshot still uses released actionlint v1.7.12; blame and log identify this PR head as the revision-pin change, so the work is neither already on main nor obsolete. (.github/workflows/workflow-sanity.yml:155, 9d81d12a7235)
  • Release/main inclusion check: No local tag or branch contains the PR head, and the fetched main commit does not contain it; the change is pending rather than shipped or implemented on main. (d402305e1586)
  • Dependency signal and available proof: The introduced workflow directly executes the actionlint module at the pinned revision. The PR body supplies the claimed upstream process contract and before/after terminal run; direct upstream retrieval was unavailable in this read-only review environment. (.github/workflows/workflow-sanity.yml:167, 9d81d12a7235)

Likely related people:

  • steipete: Authored the current PR and the preceding repository workflow-checker work that established this ownership surface. (role: recent CI tooling contributor; confidence: high; commits: 9d81d12a7235, 629a47e3cc20; files: .github/workflows/workflow-sanity.yml, scripts/check-workflows.mts)
  • vincentkoc: History attributes earlier actionlint-download retry hardening to this contributor. (role: adjacent CI hardening contributor; confidence: medium; commits: a7a89fb680c9; files: .github/workflows/workflow-sanity.yml)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the exact-head Workflow Sanity and required CI checks complete against this revision.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 9d81d12a723599482bdf8faa3a75688cf70e055c:

The six-file patch fixes the upstream stdin ownership defect at all three owned actionlint installation surfaces, without changing release workflow bytes or disabling ShellCheck. The detailed source/probe evidence is in the PR body. Production LOC is 0; workflow +15/-19, tooling/config +4/-4, tests +33/-17. Existing installed-actionlint and pre-commit fallbacks remain unchanged.

Local validation: node scripts/run-vitest.mjs test/scripts/check-workflows.test.ts test/scripts/ci-workflow-guards.test.ts test/scripts/package-acceptance-workflow.test.ts test/scripts/check-composite-action-input-interpolation.test.ts test/scripts/check-no-conflict-markers.test.ts passed 367 tests (2 existing skips); PATH=<fixed-bin>:$PATH pnpm check:workflows, targeted oxfmt and git diff --check passed. The six-file node scripts/check-changed.mjs -- <paths> gate passed on Testbox 33195535020, exit 0; the lease is stopped. Deslop and fresh isolated Codex autoreview are clean.

Exact-head Workflow Sanity 33196003010 passed: the fixed revision installed in 9 seconds and linted all workflows in 7 seconds. Exact-head CI 33196019956 passed, as did Blacksmith Testbox 33196020058, ARM Testbox 33196019975, and Build Artifacts 33196020050. Cancelled scans from the draft/ready transition were superseded, not waived. Native review artifacts bind the exact PR head and are validated. Main movement since the base is disjoint from the repair files; no unnecessary rebase or full rerun.

Read the latest ClawSweeper review and Rank-up moves. It found no introduced correctness/security defect. Maintainer decision: accept this immutable interim source build, as explicitly authorized for this repair; return to a tagged actionlint release once it contains upstream #651. The install/lint merge-risk proof is satisfied by the exact-head Workflow Sanity result above; the sole rank-up move is completed required CI. No re-review is needed for unchanged behavior/head.

Proceeding only through OPENCLAW_TESTBOX=1 scripts/pr prepare-run 131982 and scripts/pr merge-run 131982; no bypass, release, package publication, CHANGELOG, product dependency, schema/protocol, live Gateway, or secret changes.

@steipete
steipete merged commit 72ff36e into main Aug 28, 2026
218 of 226 checks passed
@steipete
steipete deleted the fix/actionlint-stdin-deadlock branch August 28, 2026 17:59
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant