Skip to content

fix(cron): scheduled automations get the same owner-only tools on every runtime - #182585

Merged
jalehman merged 8 commits into
mainfrom
openclaw-0d5.10/owner-operator-authority
Oct 25, 2026
Merged

jalehman merged 8 commits into
mainfrom
openclaw-0d5.10/owner-operator-authority

Conversation

@jalehman

@jalehman jalehman commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Related: #178813 (Phase 3a of #178812, tracked by #178811)

What Problem This Solves

Fixes: the same scheduled automation gets different owner-only tools depending on its runtime, and a non-owner's automation keeps owner-only tools on embedded runs. Embedded and Codex runs pass no sender bit, which keeps every owner-only tool except intent. CLI runs coerce the missing bit to false and lose them all. Neither runtime checks whether the job's requester is still an owner.

User Impact

  • A scheduled child or detached run (isolated, current) now gets one owner decision from its execution context, the same on embedded, Codex and CLI runtimes.
    • Owner runs keep exactly today's embedded surface on all three: every owner-only tool except intent. That includes operator and unbound jobs, and parent-linked jobs whose requester passes the per-occurrence owner check. CLI runs of these jobs now get that surface too.
    • Non-owner runs carry false and lose the owner-only tools on all three runtimes. This covers parent-linked jobs whose requester no longer passes the check (a profile that is gone, a channel sender removed from commands.ownerAllowFrom) or that has no recorded requester.
  • If a requester stops being an owner during a run, its owner-only effects are refused: the check runs before each owner-only call and again at every Gateway dispatch inside that call, so revocation while a tool awaits (for example nodes approve between node.pair.list and node.pair.approve) is refused before the effect.
  • Refinement of resolved decision 2 ("a linked job without a recorded requester is not an owner"). Maintainer confirmed on 2026-10-25: legacy trusted-policy jobs keep owner authority. v2026.10.6 stored a parent and a trusted tool policy, but no requester (createdActor), for jobs an authenticated operator linked with cron.add --session-key; agents never get a trusted policy. Such a job now carries owner: true with basis trusted-policy (no requester to recheck):
    • Tools: it keeps exactly the owner-only tools it has today (everything except intent) on every runtime.
    • Memory (widens access): with a direct-chat parent, its parent memory moves from conversation-only (today's main) to owner-private, the audience the operator's own conversation has. One owner bit drives both, as the design requires.
    • A linked job with no recorded requester and an account policy (agent-created) stays owner: false with conversation-only memory, as decided.
    • Both v2026.10.6 and v2026.10.7 (latest stable) store this shape; the upgrade proof runs from each.
    • trusted-policy is its own basis. Its only reader today is admission, which treats it exactly like legacy: no requester recheck, because there is no requester. Neither basis reaches the sender bit (both owner runs carry none, so neither gets intent), and no Doctor check reads the basis yet.

Scope, stated plainly: consumers still see the existing undefined-or-false sender bit. Only the source of the bit changes: the execution context's authority.owner replaces each runtime's own derivation. Removing the tri-state at the consumers is later cleanup, not this PR.

Why This Change Was Made

The execution context already decides authority.owner once per occurrence (#178933, #178965). This PR makes the runtimes consume it.

  • The isolated executor sets the run's sender bit from the minted context: no bit for owners, false for non-owners. The embedded runner and the Codex harness read it from the same run params.
  • The CLI MCP loopback reads the same decision from the admitted run's context, because the grant coerces an absent bit to false.
  • Owner-only tools are wrapped once at core tool finalization with the requester's live recheck. That is the operator source's authority, the profile's residency and role policy, or the channel's current owner config. The wrapper also composes the recheck into the call's Gateway caller receipt authority, which the in-process Gateway request already evaluates before and after each dispatch, so no new fence path is added.

Known differences from the design, approved by the 0d5 coordinator:

  • session:<key> and main jobs keep their session turn's own command-owner check. That check is already one boolean on both runtimes. Applying the builder's owner: true to the 44 stored session: operator jobs would hand them owner-only tools they don't have today.
  • Hook and join-intro ingress turns keep their existing surface. Phase 4a (0d5.11) decides it.
  • Scheduled CLI loopback runs keep an explicit automations denial. The loopback has no self-scoped automations grant yet, so letting the bit through would expose an unscoped automations tool. 0d5.12 removes the denial when it passes the self scope (row 40).

Unchanged rows:

  • Row 30 (message-action-dispatch.ts) keeps its occurrence-bound capability, per the design.
  • Row 42 (Codex scheduled-configured-mcp-authority.ts) is reached only when trigger === "user" and there is no scheduled tool policy, so scheduled runs never reach it.
  • Phase 3b (operator rule, rows 1, 21, 26, 27, 40) follows in a separate PR.

Doctor's scheduled-run review (from #182328) now reads the owner surfaces (a lost owner shows owner -> non-owner), and its CLI-backend section reports the parity gain this PR delivers instead of announcing it. run-prompt-executor.ts reached its 700-line limit after the rebase; the cron run admission, which owns the minted context, now exposes the run's sender bit.

tool-resolution.ts was at its 700-line limit. The default HTTP deny computation moved unchanged to tool-resolution-authority.ts, next to the new sender helper.

Evidence

Crabbox, AWS (c7a.8xlarge, us-east-1). Exit 0.

Command CRABBOX_AWS_REGION=us-east-1 CRABBOX_CAPACITY_REGIONS=us-east-1,us-east-2,us-west-2 crabbox run --provider aws --keep --ttl 75m --timing-json --download proof-out.tgz=… --shell -- "bash proof/0d510-remote.sh"
Tested source f260e0f51ed (this head). Crabbox verified the synced source SHA; the SHA-256 of all 27 changed files was checked on the remote against the local head: "changed files match local head". The proof scenario, mock-provider script, fake CLI, QA plugin and bind/authority probes are local proof tooling, not committed.
Provider / lease aws, cbx_9f88c2e7a9da. Released after the run.
Run run_ff227a947f72050ce0cc375ffd45325f
  1. Focused tests: 64/64 passed (owner authority, operator-source child, final-effect fence through the Gateway, memory audience, run.bind-parent including bind-then-device-revoked refusal, bind-parent, cron-bind, Doctor's scheduled-run review).

  2. Real Gateway, Discord owner DM (Crabline local provider). The agent creates two automations from a Discord owner DM, one on the embedded runtime (mock-openai) and one on a CLI backend whose fake CLI calls tools through the real MCP loopback. Each scheduled run calls the owner-only conversations_list.

    Case This PR main (f211f3d601e), same scenario
    Requester is an owner: embedded allowed (lists the DM) allowed
    Requester is an owner: CLI allowed refused: conversations_list needs the owner's authority
    Requester removed from commands.ownerAllowFrom (nearest refused case): embedded refused allowed
    Same, CLI refused refused
  3. Upgrade from v2026.10.6 and from v2026.10.7 (latest stable). Each old build stores a linked job, an unlinked job and a linked memory-probe job (all with a trusted policy and no createdActor; both versions store that shape) and runs the first two: allowed. After this build's doctor --fix, cron.list returns every job unchanged.

    Job Old build (10.6 / 10.7) This build (from 10.6 / from 10.7) Decided authority (builder over the stored row)
    Unlinked (operator) job allowed / allowed allowed / allowed owner, basis legacy
    Linked job without a recorded requester (trusted policy) allowed / allowed allowed / allowed owner, basis trusted-policy
    Same shape, memory probe with a direct-chat (dashboard) parent — OWNER-PRIVATE-NOTE / OWNER-PRIVATE-NOTE (owner-private audience) owner, basis trusted-policy
    New CLI job linked to the pre-upgrade parent — allowed / allowed owner, basis profile-role
    New CLI job, unlinked — allowed / allowed owner, basis legacy

    cron.bind (feat(cron): bind older automations to the conversation that created them #182561) and these jobs. cron.bind only applies to key-only links (unbound-parent), and a stored trusted policy never classifies as unbound-parent. So a v2026.10.6/10.7 trusted job without a requester cannot be bound: run over each stored row, resolveCronBindParent refuses the linked ones with "already bound to its parent conversation" and the unlinked ones with "only applies to automations linked to a parent conversation by session key alone". The jobs are unchanged and keep basis trusted-policy, the same owner-only tools and owner-private memory. Binding an account-policy key-only job leads to a parent with no recorded requester and an account policy, which stays non-owner.

Final-effect revocation through the Gateway (node scripts/run-vitest.mjs run src/cron/execution-context-owner-final-effect.test.ts, temporary result logging, request IDs redacted):

Runtime / case This head Previous guard (4d3a98f72e0, entry check only)
Embedded, owner node.pair.list → node.pair.approve; pairing approved same
Embedded, requester removed during node.pair.list refused: agent tool caller authority is no longer active; dispatched ["node.pair.list"]; request still pending approved: dispatched list and approve; request gone
CLI loopback, owner node.pair.list → node.pair.approve; pairing approved same
CLI loopback, requester removed during node.pair.list refused, same error; request still pending approved
[embedded] revoked: {"outcome":{"ok":false,"error":"Error: agent=main node=auto gateway=default action=approve: agent tool caller authority is no longer active"},"dispatched":["node.pair.list"],"stillPending":true}
[cli] revoked: {"outcome":{"ok":false,"error":"Error: agent=main node=auto gateway=default action=approve: agent tool caller authority is no longer active"},"dispatched":["node.pair.list"],"stillPending":true}

Static replay (scripts/dev/cron-context-replay.mts over a copy of Josh's Gateway state; 105 jobs):

  • 0 gain-unexpected, 0 loss.
  • ownerCli: gain-intended on 43 child and detached jobs (24 operator, 16 unbound, 3 parent-linked). Cause: Phase 3 runtime parity; the CLI takes the surface embedded runs already have.
  • ownerEmbedded is equal on every job. All 3 parent-linked child jobs have a requester profile that passes the owner check.
  • In-session jobs: equal on both fields.
  • Josh's store has no linked trusted-policy job without a requester, so the refinement above changes no replay row. The replay's memory value now names the parent audience (parent-owner / parent-conversation). Checked-in fixtures 28 and 29 cover both shapes: the v2026.10.6 trusted job → memory: parent-owner, gain-intended (cause: refinement of resolved decision 2), owner-only tools equal; the agent-created account-policy job → memory: parent-conversation, ownerEmbedded: loss (cause: resolved decision 2, no recorded requester).
  • The 4 pause results are archived parents (Phase B), unchanged by this PR: "Verify knowledge reload from main", "Verify bundled Knowledge after Gateway restart", "land bundled reload pr 180466", "babysit-pr-181933".
  • The checked-in fixtures add the ownerCli label.

Tests:

  • src/cron/execution-context-owner-authority.test.ts, one case per principal kind (operator, unbound, owner profile requester, non-owner profile requester, no recorded requester):
    • The same owner-only tools on embedded, Codex (through the harness host's tool surface) and CLI (MCP loopback). The CLI keeps the automations denial.
    • No principal is offered intent; a control with an explicit owner bit is.
    • Non-owners lose every owner-only tool except their scoped sessions and automations grants.
    • A requester who stops being an owner mid-run is refused at the next owner-only call, on embedded and CLI.
    • The v2026.10.6 shape (linked, trusted policy, no requester) keeps the operator surface on all three runtimes; execution-context.test.ts pins its authority (owner: true, basis trusted-policy).
    • execution-context-memory-audience.test.ts: that shape gets owner-private memory with a direct-chat parent on embedded and CLI; an agent-created account-policy job without a requester gets only the conversation's memory.
  • run.operator-source-child.test.ts: the executor passes the context's bit to the run, and revoking the device during a run trips the owner-only recheck.
  • execution-context-owner-final-effect.test.ts (final-effect fence, production dispatch path): a profile-requester job is admitted through cron occurrence admission and prepareCronRunAdmission with the Gateway context bound as cron binds it. Its embedded tools and its CLI loopback tools (resolveGatewayScopedTools) run nodes approve under the admitted run's Gateway caller (createAdmittedGatewayToolCallerIdentity, as the CLI and embedded runners do), through the real in-process Gateway dispatch, the real node.pair.list / node.pair.approve handlers and the real pairing store. Only the profile catalog's residency check is stubbed so the test can remove the requester inside node.pair.list.
  • pnpm tsgo:core, pnpm tsgo:core:test and oxlint are clean on the rebased head. 33 files / 512 tests across the cron, bind, tool-resolution, agent-tools and run-admission callers pass, plus the fixtures (30) and Doctor cron suites (43).

Autoreview (Claude engine, because the Codex CLI failed authentication on this host): scoped-clean at P1.

@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: f260e0f51ed092bba741ae436a6ed32e8c7ee9b0
  • Maintainer: @jalehman
  • Repository role: admin

These security sensitive changes were made:

  • src/gateway/tool-resolution-authority.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: L labels Oct 24, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Scheduled automations use one owner-authority decision across runtimes and recheck requester authority before privileged effects.

Example: An owner-created Discord automation calls conversations_list through a CLI backend.

  • Before: The CLI refuses the call while the equivalent embedded run allows it.
  • After: Both allow the owner’s call and refuse owner-only calls after requester revocation.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) The focused repair preserves existing owners and scoped exceptions, has no actionable finding, and supplies runtime, final-effect, and upgrade evidence.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The full body records exact-head Crabbox Gateway runs from a Discord owner DM through embedded tools and a fake CLI using the real MCP loopback, including refusal after owner-config removal; production-path pairing traces additionally show revocation during node.pair.list prevents approval.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Changing an automation’s runtime changes which privileged tools it can call, and embedded runs retain privileges after requester ownership is lost.
Reason: The maintainer-authored direction resolves a concrete inconsistency and explicitly accepts legacy compatibility, memory widening, and the remaining scoped CLI exception.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current runtime-authority inconsistency, addresses the earlier final-effect finding, and has sufficient behavior and upgrade evidence; no actionable defect remains.

Priority: P2
Reviewed head: f260e0f51ed092bba741ae436a6ed32e8c7ee9b0

Before merge

None.

Findings

None.

Agent review details

How this fits together

Cron admission derives authority from the stored job and current requester; embedded tools, the Codex host, and CLI loopback consume that decision before Gateway effects.

flowchart TD
  A[Stored automation] --> B[Occurrence admission]
  B --> C[Execution context]
  C --> D[Embedded and Codex tools]
  C --> E[CLI MCP loopback]
  D --> F[Owner check and receipt authority]
  E --> F
  F --> G[Gateway effect]
Loading

Technical review

Best possible solution:

Land the shared occurrence-authority repair while retaining the documented legacy compatibility and scoped CLI automations denial.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the undefined-to-false divergence, and the supplied Gateway comparison demonstrates allowed embedded calls versus refused CLI calls; this review ran no target code.

Is this the best way to solve the issue?

The patch uses existing occurrence admission, the per-run registry, and Gateway receipt authority, providing the smallest coherent repair without another authorization owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b1ae827b1cdc.

Provenance checked

  • Scheduled owner-tool semantics changes intended behavior with a stated reason (fix: the cron isolated agent in openclaw unconditiona (#383) #63878: Earlier hardening removed unconditional owner privileges from isolated cron runs; commit 02182d5 subsequently removed the explicit sender bit.)
  • Per-occurrence authority and admission keeps the original intent (240a90e: The foundation derives one scheduled execution context; the later admission refactor shares it across executors.)
  • Stable catalogs and deployment tool policy keeps the original intent (e4d101a: Stable tool definitions preserve prompt prefixes while current authority gates execution; the new wrapper retains that ordering and existing deployment policy.)
  • Gateway HTTP owner gating keeps the original intent (2a21de6: Identity-bearing non-owner HTTP callers must not receive privileged server-credential tools; the changed sender projection applies only to admitted loopback runs.)
  • Doctor scheduled-run access report changes intended behavior with a stated reason (c668bc0: Doctor reports access changes before scheduled-context cutover; this PR updates its owner-surface projection and wording for the delivered CLI parity.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Current main still has the divergence: The fetched main executor omits senderIsOwner, while CLI grant construction coerces it with === true; the shared denylist treats undefined and false differently. (src/agents/cli-runner/mcp-grant-context.ts:257, b1ae827b1cdc)
  • One authority source with a scoped CLI exception: Loopback reads the admitted occurrence’s sender decision and retains the explicit automations denial until its self-scoped grant exists; HTTP behavior is preserved. (src/gateway/tool-resolution-authority.ts:133, f260e0f51ed0)
  • Earlier final-effect finding addressed: The guard composes the requester recheck into existing same-run receipt authority, preserving prior restrictions through awaited Gateway dispatches. (src/agents/scheduled-owner-tool-guard.ts:24, f260e0f51ed0)
  • Allowed and revoked final-effect evidence: The full PR body supplies embedded and CLI traces: owners approve pairing, while removal during node.pair.list prevents node.pair.approve and leaves the request pending; the previous entry-only guard incorrectly approved it. (src/cron/execution-context-owner-final-effect.test.ts:196, f260e0f51ed0)
  • Accepted compatibility behavior and upgrades: The maintainer-authored body explicitly accepts trusted-policy jobs retaining owner tools and gaining owner-private memory for direct-chat parents; supplied upgrades from v2026.10.6 and v2026.10.7 preserve stored jobs and exercise those outcomes. (src/cron/execution-context.ts:298, f260e0f51ed0)
  • Exact-head checks: Both REST check-run pages were inspected; every returned check completed successfully, neutrally, or as skipped, with no failing check reported. (f260e0f51ed0)

Likely related people:

  • Josh Lehman: Raw commit 240a90e adds src/cron/execution-context.ts:288 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 240a90ef9f95; files: src/cron/execution-context.ts)
  • stevenlee-oai: Raw commit 1bd22b2 adds src/agents/openclaw-tools.finalize.ts:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1bd22b28d632; files: src/agents/openclaw-tools.finalize.ts)

PR surface

Source +431, Tests +664. Total +1095 across 27 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 16 500 69 +431
Tests 11 675 11 +664
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 27 1175 80 +1095

Root-cause cluster

Relationship: same_root_cause
Canonical: #178813
Summary: This PR repairs the runtime owner-authority divergence documented by the canonical bug report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: The fix addresses reproducible scheduled-runtime permission differences without evidence of an urgent operational incident.
  • merge-risk: 🚨 compatibility: Existing CLI automations gain the embedded owner surface and non-owner embedded automations lose privileged access; the maintainer accepts these changes and supplied stable-version upgrade evidence.
  • merge-risk: 🚨 security-boundary: The patch changes access to privileged tools and the trusted-policy memory audience; accepted direction and allowed, forbidden, and revoked-effect evidence cover the changed boundary.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (5 earlier review cycles)
  • reviewed 2026-10-24T12:39:04.795Z sha 4b403fa :: needs real behavior proof before merge. :: [P1] Carry the scheduled owner check to the final privileged effect
  • reviewed 2026-10-24T13:07:41.720Z sha 4d3a98f :: needs real behavior proof before merge. :: [P1] Carry the scheduled owner check to the final privileged effect
  • reviewed 2026-10-24T14:01:09.091Z sha 745c4a2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-24T14:20:44.715Z sha d484127 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-25T20:57:59.705Z sha 18568c2 :: needs maintainer review before merge. :: none

Reviewed October 25, 2026, 6:09 PM ET / 22:09 UTC (Revision 6).

@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
…dience

Operator-linked jobs without a recorded requester carry basis
trusted-policy. The replay projection distinguishes owner-private from
conversation-only parent memory, with fixtures and audience tests for the
v2026.10.6 trusted shape and an agent-created account-policy job.
… the call

The owner-only guard now composes the requester recheck into the call's
Gateway caller receipt authority, so a requester revoked while the tool
awaits is refused at the next dispatch, not only at the next call.
…hrough the Gateway

Replaces the mocked-dispatch guard test with an admitted scheduled run that
calls nodes approve through the real in-process Gateway dispatch and pairing
handlers on embedded and CLI runtimes.
Main grew run-prompt-executor.ts to its line limit; the admission that owns
the minted context now exposes the shared sender bit.
@jalehman
jalehman force-pushed the openclaw-0d5.10/owner-operator-authority branch from d484127 to 18568c2 Compare October 25, 2026 20:52
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

…s the CLI parity gain

The projection now names owner surfaces, so a lost owner reads owner -> non-owner.
Scheduled CLI runs with an owner context now get the owner-only tools their
embedded runs had; the review states that instead of announcing it.
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Oct 25, 2026
@jalehman

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 25, 2026
@jalehman
jalehman merged commit 2011274 into main Oct 25, 2026
140 checks passed
@jalehman
jalehman deleted the openclaw-0d5.10/owner-operator-authority branch October 25, 2026 22:18
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 26, 2026
…ry runtime (openclaw#182585)

* fix(cron): scheduled runs take owner authority from their execution context

Child and detached scheduled runs take their sender bit from the context's
authority.owner on embedded, Codex and CLI runtimes alike: owner runs carry
no sender bit (every owner-only tool except standing intents) and non-owner
requesters carry false. Owner-only tools recheck the requester before each
call, so a requester who stops being an owner is refused mid-run. The CLI
loopback keeps its automations denial until it carries the self scope.

Refs openclaw#178813

* test(cron): owner authority parity covers Codex and standing intents

Each principal gets the same owner-only tools on embedded, Codex and CLI
runs; no scheduled run is offered intent, and the CLI loopback keeps its
automations denial.

* fix(cron): operator-linked jobs without a recorded requester keep operator authority

v2026.10.6 stored a trusted tool policy but no requester for jobs an
authenticated operator linked with cron.add --session-key. They keep the
operator surface they had; agent-created jobs with no requester stay
non-owners.

* fix(cron): name trusted-policy authority and project parent memory audience

Operator-linked jobs without a recorded requester carry basis
trusted-policy. The replay projection distinguishes owner-private from
conversation-only parent memory, with fixtures and audience tests for the
v2026.10.6 trusted shape and an agent-created account-policy job.

* fix(cron): scheduled owner recheck fences every Gateway effect inside the call

The owner-only guard now composes the requester recheck into the call's
Gateway caller receipt authority, so a requester revoked while the tool
awaits is refused at the next dispatch, not only at the next call.

* test(cron): revoked scheduled owner is refused at node.pair.approve through the Gateway

Replaces the mocked-dispatch guard test with an admitted scheduled run that
calls nodes approve through the real in-process Gateway dispatch and pairing
handlers on embedded and CLI runtimes.

* refactor(cron): the cron run admission carries the run's sender bit

Main grew run-prompt-executor.ts to its line limit; the admission that owns
the minted context now exposes the shared sender bit.

* fix(doctor): scheduled-run review reads the owner surfaces and reports the CLI parity gain

The projection now names owner surfaces, so a lost owner reads owner -> non-owner.
Scheduled CLI runs with an owner context now get the owner-only tools their
embedded runs had; the review states that instead of announcing it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. security-sensitive-changed size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant