Skip to content

fix: cron jobs treat node policy denials as failures - #160620

Open
giodl73-repo wants to merge 4 commits into
openclaw:mainfrom
giodl73-repo:fix/node-exec-fatal-code-cron
Open

giodl73-repo wants to merge 4 commits into
openclaw:mainfrom
giodl73-repo:fix/node-exec-fatal-code-cron

Conversation

@giodl73-repo

@giodl73-repo giodl73-repo commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Related: #166763 (wrapped remote-node policy denial and persisted cron diagnostics).

What Problem This Solves

Unattended cron runs could report success when a remote node rejected an exec command with SYSTEM_RUN_DENIED, including when the Gateway wrapped the native denial in an UNAVAILABLE error.

User Impact

Cron jobs now preserve native node policy denials as fatal execution failures. The persisted run keeps the original denial text and a structured tool diagnostic; ordinary node transport failures retain the existing nonfatal policy.

Why This Change Was Made

The node exec path retained structured failure metadata, but a Gateway wrapper could obscure the denial code and the cron projection discarded the tool name and code. This change:

  • recognizes the native denial marker through the Gateway wrapper;
  • carries the denial message and code through sanitized tool results;
  • persists the original denial text without classifier decoration;
  • retains toolName and code in normalized cron diagnostics.

Evidence

Current-Main Reconciliation

Published conflict-resolved head eaf56030827d914f8ec668541dff6d6f834f4940 incorporates native catalog fix #165825 on pinned base c9a0c00b8691bda5bd7a38ee494b5edd8ecb9254, tree 323e0c35d9eced82b025aa91a287e7ce4cd38ec2. The exact tested candidate replaces old head 8e4df6c84d9650945a46fc783786dedd812f0d4b without rewriting its history. A clean merge tree was verified against main b0c330d27df4a528f65185cc3e509284d1b218d9 before publication; that prospective merge was not executed as a new proof candidate. The full static gate retains its inherited unused-export failure, independently reproduced below.

Independent source review is clean. The two-parent merge preserves the original PR and upstream test cleanup, with exactly the same per-file added/removed lines: 12 files, 171 additions, 18 deletions. No unrelated fix or scan-policy change is included.

Testbox run 37867734739 passed the required runtime build (220.1s), 99 unique tests across six complete files, production typechecking and all 27 test-type partitions. The selected-test wrapper completed five shards in 292.13s. Shard durations were 0.695s (subscriber), 23.95s (node failure), 1.77s (both Cron helper/diagnostic files), 3.64s (node phases), and 28.48s (Cron E2E). The repeated ten-case E2E summary is counted only once. Counts remain 31 + 2 + 38 + 18 + 10. Per-file wrapper wall and hosted planner seconds for this refreshed candidate are not yet measured; older measurements below remain historical.

The script unused-export scan now passes, clearing the catalog failure. The production scan fails on four other exports; the full-tree scan reports the last two:

  • src/agents/cli-runner/tool-authority.ts: bindCliQuestionAnswerAuthority
  • src/auto-reply/reply/session-event-handoff.ts: prepareSessionEventTargetForHost
  • src/config/sessions/session-accessor.sqlite-entry-cache-publication.ts: readSessionEntryCreationTransition
  • src/infra/heartbeat-events-filter.ts: RESTART_CONTINUATION_CONTEXT_PREFIX

All four modules are byte-identical between our candidate and its base, and unchanged through inspected main dc8ac2b5910a088291d5d68b345d6e72ea49508f. #167541 and #167542 report the same findings; the latter reports a clean-main reproduction at c881d464aafee4b07a80d34ae7c357a94b161690. That reproduction is contributor-reported evidence, not pristine-base execution by this proof. Neither PR is asserted to fix these exports.

Overall exit was 1; subsequent lint and remaining checks were not reached in that run. No guard was skipped or waived.

Our bounded pristine-base Testbox run 37872792248 now independently reproduces the exact same four production findings and the same last two full-tree findings; the script scan passes. It executes only node --import tsx scripts/check-deadcode-exports.mts after clean dependency preparation on base c9a0c00b8691bda5bd7a38ee494b5edd8ecb9254, tree 911a5e4e80d4068612deceb42eceaff04115c68f, lock blob 08687fb86b5c922c34e7b58efef2236b580506af, using the same Node 24.21.0, pnpm 12.5.1, Knip 6.32.2 and inspected isolation boundary. Source remained pristine and the native exit 1 is retained. Peak memory was 4,920,725,504 bytes, with zero OOM/PID-limit events; container termination, remote cleanup and completed lease were verified. This is a reproduction on the pinned base, not a claim about executing latest main.

Independent source attribution also confirmed unchanged scanner/configuration/dependency inputs and no removed existing import or re-export edge in the 12-file delta. The candidate adds one test entry, so the whole scan graph is not claimed identical. The matched base result establishes that these four findings predate the candidate; it does not waive current-head hosted CI or maintainer review.

The bounded continuation in Testbox run 37871198481 passed all nine remaining canonical checks on the same candidate/base/tree: changed-file lint (zero warnings/errors), native state schema, database-first legacy stores, media download helpers, runtime sidecar loaders, runtime import cycles (zero), webhook body ordering, pairing store, and pairing account scope. The independently reviewed runner uses the native planner, asserts its 24 previously passed checks and exact failed-scan boundary, and executes the complete suffix with native environments and managed processes. No build, tests or typechecks were repeated or recounted. Its exit 0 means remaining-check success only; the full gate retains the prior unused-export failure.

Final source/tree/lock checks passed. Non-root, network-none execution, container termination, remote cleanup and completed lease were verified. Peak memory was 5,558,390,784 bytes with zero OOM/PID-limit events. Workflow carrier SHA 2b007df256af52b17aace258a24a6e45dab8e8f8 is not the candidate SHA. Subsequent hosted CI and review outcomes are recorded below. Reuse valid passing proof; no blind main refresh, duplicate issue or unrelated repair.

Candidate execution stayed in an inspected non-root, network-none container mounting only proof material after separate credential-free frozen dependency acquisition. Peak memory was 10,302,849,024 bytes; OOM/PID-limit counters stayed zero. Container termination, remote cleanup and completed lease were verified. The workflow carrier is not itself a green candidate CI run. No live model/channel, released-package, consumer-adoption, transcript or raw-log claim.

Hosted CI And Owner Decision

CI run 37874016627 completed with 58 successful jobs, 23 conditional skips and 2 failures. The architecture checkout log and Git commit API bind tested merge 5d6c73bc528a3b7f2b750857f425480eba56fa97 (tree cd75a57fb9ad523139334be86f0e8292a243ec8a) to ordered parents main b0c330d27df4a528f65185cc3e509284d1b218d9 and published head eaf56030827d914f8ec668541dff6d6f834f4940.

  • Architecture job: the runtime-value scan passed with zero cycles; Madge failed on the cycle between src/agents/prepared-model-catalog-fingerprints.ts and src/agents/prepared-model-catalog-worker.ts. Both files, the Madge scanner and its graph/compiler helpers, TypeScript configuration, launcher, package manifest, lockfile and CI workflow are byte-identical between the tested main parent and merge. The 12-file PR delta touches none of those inputs. This supports inherited-source attribution. Existing maintainer evidence reports the same cycle introduced by 811d442afa2c1103ed10f33f3b64fb1afa7675f8 and reproduced on pristine main 3f76fe021990df309bfcd0905030520bb30f81f4; that execution is contributor-reported, not our own baseline Madge run. Kysely was selected after Madge but not reached.
  • Aggregate gate: reports only selected check-additional-shard as failed, the matrix owner of the architecture job. No independent failure is hidden by the aggregate. The failed conclusion remains; no waiver, rerun or unrelated repair was applied.

Exact-head ClawSweeper review, revision 19, completed with no introduced code or security findings. Under its maintainer-authored classification it no longer lists a separate diagnostic-contract owner hold. Its explicit remaining merge gate is data-model upgrade compatibility. The proposed outcome remains the complete diagnostic repair; optional-schema inspection is not executed upgrade proof. This records review disposition, not inferred human acceptance or merge approval.

The 99 tests remain harness proof. The scheduled proofs below add a joined Gateway -> native node denial -> subscriber -> persisted-history scenario and restart comparison, with the controlled policy-change boundary disclosed. The recovered identical-fixture run now demonstrates base-fail/head-pass, but not latest-stable-to-head upgrade. That remains missing evidence, not a demonstrated data-loss defect. The prepared, unexecuted upgrade plan pins stable v2026.9.9 at bcfc88812a35243893585dbeca87ca41b48272ca and production candidate eaf56030827d914f8ec668541dff6d6f834f4940: create synthetic settings, jobs and old-format history through the stable runtime, then verify those records through candidate startup and restart. Keep stable seeding and the scheduled-denial comparison distinct; do not substitute hand-authored history. Forward-upgrade success would not prove rollback or old-client acceptance. No merge, adoption, released-package proof or contract approval is inferred. Next: bounded stable-upgrade proof and maintainer disposition of the attributed CI failure.

Scheduled Native Node Proof

Run 38070633150 executed proof-only commit 97d5c8903e85, tree fcd3fb6d94f82d5e2217906fc475109713338b82, directly above the unchanged production PR head. Two added fixtures exercise the actual QA Gateway, paired native node, subscriber and persisted cron history with a loopback synthetic Responses provider. Native JSON confirms 1 passed, 0 skipped, 0 todo, naming the exact scheduled test.

The job is enabled and due through cron.add, with no cron.run. A transparent WebSocket gate delays only system.run while native approval get/set/get commits and reads back deny/off, then forwards original bytes. This controlled policy-change boundary lets preparation complete before the native node denies execution. The reply carries SYSTEM_RUN_DENIED and original text SYSTEM_RUN_DISABLED: security=deny; invocation-ID correlation, absent command-marker effect, fatal cron diagnostics and exact job/history equality after Gateway restart all pass. This is fresh synthetic state, not a stable-upgrade, live-provider or failing-baseline test.

Required build: 207.6s. Test: 73.271s. Vitest: 320.65s. One-worker wrapper including preparation: 322.557s. Pinned oxfmt0.68.0 passed, but root-test types found two possibly-undefined accesses and lint found four fixture errors (Promise executor return, prefer-const, two raw WebSocket conversions). The broad native changed gate passed production types and all27 core-test partitions, then failed on the same root-test errors; subsequent export/lint/remaining gates were not reached. Overall remote exit2, not a green proof gate.

Source/tree/lock/fixture hashes stayed exact. Separate credential-free frozen acquisition passed1710 supply-chain checks and installed1473 packages, including locked fs-safe0.24.2. Candidate execution used the inspected nonroot/network-none container, only /proof mounted,12GiB/no swap/512PID. Peak memory10,840,305,664 bytes; no OOM/PID-limit events. Containers/task were removed and the exact lease completed. Workflow carrier 06d231d65279a579b6cacbfb6a281e6fca1c5dbb concluded cancelled; carrier status is not candidate CI success. No transcript or raw log attached.

Repaired Fixture Result

Run 38072483357 independently executes repaired proof-only 2fa35eb0e1b4, tree 7aea70ea7042d752a5529a98f377d43110b55021, parent 97d5c8903e85bc65a908e9162bc586768f4bfc25. Only the two fixture files change: actual-value guards for type narrowing, the native WebSocket decoder, a block-body Promise executor, and direct capture of the paired node ID. Source review found no actionable findings; no assertions were weakened or production bytes changed.

Scheduled runtime, pinned formatting, all four root-test type partitions and focused lint pass. Native JSON again verifies the exact single executed test with zero skips/todo; this is the same scenario rerun, not another unique case. Build196.8s, test73.910s, Vitest312.04s, one-worker wrapper313.889s. The same controlled policy-change, native-denial/absent-effect and persisted job/history/restart assertions pass on the repaired bytes.

The native changed gate is scoped to production eaf56030827d -> the two added proof files. Initial guards and root types pass, then the scanner fails on the same four production/two full-tree exports listed above and independently reproduced by pristine-base run37872792248; script scan passes. Later native gate commands were not reached. Overall exit1 remains failed. No skip flag, aggregate waiver or production graph/typecheck rerun; focused lint passed separately before runtime.

Exact source/tree/lock/fixture hashes stayed clean. Same frozen acquisition and inspected isolation; peak memory11,216,740,352 bytes, zero OOM/PID-limit events. Container/task cleanup and exact completed lease verified. Carrier 61621f7b5941e3ea0dbc769a017ac6b9559d4bdc is not the proof commit or evidence of green candidate CI. The production PR head remains unchanged. This historical head-only run did not prove the baseline comparison or stable upgrade; the next section records the subsequent comparison. No transcript or raw log attached.

Identical-Fixture Baseline Comparison

Run 38087945036 used proof-only e3e8da017b45, tree f5aa3c6153275733f04fdbf20ee478a453d3b52b, parent 2fa35eb0e1b47b752b72bb90bf5a223fb0eba31c. The fixture retains every assertion, but verifies native denial, absent command effect and exact job/history restart preservation before the expected fatal-result mismatch. A synthetic receipt records those observations. The identical two fixture blobs were applied to production base c9a0c00b8691bda5bd7a38ee494b5edd8ecb9254: transport-only baseline commit 088d07cda5cb7411b7ab62914fdfc62e4bfadad1, tree 0a0032855e9cb41f008d28c0f3663954395c6462. Source, dependencies, builds and state were separate for each side; production head remains eaf56030827d914f8ec668541dff6d6f834f4940.

  • Base: the node returns SYSTEM_RUN_DENIED / SYSTEM_RUN_DISABLED: security=deny and the command has no effect, yet terminal/history report ok, history says completionStatus: succeeded, and that incorrect record survives restart. Exactly one test fails solely at the named fatal-result assertion; zero skips/todo.
  • Head: the same scenario passes with terminal/history error, completionStatus: failed, the original denial text and a tool diagnostic containing toolName: exec and code: SYSTEM_RUN_DENIED. Exact job/history persist after restart; one pass, zero skips/todo. Pinned formatting, all four root-test type partitions and focused lint pass.
  • Cost: base/head build209.9s/195.8s; test71.829s/72.490s; Vitest322.39s/308.22s; one-worker wrapper324.557s/309.911s. This compares the same scenario twice, not two new unique cases.

Collection recovery is explicit. Native base/head exits are1/0. The original host collector failed to read UID1000-owned private output directories, so its comparison and aggregate remain failed, exit1. A separately reviewed, read-only UID1000 collector captured both settled native reports/logs and six exit/integrity records from the same lease before cleanup, with bounded no-follow reads. All16 file hashes and the unchanged strict assertion/receipt qualifiers validate. Original source/integrity and Docker termination records corroborate native exits1/0; no source, permissions or candidate execution changed and no test was rerun. Recovery capture exits0, but does not turn the original runner, inherited export failures or hosted CI green.

Same approved credential-free dependency preparation and nonroot/network-none execution, only /proof mounted,12GiB/no swap/512PID. Base/head peaks10,306,088,960/11,213,742,080 bytes; zero OOM/PID-limit events. Both containers/tasks were removed and exact lease tbx_01m4kvme41dfw7k64cvfg53v3s completed. Carrier c8278d736d8eb3babe3ec963c79959ab1fcd59d6 concluded cancelled. The controlled policy-change boundary and synthetic provider remain part of the proof. This is fresh-state base/head evidence, not stable9.9 upgrade, rollback, old-client, live-provider, released-package or adopter proof. No transcript or raw log attached.

Previous Candidate Reconciliation

The previous separate candidate was 33eefe850cd9d02f436d0eb2100f6626795b0341, based on 90d30a1178a79dddd92e6190b66b95d89dfb3ca8, with tree 3ccf7a1ac92fc83f7508829e0c5b30e28793bdf7. At that time the public PR head remained 8e4df6c84d9650945a46fc783786dedd812f0d4b because the candidate's full static gate had not passed.

A two-parent merge preserves the original PR history and main's test cleanup. The exact base delta remains 12 files, 171 additions and 18 deletions, with unchanged per-file additions/removals. Independent source review found no actionable defects. No build-policy changes or unrelated repairs are included.

Previous Candidate Test Evidence

Previous-candidate Testbox run 37725232801 passed the required runtime build and 99 unique tests across six complete files, but the full exact-base static gate failed on an unchanged catalog export.

File Passing tests
src/agents/bash-tools.exec-host-node-phases.test.ts 18
src/agents/embedded-agent-subscribe.handlers.tools.node-failure.test.ts 2
src/agents/embedded-agent-subscribe.tools.test.ts 31
src/cron/cron-execution-diagnostics.e2e.test.ts 10
src/cron/isolated-agent.helpers.test.ts 18
src/cron/run-diagnostics.test.ts 20

The one-worker selected-test wrapper completed five Vitest shards in 281.17s, including the required 214.2s runtime build. Vitest shard durations were 0.721s (subscriber), 23.31s (node failure), 1.61s (both cron helper/diagnostic files), 3.24s (node phases), and 25.03s (cron E2E). The log repeats the same ten-case E2E summary; it is not counted as ten additional tests or a separately proven repeat execution. Current per-file wrapper wall times and hosted CI planner seconds are not yet measured; historical measurements remain explicitly scoped below.

Execution uses the existing workflow/profile, separate credential-free frozen dependency acquisition, and inspected non-root network-disabled runtime containers mounting only proof material. A 12 GiB cap, no swap, and the documented GOMEMLIMIT=6GiB caller target address the build-memory constraint; the host-availability guard passed. Related issue #157783 and unmerged PR #157992 own the build-memory work; their code is not included here.

The full check-changed --base 90d30a1178a79dddd92e6190b66b95d89dfb3ca8 --head HEAD passed initial guards, formatting, plugin boundaries, production typechecking and all 27 core-test type partitions. Script and full-tree Knip scans then failed on scripts/publish-model-catalog.mts: readRecommendedModels; the production scan passed with zero entries. Subsequent lint and remaining checks were not reached. Overall exit was 1, with no skipped gate. Runtime peak memory was 10,637,508,608 bytes, OOM/PID-limit counters stayed zero, Docker reported OOMKilled=false, and the lease is independently confirmed completed.

The catalog module is unchanged between the pinned base and candidate. Merged #165825, commit 858d31d074afbc6be80b2074bb05609d55e0d792, already removes this unused export while preserving its internal caller. That source fix is present in checked main ba5b60b0bc452e70876088bf7b5b667f2005c8f9. This is source attribution, not pristine-base runtime reproduction or a passing refreshed composition. The refreshed composition and its remaining findings are recorded above. No duplicate repair or waiver.

Historical failed preparation attempts remain recorded in the canonical issue progress comment. No live model/channel, released-package, or consumer-adoption proof is claimed. No transcript or raw host log is attached.

Historical Evidence

The following results belong only to base 9dd0f4b275f15410e8d82c16e98f93cfc15f81d3 and old head 8e4df6c84d9650945a46fc783786dedd812f0d4b, not the refreshed candidate.

Blacksmith Testbox run 36944891109 verified that historical tuple:

  • frozen install passed all 1,709 supply-chain entries;
  • 99 focused tests passed: 24 subscriber result tests, 2 node failure projection tests, 46 cron/helper tests, 17 node phase tests, and 10 cron E2E tests;
  • line-cap and formatting checks passed;
  • check:changed stopped only at the date-driven main baseline plugin-boundary-report: 11 compatibility record(s) are due for removal, independently tracked in #114414.

Complementary Testbox run 36948502050 used the repository's changed-check planner, skipped only the known plugin boundaries baseline command by name, and passed every other planned command. That includes all 27 typecheck partitions, lint, dead-code, database, media, sidecar, cycle, webhook, and pairing guards; the run exited 0 with FINAL_PROOF_TAIL_PASS_160620_RESTACK.

Historical Test Cost

Hosted old-head CI run 36950849706 executed each changed test file with inner parallelism 1. These timings are historical, not measurements of the refreshed head. The wrapper wall includes per-file preparation; Vitest duration isolates the test process. CI seconds are the planner's predicted test seconds for the containing row.

Test file One-worker wall Vitest CI row / seconds
src/agents/bash-tools.exec-host-node-phases.test.ts 33.10s 31.49s checks-node-changed-1 / 140s
src/agents/embedded-agent-subscribe.handlers.tools.node-failure.test.ts 10.46s 9.35s checks-node-changed-1 / 140s
src/agents/embedded-agent-subscribe.tools.test.ts 2.09s 0.798s checks-node-changed-1 / 140s
src/cron/cron-execution-diagnostics.e2e.test.ts 976.63s 33.44s checks-node-changed-2 / 145s
src/cron/isolated-agent.helpers.test.ts 11.00s 9.84s checks-node-changed-2 / 145s
src/cron/run-diagnostics.test.ts 2.77s 1.22s checks-node-changed-3 / 140s

The cron E2E wrapper wall includes a cold 15m28.1s repository/runtime build; its test process itself completed in 33.44s. The full hosted CI workflow completed successfully with 68 jobs passed, 18 scoped skips, and no failed job.

@clawsweeper

clawsweeper Bot commented Sep 28, 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.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: S labels Sep 28, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 28, 2026
@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

This PR makes wrapped remote-node policy denials fail cron runs and preserves their original message, tool name, and error code.

Example: A scheduled exec receives SYSTEM_RUN_DENIED: SYSTEM_RUN_DISABLED: security=deny through a Gateway UNAVAILABLE wrapper.

  • Before: Cron can record ok and succeeded despite the command being denied.
  • After: Cron records error and failed, retaining the denial text and an exec diagnostic with code SYSTEM_RUN_DENIED.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused patch has credible scheduled-runtime comparison evidence and no identified introduced defect, while existing-state compatibility remains unproven.
Proof confidence 🦐 gold shrimp (3/6) The public comparison reports the changed node classifier, subscriber, and cron persistence path exercised through an automatically due job on a real QA Gateway and paired node, with correct fatal results after the fix and restart preservation. The persisted diagnostics.entries[].code addition still lacks the explicitly unexecuted stable-to-candidate upgrade proof; the prepared v2026.9.9 plan also predates the supplied latest stable release.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

The scores reflect the reviewer's assessment. Real behavior proof is not required for maintainer- or bot-authored pull requests.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An unattended automation can appear successful even though its remote node refused to execute the command.
Reason: The change restores documented failure reporting through existing owners; the host classifies its direction as maintainer-authored, so no additional product-direction approval is requested.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep this PR open: current main still loses remote-node policy-denial metadata, and the patch addresses that documented failure-reporting contract. No introduced correctness or security defect was identified; GitHub reports a merge conflict.

Reviewed head: eaf56030827d914f8ec668541dff6d6f834f4940

Before merge

  • Complete next step - The PR author should resolve GitHub’s reported conflict, preserving current-main permission handling and tool-result behavior alongside the denial repair.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Agent review details

How this fits together

Node execution failures enter the agent tool-result pipeline, become terminal cron failure signals, and leave through scheduler outcomes, persisted history, and Gateway diagnostics.

flowchart LR
  A[Scheduled cron job] --> B[Agent exec tool]
  B --> C[Gateway node invocation]
  C --> D[Node policy denial]
  D --> E[Tool result extraction]
  E --> F[Cron failure classification]
  F --> G[History and Gateway diagnostics]
Loading

Technical review

Best possible solution:

Preserve native denial facts through the existing result and cron owners while retaining transport-failure and retry policy.

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

Current-main source shows the producer storing nodeInvokeFailure metadata that the consumer does not extract; the supplied comparison additionally reports base-fail/head-pass scheduled execution, which this read-only review did not rerun.

Is this the best way to solve the issue?

The patch repairs the existing metadata projections and preserves the safety distinction between policy denial and ambiguous transport outcomes, making it a focused solution to the documented bug.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Node invocation failure classification keeps the original intent (b82dd01: Represent ambiguous execution outcomes without encouraging unsafe retries; later native-session work added explicit policy-denial classification.)
  • Structured tool-result extraction keeps the original intent (87b3c0e: The subscribe refactor moved canonical result extraction into a dedicated owner while preserving behavior.)
  • Cron failure message decoration changes intended behavior with a stated reason (b0c7078: Preserve fatal structured denial signals and their explanatory classifier context; the PR explains retaining original denial text while carrying structured context in diagnostics.)
  • Persisted cron diagnostics keeps the original intent (89db1e5: Expose bounded explanatory diagnostics through job state, history, and Gateway surfaces without changing cron status values.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Kevin Lin: Raw commit 89db1e5 adds src/cron/run-diagnostics.ts:198 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 89db1e5440f5; files: src/cron/run-diagnostics.ts)

PR surface

Source +19, Tests +134. Total +153 across 12 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 6 33 14 +19
Tests 6 138 4 +134
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 171 18 +153

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.

Root-cause cluster

Relationship: same_root_cause
Canonical: #166763
Summary: The canonical report describes the same wrapped-denial metadata loss and explicitly identifies this PR as its implementation.

Members:

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

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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 readiness starts with the lower of the proof and patch scores. It is capped at 3/6 if the fix is partial, the change offers little benefit, a product decision is still open, or the PR reverses an earlier decision without saying why. ✨ 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 (20 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-08T04:30:44.915Z sha 8e4df6c :: needs changes before merge. :: none
  • reviewed 2026-10-09T01:44:54.103Z sha 8e4df6c :: needs changes before merge. :: none
  • reviewed 2026-10-09T02:01:11.357Z sha 8e4df6c :: needs changes before merge. :: none
  • reviewed 2026-10-09T02:30:06.717Z sha eaf5603 :: blocked before merge. :: none
  • reviewed 2026-10-09T02:58:55.656Z sha eaf5603 :: blocked before merge. :: none
  • reviewed 2026-10-10T00:37:15.391Z sha eaf5603 :: blocked before merge. :: none
  • reviewed 2026-10-10T18:01:26.462Z sha eaf5603 :: blocked before merge. :: none
  • reviewed 2026-10-10T22:04:01.062Z sha eaf5603 :: blocked before merge. :: none

Reviewed November 24, 2026, 4:38 PM ET / 21:38 UTC (Revision 21).

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime size: M and removed size: S labels Sep 29, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Sep 29, 2026
@giodl73-repo
giodl73-repo force-pushed the fix/node-exec-fatal-code-cron branch from 265a564 to 8ff241a Compare September 29, 2026 02:29
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@giodl73-repo
giodl73-repo force-pushed the fix/node-exec-fatal-code-cron branch 3 times, most recently from 8b25eb5 to 99ea0f9 Compare September 29, 2026 04:05
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Sep 29, 2026
@giodl73-repo
giodl73-repo force-pushed the fix/node-exec-fatal-code-cron branch from 99ea0f9 to 856cc08 Compare September 29, 2026 04:27
@openclaw-barnacle openclaw-barnacle Bot removed the commands Command implementations label Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

The only exact-head CI failure reproduced identically on the bounded failed-job rerun in untouched subagent-registry.test.ts: the fake-timer yielded-agent.wait case remained running.

I isolated the test-only repair in #160987 rather than adding unrelated code here. Its selected checks-node-changed job is green: https://github.com/openclaw/openclaw/actions/runs/36524887298/job/109265902690

This PR's functional head remains unchanged. I will rebase it after the test repair lands; no review request is needed meanwhile.

steipete added a commit that referenced this pull request Sep 29, 2026
The subagent registry collector-yield case drained owned root work before the
fake-timer zero-delay agent.wait continuation ran, so under shard load the run
could still be running when asserted. It failed twice in checks-node-changed on
#160620 and on #160969 while passing standalone. Advance fake timers by zero
before draining, matching the suite's existing lifecycle-settlement pattern.

Diagnosis and fix from #160987.

Co-authored-by: Gio Della-Libera <[email protected]>
@giodl73-repo
giodl73-repo force-pushed the fix/node-exec-fatal-code-cron branch from 856cc08 to 8f900a4 Compare September 29, 2026 14:38
@giodl73-repo

giodl73-repo commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Restacked onto current main at exact head a3df5a2acf480cb9a1f1c195d4640a8e63f0f4d5. Exact-head Blacksmith Testbox 36940626574 passed the frozen 1,709-entry install, 96 focused tests, full check:changed, final diff integrity, and clean-worktree checks.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@giodl73-repo
giodl73-repo force-pushed the fix/node-exec-fatal-code-cron branch from a3df5a2 to 8e4df6c Compare October 2, 2026 01:25
@giodl73-repo

giodl73-repo commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Restacked to exact proved head 8e4df6c84d9650945a46fc783786dedd812f0d4b. Blacksmith Testbox run 36944891109 passed the frozen 1,709-entry install, 99 focused tests, line-cap, and formatting; its only changed-check stop is the date-driven main plugin-boundary baseline tracked in #114414. Complementary planner run 36948502050 skipped only that baseline command by name and passed every other planned check, including all 27 typecheck partitions. A clean merge tree was verified against current main before publishing.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot mentioned this pull request Oct 2, 2026
78 tasks
@giodl73-repo
giodl73-repo requested a review from steipete October 2, 2026 01:50
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

Added the repository-required one-worker wall times, Vitest durations, and hosted CI planner seconds for all six changed test files to the PR body. The measurements come from successful exact-head CI run 36950849706; the cron E2E row explicitly separates its 976.63s cold-build wrapper wall from its 33.44s Vitest duration. The code head remains 8e4df6c84d9650945a46fc783786dedd812f0d4b.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@giodl73-repo

giodl73-repo commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Refreshed proof for #166763:

  • Published exact tested head eaf56030827d914f8ec668541dff6d6f834f4940, base c9a0c00b8691bda5bd7a38ee494b5edd8ecb9254, tree 323e0c35d9eced82b025aa91a287e7ce4cd38ec2, preserving the original 12-file delta and prior PR ancestry. Independent source review is clean; prospective merge with main b0c330d27df4a528f65185cc3e509284d1b218d9 is conflict-free.
  • Testbox run 37867734739 passed the required runtime build, 99 unique tests across six complete files, production types and all 27 test-type partitions.
  • Native refactor: remove experimental fleet management #165825's catalog export fix is incorporated; the script unused-export scan now passes. Production/full-tree scans instead report four other exports (full-tree reports two). All four modules are unchanged between candidate and base. The PR body names every finding and preserves the earlier failed attempts.
  • Existing #167541 and #167542 report the same findings; refactor(doctor): simplify migration and update recovery paths #167542 reports a clean-main reproduction. That is contributor-reported evidence, not a pristine-base run by this proof or a claim that either PR fixes the exports.
  • The original full-gate exit remains 1. Continuation run 37871198481 now passes all nine remaining canonical checks, including changed-file lint and database/media/runtime/webhook/pairing guards. Its reviewed runner derives the complete suffix from the native planner and preserves the failed export-scan boundary. No build, tests or typechecks were repeated or recounted; continuation exit 0 is not a full-gate pass or a waiver.
  • Pristine-base run 37872792248 independently reproduces all four production findings and the same two full-tree findings on exact base c9a0c00b8691; the script scan passes. Same Node/pnpm/Knip, lockfile and isolation; source stayed clean and native exit 1 is retained. This establishes inherited findings on the pinned base, not a latest-main execution or CI waiver.
  • Hosted CI 37874016627 completed: 58 successful jobs, 23 conditional skips, 2 failures. Tested merge 5d6c73bc528a3b7f2b750857f425480eba56fa97 has ordered parents main b0c330d27df4a528f65185cc3e509284d1b218d9 and published head eaf56030827d914f8ec668541dff6d6f834f4940. Architecture failed on the prepared-model catalog fingerprints/worker Madge cycle; runtime-value cycles were zero, and selected Kysely was not reached. Both cycle files and scanner/configuration/dependency inputs are unchanged between tested main and merge. The aggregate reports only that architecture matrix failure. Existing maintainer evidence reports pristine-main reproduction; our attribution is source/log based, not our own baseline Madge execution. No CI waiver or full-green claim.
  • Exact-head review revision 19 found no introduced code/security defect. Under its maintainer-authored classification it no longer lists a separate diagnostic-contract owner hold; the explicit remaining merge gate is data-model upgrade compatibility. This is review disposition, not inferred human acceptance or merge approval.
  • New scheduled proof run 38070633150: proof-only 97d5c8903e85 above unchanged production head passed 1 exact native scheduled test, 0 skips/todo. Actual QA Gateway and paired node, automatic due cron.add (no cron.run), subscriber, persisted fatal diagnostics and exact job/history after restart. A transparent dispatch gate holds system.run while native approval get/set/get changes policy to deny/off; original bytes then reach the node. This controlled policy-change boundary is explicit. Native denial, invocation identity and absent command-marker effect pass. Synthetic loopback provider, fresh state, head-only proof.
  • That run is not aggregate green: pinned formatting passed, root-test types failed two captured-entry checks and lint failed four fixture checks. The broad changed gate passed production types/all27 core-test partitions, then failed the same root-test types; later checks were not reached. Remote exit2 retained. Build207.6s, test73.271s, Vitest320.65s, one-worker wrapper322.557s. Exact source/hash checks, container/task cleanup and completed lease verified; carrier concluded cancelled, not candidate CI success. The PR body retains details.
  • Repaired proof-only 2fa35eb0e1b4, run38072483357, now passes the same exact scheduled case, formatting, all four root-test type partitions and focused lint. No weakened assertions or production changes. Build196.8s, test73.910s, Vitest312.04s, one-worker wrapper313.889s; same scenario rerun, not an added unique case. The native changed gate compares only the two proof files against production eaf560, then fails the same four production/two full-tree exports independently reproduced above. Script scan passes; later commands were not reached. Overall exit1, no skip or waiver. Exact source/hash integrity, no OOM/PID-limit events, container/task cleanup and completed lease verified. Production PR head unchanged.
  • Comparison run 38087945036 executed identical proof fixtures e3e8da017b45 on fresh base c9a0c00b8691 and production head eaf56030827d. Before: actual node denial, no command effect, but terminal/history say ok and completionStatus: succeeded, preserved after restart; the exact fatal-result assertion fails. After: the same scenario passes with error/failed, original denial text and toolName: exec / code: SYSTEM_RUN_DENIED, also preserved after restart. Each side executes one case with zero skips/todo; the controlled policy change and synthetic provider remain explicit. Base/head build209.9s/195.8s, test71.829s/72.490s, one-worker wrapper324.557s/309.911s. Head pinned formatting/all4 root types/lint pass.
  • Collection recovery, not an all-green run: native base/head exits are1/0, but the original host collector cannot read UID1000-owned private output directories; its comparison and aggregate remain failed, exit1. A separately reviewed read-only UID1000 collector captured both settled native reports/logs and six exit/integrity records from that same lease before cleanup. All16 file hashes and unchanged strict assertion/receipt qualifiers validate; no candidate mutation or test rerun. Runtime container exits, source/lock/fixture integrity, zero OOM/PID-limit events, cleanup and completed lease are independently checked against the original run. Recovery capture exits0; the original failure and inherited unrerun static/CI failures are not waived. Carrier c8278d736d8eb3babe3ec963c79959ab1fcd59d6 concluded cancelled, not green candidate CI.
  • Missing proof: latest-stable-to-head upgrade preserving settings and history. The recovered fresh-state baseline comparison and earlier99 harness tests do not establish that. No data-loss defect is demonstrated. The unexecuted plan pins stable v2026.9.9 / bcfc88812a35243893585dbeca87ca41b48272ca and candidate eaf56030827d914f8ec668541dff6d6f834f4940: seed through the stable runtime, then verify those records through candidate startup and restart. Keep stable seeding, the scheduled denial comparison, rollback and old-client compatibility distinct.
  • Next: bounded stable-upgrade proof and maintainer disposition of attributed CI failures. No broad rerun merely for green, blind main refresh, manual-run substitute for scheduler proof or silent narrowing of the repair.
  • Non-root, network-none execution, remote cleanup and completed lease were verified. Zero OOM/PID-limit events. No live-provider, released-package or consumer-adoption claim; no transcript or raw log attached.

The previous candidate's 99-test/typecheck success and catalog scan failure remain historical evidence in the PR body. No duplicate issue or unrelated repair is introduced.

The earlier owner-routing request is historical; review19's current hold is described above. No new owner ping or merge request is added.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Oct 8, 2026
@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 9, 2026
@giodl73-repo

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Published the conflict-resolved, exact tested head eaf56030827d914f8ec668541dff6d6f834f4940. It preserves the prior PR ancestry and current native tool-result/warning behavior; the focused 12-file delta is unchanged.

The PR body records 99 passing tests, production types and all 27 test-type partitions, plus all nine remaining canonical checks. The four unused-export failures independently reproduce on pristine pinned base in run 37872792248. Their failed exit remains recorded; no full-green, hosted-CI waiver or live-provider/adopter proof is claimed.

@clawsweeper

clawsweeper Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Oct 9, 2026
@clawsweeper clawsweeper Bot added the status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. label Nov 24, 2026

This branch has not been deployed

No deployments
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 gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants