Repository navigation
fix(review): restrict hosted reviews to public targets - #1292
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 6:20 PM ET / 22:20 UTC. ClawSweeper reviewWhat this changesThis PR gates hosted review workflows, webhook commands, durable queueing, and publication on configured-target eligibility plus a fresh public-visibility check. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep this active maintainer-authored PR open: the current head provides a coherent public-only hosted-review boundary and the follow-up closes the prior command-persistence gap. The accepted fail-closed availability tradeoff remains the principal merge consideration. Priority: P1 Review scores
Verification
How this fits togetherClawSweeper receives GitHub events and scheduled repository candidates, admits eligible public targets, then persists and dispatches review work. The queue and Worker also publish lifecycle state to the observer-only Bay surface. flowchart LR
A[GitHub events] --> B[Target eligibility]
C[Scheduled repository fanout] --> B
B --> D[Public visibility check]
D --> E[Queue and command intake]
E --> F[Review and publication]
F --> G[Lifecycle and Bay status]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared eligibility and live-public-visibility boundary at each durable or credential-bearing transition, while retaining the documented local-review path for private repositories. Do we have a high-confidence way to reproduce the issue? Yes. The current-head Worker/SQLite proof in the PR body exercises signed command intake with private, retryable, and public metadata outcomes, and the checked source confirms admission precedes durable intake storage. Is this the best way to solve the issue? Yes. A shared configured-target check plus fresh visibility checks at each persistence and credential boundary is the narrowest way to prevent a stale earlier admission from authorizing later effects. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4eb18d1e6fdc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
d4fcc84 to
1234bc1
Compare
e4e6b80 to
e00cb5b
Compare
e00cb5b to
10118af
Compare
|
Maintainer decision: accept the public-only hosted admission boundary and its Private and internal targets remain unsupported by hosted ClawSweeper. |
Use the shared public-target admission before persisting command prompts, and retain the separate visibility check for already-admitted work. Remove the redundant response conversion and keep release notes in this PR. Co-authored-by: Vincent Koc <[email protected]>
Merge current main and remove the source-text assertion that required visibility checks to happen after command persistence. Signed request, SQLite, and resumed-command behavior coverage now protects the actual contract. Co-authored-by: Vincent Koc <[email protected]>
|
@clawsweeper re-review Updated the existing contributor branch with current main and fixed command intake persisting prompt content before current public visibility was checked. The PR body contains the baseline/candidate native Worker + SQLite proof, source hash, successful full gate, managed review scope, and explicit proof limits. The existing public-only policy decision remains accepted. Please review head |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(review): restrict hosted reviews to public targets This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Landed as 7fd8583 after improving the existing contributor branch. Public visibility admission now happens before command prompts, receipts, watermarks and journey mappings are persisted; the redundant eligibility-only adapter is removed. Vincent Koc's contributor credit is retained. Native production Worker/SQLite comparison: https://crabbox.openclaw.ai/portal/runs/run_d1c065742f8f. The submitted head saved private/retryable command content before its visibility response; the candidate refused those requests with zero command rows and no target-write credentials, while public intake succeeded. The fixture used signed synthetic requests and loopback metadata, not live repository privacy changes or production mutation. Full check passed 4,359 tests (14 skipped, zero failures), plus 13 changed-coverage checks and nine focused command-intake tests. CI https://github.com/openclaw/clawsweeper/actions/runs/33565297909 and automerge E2E https://github.com/openclaw/clawsweeper/actions/runs/33565297980 passed; CodeQL passed. Current-head hosted review found no actionable findings and accepted the proof: #1292 (comment). The earlier dispatch was superseded by the successful fresh review. The public-only hosted policy and fail-closed availability tradeoff are accepted as recorded above. Local private-checkout review remains documented. The merged tree was verified against the reviewed integration, and the task-owned AWS lease was released. |
What Problem This Solves
Hosted target eligibility was inconsistent across webhook intake, maintainer commands, scheduled fanout, authority reservation, lifecycle acknowledgement and resumed publication. A repository could become private between an early check and a durable effect.
The final audit also found that signed command intake saved prompt content, receipts, watermarks and journey identifiers before checking current visibility. The later execution gate blocked target credentials, but could not undo that initial persistence.
Why This Change Was Made
Hosted ClawSweeper accepts explicitly configured public repositories and approved public
openclaw/*/steipete/*fallbacks. Explicit denials override fallbacks. Private/internal, arbitrary third-party, and unverifiable targets are refused before the owning credential or persistence boundary. Operator-provided private checkouts remain supported for local review.The queue performs fresh public visibility admission before authority reservations, command persistence, lifecycle acknowledgement and publication. Resumed work rechecks visibility independently. Command intake now uses the existing combined admission owner, removing its eligibility-only response adapter instead of introducing another check implementation.
User Impact
Eligible public contributors retain hosted review. Unsupported targets receive no hosted processing or target acknowledgement. GitHub metadata outages intentionally delay admission until visibility can be verified; this fail-closed availability tradeoff was accepted in #1292 (comment).
OpenClaw Bay Impact
Rejected command intake does not create a journey mapping or accepted-intake lifecycle effect. Lifecycle completion uses the same admission boundary. Bay stays observer-only; no new observer schema, browser GitHub calls or mutation controls are introduced.
Documentation and Cleanup
README and dispatcher/scheduler references describe the public-only hosted contract and local private-review path. The obsolete
item_countworkflow input is removed, manual review telemetry and reconciliation remain aligned, and the reusable admission script uses valid Node ESM execution. The proposed changelog entry was removed; release-note context stays here.This is a security-boundary addition: production/workflow code is +1,978/-383 (net +1,595) against the integration base. The command-intake follow-up removes ten production lines relative to the submitted PR. The broader increase applies one trust boundary across existing entrypoints; it does not add an agent orchestration or judgment framework.
Evidence
df3a019fe8c10aff1311ca5aaaa9f14729c4c3ad; original contributor ancestry retained, including Vincent Koc's10118afea4076df058d10215c32ecf2d284a854a.pnpm run checkon the latest-main integration passed: 4,359 tests passed, 14 skipped, zero failures; all 13 changed-coverage checks passed. Managed precommit and committed Codex reviews were clean at the configured P0 scope.Real Behavior Proof
Surface: production Worker, queue and command store in Wrangler
4.107.0 dev --local, using real disposable SQLite Durable Objects, signed synthetic requests, generated synthetic App credentials, and loopback GitHub API responses.Provider: AWS Crabbox
cbx_62c61f7c200a, Linuxc7a.8xlarge, imageami-0461d919be7deb53c, Node24.18.1 and pnpm11.10.0. Native proof and full gate.The same standalone script runs against the submitted head and working candidate. It holds the metadata response while querying SQLite, so later cleanup cannot hide premature persistence. It releases the response and records the final HTTP result and database state. The candidate queue source SHA-256 is
6b84f6e3aceea756b2b12558a55f11284dd5cd18a0a5998c00665f0b64a1db4b, verified against the committed source.Private/retryable cases requested zero target-write credentials. They used only the synthetic metadata-read credential needed for visibility. The public case persists exactly one command receipt. All fixture processes, listeners and temporary databases are cleaned up.
Limits: real Worker/SQLite execution with synthetic API responses; no real GitHub repository privacy changes, target credentials, production service mutation, or fleet deployment claim. The live trace covers the signed command-intake endpoint. Duplicate delivery and resumed-row behavior are additionally covered by the focused production-owner regression suite; the native trace is not presented as a duplicate-delivery or full review-execution proof.
Run after installing the repository dependencies:
node intake-proof.mjs "$PWD"Standalone Worker and SQLite proof
Earlier Authority and Lifecycle Proof
Vincent's submitted head
10118afea4076df058d10215c32ecf2d284a854asupplied separate real Worker/SQLite authority and lifecycle traces. Public-to-private and public-to-retryable transitions rejected branch/source reservation without authority, sequence, alarm, queue, receipt or target-credential effects; public controls accepted. Lifecycle rejection avoided acknowledgement/Bay effects and the public control persisted its matching completion.Those earlier traces used Node26.7.0 and Wrangler4.107.0 with synthetic loopback GitHub credentials. Their 78-entry manifest was verified by the original author. They are supporting evidence for unchanged authority/lifecycle paths, not reruns at this follow-up head. Recorded hashes: authority-results.json
90e33abd451c722031a4f48c53ff2328c53aa16fd2a163fa58fa22b207c11fd9; lifecycle-authority-trace7822b6cb0e7e16518f84d137572ce4618a7ae24b4db0496fee7fbdf75f2a3913.Review Disposition
The earlier authority-reservation race and required transition proof were addressed on the submitted head. The independent follow-up found and fixed the separate command first-persistence gap. The delayed visibility check remains for already-admitted rows. Current-head CI and a review of this updated body are required for landing. Maintainer acceptance of the public-only policy and its fail-closed availability tradeoff remains recorded in the linked decision above.