Repository navigation
improve(cron): surface scheduled jobs blocked on a missing creator channel and guide recovery - #178677
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
✅ Maintainer security changes approvedA maintainer approved this revision with an explicit security approval comment.
A later push requires a fresh approval comment for an external contributor's PR. |
There was a problem hiding this comment.
💡 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".
|
Codex review: needs maintainer review before merge. What this changesAdds 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.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Partial 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCron 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +108, Tests +251, Docs +6, Other +5. Total +370 across 20 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (5 earlier review cycles)
Reviewed November 18, 2026, 4:22 AM ET / 09:22 UTC (Revision 6). |
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.
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)
…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)
…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.
|
@clawsweeper re-review Both findings from the October 20 review are fixed, and the branch is now merged with main
The merge resolved two conflicts: main's test cleanup (#183135) in CI on Still open: real-behavior proof through a shipped Gateway. |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
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.
|
Both findings from the November 8 review are fixed at
CI: Test-line allocation is now 251: 173 + 78 net new lines (74 + 5 - 1), which is the exact growth against Still open for a maintainer: the security-sensitive approval for This is an |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
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.
|
/allow-security-sensitive-change |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Maintainer land-ready summary for 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 Review.
CI. Run 44272648902 attempt 2 on this head: success, 56 jobs passed, 25 skipped, none failed. 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. |
|
Merged via squash.
|
…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.
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-channelDM 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 statusreports areauthorizationRequiredcount, each affected job's details and list entries flagreauthorizationRequired: 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 main4f84bfd25. 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 parent0d38c2dfcbfbb1ae2bec19a0a26973640390a5a8(tree40c5902ba2f3ece22bf6461af8bfe93ad3b34398) on macOS arm64 with Node 24.22.1 and pnpm 12.15.0:pnpm install --frozen-lockfile, thenOPENCLAW_BUILD_PRIVATE_QA=1 node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntime. Both exited 0.dist/entry.jsSHA256 isae7797afd96e9a9fb60d6bf1ec8cb1a0ea9383307cf740a151ba0ac4015ad913for the head anda1454578a78ce6c7614a1113671823495c9ad187b78d4e161c0102e5046bc991for 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'sqa-channelplugin on its local QA bus (extensions/qa-lab), with accountsdefaultand a namedcreatorbot,session.dmScope: "per-channel-peer"andcommands.ownerAllowFrom: ["alice"]. The model isscripts/e2e/mock-openai-server.mjswith scripted responses. Every operator step goes through the shipped CLI. The DM senderaliceis synthetic; no Telegram or Discord account and no real provider were used.The script:
aliceDMscreatorbotand the scripted model callsautomationsaddwithtoolsAllow: ["read"]. The Gateway stores cap["read","skills_read"], account-mode policy, owneragent:main:qa-channel:direct:dm:aliceoncreatorbot, 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.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.aliceDM 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):
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: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 accountat startup, and every reply in the run, including the one sent during the blocked window, went out throughcreatorbot. 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,
alicewas not a configured owner, soautomationsrefused 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:fe17c08e16d9:cron-tool.output-contract.test.ts5/5,tools-allow.test.ts7/7,agent-tools.policy.test.ts17/17.0d38c2dfcbfb:accepts the reauthorization flags that Gateway projections emitfails (1 failed, 4 passed); all 7 detector cases fail withTypeError: cronJobNeedsCreatorReauthorization is not a function;names the missing creator channel when a DM-key scheduled account cannot resolve a channelfails 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 printedRUNTIME_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 accountworkwith no recorded origin through the real script runtime. It requirescronJobNeedsCreatorReauthorizationto equal "the run failed with no recorded creator channel":[]script payload, noMCP[]command with condition, noMCP[]script payload namingMCP[]condition namingMCP["read"]script payloadtools-allow.tsandtrigger-script.tsat86306f76411: 1 failed, 11 passed, the failure being the first row. With soft assertions exactly the first two rows mismatch (flag true, runtime runs).48ab4a7444d: 12/12 pass, the probe plus that file andtools-allow.test.ts.run.account-policy.test.tschecks the same equality for its eight scheduler jobs, including a new empty-cap DM agent turn that fails before the model. 8/8 at86306f76411and at48ab4a7444d.MCPmatch, or the tool-construction check each fails exactly one case.Local gates at 48ab4a7, November 9
Merge base
4f84bfd25throughout; Vitest on Node 26.12.1 for the test run.pnpm tsgo:all: pass. An injected type error intools-allow.tsand 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: 18Thanks @steipete-oai(CHANGELOG/2026.6.8.mdx4,CHANGELOG/2026.7.1.mdx11,CHANGELOG/records/2026.6.8.mdx3) and 2Thanks @roboclaw-bot(CHANGELOG/records/2026.10.6.md). The PR changes noCHANGELOGpath, andcheck-changelog-attributions.mtson this tree, whoseCHANGELOG/equals the merge base's, lists the same 20; main3855c896eddlists the same counts per file. The dead export scan reportsOpenClawShellinui/src/app/app-host.tsxandCommandPaletteOpenDetailinui/src/components/command-palette-contract.ts. Control:pnpm deadcode:exportson the merge-base tree, with every path this PR changes reverted, reports the same two. The PR touches nothing underui/.node scripts/test-projects.mts --changed 3855c896edd8(Node; the log has no runtime line, but the crashing child in the plugin-preparation failure printsNode.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.tsandworker-task-pool.memory.test.ts. For the first,command-status.test.tsexpects 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-basewith the line-cap comparison: all 10 pass.CI lint failure on
86306f76411:scripts/run-oxlint.mjsoncron-tool.output-contract.test.tsreports the same twono-unused-varserrors at86306f76411and none at48ab4a7444d.Test cost (
pnpm test <file> --maxWorkers=1, Bun, the local default, macOS arm64, two runs each):agent-tools.policy.test.ts36.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.ts20.3 s and 9.2 s wall, 1.4 s and 1.1 s of tests;run.account-policy.test.ts31.4 s and 19.1 s wall, 14.5 s and 9.8 s of tests;tools-allow.test.ts1.9 s and 1.8 s wall, 26 ms and 25 ms of tests;trigger-script.account-policy.test.ts19.3 s and 18.1 s wall, 9.2 s and 8.0 s of tests. CI run 42441709604, Bun:agent-tools.policy.test.ts7.7 s Vitest duration, 346 ms of tests (checks-node-changed-compact-large-26);cron-tool.output-contract.test.ts1.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.tsno CI seconds in this measurement (the file first ran in CI on48ab4a7444d, after it);tools-allow.test.ts7 ms of tests in a shared run (checks-node-changed-compact-large-26);trigger-script.account-policy.test.tsno CI seconds in this measurement (the file first ran in CI on48ab4a7444d, after it).Test-line allocation
config/test-lines-allocations/178677-cron-creator-reauthorization.txtrecords 251 lines, the exact net growth against4f84bfd25.check:test-lines-ratchet --base 4f84bfd25passes at 251 and rejects 252 ("credit 252 exceeds allowed ceiling growth 251").tools-allow.test.ts: the detector's own cases (origin kinds, group keys, trusted mode, default account, capless jobs, command jobs).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.agent-tools.policy.test.ts: the new missing-channel message and the unchanged removed-account message.trigger-script.account-policy.test.tsand 5 inrun.account-policy.test.ts: the detector checked against the real script runtime and the isolated scheduler.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
withCronStoreandcreateCronScriptRuntimeharness, 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 isopenclaw/ci-gate, withopenclaw/security-sensitive-reviewpending, 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
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.openclaw automations showview does not print the flag; the JSON surfaces above do. This PR does not changeshow.sessionTargetmainorsession:<key>) are flagged like isolated ones. The tests above cover the isolated runner and the script runtime, not the session route.