Repository navigation
[BACKPORT] fix(automations): let configured owners manage jobs from chat - #158372
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 changes before merge. Reviewed September 25, 2026, 9:28 PM ET / September 26, 2026, 01:28 UTC (Revision 3). ClawSweeper reviewWhat this changesThe branch lets configured chat owners manage automations across conversations on the September 4 branch, with owner grant checks, documentation, tests, and refreshed Codex prompt snapshots. Merge readiness⛔ Needs changes before merge - 2 items remain Keep this September 4 backport open. The upstream fix is on main and in v2026.9.6, but the target branch lacks it. This head still rejects configured owners on restricted operator profiles before their automation write requests reach the cron handler. Priority: P2 Review scores
Verification
How this fits togetherAn admitted channel message starts an agent turn that can call the automation tool. The tool sends a grant through Gateway authorization to the scheduler, which reads or changes a job. flowchart LR
A[Channel message] --> B[Owner admission]
B --> C[Agent automation tool]
C --> D[One use management grant]
D --> E[Gateway method authorization]
E --> F[Automation job]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +33, Tests +73, Docs 0. Total +106 across 14 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Carry the current-main method-bound grant check into the September 4 Gateway dispatcher, preserving admin access and proving both restricted-owner success and nonowner denial through registered dispatch. Do we have a high-confidence way to reproduce the issue? Yes. On this PR head, a configured owner using a restricted operator profile can mint a grant, but a registered cron.update request reaches the operator.admin method-scope check before the handler can redeem it. This path was established from source, not executed here. Is this the best way to solve the issue? No. The grant and handler changes need the narrow pre-dispatch exception already present on main; direct-handler tests cannot establish the promised end-to-end behavior. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 55ee0e0dfcea. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
bb0a532 to
23de8ec
Compare
Why This Change Was Made
The September 4 release predates the merged owner-management fix in #148790. A configured owner asking from another Slack conversation therefore sees only the caller-scoped automation inventory and cannot manage an existing job there.
What Problem This Solves
An owner listed in
commands.ownerAllowFromcannot manage a job created in another conversation from chat on this release branch. The Gateway treats that owner as an ordinary caller when listing or changing automations.Backport
Apply the upstream owner-management entitlement to the authority and cron paths present in this release. Configured channel owners can list, inspect, update, run, and remove existing jobs across admitted conversations. Ordinary callers remain scoped, run history remains caller-scoped, and a job's scheduled execution authority does not change. The release's Control UI harness API is retained for compatibility. Requester-continuation changes in the upstream commit were omitted because that subsystem is absent from this release branch.
Evidence
pnpm tsgo:coreandgit diff --checkpassed on the rebuilt commit.pnpm prompt:snapshots:checkpassed after regenerating the four snapshots changed by this backport.src/agents/embedded-agent-runner/run/settled-turn-finalization.test.ts, which has the identical Git blob on the release base and this PR head.check-lint-core-1reportsFile has too many lines (1046)at line 1120;check-test-types-core-1reports TS2345 at line 341. Both exact failures also occurred on the previous PR head in run 36194068878. This backport does not change that file.Backport-Of: #148790
Release-Target: sjf_openclaw_2026-09-04