Repository navigation
feat(cron): let linked users schedule their own work - #198119
dankarization wants to merge 7 commits into
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 Summary: ❌ FailedThis 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 real behavior proof before merge. What this changesAdds caller-scoped one-shot and recurring Telegram automations with creator-bound tool caps and later-turn management. Example: Alice has operator.write and requests a recurring read-only task every 60 seconds in Telegram topic 99.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 5 items remain Keep open: this PR supplies a concrete Telegram scheduling capability absent from current main, but the expanded authorization contract still needs an owner decision. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherTelegram ingress supplies authenticated human and conversation facts; agent and child-run grants carry those facts into Gateway cron handlers, which authorize and persist jobs for execution and original-conversation delivery. flowchart TD
A[Telegram human message] --> B[Ingress authority]
B --> C[Caller and conversation grant]
C --> D[Agent or managed child]
D --> E[Gateway cron handlers]
E --> F[SQLite automation job]
F --> G[Original Telegram conversation]
Technical reviewBest possible solution: Extend the existing cron authority and persistence owners with an approved caller-bound scheduling contract that preserves human, tool-cap and conversation isolation. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the missing non-owner Telegram admission path; this review executed no target code, and the custom-deployment lifecycle report does not identify this head as its source. Is this the best way to solve the issue? The implementation coherently extends existing grants, session facts and cron handlers; broader channel and autonomous-agent requests remain outside its Telegram admission contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 18892937f802. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No concrete runtime authority bypass was established, but the public description exposes private work-session locations. EvidenceSecurity concerns:
What I checked:
PR surfaceSource +618, Tests +1578, Docs +18, Other +2. Total +2216 across 56 files. Added test files: 3. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. 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 (2 earlier review cycles)
Reviewed November 14, 2026, 6:59 AM ET / 11:59 UTC (Revision 3). |
|
Thanks — both concrete CI findings are addressed in The Telegram assertions now run through the registered plugin in a core-owned Gateway integration test; the extension no longer imports those private core modules. Cron fixtures use the grant’s actual run ID, with mismatched-run and revoked-grant rejection still covered. All 188 selected tests, the extension boundary check, three affected type graphs, scoped lint and formatting pass locally. One correction to the decision question: the implementation checks the linked profile’s |
Worked on by: - @dankarization Co-authored-by: dankarization <[email protected]> OpenClaw-Publication: 32289693-b031-4179-80f5-a3c563b25e5c
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Small correction on scope from the person whose deployment raised this. The narrow framing in this PR — one-shot, tool-free reminders with a fixed delivery route — is not actually what the use case needs, and I asked for it that way earlier. My mistake. What I really want: a linked, non-owner person should be able to create and manage their own automations with the same effective rights they already have as a caller. They can already do plenty of things; the only thing they cannot do is anything inside automations. That looks like an upstream gap rather than a config mistake on my side, because an ordinary allowlist never lifts the owner-only deny. Concretely, for a caller-scoped job:
The one-shot reminder path here is a reasonable first step, but please treat the general caller-scoped case (#187264, #168389, #141201) as the actual target. I am testing that behaviour on a sub-production Gateway with real users. |
Co-authored-by: dankarization <[email protected]>
Worked on by: - @dankarization Co-authored-by: dankarization <[email protected]> OpenClaw-Publication: 28c614f8-49be-4489-9ffd-f7411e203b2c
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
I ran a live scheduled-tools check with the An agent created a one-shot job limited to This used owner authority. Live employee/nonowner acceptance is still outstanding; no owner role was added for this test. The branch has since advanced to |
|
I tested the repair packet against
The run still finishes An admin change from the current session target to an isolated target also drops the source and lets the changed job run. That second probe used a member creator; the revoked-creator result above is the schedule-only case. The positive checks also passed: 46 focused tests, plus one member job surviving a cold restart and firing naturally with working I haven't changed the product code or this branch. The repair needs to preserve or safely revalidate the creator's authority on these edits, rather than falling back to a job without a source. I'm holding this packet out of our deployment until that case is fixed and retested. These results cover the supplied repair tree, not the current unmodified PR head. |
|
Correction after an actual built-runtime test: the source-loss probe below placed the new job in an old-initialized schema-40 fixture. It was a persisted-format probe, not the previous executable opening a real newer store. We have now run the actual built The existing 41/40 schema boundary therefore fences this tested executable downgrade. The earlier probe does not establish an executable path through that boundary, and requiring a new format bump solely from that probe was too strong. An executable-only rollback still cannot use the newer store; matched state restoration before new traffic or a compatible forward-recovery runtime is required. This is not acceptance of the pending personal-reminder port, published Additional independent compatibility result from the current-main adaptation (not a qualification of published head The narrow repair passed four Gateway handler checks and an isolated real-Gateway negative test: an interval-only edit retains the source and revision, incompatible target changes are rejected without mutation, and revocation prevents provider/tool effects. One job also survived a cold restart and fired through the natural timer with bounded read/exec effects. That last probe used a synthetic command-owner linked-member profile; it is not proof of non-owner creation or live employee Telegram acceptance. The downgrade probe is still unsafe. The previous operator runtime We are excluding this repair from the new production candidate. The published Legacy source-less jobs remain a separate compatibility problem; these results do not authorize deriving a grant from an identifier or silently assigning owner authority. No production roles or jobs were changed for these probes. |
Related: #198415.
What Problem This Solves
Linked users should be able to schedule work they are already allowed to perform, without becoming Gateway owners.
User Impact
Adds one-shot and recurring Agent-turn jobs with explicit tool limits and later management by the original caller. The creation grant is currently Telegram-conversation-bound; other users, chats/topics and bot accounts remain isolated. Tool and sandbox denies still apply.
Why This Change Was Made
Keep the authenticated creator and permission limits through delegated work, persistence and timing edits instead of borrowing administrator authority. Personal jobs cannot redirect delivery or enable global failure alerts.
Evidence
Existing source-less jobs are not retroactively granted authority. Older builds cannot execute newly recorded channel-source envelopes; rollback must not strip that authority.
Implementation by @dankarization.
Work sessions
Linked for team reference; these sessions aren’t public.