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 real behavior proof before merge. Reviewed August 29, 2026, 8:40 AM ET / 12:40 UTC. ClawSweeper reviewWhat this changesThis PR centralizes configured-target eligibility and live public-visibility checks for hosted review dispatch, queueing, lifecycle acknowledgement, publication, and fanout. Merge readiness⛔ Blocked until stronger real behavior proof is added - 8 items remain Keep open: the intended security boundary has a P1 gap because authority reservations can still be persisted after a target changes from public to private. Priority: P1 Review scores
Verification
How this fits togetherHosted review events enter the Worker and Durable Object queue before credentials are minted and review results are published. The new admission layer is meant to stop private or unsupported targets before those durable and credentialed stages. flowchart LR
A[GitHub event or command] --> B[Worker admission]
B --> C[Public visibility probe]
C --> D[Authority reservation]
D --> E[Durable review queue]
E --> F[Credentialed review and publication]
F --> G[Bay lifecycle projection]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The introduced authority boundary permits a private-transition target to persist an authority reservation before its fresh visibility check. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Probe live public visibility at every authority-reservation persistence boundary, reject before writing state, and prove the public-to-private transition through the production queue path. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence path: let a configured repository become private after the Worker probe and before the source-authority reservation transaction. Is this the best way to solve the issue? No—the centralized design is appropriate, but it must recheck live visibility before each durable authority reservation rather than only during later processing. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e1eefe217304. LabelsLabel justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
d4fcc84 to
1234bc1
Compare
1234bc1 to
e4e6b80
Compare
e4e6b80 to
e00cb5b
Compare
What Problem This Solves
Fixes an issue where hosted review eligibility was inconsistent across event
intake, maintainer commands, scheduled fanout, lifecycle acknowledgements, and
resumed publication. Private, internal, unavailable, and out-of-scope
repositories could reach parts of the hosted lifecycle before the final target
boundary was known.
Why This Change Was Made
Centralizes hosted-target eligibility and fresh public-visibility admission
before target credentials, acknowledgements, durable state, dispatch, or
publication. Hosted scope is limited to explicitly configured repositories and
the approved public
openclaw/*andsteipete/*owner fallbacks; explicitdenials override those fallbacks. Arbitrary public repositories are rejected.
Lifecycle and Bay acknowledgements pass both Worker admission and a queue-side
fresh visibility recheck immediately before persistence. Private and internal
review remains local-only. Author-wide repair remains limited to explicitly
configured public repositories.
This is the best fix because the admission result is owned once and enforced at
each durable lifecycle boundary. Intake-only validation would leave scheduled,
resumed, fanout, acknowledgement, and publication paths able to bypass the same
invariant.
User Impact
External contributors can use hosted ClawSweeper review on eligible public
repositories. Private/internal repositories and unconfigured repositories
outside the approved owner fallbacks receive no hosted processing or target
acknowledgement; maintainers can review them locally.
During GitHub metadata outages, affected hosted work deliberately fails closed
and may be delayed until visibility can be verified.
OpenClaw Bay Impact
Bay keeps the same observer-only contract. Its lifecycle completion projection
now persists only after the target passes the same fresh hosted-public boundary.
Documentation Impact
Updated the active dispatcher, scheduler, target, and README guidance to name
the hosted admission owner, eligible public-target scope, and local-only
private/internal boundary. Added one unreleased changelog entry.
Evidence
e00cb5bd4546f8087ec412778cd184614644150ce1eefe217304f0f510acb3890db1155cef61682epassed, including
pnpm check; the PR has 13 successful or expected-skippedchecks and no failing checks.
queue, and triage-harness proof: 348/348 tests passed.
boundary and CI-repair amendments are covered by exact-head focused sets.
checks,
git diff --check, signature verification, and private-data scrubpassed.
an independent exact-head audit found no remaining admission bypass.
Real Behavior Proof
unavailable, explicitly denied, and out-of-scope public targets stop before
target credentials or durable/target-side effects.
e00cb5bd4546f8087ec412778cd184614644150c, tree1f9a5862201fce97ba7fd2e9c1d61bc80a81680e, basee1eefe217304f0f510acb3890db1155cef61682e.dashboard/worker.tsanddashboard/exact-review-queue.tsunder Nodev26.7.0andwrangler@4.107.0 dev --local, with real SQLite Durable Objects anddisposable persistence.
GitHub metadata API, signed webhook ingress, and acknowledgement-pending
lifecycle projections seeded in disposable SQLite.
repository credential, private repository identity, production service, or
production state was used.
Redacted final-effect authority trace:
[ { "path": "eligible-public", "worker_visibility": "public", "queue_visibility": "public", "http": 202, "result": "recorded Bay journey completion", "github_requests": 6, "metadata_token_mints": 2, "visibility_probes": 2, "target_credential_mints": 0, "acknowledgement_persisted": true, "bay_completion_persisted": true, "queue_items": 0, "delivery_receipts": 0 }, { "path": "explicit-deny", "http": 202, "result": "target not eligible", "github_requests": 0, "metadata_token_mints": 0, "visibility_probes": 0, "target_credential_mints": 0, "acknowledgement_persisted": false, "bay_completion_persisted": false, "queue_items": 0, "delivery_receipts": 0 }, { "path": "public-then-not-found", "worker_visibility": "public", "queue_visibility": "not_found", "http": 202, "result": "private target unsupported", "target_credential_mints": 0, "acknowledgement_persisted": false, "bay_completion_persisted": false, "queue_items": 0, "delivery_receipts": 0 }, { "path": "retryable-metadata-failure", "worker_visibility": "public", "queue_metadata_token": "rate_limited", "http": 503, "result": "target_visibility_unverified", "github_requests": 5, "metadata_token_mints": 2, "visibility_probes": 1, "target_credential_mints": 0, "acknowledgement_persisted": false, "bay_completion_persisted": false, "queue_items": 0, "delivery_receipts": 0, "standalone_retry_record": false } ]The explicit-deny path stops before any metadata I/O. The stale-private and
retryable paths perform only the bounded metadata authority check, then stop
before target credential minting, acknowledgement persistence, Bay completion,
queue insertion, or delivery receipts. Only the public/public path changes the
durable acknowledgement and Bay projection.
Local proof package provenance:
Limits: the historical acknowledgement-pending prerequisite was seeded
directly into disposable SQLite because no public endpoint creates that prior
state. Admission, both visibility probes, queue-owner final-effect decisions,
durable mutations, and HTTP responses all ran through the production Worker
code. This proof does not mutate the deployed service.
Prior Review Disposition
targets; private/internal use remains local-only. Arbitrary public
repositories are not in scope.
unverifiable metadata may delay hosted review, acknowledgement, and
publication rather than allowing authority to become stale.
hosted work.
metadata request.
fresh visibility recheck before durable persistence.
paths are covered at exact head.
current-head proof package recorded above.