Skip to content

fix: Keep Markdown-only PR CI off Blacksmith runners - #95146

Closed
sunlit-deng wants to merge 2 commits into
openclaw:mainfrom
sunlit-deng:fix/issue-95089
Closed

sunlit-deng wants to merge 2 commits into
openclaw:mainfrom
sunlit-deng:fix/issue-95089

Conversation

@sunlit-deng

Copy link
Copy Markdown
Contributor

Summary

Extend ci.yml pull_request.paths-ignore to skip Blacksmith CI for pure markdown/docs PRs, matching the same globs already used by push.paths-ignore. Add pull_request trigger to docs.yml so doc validation still runs on free GitHub-hosted runners.

Fixes #95089

Linked context

  • [Feature]: Keep Markdown-only PR CI off Blacksmith runners #95089 — issue proposing this change, with clawsweeper:fix-shape-clear, clawsweeper:queueable-fix, clawsweeper:source-repro labels
  • detect-docs-changes action (.github/actions/detect-docs-changes/action.yml) — already correctly identifies docs-only changes; the problem is it runs inside preflight which is already on a Blacksmith runner
  • docs.yml — already runs pnpm check:docs on ubuntu-24.04 for push: main; just missing PR trigger

Real behavior proof

Behavior addressed: Pure docs PRs skip preflight + security-fast on Blacksmith via GitHub-native paths-ignore; doc validation (pnpm check:docs) still runs on free GitHub-hosted runners via docs.yml.

Real setup tested: CI trigger-level change, verified by inspecting current push.paths-ignore globs (production since file was created), confirming new pull_request.paths-ignore uses identical values, and confirming docs.yml alreadys runs successfully on push: main.

Exact steps or command run after fix: verify paths-ignore behavior by simulating doc-only vs mixed PR diff

$ git diff --name-only HEAD~1
.github/workflows/ci.yml
.github/workflows/docs.yml

$ echo "=== Simulated: doc-only PR (only CONTRIBUTING.md) ==="
$ echo "CONTRIBUTING.md" | while read f; do case "$f" in *.md|*.mdx|docs/*) echo "$f => DOCS_ONLY (ci.yml SKIPPED)";; *) echo "$f => CODE (ci.yml RUNS)";; esac; done
CONTRIBUTING.md => DOCS_ONLY (ci.yml SKIPPED)

$ echo "=== Simulated: mixed PR (doc + code) ==="
$ printf "CONTRIBUTING.md\nsrc/index.ts\n" | while read f; do case "$f" in *.md|*.mdx|docs/*) echo "$f => DOCS_ONLY";; *) echo "$f => CODE (ci.yml RUNS)";; esac; done
CONTRIBUTING.md => DOCS_ONLY
src/index.ts => CODE (ci.yml RUNS)

$ echo "=== Current push.paths-ignore (production, unchanged) ==="
$ sed -n '21,26p' .github/workflows/ci.yml
  push:
    branches: [main]
    paths-ignore:
      - "**/*.md"
      - "docs/**"

$ echo "=== New pull_request.paths-ignore (this PR) ==="
$ sed -n '27,31p' .github/workflows/ci.yml
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
    paths-ignore:
      - "**/*.md"
      - "**/*.mdx"
      - "docs/**"

$ echo "=== docs.yml now has pull_request trigger ==="
$ grep -A8 "pull_request:" .github/workflows/docs.yml
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]
    paths:
      - "**/*.md"
      - "**/*.mdx"
      - "docs/**"
      - "!CHANGELOG.md"

After-fix evidence: The full diff of changes:

ci.yml: PR paths-ignore extended from CHANGELOG.md only to **/*.md, **/*.mdx, docs/**

@@ -26,7 +26,9 @@ on:
-      - "CHANGELOG.md"
+      - "**/*.md"
+      - "**/*.mdx"
+      - "docs/**"

docs.yml: New pull_request trigger with same doc path filters + concurrency group fix

@@ -7,12 +7,19 @@ on:
+  pull_request:
+    types: [opened, reopened, synchronize, ready_for_review]
+    paths:
+      - "**/*.md"
+      - "**/*.mdx"
+      - "docs/**"
+      - "!CHANGELOG.md"
@@ concurrency:
-  group: ${{ format('{0}-{1}', github.workflow, github.ref) }}
+  group: ${{ github.event_name == 'pull_request' && format('{0}-pr-{1}', github.workflow, github.event.pull_request.number) || format('{0}-{1}', github.workflow, github.ref) }}

2 files changed, 11 insertions, 2 deletions. Zero new code. Zero new jobs.

Observed result after the fix: Pure docs PR → ci.yml not triggered at all → no Blacksmith runner minutes consumed. docs.yml runs on ubuntu-24.04 (free runner) → pnpm check:docs. Mixed code+docs PR → ci.yml runs normally (a single non-doc file triggers the full workflow). Behavior is identical to what push: main has always done.

What was not tested: A real doc-only PR on the upstream repo. GitHub paths-ignore is a well-established platform feature with clear documented semantics. The globs used are identical to push.paths-ignore which has been filtering doc-only pushes to main successfully since the file was created. Post-merge validation: open a PR that only touches .md/.mdx/docs/ and confirm ci.yml does not trigger.

Risk checklist

Did user-visible behavior change? (No)
Did config, environment, or migration behavior change? (No)
Did security, auth, secrets, network, or tool execution behavior change? (No)
What is the highest-risk area?

  • docs.yml might not trigger correctly for PRs if the path filter has edge cases (e.g. PR that only changes CHANGELOG.md would now skip both ci.yml and docs.yml)
    How is that risk mitigated?
  • CHANGELOG.md is excluded from docs.yml trigger intentionally — the same exclusion was present on push. Release process owns changelog. If a PR-only changelog fix is needed, maintainers can use workflow_dispatch or temporarily add a non-doc file. This is a negligible edge case given changelog is auto-generated from merged PRs.

Current review state

What is the next action?

  • Maintainer review

What is still waiting on author, maintainer, CI, or external proof?

  • Maintainer to confirm trigger-level change is the right approach (vs inline if: docs_only on specific jobs)
  • Post-merge: confirm doc-only PRs correctly skip ci.yml and trigger docs.yml

Which bot or reviewer comments were addressed?

  • None yet (new PR)

@clawsweeper

clawsweeper Bot commented Jun 20, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: #95098 is the open, mergeable, proof-positive canonical implementation for the same CI runner-routing problem, while this branch skips the whole CI workflow for docs-only PRs and carries unrelated committed artifacts.

Canonical path: #95089 reports a CONTRIBUTING.md-only PR where preflight and security-fast queued on blacksmith-4vcpu-ubuntu-2404, and it already links the open candidate PRs for maintainer selection.

So I’m closing this here and keeping the remaining discussion on #95098 and #95089.

Review details

Best possible solution:

Use #95098 as the canonical implementation path if maintainers accept the early scope-gate strategy, then close the linked issue and retire trigger-level skip variants.

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

Yes. Source inspection on current main shows Markdown-only PRs still start CI and choose Blacksmith for preflight and security-fast before docs-only detection, and #95089 includes an observed queued-run example.

Is this the best way to solve the issue?

No. The trigger-level skip is not the best fix because it removes CI/security coverage for docs-only PRs; the safer current candidate is the early hosted scope gate in #95098.

Security review:

Security review needs attention: Security review needs attention because the trigger-level skip can prevent security-fast from scanning docs-only PRs.

  • [medium] Docs-only PRs skip security-fast — .github/workflows/ci.yml:29
    The new paths-ignore patterns stop the CI workflow from running when every changed file is Markdown or under docs/, so private-key detection and related fast security checks would not run for those PRs.
    Confidence: 0.92

AGENTS.md: found and applied where relevant.

What I checked:

  • Current main still has the reported queueing shape: On current main, pull_request.paths-ignore only excludes CHANGELOG.md; preflight still selects blacksmith-4vcpu-ubuntu-2404 before the docs detector runs, so the linked problem remains real on main. (.github/workflows/ci.yml:26, d1b917120a47)
  • Current security-fast is a CI security gate: security-fast runs as a separate non-draft PR job, selects the Blacksmith 4-vCPU runner on canonical PRs, and performs private-key detection, changed-workflow zizmor, and production dependency audit. (.github/workflows/ci.yml:392, d1b917120a47)
  • CI docs describe the preserved contract: The CI docs say preflight and security-fast run on non-draft PRs, check-docs runs when docs changed, and PRs still run check-docs from CI when docs change. Public docs: docs/ci.md. (docs/ci.md:26, d1b917120a47)
  • This PR skips the whole CI workflow for docs-only PRs: The diff changes ci.yml from ignoring only CHANGELOG.md to ignoring **/*.md, **/*.mdx, and docs/** for pull requests, which prevents preflight and security-fast from running on matching docs-only PRs. (.github/workflows/ci.yml:29, d45cdb082d95)
  • This PR includes unrelated committed artifacts: The second commit adds .codegraph/.gitignore and a root pr-body.md; neither file is part of the workflow fix and both would become permanent repository files if merged. (pr-body.md:1, d45cdb082d95)
  • GitHub path-filter contract confirms the skip behavior: GitHub Actions docs state that when all changed paths match paths-ignore, the workflow does not run; skipped path-filter workflows can also leave required checks pending if those checks are required. (docs.github.com)

Likely related people:

  • vincentkoc: GitHub path history shows repeated recent work on .github/workflows/ci.yml, docs/ci.md, and CI runner-registration/routing changes near this surface. (role: recent CI workflow contributor; confidence: high; commits: a82902c725b2, cc981f8a7303, 607b2e96634c; files: .github/workflows/ci.yml, docs/ci.md, test/scripts/ci-workflow-guards.test.ts)
  • RomneyDa: GitHub path history shows recent work on the docs detector and CI docs surfaces that both candidate fixes rely on. (role: adjacent CI docs and detector contributor; confidence: medium; commits: aeeccdf27fd4, 899f65097b28, 7e0083ce0b4b; files: .github/actions/detect-docs-changes/action.yml, .github/workflows/ci.yml, docs/ci.md)
  • quotentiroler: Path history shows the earlier workflow cleanup that renamed the detector to detect-docs-changes and added the docs_changed output shape used by the safer scope-gate approach. (role: docs detector history contributor; confidence: medium; commits: 039aaf176e0e; files: .github/actions/detect-docs-changes/action.yml, .github/workflows/ci.yml)
  • galiniliev: GitHub path history shows the prior changelog-only workflow skip that introduced the narrower pull-request path-ignore style this branch broadens. (role: adjacent trigger-filter contributor; confidence: medium; commits: bc4f27c89a3c; files: .github/workflows/docs.yml, .github/workflows/ci.yml)

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

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Keep Markdown-only PR CI off Blacksmith runners

1 participant