Skip to content

chore: harden CI workflows and clear lint debt#55

Merged
steipete merged 4 commits intoopenclaw:mainfrom
ds4psb-ai:ted/clawsweeper-hardening-2026-05-09
May 9, 2026
Merged

chore: harden CI workflows and clear lint debt#55
steipete merged 4 commits intoopenclaw:mainfrom
ds4psb-ai:ted/clawsweeper-hardening-2026-05-09

Conversation

@ds4psb-ai
Copy link
Copy Markdown
Contributor

Summary

Small hardening sweep that stays out of the 5 currently-open PRs' file footprints, so it can land independently without creating rebase friction.

What changed

ci: add timeout-minutes to disabled-target echo jobs (cd5e884)

Three workflows have echo-only "disabled-target" guard jobs that fall back to GitHub's 360-minute job default. Even trivial echo jobs deserve an explicit small timeout to bound runner exposure on stalled steps.

  • .github/workflows/commit-review.ymldisabled-target job
  • .github/workflows/repair-commit-finding-intake.ymldisabled-target job
  • .github/workflows/sweep.ymlevent-disabled-target job

All three set timeout-minutes: 5.

ci: add concurrency groups to write-side repair workflows (7606340)

Three write-side workflows lacked a top-level concurrency: block:

  • repair-comment-router.yml — runs on cron */5 * * * * PLUS repository_dispatch. Without a group, a slow run can be overlapped by the next cron tick (or a dispatch event), and both will race on the GitHub API + git push side. Uses a per-target dynamic group so parallel target-repo runs stay separate.
  • repair-self-heal.yml — runs on cron 17,47 * * * *. Singleton group since it operates fleet-wide.
  • repair-finalize-open-prs.ymlworkflow_dispatch only, but still write-side and writes repair-apply-report.json ledger. Singleton group.

cancel-in-progress: false on all three — these workflows write ledger state and should not be interrupted mid-publish.

Why

  • Workflow audit: missing timeout-minutes on echo-only guard jobs (3 spots), missing top-level concurrency: on write-side workflows that share ledger files (3 spots).
  • Lint/format debt: none found outside the 5 chokepoint files. pnpm run lint:scripts and pnpm run format:check were already clean.

Validation

  • pnpm run check passes green: 357 tests, lint 0 errors, format clean
  • All edits restricted to .github/workflows/*.yml (6 lines added, 0 removed effective)

Scope discipline

This PR explicitly does NOT modify src/clawsweeper.ts, src/repair/comment-router*, src/repair/github-cli.ts, src/repair/plan-cluster.ts, or src/policy-rfc/**, so it can be merged in any order relative to PR#52/#53/#50/#49/#39.

ds4psb-ai added 2 commits May 9, 2026 01:50
Three workflows have echo-only "disabled-target" jobs that fall back
to GitHub's 360-minute job default. Even trivial echo jobs deserve
an explicit small timeout to bound runner exposure on stalled steps.
Three write-side workflows lacked a top-level concurrency: block:
- repair-comment-router.yml (cron */5min + repository_dispatch)
- repair-self-heal.yml (cron 17,47 hourly)
- repair-finalize-open-prs.yml (workflow_dispatch only)

Without a group, overlapping cron/dispatch runs can race each other on
git push (rebase-strategy=theirs ledger commits) and dispatch worker
slots. comment-router uses a per-target dynamic group to keep parallel
target-repo runs separate; self-heal and finalize-open-prs use static
singleton groups since they operate fleet-wide.

cancel-in-progress is false everywhere — these workflows write ledger
state and should not be interrupted mid-publish.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7606340da4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +71 to +73
concurrency:
group: repair-comment-router-${{ github.event.inputs.target_repo || github.event.client_payload.target_repo || 'openclaw/openclaw' }}
cancel-in-progress: false
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve all pending comment-router runs in concurrency queue

This new top-level concurrency block can drop repository_dispatch events under load because GitHub Actions defaults concurrency queues to single pending run: when a second pending run arrives, the older pending run is canceled and replaced even with cancel-in-progress: false. In this workflow, that means if one run is active and multiple comment dispatches arrive, intermediate comment-router runs can be discarded, so some commands may never be routed (especially when schedule-based execute is disabled). Add queue: max (or another explicit queue strategy) to avoid losing queued events.

Useful? React with 👍 / 👎.

ds4psb-ai pushed a commit to ds4psb-ai/clawsweeper that referenced this pull request May 8, 2026
@ds4psb-ai
Copy link
Copy Markdown
Contributor Author

@clawsweeper automerge

name: Skip disabled target commit review
if: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.target_repo == 'openclaw/clawhub' && vars.CLAWSWEEPER_ENABLE_CLAWHUB != '1' }}
runs-on: ubuntu-latest
timeout-minutes: 5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is very tight

@steipete steipete merged commit b439a7a into openclaw:main May 9, 2026
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4237d2fb3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

CLAWSWEEPER_APP_CLIENT_ID: Iv23liOECG0slfuhz093

concurrency:
group: repair-comment-router-${{ github.event.inputs.target_repo || github.event.client_payload.target_repo || 'openclaw/openclaw' }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include scheduled target repo in concurrency key

Update the workflow-level concurrency group to include the same schedule-time target resolution used by the router step. Right now the group only checks github.event.inputs.target_repo and github.event.client_payload.target_repo, then falls back to 'openclaw/openclaw', but scheduled runs actually use vars.CLAWSWEEPER_TARGET_REPO when choosing --repo in the routing step. If that variable is set to a non-default repo, those runs are still placed in the openclaw/openclaw concurrency group, so unrelated target repos can block/cancel each other under concurrency limits and drop routing cycles.

Useful? React with 👍 / 👎.

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.

2 participants