Skip to content

improve(cron): surface scheduled jobs blocked on a missing creator channel and guide recovery - #178677

Merged
vincentkoc merged 9 commits into
openclaw:mainfrom
amittell:cron-reauthorization-flow
Nov 18, 2026
Merged

vincentkoc merged 9 commits into
openclaw:mainfrom
amittell:cron-reauthorization-flow

Conversation

@amittell

@amittell amittell commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Related: #162087

What Problem This Solves

An automation can retain a named-account tool cap while losing its recorded creator channel. For a tool-runtime job whose creator origin is unknown and whose owner key supplies no group/channel reference, the account liveness guard cannot resolve the channel and rejects the run. The retained head/base reproduction used a synthetic qa-channel DM job whose origin became unknown after an operator CLI edit. It did not reproduce an original job from a release that predates origin recording; applicability to those older jobs is inferred from the shared origin normalization and guard path.

The authenticated same-cap re-save path already exists, as the reported head/base proof below demonstrates. On the base, the reproduced job's inventory does not flag this condition, and its run error suggests re-adding the account even though that synthetic account is configured and running.

User Impact

User impact: operators can now discover blocked jobs and recover them without demoting their authority. openclaw automations status reports a reauthorizationRequired count, each affected job's details and list entries flag reauthorizationRequired: true, and the run error names the real cause and the least-privilege recovery: re-save the job's tool cap from the creator's authenticated turn (which records a fresh origin via the existing reauthorization path), or recreate it from the intended account.

Why This Change Was Made

This is the guided-recovery side of the failure mode recommended by the security review on #162087 ("require guided reauthorization: keep the fail-closed boundary and add a clear operator or creator recovery flow"). It does not change the boundary: the liveness guard still fails closed; the change only detects the exact blocked class, surfaces it, and makes the error accurate. The trigger-path origin threading is already merged (#176158) and is not touched here. The detector checks named-account policy, unknown creator origin and an owner key without a group/channel reference. It counts only runs that reach the account check: every capped agent turn, and a script or condition whose cap constructs agent tools or whose script names MCP.

Evidence

Source head: 48ab4a7444d09d8e43b56bc4083ebb948cc35d2e, on main 4f84bfd25. The proof and author-reported sections below were measured at earlier heads, as each says.

Author-reported shipped Gateway proof, October 26

The execution results below are retained from the October 26 author report. This refresh independently inspected current source, review records and hosted check metadata; it did not inspect the original local execution receipts or rerun the Gateway proof. The current-head review accepted the report within the synthetic-channel and CLI-edited-origin limits stated below.

I built the head (tree 8132c05bdac84fa711ae03d9bf8fafd50ab82dd9) and its main parent 0d38c2dfcbfbb1ae2bec19a0a26973640390a5a8 (tree 40c5902ba2f3ece22bf6461af8bfe93ad3b34398) on macOS arm64 with Node 24.22.1 and pnpm 12.15.0: pnpm install --frozen-lockfile, then OPENCLAW_BUILD_PRIVATE_QA=1 node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntime. Both exited 0. dist/entry.js SHA256 is ae7797afd96e9a9fb60d6bf1ec8cb1a0ea9383307cf740a151ba0ac4015ad913 for the head and a1454578a78ce6c7614a1113671823495c9ad187b78d4e161c0102e5046bc991 for main. Tracked source was unchanged before each run.

Each run used a fresh HOME, state and config and a loopback Gateway started with node openclaw.mjs gateway run --bind loopback --allow-unconfigured. The channel is the repository's qa-channel plugin on its local QA bus (extensions/qa-lab), with accounts default and a named creatorbot, session.dmScope: "per-channel-peer" and commands.ownerAllowFrom: ["alice"]. The model is scripts/e2e/mock-openai-server.mjs with scripted responses. Every operator step goes through the shipped CLI. The DM sender alice is synthetic; no Telegram or Discord account and no real provider were used.

The script:

  1. alice DMs creatorbot and the scripted model calls automations add with toolsAllow: ["read"]. The Gateway stores cap ["read","skills_read"], account-mode policy, owner agent:main:qa-channel:direct:dm:alice on creatorbot, and creator origin {"kind":"external","channel":"qa-channel"}. The origin is store-private, so I read it from the job row with a read-only SQLite open rather than from a projection.
  2. The operator reschedules the job from the CLI with openclaw automations edit <id> --every 1m. Remote management carries no creator source, so the stored origin becomes {"kind":"unknown"} while the cap, owner and account stay the same. The detector and the run guard normalize that to the same unknown origin as a job saved before origins were recorded. I did not reproduce an actual pre-origin row from an older release.
  3. Discovery, rejection, same-cap re-save from an authenticated alice DM turn, then the next scheduled occurrence.

Head run, 18:03:55Z to 18:07:54Z, condensed from the run transcript (commands verbatim, JSON trimmed to the fields this PR changes, exit codes kept):

18:04:45Z  qa-channel creatorbot -> dm:alice "PROOF-178677-CREATED"        (job bd23054f-4e32-4342-b0ed-412d95c95b8e)
           stored: toolsAllow ["read","skills_read"], mode account, accountId creatorbot, callerOrigin {"kind":"external","channel":"qa-channel"}
$ openclaw automations status                     "jobs": 2, "reauthorizationRequired": 0                      [exit 0]
$ openclaw automations edit <id> --every 1m       "everyMs": 60000, "reauthorizationRequired": true            [exit 0]
           stored: toolsAllow ["read","skills_read"], mode account, accountId creatorbot, callerOrigin {"kind":"unknown"}
$ openclaw automations status                     "jobs": 2, "reauthorizationRequired": 1                      [exit 0]
$ openclaw automations get <id>                   "reauthorizationRequired": true                              [exit 0]
$ openclaw automations list --json                proof check-in: true; Memory Dreaming Promotion: false        [exit 0]
$ openclaw gateway call cron.list --params '{"compact":true}' --json
                                                  proof check-in: true; Memory Dreaming Promotion: (absent)    [exit 0]
18:06:04.154Z  scheduled run: "status": "error", "error": "Scheduled account \"creatorbot\" is unavailable: the job has no
               recorded creator channel, so its scheduled authority cannot be resolved. Re-save the job's tool cap from the
               creator's authenticated turn to record it, or recreate the automation from the intended account."
$ openclaw automations run <id> --wait --wait-timeout 3m --poll-interval 2s
                                                  "completionStatus": "failed", same error (run 18:06:20.081Z) [exit 1]
18:06:35Z  qa-channel dm:alice -> creatorbot "Re-save my check-in automation's tools as read, same as before."
           scripted model calls automations update {"payload":{"kind":"agentTurn","toolsAllow":["read","skills_read"]}}
           stored: toolsAllow ["read","skills_read"], mode account, accountId creatorbot, callerOrigin {"kind":"external","channel":"qa-channel"}
$ openclaw automations status                     "jobs": 2, "reauthorizationRequired": 0                      [exit 0]
$ openclaw automations get <id>                   "reauthorizationRequired": false                             [exit 0]
$ openclaw automations list --json                proof check-in: false                                        [exit 0]
$ openclaw gateway call cron.list --params '{"compact":true}' --json
                                                  proof check-in: (absent)                                     [exit 0]
18:07:22.253Z  scheduled run: "status": "ok", "summary": "PROOF-178677-SCHEDULED-OK", "deliveryStatus": "delivered"
               qa-channel creatorbot -> dm:alice "PROOF-178677-SCHEDULED-OK"

The two rejected runs reached no model. The mock recorded 6 requests in the whole run: 2 for the create turn, 1 for the scheduler's existing owner-conversation repair brief after the second failure (Gateway run id cron-failure-repair:8717eb54-...), 2 for the re-save turn, and 1 for the recovered scheduled run. The Gateway log shows the two blocked runs ending in 686 ms and 56 ms with the error above.

Control on main 0d38c2dfcbfb, same script, 18:08:11Z to 18:19:46Z:

$ openclaw automations status                     "jobs": 2   (no reauthorizationRequired field)           [exit 0]
$ openclaw automations get / list --json / gateway call cron.list compact
                                                  no reauthorizationRequired field on any row, before or after the edit
18:12:52.947Z, 18:13:53.054Z  scheduled runs: "error": "Scheduled account \"creatorbot\" is unavailable. Re-add it to the
               channel configuration, or recreate this automation from the intended account."
$ openclaw automations run <id> --wait ...        "completionStatus": "failed", same error                      [exit 1]
           same-cap re-save from the alice DM -> callerOrigin {"kind":"external","channel":"qa-channel"}
18:19:21.268Z  scheduled run: "status": "ok", "summary": "PROOF-178677-SCHEDULED-OK", "deliveryStatus": "delivered"

On main the same job stays undiscoverable and its error tells the operator to re-add creatorbot, which was configured and running throughout: the Gateway logged [qa-channel] [creatorbot] starting account at startup, and every reply in the run, including the one sent during the blocked window, went out through creatorbot. The re-save path itself already existed on main and recovered there too, so this PR's change is the discovery surface and the accurate error, not the recovery mechanism.

Two earlier head attempts are excluded. In the first, alice was not a configured owner, so automations refused with "needs the owner's authority" and no job was created. The second re-saved ["read"] instead of the stored ["read","skills_read"], which narrowed the cap, so it was not a same-cap re-save. Its status, get and list results, rejection, recovery and scheduled run otherwise matched the run above; it did not query the compact list.

Author-reported base and head runs of the added tests

The PR's three changed test files, run with pnpm test <files> on October 26:

  • Head fe17c08e16d9: cron-tool.output-contract.test.ts 5/5, tools-allow.test.ts 7/7, agent-tools.policy.test.ts 17/17.
  • The same three files copied over main 0d38c2dfcbfb: accepts the reauthorization flags that Gateway projections emit fails (1 failed, 4 passed); all 7 detector cases fail with TypeError: cronJobNeedsCreatorReauthorization is not a function; names the missing creator channel when a DM-key scheduled account cannot resolve a channel fails against the old message (1 failed, 16 passed).

Detector against the runtime, November 9

All test runs below use Vitest on Node 26.12.1 (OPENCLAW_VITEST_RUNTIME=node), macOS arm64, one worker. For the red/green pair a probe test in the same invocation printed RUNTIME_PROBE {"bun":null,"node":"26.12.1",...,"env":"node"}.

flags reauthorization exactly when script preparation reaches the missing-channel guard (src/cron/trigger-script.account-policy.test.ts) runs five DM-owned jobs on named account work with no recorded origin through the real script runtime. It requires cronJobNeedsCreatorReauthorization to equal "the run failed with no recorded creator channel":

job runtime flag
[] script payload, no MCP completes false
[] command with condition, no MCP evaluates false
[] script payload naming MCP fails, no recorded creator channel true
[] condition naming MCP fails, no recorded creator channel true
["read"] script payload fails, no recorded creator channel true
  • Node, with tools-allow.ts and trigger-script.ts at 86306f76411: 1 failed, 11 passed, the failure being the first row. With soft assertions exactly the first two rows mismatch (flag true, runtime runs).
  • Node, at 48ab4a7444d: 12/12 pass, the probe plus that file and tools-allow.test.ts.
  • Node, control: run.account-policy.test.ts checks the same equality for its eight scheduler jobs, including a new empty-cap DM agent turn that fails before the model. 8/8 at 86306f76411 and at 48ab4a7444d.
  • Node, mutations: removing the agent-turn branch, the MCP match, or the tool-construction check each fails exactly one case.

Local gates at 48ab4a7, November 9

Merge base 4f84bfd25 throughout; Vitest on Node 26.12.1 for the test run.

  • pnpm tsgo:all: pass. An injected type error in tools-allow.ts and one in the new test each fail it, so both files are in the checked graphs.

  • pnpm check:changed --base 4f84bfd25: exit 1. Every lane passes (typecheck, lint core/extensions/scripts, import cycles, format, docs) except two. The changelog attributions lane lists 20 forbidden thanks lines: 18 Thanks @steipete-oai (CHANGELOG/2026.6.8.md x4, CHANGELOG/2026.7.1.md x11, CHANGELOG/records/2026.6.8.md x3) and 2 Thanks @roboclaw-bot (CHANGELOG/records/2026.10.6.md). The PR changes no CHANGELOG path, and check-changelog-attributions.mts on this tree, whose CHANGELOG/ equals the merge base's, lists the same 20; main 3855c896edd lists the same counts per file. The dead export scan reports OpenClawShell in ui/src/app/app-host.tsx and CommandPaletteOpenDetail in ui/src/components/command-palette-contract.ts. Control: pnpm deadcode:exports on the merge-base tree, with every path this PR changes reverted, reports the same two. The PR touches nothing under ui/.

  • node scripts/test-projects.mts --changed 3855c896edd8 (Node; the log has no runtime line, but the crashing child in the plugin-preparation failure prints Node.js v26.12.1, lines 10431 and 11362): exit 1, 7749 passed, 3 failed, 19 skipped across 942 files. The changed-path set equals the merge base's. Control: the same 3 tests fail the same way on the merge-base tree, Node: command-status.test.ts, plugin-preparation-exec-argv.test.ts and worker-task-pool.memory.test.ts. For the first, command-status.test.ts expects command copy that fix(control-ui): clarify slash-command descriptions #194698 changed, and main fixed that test in fix(ci): keep command help tests independent of copy #194910.

  • pnpm check:baseline-ratchets --base 4f84bfd25 --no-merge-base with the line-cap comparison: all 10 pass.

  • CI lint failure on 86306f76411: scripts/run-oxlint.mjs on cron-tool.output-contract.test.ts reports the same two no-unused-vars errors at 86306f76411 and none at 48ab4a7444d.

  • Test cost (pnpm test <file> --maxWorkers=1, Bun, the local default, macOS arm64, two runs each): agent-tools.policy.test.ts 36.0 s (cold worker cache, 24.1 s of it compiling) and 7.6 s wall, 414 ms and 419 ms of tests; cron-tool.output-contract.test.ts 20.3 s and 9.2 s wall, 1.4 s and 1.1 s of tests; run.account-policy.test.ts 31.4 s and 19.1 s wall, 14.5 s and 9.8 s of tests; tools-allow.test.ts 1.9 s and 1.8 s wall, 26 ms and 25 ms of tests; trigger-script.account-policy.test.ts 19.3 s and 18.1 s wall, 9.2 s and 8.0 s of tests. CI run 42441709604, Bun: agent-tools.policy.test.ts 7.7 s Vitest duration, 346 ms of tests (checks-node-changed-compact-large-26); cron-tool.output-contract.test.ts 1.3 s of tests in a shared run (checks-node-changed-compact-large-30) for the pushed version of the file; run.account-policy.test.ts no CI seconds in this measurement (the file first ran in CI on 48ab4a7444d, after it); tools-allow.test.ts 7 ms of tests in a shared run (checks-node-changed-compact-large-26); trigger-script.account-policy.test.ts no CI seconds in this measurement (the file first ran in CI on 48ab4a7444d, after it).

Test-line allocation

config/test-lines-allocations/178677-cron-creator-reauthorization.txt records 251 lines, the exact net growth against 4f84bfd25. check:test-lines-ratchet --base 4f84bfd25 passes at 251 and rejects 252 ("credit 252 exceeds allowed ceiling growth 251").

  • 101 in the new tools-allow.test.ts: the detector's own cases (origin kinds, group keys, trusted mode, default account, capless jobs, command jobs).
  • 46 in cron-tool.output-contract.test.ts: the closed output schemas accept the new flag and count on real Gateway projections. This is the regression for the Codex P1, and it needs the real projections because the bug was a mismatch between them and the schemas.
  • 24 in agent-tools.policy.test.ts: the new missing-channel message and the unchanged removed-account message.
  • 74 in trigger-script.account-policy.test.ts and 5 in run.account-policy.test.ts: the detector checked against the real script runtime and the isolated scheduler.
  • 2 in test-support mocks for the new status field, and -1 for the removed unused import.

No cheaper layer covers the last group. The detector predicts whether a run reaches the account check, and the review finding was a predicate that disagreed with the runtime. A unit test of the predicate can only restate the predicate. These cases use the runtime as the oracle: five jobs in one test on the existing withCronStore and createCronScriptRuntime harness, plus one row and one assertion in the existing scheduler table.

This is an improve(cron) PR rather than a fix PR, so a maintainer needs to approve the 251-line allocation.

CI and review at 48ab4a7

CI on 48ab4a7444d: 84 checks passed and 43 were skipped. The only red is openclaw/ci-gate, with openclaw/security-sensitive-review pending, both for "A maintainer must approve the current PR revision" (Security Review run 42718955524 itself succeeded). The November 8 review's two findings are addressed above; its schema finding from October 20 stays fixed (CronJobSchema, compact list and status declare the field).

The security-sensitive and combined commit statuses need a maintainer's approval comment for this head. No security approval or merge is claimed.

Limits

  • The channel is the repository's synthetic qa-channel, not Telegram or Discord. The authenticated turn and the scheduled delivery go through the same channel plugin boundary, but no real transport was exercised.
  • The unknown origin came from an operator CLI edit, not from a job written by a release that predates origin recording.
  • The human openclaw automations show view does not print the flag; the JSON surfaces above do. This PR does not change show.
  • Session-routed agent turns (sessionTarget main or session:<key>) are flagged like isolated ones. The tests above cover the isolated runner and the script runtime, not the session route.

@clawsweeper

clawsweeper Bot commented Oct 20, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T19:02:35.904672Z 2ef2ffa PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Maintainer security changes approved

A maintainer approved this revision with an explicit security approval comment.

A later push requires a fresh approval comment for an external contributor's PR.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: M labels Oct 20, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2ef2ffabe4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cron/job-read-view.ts Resolved
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature 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. 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:feature Preliminary submission classification; full source review pending. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds missing-creator-channel flags, a scheduler count, and recovery guidance for affected scheduled jobs.

Example: A DM-created job on named account creatorbot loses its creator origin after a CLI schedule edit.

  • Before: Inventory does not identify the problem, and execution incorrectly suggests re-adding the configured account.
  • After: Inventory reports reauthorizationRequired, and execution directs the creator to re-save the tool cap or recreate the automation.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, focused and supported by shipped CLI evidence within the stated synthetic-environment limits, with no remaining actionable findings.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): Supplied Gateway/CLI terminal traces exercise the changed inventory fields and error, then show authenticated unchanged-cap recovery and scheduled success using qa-channel on macOS; later script corrections have production-runtime regression evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Partial
User problem: Operators cannot readily identify jobs blocked by missing creator-channel provenance and receive misleading account-restoration advice.
Reason: Provides useful discovery and accurate guidance while preserving the established security boundary; the PR correctly uses Related for the broader issue.

Merge readiness

✅ Ready for maintainer review

This PR remains useful: current main lacks these diagnostics, earlier findings are fixed, and current-head security approval is recorded; CI is still completing.

Priority: P2
Reviewed head: df949a33bb775792210474b458e538ace65a777b

Before merge

None.

Findings

None.

Agent review details

How this fits together

Cron reads stored job ownership and tool-policy provenance, projects diagnostics through Gateway and automation-tool responses, and retains the existing execution-time account checks.

flowchart LR
  A[Stored cron job] --> B[Reauthorization detector]
  B --> C[Job and status projections]
  C --> D[Gateway and automation tools]
  A --> E[Scheduled execution]
  E --> F[Existing account guard]
  F --> G[Recovery guidance]
Loading

Technical review

Best possible solution:

Land the focused diagnostic change after required CI succeeds, preserving authenticated recovery and existing account checks.

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

Current source shows the missing-origin named-account rejection, and the author supplies paired Gateway traces for a CLI-edited DM job; no target code was executed during this review.

Is this the best way to solve the issue?

The change uses existing cron projections and recovery mechanisms, shares script admission predicates, and avoids deriving authority from delivery settings.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Scheduled named-account rejection keeps the original intent (38d7afc: Report failed scheduled work when required creator accounts are unavailable instead of silently completing without tools.)
  • Creator origin versus delivery routing keeps the original intent (d82cbec: Resolve scheduled authority from recorded creator context, retaining fail-closed handling for unknown origins.)
  • Read-view metadata and definition comparison keeps the original intent (49ecde8: Keep response metadata out of scheduled-job definition comparisons.)
  • Cached cron projections keeps the original intent (f45a1a1: Reuse immutable scheduler projections between mutations while keeping authority checks current.)
  • Script MCP preparation keeps the original intent (3c2c989: Allow scripts and conditions to use explicitly allowed MCP servers; the existing MCP-reference gate is extracted unchanged.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced change and current-main distinction: The pinned introduced diff adds the detector and projections; fetched main retains the earlier tools-allow implementation without this diagnostic. (src/cron/tools-allow.ts:111, df949a33bb77)
  • Existing authority boundary preserved: Only the missing-channel error changes; the named-account rejection remains before account-roster lookup, and the detector grants no execution authority. (src/agents/agent-tools.policy.ts:527, df949a33bb77)
  • Prior findings resolved: Full-job, compact-job and status output schemas declare the new fields; script detection now shares the production MCP predicate and tool-construction planner, excluding tool-free script paths. (src/agents/tools/cron-tool-output-schema.ts:49, df949a33bb77)
  • Supplied shipped-entry-point proof: The full PR body records paired Gateway/CLI traces showing discovery, rejection, authenticated unchanged-cap recovery and a successful subsequent occurrence. Proof uses qa-channel and a scripted provider; it does not establish an older-release migration or live Telegram/Discord behavior. Captured body identity: SHA-256 0e27d805a94e9636436915b510b8388fdb0f0a07fa29ce690a7a2b759d99b2d6. (fe17c08e16d9)
  • Current security approval: Vincent Koc's approval at improve(cron): surface scheduled jobs blocked on a missing creator channel and guide recovery #178677 (comment) is recognized by the current-head security status. (df949a33bb77)
  • Earlier allocation approval is no longer required: Current policy permits 400 net test lines without an allocation record, so the earlier request for approval of this PR's 251-line allocation is no longer an enforced blocker. Public docs: docs/ci/local-proof.md. (docs/ci/local-proof.md:357, df949a33bb77)

Likely related people:

  • Ayaan Zaidi: Raw commit 08498ec adds src/cron/tools-allow.ts:25 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 08498ec40de5; files: src/cron/tools-allow.ts)

PR surface

Source +108, Tests +251, Docs +6, Other +5. Total +370 across 20 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 10 117 9 +108
Tests 7 251 0 +251
Docs 2 7 1 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 1 5 0 +5
Total 20 380 10 +370

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test growth Production +117/-9; tests and test support +251/-0 Growth supplies the shared detector, response contracts and projections, with runtime-oracle regressions for admission differences.

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on maintainer: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Improves diagnosis and recovery guidance for a bounded class of blocked scheduled jobs without changing execution authority.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 (5 earlier review cycles)
  • reviewed 2026-10-20T19:17:42.865Z sha 2ef2ffabe40817446da4186fc46875822772985f :: needs real behavior proof before merge. :: [P1] Declare the new fields in every closed output schema | [P2] Exclude jobs that do not construct agent tools
  • reviewed 2026-10-26T15:20:39.634Z sha fe17c08e16d9c00d7e645e25480c39493028a791 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-27T19:37:43.271Z sha fe17c08e16d9c00d7e645e25480c39493028a791 :: blocked before merge. :: none
  • reviewed 2026-11-08T03:37:13.251Z sha 86306f7 :: blocked before merge. :: [P2] Exclude script paths that never perform account admission | [P3] Describe missing provenance without asserting job age or account health
  • reviewed 2026-11-10T00:09:16.351Z sha 48ab4a7 :: blocked before merge. :: none

Reviewed November 18, 2026, 4:22 AM ET / 09:22 UTC (Revision 6).

amittell added a commit to amittell/openclaw that referenced this pull request Oct 22, 2026
cron: surface and recover scheduled jobs blocked on a missing creator channel. Not
in v2026.10.5 and never carried (absent from 1ecf113). Applies to mac-mini:
11 scheduled runs for the configured ratbot (09-23..) and ailybot (10-20) accounts
failed closed with "Scheduled account ... is unavailable. Re-add it ...".

Resolution against the 10.5 tree:
- agent-tools.policy.ts: 10.5 returns an account-unavailable outcome instead of
  throwing, so unavailableScheduledAccount takes the PR's missingCreatorChannel flag
  and the no-channel site passes true; the removed-account site keeps the old text.
- agent-tools.policy.test.ts: the PR's two message tests, then 10.5's deny-all test.
- cron-list-projection.ts: keep 10.5's compactCronListJob(job) (main's
  toPublicCronJob wrapping is not in 10.5) and add the PR's flag. The PR's
  `job as CronJob & { toolsAllowProvenance?: ... }` cast is dropped: a CronJob is
  assignable to both callees, and 10.5's assertion SAFETY ratchet refuses it.
- job-read-view.ts: the PR's reauthorizationRequired strip; main's
  streamExecutionHost field is not in 10.5.
- Test mocks: CronStatusSummary now requires reauthorizationRequired. 10.5 still
  keeps both typed status mocks inline, in server-startup-post-attach.test.ts
  (3,171 counted lines) and scheduled-turns.contract.test.ts (1,232), and the
  line-cap ratchet refuses either one growing. So they move out the way main moved
  them: createServiceCronHost into services.test-support.ts, and
  createMockCronService into a new scheduled-turns.test-support.ts, written as on
  main with typed vi.fn members instead of 10.5's `as CronServiceContract`. Both
  carry the PR's reauthorizationRequired: 0; the two test files shrink by 15 and 31.
amittell added a commit to amittell/openclaw that referenced this pull request Oct 22, 2026
amittell added a commit to amittell/openclaw that referenced this pull request Oct 23, 2026
fix(cron): declare reauthorization fields in closed output schemas

Job reads, compact list rows, and scheduler status now carry
reauthorizationRequired, but CronJobSchema, the compact list row, and the
automations status output are closed and did not declare it. Every get,
full list, status, add, and update result (and compact lists with a
blocked row) failed output validation through Tool Search and Code Mode.

Declare the flag on CronJobSchema so get, full list, add, and update
inherit it, on the compact row, and as a count on status. The compact
wire type now picks the field from the canonical job type.

10.5 shape: 10.5 has no streamExecutionHost, so the compact Pick list and
CompactCronJobSchema take only reauthorizationRequired (two conflicts).
103a179 carried the PR at 2ef2ffabe40 and missed this commit; at
9bf1612 cron.webchat-delivery.test.ts failed 2/2 on Value.Errors.

(cherry picked from commit 46c640290cffc2f5b8179bef46d47ca8ef7540de)
amittell added a commit to amittell/openclaw that referenced this pull request Oct 23, 2026
…2832d6c929

fix(cron): flag reauthorization only for jobs that construct agent tools

A command payload keeps its toolsAllow across a kind change, and the
dormant account policy is preserved, but a command without a condition
trigger never builds agent tools and never reaches the scheduled account
liveness check. The predicate flagged such jobs as blocked, so status
counts and job reads asked for a reauthorization the job does not need.

Gate the predicate on cronJobUsesToolRuntime, which keeps command jobs
with a condition script eligible. The predicate moves next to that
helper in tools-allow.ts (tools-allow already imports
scheduled-tool-policy, so the reverse import would be a cycle), and its
tests move with it.

10.5 shape: one conflict, in cron-list-projection.ts. 10.5's compact path
calls compactCronListJob(job) directly (no toPublicCronJob), and
103a179 had already dropped the type assertion, so only the import
moves to tools-allow.js; 103a179's comment on stored jobs stays.

(cherry picked from commit e2832d6c929374ab8f503704954012176644c450)
amittell added a commit to amittell/openclaw that referenced this pull request Oct 23, 2026
…orization contract test

46c640290cf's new case spies on a gatewayModule namespace import that only
upstream main's version of this file declares. 10.5's cases inject the call
through createCronTool's second argument, so the ported case does the same.

Revert control: with 46c640290cf's two schema files reverted, the case fails
(1 failed | 4 passed); with them, 5 of 5 pass.
@amittell

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Both findings from the October 20 review are fixed, and the branch is now merged with main 0d38c2dfcbfb in fe17c08e16d9:

  • P1, closed output schemas: 46c640290c declares reauthorizationRequired on CronJobSchema and CompactCronJobSchema, and as a count on the status output (thread answered above).
  • P2, jobs that never build agent tools: e2832d6c92 returns false from cronJobNeedsCreatorReauthorization unless cronJobUsesToolRuntime(job); flags a retained cap only when the job still constructs agent tools covers it.

The merge resolved two conflicts: main's test cleanup (#183135) in cron-tool.output-contract.test.ts, and main's projection cache (#183953), which moved row building into prepareJob, so the compact-row flag moved with it. The PR's added and removed lines are otherwise unchanged.

CI on fe17c08e16d9: 85 check runs passed, 45 skipped, CodeQL neutral, none failed. accepts the reauthorization flags that Gateway projections emit passed in checks-node-changed-compact-large-1 and the P2 case in checks-node-changed-compact-large-16. cron-tool.stream-exec-policy.e2e.test.ts, which timed out in checks-node-changed at 37f06c6c, passed 1/1 in checks-node-changed. The two red commit statuses, openclaw/security-sensitive-review and openclaw/ci-gate, both read "A maintainer must approve the current PR revision".

Still open: real-behavior proof through a shipped Gateway.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 8, 2026
3dbda92 imported clearCronJobActive and markCronJobActive into
cron-tool.output-contract.test.ts without using them. oxlint's
no-unused-vars rejects both, which failed check-lint-core-2 on
86306f7 (CI run 42441709604, job 128612747488).
A script payload or condition with a tool cap that builds no agent tools
(toolsAllow: []) never resolves a capability profile unless the script
names MCP, so it never reaches the scheduled account check and runs
without a creator channel. cronJobNeedsCreatorReauthorization still
flagged it, which inflated the status count and flagged runnable jobs.

Scripts now count only when the cap constructs tools, using the same
resolveEmbeddedAttemptToolConstructionPlan call as trigger-script.ts, or
when the payload or condition script names MCP. trigger-script.ts uses
the shared cronScriptReferencesMcp for its MCP gate so the two cannot
drift. Agent turns keep the flag whatever their cap: the isolated prompt
executor checks the account before the model runs.

The new trigger-script case runs five jobs through the real script
runtime and requires the detector to agree with the outcome. On
86306f7 it fails for the empty-cap script and command condition (the
runtime completes, the detector says blocked). The isolated-agent table
gains an empty-cap DM agent turn and checks the detector against the
recorded error for all eight jobs.
…cause

The troubleshooting entry said the error proves the job predates origin
recording and that its account is configured. Neither follows: the guard
throws before it reads the account list, and an executable edit made
without fresh creator authorization also clears a recorded origin.

Name both causes, say the error does not show account health, and point
to the removed-account entry for a later run that fails without this
reason.
The detector fix adds 74 lines to trigger-script.account-policy.test.ts
and 5 to run.account-policy.test.ts, and the lint fix removes 1 from
cron-tool.output-contract.test.ts: 173 + 78 = 251, the exact net
test-line growth against the merge base 4f84bfd.
@amittell

Copy link
Copy Markdown
Contributor Author

Both findings from the November 8 review are fixed at 48ab4a7444d:

  • P2, script paths that never admit the account (b9e0da0adc8). A script or condition counts only when its cap constructs agent tools or the script names MCP, which are the two places trigger-script.ts resolves the capability profile and so checks the account. Empty-cap agent turns keep the flag, because the isolated prompt executor checks the account on its own. flags reauthorization exactly when script preparation reaches the missing-channel guard runs your example (a [] cap script returning { notify: "done" }) and an empty-cap command condition through the real script runtime: both complete, and the detector now says false. On 86306f76411 it said true for both, and those are the only two rows that fail there. The MCP and ["read"] rows still fail with "no recorded creator channel" and stay flagged. In run.account-policy.test.ts, an empty-cap DM agent turn still fails before the model and stays flagged.
  • P3, troubleshooting text (4b02417b28b). The entry no longer says the job predates origin recording or that the account is configured. It names both causes of a missing origin, including an executable edit without fresh creator authorization. It also says the check runs before the account list is read.

CI: check-lint-core-2 failed on 86306f76411 because 3dbda92ac7d left an unused clearCronJobActive, markCronJobActive import in cron-tool.output-contract.test.ts (job 128612747488). The matching main job passed (128603155080). 3596448085b removes it; locally run-oxlint.mjs on that file reports both errors at 86306f76411 and none after the fix. openclaw/ci-gate failed only on that lint shard. Intersect shared OpenClawKit dead code failed in "Resolve producing attempts" with "Missing or invalid Periphery producer execution for Build iOS Periphery reports". That job failed the same way across other PRs that night: 10 other PR runs created between 02:27Z and 07:37Z on November 8 failed only at that step, two of them with this exact error, and replaying that step's producer selector against this run's job list today accepts both producers. This PR touches no Swift. CI on 48ab4a7444d: 84 checks passed and 43 were skipped. The only red is openclaw/ci-gate, with openclaw/security-sensitive-review pending, both for "A maintainer must approve the current PR revision" (Security Review run 42718955524 itself succeeded).

Test-line allocation is now 251: 173 + 78 net new lines (74 + 5 - 1), which is the exact growth against 4f84bfd25. check:test-lines-ratchet --base 4f84bfd25 passes at 251 and rejects 252 ("credit 252 exceeds allowed ceiling growth 251").

Still open for a maintainer: the security-sensitive approval for src/agents/agent-tools.policy.ts at the new head. This push does not touch that file, but the guard asks for a fresh approval on every push.

This is an improve(cron) PR, not a fix PR, so the 251-line test allocation needs a maintainer's approval. Could a maintainer approve it? The reason for each part is in the PR body under "Test-line allocation".

@amittell

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 10, 2026
amittell added a commit to amittell/openclaw that referenced this pull request Nov 11, 2026
Upstream head 48ab4a7. The ledger records the carry of
2ef2ffabe408 as 103a179, but this branch already matches the PR
through 88ee80c ("flag reauthorization only for jobs that
construct agent tools"): src/cron/tools-allow.ts and tools-allow.test.ts
are byte-identical to that commit, scheduled-tool-policy.ts and its test
to the head, and the output-schema fields and their contract test from
3dbda92 are present. The head was rebased since; its first commit
differs from 2ef2ffabe408 only in main's cron-list-projection refactor.
This carries what came after 88ee80c:

- b9e0da0 "flag scripts only when their preparation admits the
  account": a script (payload or condition) with a cap that constructs
  no agent tools never resolves a capability profile unless it names
  MCP, so it never reaches the scheduled-account guard, but
  cronJobNeedsCreatorReauthorization still flagged it. The branch's
  trigger-script.ts has the same shape (capability profile only from
  createTools when toolPlan.constructTools, or from acquireMcpTools
  behind the MCP gate), so the defect is present. tools-allow.ts takes
  the commit as is; trigger-script.ts uses the shared
  cronScriptReferencesMcp for its MCP gate.
- 4b02417: the troubleshooting entry no longer guesses the cause.
  Both causes it names hold here: the guard returns before the account
  list is read (agent-tools.policy.ts), and an executable edit without
  fresh creator authorization drops the recorded origin
  (jobs-tool-policy.ts).
- The test-lines allocation (48ab4a7), with this delta's net count.

Adaptations:
- trigger-script.account-policy.test.ts does not exist here (main's
  file, from openclaw#180565). The PR's new case is carried as that file's only
  test, at main's path. It uses createOpenClawTestState for the
  workspace (no withCronStore here) and drops the occurrence parameter,
  which this branch's script invocation does not take.
- run.account-policy.test.ts: the branch's table uses object rows;
  the PR's empty-cap DM row and its detector-vs-outcome check are added
  in that shape.

Not applicable: 3596448 drops an unused active-jobs import from
cron-tool.output-contract.test.ts. Here that import is used (lines 116
and 140, as in the v2026.11.2 tag).

Proof (M4, Node 26.12.1, --maxWorkers=1):
- trigger-script.account-policy.test.ts, run.account-policy.test.ts,
  tools-allow.test.ts and the seven other trigger-script test files
  (trigger-script.test.ts and its six siblings): 10 files, 67 tests
  passed (43 + 24). The new empty-cap DM agent-turn row fails closed
  with "no recorded creator channel", so the branch's isolated executor
  checks the account whatever the cap, as the PR assumes.
- Red-before, tools-allow.ts and trigger-script.ts reverted:
  trigger-script.account-policy.test.ts fails at its first case, the
  empty-cap script payload ("payload []: ... expected true to be
  false": the runtime completed and the detector said blocked); 1
  failed, 8 passed of 9. run.account-policy.test.ts passes before and
  after: its new row guards that agent turns keep the flag.
@vincentkoc vincentkoc self-assigned this Nov 18, 2026
@vincentkoc

Copy link
Copy Markdown
Member

/allow-security-sensitive-change

@vincentkoc

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added 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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. labels Nov 18, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer land-ready summary for df949a33bb775792210474b458e538ace65a777b.

Why this one. A production gateway hit this exact case: automations saved without a creator origin from private-chat sessions failed every run with the account-unavailable message while the account stayed configured, and the wording led to repeated delete-and-recreate attempts. #201008 fixed how new jobs are saved; this PR makes the already-saved ones discoverable and their error accurate. A narrower wording-only change was prepared separately and dropped in favor of this PR.

What changed on the branch. One maintainer update: GitHub's update-branch merged main a6983ed7ee into the reviewed head 48ab4a7444. The result is exactly that merge, with the same 20 files and +380/-10 against main. No force-push and no content edits.

Review.

  • Read the full production diff and tests against current main. The guard still fails closed; only the message differs for the no-channel branch. The detector is read-only and its boundary test asserts it agrees with the runtime guard case by case.
  • Product decision: the optional reauthorizationRequired job flag and status count are accepted.
  • Security-sensitive change in src/agents/agent-tools.policy.ts approved for this head.
  • Autoreview, branch mode, main a6983ed7ee to head, priorities P0 to P2: scoped-clean, no findings. Diff-only; it did not execute tests.
  • Hosted re-review of this head: no findings, nothing required before merge.

CI. Run 44272648902 attempt 2 on this head: success, 56 jobs passed, 25 skipped, none failed. openclaw/ci-gate reports CI and applicable security review requirements passed.

Gaps. Contributor source was not run on a maintainer host; proof is hosted fork CI. The shipped-Gateway proof in the PR body was measured at earlier heads and was not rerun after the main merge.

Thanks @amittell.

@vincentkoc
vincentkoc merged commit 81c9c3b into openclaw:main Nov 18, 2026
138 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…annel and guide recovery (openclaw#178677)

* feat(cron): surface and recover scheduled jobs blocked on a missing creator channel

A capped automation created from a direct (DM) conversation before creator
origins were recorded fails closed on every scheduled run: the account-scoped
liveness check cannot resolve a channel from a DM owner key with no recorded
origin, so it reports the configured account as unavailable. The only recovery
today is recreating the job, which demotes it to broader trusted authority.

This adds the guided-recovery side of that failure mode (per the openclaw#162087
security review recommendation) without changing the fail-closed boundary:

- cronJobNeedsCreatorReauthorization(): detects the exact blocked class by
  mirroring the liveness guard (named account, unknown origin, non group/channel
  owner key).
- reauthorizationRequired flag on cron.get / cron.list job views and a
  reauthorizationRequired count on cron.status, so blocked jobs are discoverable.
- The no-creator-channel failure now names the real cause and the recovery
  (re-save the tool cap from the creator's authenticated turn, which re-stamps
  a fresh origin via the existing reauthorization path) instead of the generic
  re-add/recreate message.
- Docs: troubleshooting + payloads recovery guidance.

Verified: 105 tests across the 9 most-affected suites (including every pinned
error-string fixture) and 185 across the broader consumer suites; tsgo
typecheck clean; formatter clean.

* fix(cron): declare reauthorization fields in closed output schemas

Job reads, compact list rows, and scheduler status now carry
reauthorizationRequired, but CronJobSchema, the compact list row, and the
automations status output are closed and did not declare it. Every get,
full list, status, add, and update result (and compact lists with a
blocked row) failed output validation through Tool Search and Code Mode.

Declare the flag on CronJobSchema so get, full list, add, and update
inherit it, on the compact row, and as a count on status. The compact
wire type now picks the field from the canonical job type.

* fix(cron): flag reauthorization only for jobs that construct agent tools

A command payload keeps its toolsAllow across a kind change, and the
dormant account policy is preserved, but a command without a condition
trigger never builds agent tools and never reaches the scheduled account
liveness check. The predicate flagged such jobs as blocked, so status
counts and job reads asked for a reauthorization the job does not need.

Gate the predicate on cronJobUsesToolRuntime, which keeps command jobs
with a condition script eligible. The predicate moves next to that
helper in tools-allow.ts (tools-allow already imports
scheduled-tool-policy, so the reverse import would be a cycle), and its
tests move with it.

The list projection drops its type assertion and duplicate types import,
which the assertion-safety ratchet and import/no-duplicates rejected.

* test: allocate 173 test lines for PR openclaw#178677

Adds the cronJobUsesToolRuntime predicate tests, the closed output-schema
reauthorization contract, and the agent-tool policy regression. 173 is the
exact measured net test-line growth against the rebased base.

* test(cron): drop unused active-jobs import from the output contract test

3dbda92 imported clearCronJobActive and markCronJobActive into
cron-tool.output-contract.test.ts without using them. oxlint's
no-unused-vars rejects both, which failed check-lint-core-2 on
86306f7 (CI run 42441709604, job 128612747488).

* fix(cron): flag scripts only when their preparation admits the account

A script payload or condition with a tool cap that builds no agent tools
(toolsAllow: []) never resolves a capability profile unless the script
names MCP, so it never reaches the scheduled account check and runs
without a creator channel. cronJobNeedsCreatorReauthorization still
flagged it, which inflated the status count and flagged runnable jobs.

Scripts now count only when the cap constructs tools, using the same
resolveEmbeddedAttemptToolConstructionPlan call as trigger-script.ts, or
when the payload or condition script names MCP. trigger-script.ts uses
the shared cronScriptReferencesMcp for its MCP gate so the two cannot
drift. Agent turns keep the flag whatever their cap: the isolated prompt
executor checks the account before the model runs.

The new trigger-script case runs five jobs through the real script
runtime and requires the detector to agree with the outcome. On
86306f7 it fails for the empty-cap script and command condition (the
runtime completes, the detector says blocked). The isolated-agent table
gains an empty-cap DM agent turn and checks the detector against the
recorded error for all eight jobs.

* docs(cron): describe missing creator provenance without guessing its cause

The troubleshooting entry said the error proves the job predates origin
recording and that its account is configured. Neither follows: the guard
throws before it reads the account list, and an executable edit made
without fresh creator authorization also clears a recorded origin.

Name both causes, say the error does not show account health, and point
to the removed-account entry for a later run that fails without this
reason.

* test: allocate 251 test lines for PR openclaw#178677

The detector fix adds 74 lines to trigger-script.account-policy.test.ts
and 5 to run.account-policy.test.ts, and the lint fix removes 1 from
cron-tool.output-contract.test.ts: 173 + 78 = 251, the exact net
test-line growth against the merge base 7b78e41.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime 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. security-sensitive-changed 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.

3 participants