Skip to content

Commit e0dc544

Browse files
authored
feat(review): durable command intake for re-review commands (#1143)
Ports the durable command-intake pipeline for the "@clawsweeper re-review" command from the abandoned Aug-8 WIP (snapshot 4cad8de on codex/fix-command-review-publication) onto current main. Commands are now durably recorded pre-acknowledgement (intake/watermark/receipt/revision tables, 16-item intake, 15s-15m bounded retries, 30-day receipts), verified against the live comment and head, fenced through verify/enqueue/effects stages, and superseded by full version identity - including equal-timestamp edits (review-caught P1). Acknowledgement and reaction effects are idempotent; router runs that throttle mid-command now recover instead of stranding the command (live instance: openclaw/openclaw#116562 was acked then lost when both router runs throttled). Superseded snapshot pieces were dropped, not ported: retry jitter (#1076/#1077), quota headroom (#1086), retry budgets (#1089), parked reconciliation (#1111), branch guard (#962); dashboard-monolith diffs were reworked around the #1116/#1124/#1132 splits. Proof: committed receipt at this exact head (docs/proof/durable-command-intake/), real Wrangler Worker + DO comparison with durable throttled recovery, GitHub confined to loopback API; full gate 7056 passed / 0 failed; strict check green. Verdict clean (Findings: None) on 9eb957e.
1 parent 04cd809 commit e0dc544

27 files changed

Lines changed: 3110 additions & 136 deletions

‎.github/workflows/repair-comment-router.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ jobs:
201201
CLAWSWEEPER_ALLOW_MERGE: ${{ vars.CLAWSWEEPER_ALLOW_MERGE || '0' }}
202202
CLAWSWEEPER_STATUS_INGEST_TOKEN: ${{ secrets.CLAWSWEEPER_STATUS_INGEST_TOKEN }}
203203
CLAWSWEEPER_ACTION_LEDGER_INVOCATION: initial
204+
CLAWSWEEPER_WEBHOOK_SECRET: ${{ secrets.CLAWSWEEPER_WEBHOOK_SECRET }}
205+
CLAWSWEEPER_TARGET_INSTALLATION_ID: ${{ steps.app_token.outputs.installation-id }}
206+
QUEUE_URL: ${{ vars.CLAWSWEEPER_EXACT_REVIEW_QUEUE_URL || 'https://clawsweeper.openclaw.ai' }}
204207
run: |
205208
set -euo pipefail
206209
target_repo="${{ github.event_name == 'workflow_dispatch' && inputs.target_repo || vars.CLAWSWEEPER_TARGET_REPO || 'openclaw/openclaw' }}"
@@ -358,6 +361,9 @@ jobs:
358361
CLAWSWEEPER_ALLOW_MERGE: ${{ vars.CLAWSWEEPER_ALLOW_MERGE || '0' }}
359362
CLAWSWEEPER_STATUS_INGEST_TOKEN: ${{ secrets.CLAWSWEEPER_STATUS_INGEST_TOKEN }}
360363
CLAWSWEEPER_ACTION_LEDGER_INVOCATION: retry
364+
CLAWSWEEPER_WEBHOOK_SECRET: ${{ secrets.CLAWSWEEPER_WEBHOOK_SECRET }}
365+
CLAWSWEEPER_TARGET_INSTALLATION_ID: ${{ steps.app_token.outputs.installation-id }}
366+
QUEUE_URL: ${{ vars.CLAWSWEEPER_EXACT_REVIEW_QUEUE_URL || 'https://clawsweeper.openclaw.ai' }}
361367
run: |
362368
set -euo pipefail
363369
target_repo="${{ github.event_name == 'workflow_dispatch' && inputs.target_repo || vars.CLAWSWEEPER_TARGET_REPO || 'openclaw/openclaw' }}"

‎README.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,11 @@ Users with repository write access and issue/PR authors may ask
292292
Other contributor commands are ignored without a reply. Scheduled comment routing is dry unless
293293
`CLAWSWEEPER_COMMENT_ROUTER_EXECUTE=1`; workflow dispatch with `execute=true`
294294
can be used for one-off live routing.
295-
For fast intake, the ClawSweeper GitHub App webhook can post the same queued
296-
status comment and enqueue exact `clawsweeper_comment` or `clawsweeper_item`
297-
work from eligible public `openclaw/*` and `steipete/*` repositories. Exact
295+
For fast intake, the ClawSweeper GitHub App webhook durably records eligible
296+
`review` and `re-review` comment versions before it acknowledges them. Other
297+
commands still enqueue exact `clawsweeper_comment` work, and item events enqueue
298+
`clawsweeper_item` work, from eligible public `openclaw/*` and `steipete/*`
299+
repositories. Exact
298300
item work is coalesced and leased by the dashboard Worker before it dispatches
299301
an executor, so webhook bursts do not create capacity-waiting Actions runners.
300302
The target-side dispatcher remains a scheduled-intake fallback until it adopts

0 commit comments

Comments
 (0)