Repository navigation
feat: allow scoped operators to manage their automations - #188090
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: needs maintainer review before merge. What this changesAdds operator.cron, implied by operator.write, for managing conversation-owned automations through authenticated agent turns. Example: An operator.write user asks their agent to create a recurring “Check status” automation.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it adds useful scoped scheduling, and no actionable introduced defect was found; current-head CI remains pending. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway admission turns authenticated operator scopes into run-bound grants; automation handlers enforce ownership and live authority before persisting jobs, and scheduled execution restores the initiating scopes. flowchart TD
A[Authenticated operator turn] --> B[Scope and creator admission]
B --> C[Run-bound requester grant]
C --> D[Gateway automation handlers]
D --> E[Ownership and live authority checks]
E --> F[Cron storage]
F --> G[Scheduled scope restoration]
Technical reviewBest possible solution: Use the existing requester grants, ownership checks, and persistence guards to provide scoped scheduling while retaining separate administrator authority. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the missing scope and default admission restriction; supplied regressions report red/green results, but no target code was executed during this review. Is this the best way to solve the issue? The implementation extends existing admission, grant, dispatch, and ownership owners without adding a competing authorization or storage system. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1f088d23a1cc. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +41, Tests +303, Docs +15, Generated 0, Other +2. Total +361 across 27 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 HistoryReview history (3 earlier review cycles)
Reviewed October 30, 2026, 9:22 PM ET / October 31, 2026, 01:22 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
ClawSweeper status: applying reviewed decision. I am applying the reviewed decision for this pull request: feat: allow scoped operators to manage their automations This is item 1/1 in the current shard. Shard 1/1. This transient lease prevents a newer review from overlapping label, comment, or close mutations. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Add operator.cron, implied by operator.write, for authenticated agent-turn scheduling within existing caller ownership. Preserve the initiating grant for scheduled work without granting global scheduler administration. Co-authored-by: VACInc <[email protected]>
Update ingress and continuation consumer expectations for scoped scheduling. Exercise signed requester creation, cross-owner denial, and revocation before persistence. Co-authored-by: VACInc <[email protected]>
3eb0998 to
95425a3
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep refreshing cost responses outside the freshness TTL and cover both agent scopes. Accept the current symlink denial message without weakening the rejection invariant. Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…ker branch Co-authored-by: hannesrudolph <[email protected]>
…8090) * feat: allow scoped operators to manage their automations Add operator.cron, implied by operator.write, for authenticated agent-turn scheduling within existing caller ownership. Preserve the initiating grant for scheduled work without granting global scheduler administration. Co-authored-by: VACInc <[email protected]> * test: prove scoped cron authority through persistence Update ingress and continuation consumer expectations for scoped scheduling. Exercise signed requester creation, cross-owner denial, and revocation before persistence. Co-authored-by: VACInc <[email protected]> * fix: refresh incomplete usage cost snapshots Keep refreshing cost responses outside the freshness TTL and cover both agent scopes. Accept the current symlink denial message without weakening the rejection invariant. Co-authored-by: VACInc <[email protected]> --------- Co-authored-by: VACInc <[email protected]>
What Problem This Solves
Operators with write access cannot ask an agent to create and manage their own automations without Gateway administrator authority.
User Impact
Adds
operator.cronfor authenticated agent-turn automation access, implied byoperator.write. Users can schedule and manage jobs within the existing conversation/account ownership boundary without receivingoperator.admin. Cron-only access does not grant chat, general write, or global scheduler administration.Why This Change Was Made
Reuse the existing requester grant and job ownership checks instead of treating every scheduler caller as an administrator. One runtime-method mapping covers creation, job management, history, and scratch access. Scheduled runs preserve the initiating operator scopes. Direct/global scheduler APIs, privileged binding, live revocation, and tool restrictions retain their existing checks.
Signed requester transports preserve private scoped-creation provenance without promoting it to local-owner or management authority. No new state owner or storage schema is introduced. The config baseline is regenerated for the accepted scope.
Evidence
f8fe5864ab3aab29ffeab8b98fef51d3014e5349; current head is01d2a7a7edda96784c97de77f5af43040223cfbc. The only rebase conflict was the generated configuration checksum, regenerated withpnpm config:docs:gen.git range-diffconfirmed the feature and regression patches were unchanged by rebase.pnpm config:docs:checkandgit diff --checkpass. All 145 focused post-rebase tests pass across scope implication, Gateway auth config, signed creator transports, Cron policy, and persisted scheduled continuation.usage.costno longer gives a freshness TTL to a refreshing lower-cache result. Two cost-handler regressions fail before the fix and pass after it for single-agent and all-agent reads, without increasing timeouts. The cost repair reuses the existing cache completeness predicate (production +2 lines; no new owner).01d2a7a7edda96784c97de77f5af43040223cfbc, including all Android and PostgreSQL lanes, changed Node shards, clean-install type/lint checks, and both requiredopenclaw/ci-gatechecks. The real Gateway quarter-backfill regression passed in 10.809s on that head. Local full Gateway E2E setup, core typecheck, and lint preparation failed because the shared installation had fs-safe 0.26.13 versus lockfile 0.26.15 (missing native-asset pin/export); the shared installation was not modified. Those local environment failures are retained separately from the passing clean-install CI evidence.operator.cronandoperator.writepass real token mint/verification, production in-process dispatch, owned-job persistence, foreign-conversation/account refusal, and revocation during validation before persistence. Refused mutations leave storage unchanged; no local-owner or management authority is added.f0586d2e3e0d73cwas integrated only for a generated-config conflict; affected checks were rerun. These are prior-head results, not current-head clean-install evidence.3eb0998e661ed1fd7681c0cfb01b16799cc552e0, including both Android lanes, all PostgreSQL lanes, changed Node shards, and required aggregate checks. The earlier Android emulator-setup failure did not recur.01d2a7a7edda96784c97de77f5af43040223cfbchas no actionable findings and no remaining before-merge items. CI was still pending when that review completed and is now green.Validation cost and change size
All changed test files were exercised with
--maxWorkers=1; wall times include compilation/setup:Transport execution itself takes about 14s; most wall time is compilation. The existing scheduled-continuation suite exercises real persistence/restoration and authority lifecycle, which helper-only tests cannot prove. The successful pre-rebase CI run's start-to-final-update window was 1,417 seconds (23m37s). The current-head CI run took 1,522 seconds (25m22s), including setup and parallel jobs; neither is summed runner time.
Production delta against integrated main: +65/-24 lines. Tests: +376/-73 lines. The original 284-line allocation covers distinct admission, signed final-effect, and continuation-scope regressions; the CI cost-cache repair adds 19 test lines in an existing suite. No shared test scalar was raised.
Requested by @VACInc.
Work sessions