Repository navigation
fix: make target dispatchers keyless with Worker-owned acknowledgements - #2062
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesReplace target-side App tokens and relay fallback with OIDC intake and shared Worker-owned command acknowledgements. Example: A collaborator posts @clawsweeper stop on openclaw/openclaw issue 42.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it removes target-held App credentials through existing Worker owners, and no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherTarget GitHub Actions workflows send item events and comment locators to the Worker, which authenticates intake and delegates to the existing exact-review queue or command router. flowchart TD
A[Target workflow] --> B[OIDC Worker intake]
C[Signed App webhook] --> D[Shared command handler]
B --> E[Live GitHub reads]
E --> D
D --> F[Exact review queue]
D --> G[Production command router]
F --> H[Canonical acknowledgements and effects]
G --> H
Technical reviewBest possible solution: Use the shared Worker and existing queue/router owners, then deploy Worker-first and migrate targets with verified App subscriptions. Do we have a high-confidence way to reproduce the issue? Current main visibly passes the App private key into target admission and mints write-capable tokens in the dispatcher; this review executed no target code. Is this the best way to solve the issue? The change removes the credential handoff while reusing existing authorization, acknowledgement, receipt, and routing owners instead of adding competing state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8779343ff735. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed October 18, 2026, 9:17 PM ET / October 19, 2026, 01:17 UTC (Revision 3). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b919a3b8ba
ℹ️ 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".
|
|
||
| - `dashboard/worker.ts`: `8f28543323b4e0815cff071917f73602ca8b119432c92f56ee4b739a4dbc8008` | ||
| - `dashboard/target-dispatch-ingress.ts`: `99fa8bd1181d56da81fa082a07a674a446688dd1ebfbe580b97dc4a51d338e2f` | ||
| - `.github/workflows/clawsweeper-dispatch.yml`: `dced71b9a5c0ce39933b7f35c348e30d17f299d321075bb39fba50f3883f2318` |
There was a problem hiding this comment.
Refresh the proof after changing failure handling
This hash does not match the dispatcher committed here: hashing the committed workflow yields 38903d4e38d6fca3533fcf43571831702133e793e67ec311becdb3ab5b9d7162, not the recorded dced…. The proof also says 503, redirect, token, and connection failures exit zero, while the committed workflow and test now require exit 1 for those cases. Consequently, the artifact is bound to an earlier candidate and cannot substantiate this commit; rerun it and update both the observed result and source hash.
AGENTS.md reference: AGENTS.md:L117-L124
Useful? React with 👍 / 👎.
|
@clawsweeper re-review The reviewed head (
|
|
🦞👀 Re-review progress:
|
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
Replace the App-key dispatcher with OIDC-only Worker intake. No App key and no token mints remain in this workflow. The App webhook remains the independent route; the Worker owns eligibility and best-effort acknowledgements. Canonical migration: openclaw/clawsweeper#2062 Validated with actionlint, zizmor --offline (zero template-injection findings), no secrets. references, and independent autoreview.
What Problem This Solves
Target dispatch workflows currently receive the ClawSweeper App key and mint write-capable tokens for acknowledgements and relay delivery. A target runner should not hold ClawSweeper credentials.
User Impact
The canonical target dispatcher uses only GitHub Actions OIDC. The Worker fetches live command data and owns acknowledgements and routing. Existing target copies and receiving
repository_dispatchhandlers continue working during migration. This PR does not deploy the Worker, change any target repository, or migrate the 83 copies.A failed OIDC request now warns and exits zero, relying on the independent App webhook. Verify Issues, Pull requests, and Issue comments subscriptions before any migration. The Actions and App routes both remain enabled.
Why This Change Was Made
The change removes the target-side secret handoff, token actions, acknowledgement shell code, and relay fallback. The OIDC comment path hydrates live data and calls the same comment handler as signed App webhooks. No new schema, Durable Object, configuration option, or incompatible legacy payload change is introduced.
Design checkpoint
iat,nbf, andexp; repository slug and positive repository ID; supportedevent_name; branch ref; exact<repo>/.github/workflows/clawsweeper-dispatch.yml@<ref>workflow; absent or matchingjob_workflow_ref; positive run ID and attempt. Comment intake requiresissue_comment, payload repository equality, and ref equality with the repository's live default branch. The live comment ID andissue_urlmust match the requested item. Payload author, association, body, or other extra fields are rejected.directReReviewIntakeand its comment-ID + GitHubupdated_at+ SHA-256 body identity, regardless of OIDC/App route, including after completion. Other commands retain the existing router's exact comment-version receipt and marker-backed acknowledgement convergence; no second receipt store is added./command-intakebefore any ack; the queue verifies the live version/head and converges status plus eyes. Other commands usecreateFastAckCommentOnce,addIssueCommentReaction, anddispatchClawsweeperComment. That handler is now shared. Queued status comments require live OWNER/MEMBER/COLLABORATOR association; acknowledgement write failures do not prevent router dispatch.opened,reopened,edited,labeled,unlabeled), PRs (opened,reopened,synchronize,ready_for_review,edited,labeled,unlabeled), and command comments (created,edited) rely on the App route when OIDC is unavailable or rejected. Specific cases include network/Worker/JWKS failure, redirects/non-2xx, missing token permission, PRs based on a non-default branch, renamed/combined workflow files, reusable-workflow callers, stale default-branch refs, oversized/malformed payloads, and relay-only fields. The App handles the corresponding Issues, Pull requests, and Issue comments events independently of workflow name/base branch; existing label and authorization skips remain intentional policy. No newly uncovered event class was found in the documented subscription/handler contract. Production installation subscription verification is a rollout prerequisite.Documentation Impact
Updated active dispatcher, onboarding, event-hook, and README guidance.
docs/target-dispatcher.mdhas the matching keyless template, failure semantics, legacy-receiver removal condition, and rollout checklist including the separateopenclaw/openclawvariant. The new proof record is historical evidence.docs/limits.md, webhook read-model, and review-authority guidance were reviewed; no limits change or authority-classifier activation is needed.Evidence
origin/main: scoped clean through P2.pnpm run check: static checks, all builds, lint, and coverage thresholds passed (91.08% lines / 81.82% branches / 93.66% functions). The 6,062-test run finished with 5,974 passed, 58 failed, and 30 skipped. The failures are outside the changed dispatcher surfaces: macOS temporary-path alias rejection and subprocess/runtime-budget failures. A serial rerun of exactly those 58 tests with a canonical temporary directory passed 52 and failed 6. The original check remains non-green. Remaining failures are twoapply-runtime-budgetfixtures (15/25-second budgets), the packaged local-reviewer four-minute timeout, and the threechanged-pr-cleanmedia-admission fixtures (missingmedia-callscapture). These tests and their implementation paths are unchanged by this PR; no unrelated fixes were added. The final dispatcher proof was rerun separately: 24/24 passed.Real Behavior Proof
Claim/surface: keyless POST through the actual Worker handler → live GitHub comment/item reads → shared command handling → actual SQLite-backed queue admission and alarm → canonical acknowledgement/reaction.
Environment: local macOS, Node v26.12.0, pinned pnpm 12.4.1; existing repository Worker/queue harness; loopback stub GitHub API; in-memory generated RSA test key and test JWKS. No remote provider, lease, or image; this is not the Windows host. No real GitHub mutation.
Command:
pnpm run build:node, thennode --test test/dashboard-target-dispatch-ingress.test.ts test/dashboard-worker-command-intake.test.ts test/target-dispatcher-workflow.test.ts.Observed: valid OIDC is accepted; wrong repo/workflow/ref/event, wrong item binding, and supplied association/body/author are rejected. Review commands are durably admitted before ack. Both arrival orders coalesce, including same-timestamp body edits. The queue verifies the live PR head and produces one status comment and one eyes reaction. Other commands use live association and the existing router; a queued-comment 403 still dispatches. The actual router executes an OIDC-produced
stopcommand for a non-author collaborator with write permission, removing repair labels and addingclawsweeper:human-review. The matching App-route replay makes no further label writes. After intake but before asynchronous execution, revoking that sender to read permission makes delayed delivery and retry each fetch current permission and ignore the command with zero label writes. Shell tests prove warning/exit-zero with no relay on failures.Artifact/trace: reproduction, normalized output, limits, and source hashes. Candidate commit:
7ead70a185addb533f3d4ed72aa528a8f6c4f4e4.Limits: controlled GitHub/JWKS responses; no live token minting, Cloudflare deployment, installation subscription audit, or target rollout. The non-review proof runs the compiled production router/runner with isolated state and a loopback-only
ghtransport shim; the existing router ledger remains its dedupe owner. It proves revocation between Worker intake and router startup, including separate retries, not a permission change during one already-running router process. Simultaneous outages of both routes can delay or lose individual delivery; warning does not mean durable acceptance.Hosted Review Disposition
The completed ClawSweeper review of
740103e941f6a954f8b76086964003186f157739identified missing asynchronous authorization proof, rather than an established introduced correctness bug. Its proof request, security concern, merge-risk item, and optional Rank-up move are addressed by the added production-router scenario above: allowed final label effect, matching App-route duplicate, and a non-author revoked after Worker intake rejected on delayed delivery and retry. Authorization policy is unchanged. The earlier hosted review does not cover this updated head/body; no automatic review request has been posted.Rollout Checklist — Separate Approved Operation
openclaw/openclaw; preserve required triggers/concurrency but use the canonical dispatcher filename.contents: readandid-token: writeonly.openclaw/openclawvariant; keep unrelated activity routing scoped separately.Security review dispositions
4xxis a deliberate refusal (warning, exit 0; the App webhook covers it), while a missing OIDC token, network failure, redirect or5xxemits::error::and fails the job, leaving a red, re-runnable run as the visible record. Tests cover all six failure scenarios with their expected exit status and message; docs updated (failure semantics, verification steps).classifyGithubIssueCommentWebhookused by the App webhook, so command admission is byte-for-byte the current policy:OWNER/MEMBER/COLLABORATORassociation, or the item author re-reviewing their own item (isAuthorReadOnlyGithubWebhookCommand). This PR grants no new authority. Moving review-command admission to live repository-permission evidence is the pendingdocs/review-authority.mdintegration ("Integration and activation require a separate policy change"); tracked as a follow-up rather than changed inside a transport refactor.