Skip to content

fix(ci): filter ClawSweeper comment dispatches before token minting#95308

Merged
vincentkoc merged 1 commit into
mainfrom
fix/clawsweeper-rate-limit-ingress
Jun 21, 2026
Merged

fix(ci): filter ClawSweeper comment dispatches before token minting#95308
vincentkoc merged 1 commit into
mainfrom
fix/clawsweeper-rate-limit-ingress

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

Summary

Pre-filter issue comments before minting the target ClawSweeper App token or dispatching comment work. Ordinary comments still reach the generic activity path, but only comments containing a ClawSweeper mention or supported slash command mint the write token and run the command acknowledgement/dispatch path.

Verification

  • node scripts/check-workflows.mjs .github/workflows/clawsweeper-dispatch.yml
  • git diff --check
  • local autoreview: clean

This is intentionally scoped to the OpenClaw ingress workflow; the corresponding ClawSweeper-side rate-limit hardening is in the companion PR.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Jun 20, 2026
@clawsweeper

clawsweeper Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 21, 2026, 7:01 AM ET / 11:01 UTC.

Summary
The PR adds a ClawSweeper issue-comment prefilter before target write-token creation and command acknowledgement/dispatch, plus script test-routing metadata updates.

PR surface: Tests +25, Config +18, Other +10. Total +53 across 6 files.

Reproducibility: yes. from source inspection: current main creates the target comment token for every issue_comment before the later grep exits on non-command comments. I did not run a live GitHub Actions reproduction in this read-only review.

Review metrics: 1 noteworthy metric.

  • Sensitive workflow gates: 2 gates moved behind 1 prefilter. The same command detector now controls both target write-token creation and exact comment acknowledgement/dispatch.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/scripts/test-projects.test.ts, vector/embedding metadata: src/scripts/test-projects.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Rank-up moves:

  • Verify one ordinary issue_comment skips target token/comment dispatch and one supported ClawSweeper command still dispatches on the exact head.
  • [P2] Wait for or review the remaining required CI and CodeQL jobs before landing.

Risk before merge

  • [P1] The new prefilter is now the gate for target write-token minting and exact ClawSweeper comment acknowledgement/dispatch, so a receiver mismatch would silently skip command automation.
  • [P1] CI/actionlint proves workflow syntax and several repository checks, but it does not by itself prove a real ordinary issue_comment skips target-token work while a supported command comment still dispatches.

Maintainer options:

  1. Prove Both Comment Paths (recommended)
    Before merge, inspect or run ClawSweeper Dispatch logs for one ordinary issue comment and one supported ClawSweeper command comment to confirm the new gate skips only the target write-token/comment lane.
  2. Accept Source-Level Automation Risk
    Maintainers can land based on source review and green workflow syntax checks if they explicitly accept that live GitHub App dispatch semantics were not exercised in this review.

Next step before merge

  • [P2] This maintainer-labeled MEMBER PR touches ClawSweeper automation; there is no narrow code repair to queue, only maintainer verification and merge judgment.

Security
Cleared: No concrete security or supply-chain regression was found; the workflow keeps the pinned token action and narrows target write-token minting for ordinary comments.

Review details

Best possible solution:

Keep the narrow prefilter, preserve generic github_activity forwarding for ordinary comments, and merge only after maintainers verify both non-command and supported-command issue_comment behavior on the exact head.

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

Yes from source inspection: current main creates the target comment token for every issue_comment before the later grep exits on non-command comments. I did not run a live GitHub Actions reproduction in this read-only review.

Is this the best way to solve the issue?

Yes, this is the narrow target-repo fix for the OpenClaw ingress side: move command detection before target write-token minting while leaving generic activity forwarding intact. The remaining best-fix requirement is live dispatch proof against the receiver contract.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a normal-priority maintainer automation fix with limited product blast radius but concrete ClawSweeper workflow impact.
  • merge-risk: 🚨 automation: The diff changes the GitHub Actions gate that decides whether ClawSweeper comment commands are acknowledged and dispatched.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor real behavior proof gate is not applicable because this is a maintainer-labeled MEMBER PR, though live Actions log proof would still reduce automation risk.
Evidence reviewed

PR surface:

Tests +25, Config +18, Other +10. Total +53 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 25 0 +25
Docs 0 0 0 0
Config 1 24 6 +18
Generated 0 0 0 0
Other 2 10 0 +10
Total 6 59 6 +53

What I checked:

Likely related people:

  • vincentkoc: Recent OpenClaw workflow and script-routing history shows Vincent Koc carrying the affected ClawSweeper dispatch and Windows taskkill routing surfaces. (role: recent area contributor; confidence: high; commits: fe1d981a47af, 4f8fd48ea76e, e486a1d1cf7e; files: .github/workflows/clawsweeper-dispatch.yml, scripts/test-projects.test-support.mjs, scripts/lib/windows-taskkill.mjs)
  • steipete: Commit history on the dispatch workflow shows Peter Steinberger introducing and hardening the ClawSweeper command and activity dispatch paths. (role: workflow feature contributor; confidence: medium; commits: 3e67ee63b4e0, 5d2ee19e5abb, 1327f6742fd5; files: .github/workflows/clawsweeper-dispatch.yml)
  • brokemac79: Blame on the ClawSweeper receiver command parser points to brokemac79 for the current exact command-line parsing contract that this target prefilter must preserve. (role: adjacent receiver parser contributor; confidence: medium; commits: a07fc1f94; files: openclaw/clawsweeper/src/repair/comment-command-text.ts)
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.

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jun 20, 2026
@vincentkoc
vincentkoc requested review from a team as code owners June 21, 2026 01:04
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: msteams Channel integration: msteams channel: nostr Channel integration: nostr channel: telegram Channel integration: telegram channel: zalouser Channel integration: zalouser app: web-ui App: web-ui gateway Gateway runtime extensions: memory-core Extension: memory-core cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: vercel-ai-gateway extensions: qa-lab extensions: codex plugin: file-transfer extensions: amazon-bedrock extensions: xai extensions: zai labels Jun 21, 2026
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: b5389b59e46b4dd4d7d4bad6984c9b63e0920b49

@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Thanks @vincentkoc!

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