Skip to content

fix(automations): limit webhook-triggered turns to their own automation - #178904

Merged
jalehman merged 5 commits into
mainfrom
fix/hook-turn-automations-scope
Oct 23, 2026
Merged

jalehman merged 5 commits into
mainfrom
fix/hook-turn-automations-scope

Conversation

@jalehman

@jalehman jalehman commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: webhook (/hooks/agent) turns get the full automations tool instead of the current-job scope scheduled runs get, although both run through the same automation runner.

User Impact

User impact: an agent turn started by an inbound webhook or a channel join introduction now gets the same automations tool scope as a scheduled run. Within that turn it can only inspect or remove its own run, not list or change other automations. Scheduled runs and ordinary conversation turns are unchanged.

Why This Change Was Made

This is consistency and defense-in-depth hardening. The Gateway already limits agent-runtime callers to automations their own session can see. Before this change, a hook turn's request for another automation passed the tool and was rejected only by the Gateway. The current-job scope was derived only from the cron trigger, so turns with trigger event that the cron runner starts were left out. They now share it. The condition still requires a job id, so other event turns that don't come from the cron runner stay as they were.

Channel join introductions already run with an empty tool allowlist. This change keeps that behavior and adds a test for it.

Evidence

  • Crabbox real behavior proof (direct AWS, lease cbx_a903c769bf38, clean --fresh-pr checkout at 048267bca94): see the proof comment below, which includes the redacted run output.
    • The QA scenario hook-turn-automations-scope runs a real Gateway child and sends an HTTP POST /hooks/agent to it, with mock-openai inference. It passes on the PR head:
      • The hook turn's remove of a sibling automation is rejected by the tool scope (Automations tool is restricted to the current automation.) before any Gateway call.
      • The allowed control, list with includeDisabled: true, succeeds and doesn't expose the sibling.
      • The sibling is still in cron.list afterward.
    • Negative control: the same scenario with only src/agents/agent-tools.ts reverted to main fails. The sibling remove gets past the tool and reaches the Gateway, which rejects it as cron job not found.
  • Closed-run authority: hook jobs are built in memory and never stored, so no stored current job exists that a leftover claim could remove after the run. The scope is applied when each attempt constructs its tools. Gateway cron.remove keeps its existing live-run check (bindCronSelfRemovalCommitGuard), which this PR doesn't change.
  • Unit tests: a new cron-runner suite drives a hook-shaped job, and the results match scheduled runs. Event-triggered sibling remove is rejected, and the turn gets the self-scoped schema (no add). The test doesn't pin the exact self action list, which cron-tool-schema.ts owns and which grew on main (scratch_get, scratch_set, record_result). Join introductions still get no automations tool. 3/3 and 13/13 pass on Crabbox. I removed the mocked option-forwarding construction asserts, since ClawSweeper flagged them as low-value.
  • CI attribution: checks-node-changed-10 (gateway-mcp-app-grant-revalidation.e2e.test.ts) and checks-node-changed-18 (gateway-rpc-chat.e2e.test.ts) fail the same way on the merge base 50dfbacf1ab, which doesn't include this PR. Neither failure comes from this PR.
  • Regression QA (mock-openai):
    • cron-send-then-continue and cron-blocked-outcome pass.
    • cron-failure-repair-owner-conversation fails the same way on unmodified main.
    • cron-explicit-authority-execution needs the live-frontier lane and wasn't run.
  • Refresh onto main 8021f987ed4 (head ca10df7c2c4, includes fix: MCP Apps cannot be pinned by their signed-in owner #178043): rebased cleanly. Locally the unit suite passes 3/3, and reverting only src/agents/agent-tools.ts makes the hook-turn case fail. gateway-mcp-app-grant-revalidation.e2e.test.ts and gateway-rpc-chat.e2e.test.ts now pass 10/10, and the hook-turn-automations-scope QA scenario passes.
  • Autoreview (Codex, P1 threshold): no findings.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Give event-triggered cron-runner turns the existing current-automation tool scope.

Example: A POST to /hooks/agent asks automations.remove to delete sibling ae776663-ea3c-4add-9748-d1e7ecd31a41.

  • Before: The request passes the tool and reaches the Gateway, which rejects the inaccessible sibling.
  • After: The tool rejects the request immediately; an allowed list call succeeds and the sibling remains stored.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused scope repair with real Gateway evidence, a causal negative control, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Exact-head Crabbox output exercises POST /hooks/agent through a real Gateway with mock inference, showing forbidden sibling removal rejected at the tool boundary, allowed scoped listing, sibling survival, and a failing production-revert control. The previous closed-run request is resolved by source inspection: hook jobs are transient and unstored, this patch creates no retained grant, and existing final-effect liveness guards are unchanged.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Webhook-started agent turns receive broader automation actions than equivalent scheduled runs.
Reason: The maintainer-authored direction restores an existing boundary with a small shared-owner change and concrete before-and-after evidence.

Regression provenance

Possible regression — probable (reviewed change; reproduction). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR makes a focused, useful scope repair. The supplied Gateway evidence resolves the previous proof concern, and no actionable patch defect was found.

Priority: P2
Reviewed head: 048267bca941fbf9447682c5a338e37a58e303d4

Before merge

None.

Findings

None.

Agent review details

How this fits together

Gateway webhook ingress creates a transient job and passes it through the cron runner; agent tool assembly selects its automation scope before tool calls reach Gateway authorization and storage.

flowchart LR
  A[Webhook POST] --> B[Gateway ingress]
  B --> C[Transient event job]
  C --> D[Cron runner]
  D --> E[Agent tool assembly]
  E --> F[Current automation scope]
  F --> G[Gateway authorization]
  G --> H[Cron store]
Loading

Technical review

Best possible solution:

Use the existing current-job scope for both cron and event jobs while preserving ordinary conversation tools and Gateway authorization.

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

Current-main source exposes the mismatch, and the supplied real-Gateway negative control reproduces it by reverting only agent-tools.ts; no target code was executed during this review.

Is this the best way to solve the issue?

The production change repairs the existing scope selector without adding another authorization owner, and the QA dispatcher preserves the previous scenario order.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Current-job automation scope changes intended behavior with a stated reason (02182d5: The earlier sender-owner simplification retained cron current-job scope while removing general sender-based tool visibility gating.)
  • QA automation scenario dispatch keeps the original intent (075b466: Existing planners exercise automation failure repair, send-then-continue, and blocked outcomes; the extracted dispatcher retains their ordering and arguments.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +44, Tests +148, Other +144. Total +336 across 6 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 4 59 15 +44
Tests 1 148 0 +148
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 144 0 +144
Total 6 351 15 +336

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This restores consistent automation scope for webhook turns; existing Gateway checks already reject the demonstrated sibling mutation.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • 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 (1 earlier review cycle)
  • reviewed 2026-10-21T01:18:37.425Z sha 12a7853 :: needs real behavior proof before merge. :: none

Reviewed October 20, 2026, 10:42 PM ET / October 21, 2026, 02:42 UTC (Revision 2).

@jalehman

Copy link
Copy Markdown
Contributor Author

Real behavior proof: Crabbox (direct AWS)

  • Provider: aws (direct Crabbox). The Blacksmith Testbox tbx_01m5e2t24j77zsx7s3qevv5tyy sat in the queue for 8 minutes, so I stopped it and switched to AWS with maintainer approval.
  • Lease: cbx_a903c769bf38 (c7a.8xlarge, eu-west-1), run run_36bd2163cb28. The lease was released afterward.
  • Checkout: crabbox run --provider aws --fresh-pr openclaw/openclaw#178904, a clean remote checkout at 048267bca941fbf9447682c5a338e37a58e303d4 (the current PR head).
  • Entry point: a real Gateway child process, using qa-channel and mock-openai inference. The scenario does a real HTTP POST /hooks/agent with waitForCompletion, then calls cron.add and cron.list over the Gateway's RPC.
Step Result
1. hook-turn-automations-scope on the PR head pass. remove of the sibling is rejected with Automations tool is restricted to the current automation. before any Gateway call. The allowed list (with includeDisabled: true) succeeds and returns jobs: [], so the disabled sibling isn't exposed. The sibling still exists in cron.list afterward.
2. Same scenario with only src/agents/agent-tools.ts reverted to main fail (negative control). The sibling remove gets past the tool and reaches the Gateway, which rejects it with cron job not found: ….
3. run.event-trigger-automations-scope.test.ts and agent-tools.construction-routing.test.ts pass (3/3, 13/13)
4. The CI-failing e2e files on the PR head Both fail the same way here as in CI. They also fail on the PR's base commit 50dfbacf1ab (local run), so neither failure comes from this PR. See below.

CI attribution. checks-node-changed-10 failed in gateway-mcp-app-grant-revalidation.e2e.test.ts (McpAppViewExpiredError). checks-node-changed-18 failed in gateway-rpc-chat.e2e.test.ts (5 failures of the form expected [] to deeply equal [ { agent_id: 'main', … } ]). I ran both files on a detached worktree at the merge base 50dfbacf1aba4aa400daa994159a2f1795af7e65, which doesn't include this PR. They failed with the same test names and the same errors. This PR changes no MCP App, chat RPC, or session-ownership code.

Closed-run authority. A hook turn's job is built in memory (src/gateway/server/hooks.ts) and never written to the cron store. That means no stored "current job" exists that a leftover claim could remove after the run ends. The scope is applied when the tool is constructed for each attempt, and Gateway cron.remove still enforces its existing check that the run is still live (bindCronSelfRemovalCommitGuard, src/gateway/server-methods/cron.ts), which this PR doesn't change.

Redacted Crabbox output (IPs, SSH and local paths removed)
== checkout: /work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904
== HEAD: 048267bca941fbf9447682c5a338e37a58e303d4
== event-scope lines in agent-tools.ts: 1
== list control in mock: 1
== [1/4] QA scenario on PR head (expect pass)
QA suite report: /work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904/.artifacts/qa-e2e/suite-mvhhczc6-0b71b657/qa-suite-report.md
QA suite evidence: /work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904/.artifacts/qa-e2e/suite-mvhhczc6-0b71b657/qa-evidence.json
QA suite summary: /work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904/.artifacts/qa-e2e/suite-mvhhczc6-0b71b657/qa-suite-summary.json
- Status: pass
- Steps:
  - [x] rejects a hook turn removing another automation
    - Details: hook turn calls=[{"target":"automations","args":{"action":"remove","jobId":"ae776663-ea3c-4add-9748-d1e7ecd31a41"}},{"target":"automations","args":{"action":"list","includeDisabled":true}}] remove="{\n  \"status\": \"error\",\n  \"tool\": \"dispatch_action\",\n  \"error\": \"Automations tool is restricted to the current automation.\"\n}" list="{\n  \"tool\": {\n    \"id\": \"openclaw:core:automations\",\n    \"name\": \"automations\",\n    \"source\": \"openclaw\"\n  },\n  \"result\": {\n    \"content\": [\n      {\n        \"type\": \"text\",\n        \"text\": \"{\\n  \\\"jobs\\\": [],\\n  \\\"total\\\": 0,\\n  \\\"offset\\\": 0,\\n  \\\"limit\\\": 0,\\n  \\\"hasMore\\\": false,\\n  \\\"nextOffset\\" siblingSurvived=true


## Notes
== [2/4] Negative control: revert only src/agents/agent-tools.ts to main (expect fail)
== event-scope lines after revert: 0
QA suite evidence: /work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904/.artifacts/qa-e2e/suite-mvhhfed2-5daeaead/qa-evidence.json
QA suite summary: /work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904/.artifacts/qa-e2e/suite-mvhhfed2-5daeaead/qa-suite-summary.json
[ELIFECYCLE] Command failed with exit code 1.
- Status: fail
- Details:

```text
expected the sibling removal to be rejected by the automations scope, got {
  "status": "error",
  "tool": "dispatch_action",
  "error": "cron job not found: 39acb162-f060-4baa-bad6-bafc6277c9e6. List automations and retry with a current job id. For cross-session management, use a fresh authenticated configured channel owner or Control UI administrator turn or the Automations page."
}
```
- Steps:
  - [ ] rejects a hook turn removing another automation (fail)
    - Details:

```text
expected the sibling removal to be rejected by the automations scope, got {
  "status": "error",
  "tool": "dispatch_action",
  "error": "cron job not found: 39acb162-f060-4baa-bad6-bafc6277c9e6. List automations and retry with a current job id. For cross-session management, use a fresh authenticated configured channel owner or Control UI administrator turn or the Automations page."
}
```


## Notes
== production patch restored
== [3/4] Unit tests for the PR
�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m3 passed�[39m�[22m�[90m (3)�[39m
�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m13 passed�[39m�[22m�[90m (13)�[39m
== [4/4] CI attribution: e2e files that failed in checks-node-changed-10/18, on PR head
-- test/e2e/qa-lab/runtime/gateway-mcp-app-grant-revalidation.e2e.test.ts
�[2m Test Files �[22m �[1m�[31m1 failed�[39m�[22m�[90m (1)�[39m
�[31m⎯⎯⎯⎯⎯⎯⎯�[39m�[1m�[41m Failed Tests 1 �[49m�[22m�[31m⎯⎯⎯⎯⎯⎯⎯�[39m
�[41m�[1m FAIL �[22m�[49m test/e2e/qa-lab/runtime/gateway-mcp-app-grant-revalidation.e2e.test.ts�[2m > �[22mrejects a standalone tool call revoked during a real catalog refresh
   → McpAppViewExpiredError: MCP App view expired or is not authorized for this session
Caused by: Caused by: GatewayClientRequestError: McpAppViewExpiredError: MCP App view expired or is not authorized for this session
Caused by: GatewayClientRequestError: McpAppViewExpiredError: MCP App view expired or is not authorized for this session
Error: McpAppViewExpiredError: MCP App view expired or is not authorized for this session
[test] FAILED (exit 1)
-- test/e2e/qa-lab/runtime/gateway-rpc-chat.e2e.test.ts
�[31m�[1mAssertionError�[22m: expected [] to deeply equal [ { agent_id: 'main', …(4) }, …(1) ]�[39m
�[31m⎯⎯⎯⎯⎯⎯⎯�[39m�[1m�[41m Failed Tests 5 �[49m�[22m�[31m⎯⎯⎯⎯⎯⎯⎯�[39m
�[41m�[1m FAIL �[22m�[49m test/e2e/qa-lab/runtime/gateway-rpc-chat.e2e.test.ts�[2m > �[22mGateway chat RPCs�[2m > �[22mkeeps explicit main then work ownership through global chat and native agent dispatch and history (chatAttachment=false, seedChat=false)
�[41m�[1m FAIL �[22m�[49m test/e2e/qa-lab/runtime/gateway-rpc-chat.e2e.test.ts�[2m > �[22mGateway chat RPCs�[2m > �[22mkeeps explicit main then work ownership through global chat and native agent dispatch and history (chatAttachment=false, seedChat=true)
�[41m�[1m FAIL �[22m�[49m test/e2e/qa-lab/runtime/gateway-rpc-chat.e2e.test.ts�[2m > �[22mGateway chat RPCs�[2m > �[22mkeeps explicit main then work ownership through global chat and native agent dispatch and history (chatAttachment=true, seedChat=true)
�[41m�[1m FAIL �[22m�[49m test/e2e/qa-lab/runtime/gateway-rpc-chat.e2e.test.ts�[2m > �[22mGateway chat RPCs�[2m > �[22mkeeps explicit work then main ownership through global chat and native agent dispatch and history (chatAttachment=false, seedChat=true)
�[41m�[1m FAIL �[22m�[49m test/e2e/qa-lab/runtime/gateway-rpc-chat.e2e.test.ts�[2m > �[22mGateway chat RPCs�[2m > �[22mkeeps explicit work then main ownership through global chat and native agent dispatch and history (chatAttachment=true, seedChat=true)
[test] FAILED (exit 1)
== done
command complete in 16m0.774s total=17m20.777s
run summary lease=50.396s bootstrap=695ms sync=1m19.459s command=16m0.774s total=17m20.777s end_to_end=18m11.249s sync_skipped=false exit=0 sync_steps=ssh:605ms,git_seed:1m18.854s command_phases=user-command:16m0.774s
run details provider=aws lease=cbx_a903c769bf38 slug=pearl-shrimp run=run_36bd2163cb28 type=c7a.8xlarge repo=<local> workdir=/work/crabbox/cbx_a903c769bf38/fresh-pr-openclaw-openclaw-178904 actions=- stop_command="CRABBOX_AWS_REGION='eu-west-1' crabbox stop --provider aws --target linux --id pearl-shrimp" idle_timeout=1h30m0s
warning: coordinator accepted release for cbx_a903c769bf38; remote cleanup remains pending and local claim/SSH artifacts were preserved
{"provider":"aws","leaseId":"cbx_a903c769bf38","slug":"pearl-shrimp",...
exit=0

@jalehman

Copy link
Copy Markdown
Contributor Author

CI attribution for the new head 048267bca94:

  • checks-node-changed-10 (gateway-mcp-app-grant-revalidation.e2e.test.ts) and checks-node-changed-18 (gateway-rpc-chat.e2e.test.ts) fail with the same tests and errors as on the previous head. They also fail on the merge base 50dfbacf1ab, which doesn't include this PR, so they're failures already on main. A separate follow-up is filed.
  • checks-node-changed-29 (test/gateway-completion-replay.e2e.test.ts, SessionRecoverySourceChangedError) is new on this head. The last commit only touches the QA mock planner, the scenario YAML and one unit test. The same file passed on the previous head, and it passed 2/2 locally on this head, so it's a flake. That job is being rerun.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 21, 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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 21, 2026
@jalehman
jalehman force-pushed the fix/hook-turn-automations-scope branch 2 times, most recently from 048267b to ca10df7 Compare October 21, 2026 13:53
@jalehman

Copy link
Copy Markdown
Contributor Author

CI attribution after refresh onto main 8021f987ed4 (head ca10df7c2c4)

The rebase picks up #178043, so the earlier gateway-mcp-app-grant-revalidation and gateway-rpc-chat e2e failures are gone; both pass locally at this head (10/10). The rebase also needed a test-only follow-up commit: the unit suite pinned the exact self-scoped automations action list, which main changed (next_check → scratch_get, scratch_set, record_result). The suite now asserts the self-scoped schema (no add) and the scope error. It passes 3/3, and the hook-turn case fails with only src/agents/agent-tools.ts reverted. The hook-turn-automations-scope QA scenario passes on this head.

The three failing node lanes on run 39611969966 are not caused by this PR. Each fails the same way locally on the base commit 8021f987ed4, without this PR:

Lane File CI at ca10df7c2c4 Base 8021f987ed4 (local) Cause
checks-node-changed-18 test/gateway-account-history.e2e.test.ts 2 failed same 2 failed fixture config still sets agents.defaults.heartbeat, which #179387 retired; Gateway exits 78 (Unrecognized key: "heartbeat")
checks-node-changed-23 test/gateway-completion-replay.e2e.test.ts 1 failed / 3 same 1 failed same retired heartbeat fixture key
checks-node-changed-4 test/e2e/qa-lab/runtime/channel-progress-presentation.e2e.test.ts 5 failed / 16 (Discord cases) same Discord cases time out (accepted final answer, ambiguous announcement settlement) not touched by this PR; the same file passed 16/16 at the pre-rebase head on the older base

#179530 fixed the retired heartbeat key in two other fixtures but not these two. openclaw/ci-gate fails only because of these three lanes.

…urns

Webhook hook turns and channel join introductions run through the cron runner with trigger "event". Give them the same current-job automations scope that scheduled runs already get, so the tool cannot act on other automations from those turns.
@jalehman
jalehman force-pushed the fix/hook-turn-automations-scope branch from 5570f12 to da10c8e Compare October 22, 2026 23:16
@jalehman
jalehman enabled auto-merge (squash) October 22, 2026 23:23
@jalehman
jalehman disabled auto-merge October 23, 2026 00:14
@jalehman
jalehman merged commit cb81ec8 into main Oct 23, 2026
239 of 244 checks passed
@jalehman
jalehman deleted the fix/hook-turn-automations-scope branch October 23, 2026 00:15
@jalehman

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
…on (openclaw#178904)

* fix(agents): scope automations tool for event-triggered cron-runner turns

Webhook hook turns and channel join introductions run through the cron runner with trigger "event". Give them the same current-job automations scope that scheduled runs already get, so the tool cannot act on other automations from those turns.

* test(qa): cover hook turn automations scope

* test(qa): add allowed list control to hook automations scope proof

* test(cron): assert self-scoped automations schema without pinning main's action list

* test(cron): pass scheduled occurrence to event-trigger scope runs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling extensions: qa-lab P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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