Commit Graph

898 Commits

Author SHA1 Message Date
Peter Steinberger
61d53f98d3 fix(cron): clean up timed out agent runs 2026-04-29 16:54:22 +01:00
Deepak Jain
0c9f84451a feat(config): add reasoningDefault to agents.defaults
Add reasoningDefault support under agents.defaults and preserve the existing per-agent/session/inline override order.

Includes authorization gating for configured reasoning state, /status coverage, config schema/docs baseline updates, and regression tests for the reply and status paths. Also carries the related cron startup-run preservation fix and CI test stabilization needed for this PR branch.

Validated locally with pnpm check:changed, the focused Vitest bundle for touched gateway/cron/auto-reply/plugin-sdk/tooling tests, pnpm config:docs:check, and git diff --check. GitHub checks are green on the merged head; Greptile latest visible review is 4/5 with no P0/P1 findings.
2026-04-29 05:47:18 -05:00
Peter Steinberger
7be65cd798 test: cover session-scoped model overrides (#74265) 2026-04-29 11:46:53 +01:00
Peter Steinberger
f5e7557c70 fix(heartbeat): defer during cron and nested lane pressure 2026-04-29 10:08:48 +01:00
openclaw-clownfish[bot]
9bb1e59447 fix(cron): preserve model overrides for text payloads (#73946)
Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
2026-04-29 01:32:27 -07:00
Peter Steinberger
2a64f1a2de test: follow deferred cron startup catch-up 2026-04-29 09:29:12 +01:00
Peter Steinberger
7877182b6f fix(gateway): defer missed cron agent startup work 2026-04-29 09:15:54 +01:00
Vincent Koc
1d0e9a907e fix(doctor): migrate legacy tts enabled toggles 2026-04-29 00:39:18 -07:00
Vincent Koc
8b71d2347f docs(types): mark remaining deprecated aliases 2026-04-29 00:04:17 -07:00
Andrew Barnes
79159f11f6 fix: use LRU eviction for cron schedule cache
Fixes #39679
2026-04-28 18:56:19 -07:00
Josh Lehman
12c52963ea fix: allow cron self-removal in isolated runs (#73028) 2026-04-28 18:16:31 -07:00
Alex Knight
f155a5f955 Add cron changed plugin hook (#72773)
* feat: add cron changed plugin hook

* fix: improve cron_changed hook correctness and code quality

- Fix PluginHookGatewayCronDeliveryStatus: replace 'error' with 'unknown'
  to match internal CronDeliveryStatus enum
- Add job snapshot to CronEvent so removed events carry the deleted job
- Extract pickDefined helper, replace 14-field verbose spread mapping
- Add toPluginCronJob mapper for explicit internal→public type boundary
- Fix schedule union: use literal-only kind discriminants for TS narrowing
- Use loadConfig() (runtime) instead of params.cfg (startup) in hook ctx
- Use formatErrorMessage instead of String(err) for stack preservation
- Fix pre-existing getCron TS2322 with explicit cast (matches gateway_start)
- Re-export supporting types from hooks.ts for plugin consumers
- Add tests: removed events with job, finished with full fields, runtime cfg
2026-04-28 21:34:42 +10:00
Vincent Koc
ae63f76bbd fix(cron): infer session agentId when omitted (#72326)
* fix(cron): infer session agentId when omitted

* fix(clownfish): address review for ghcrawl-165998-agentic-merge (1)
2026-04-28 02:47:20 -07:00
Peter Steinberger
db40ec404a fix: honor Ollama thinking catalog metadata 2026-04-28 09:15:28 +01:00
roytong9
a3fd97570f Normalize telegram topic targets in delivery resolution (#59069)
* Normalize telegram topic targets in delivery resolution

* fix(cron): preserve explicit Telegram topic targets

* fix(clownfish): address review for ghcrawl-165998-agentic-merge (1)

---------

Co-authored-by: vincentkoc <25068+vincentkoc@users.noreply.github.com>
2026-04-27 22:27:42 -07:00
Peter Steinberger
343f2d7245 fix: fail closed for invalid cron payload models 2026-04-28 04:12:54 +01:00
Peter Steinberger
e1acb61317 refactor: expose SDK test helper subpaths 2026-04-28 03:28:17 +01:00
Peter Steinberger
a66605bf23 fix(cron): skip isolated runs when local providers are down 2026-04-28 02:12:19 +01:00
Peter Steinberger
e27c32b9b0 refactor(plugin-sdk): publish route helpers 2026-04-28 01:13:01 +01:00
Peter Steinberger
ff2b2e769f fix(cron): preserve job model fallbacks 2026-04-28 00:03:01 +01:00
Peter Steinberger
6fe9285f64 fix(ci): sync locale and cron contract tests 2026-04-27 13:15:59 +01:00
Peter Steinberger
9f62c73893 fix(cron): verify delivery before clearing message warnings 2026-04-27 11:02:09 +01:00
Peter Steinberger
d33eebd050 fix(cron): ignore delivered presentation warnings 2026-04-27 10:53:35 +01:00
Peter Steinberger
7d74c29dcc fix: isolate cron nested lane concurrency 2026-04-27 09:39:10 +01:00
Peter Steinberger
729147dcb5 fix(cron): start isolated timeout after execution begins 2026-04-27 08:15:59 +01:00
Peter Steinberger
37d37d3779 fix(cron): tolerate legacy flat schedule identity 2026-04-27 07:56:26 +01:00
Peter Steinberger
9ced682a9d fix(cron): omit disabled delivery trace errors 2026-04-27 07:50:50 +01:00
Peter Steinberger
ddcd9d62c4 fix(cron): invalidate stale external schedule slots 2026-04-27 07:46:08 +01:00
Peter Steinberger
4bca42d933 fix(cron): alert on persistent skipped runs 2026-04-27 07:31:04 +01:00
Peter Steinberger
85148f3b20 refactor(cron): split notification routing 2026-04-27 06:44:53 +01:00
Peter Steinberger
332cdd7aca fix(cron): route failure alerts via target session 2026-04-27 06:34:38 +01:00
Peter Steinberger
382e03a2d8 fix(cron): fail isolated runs on run-level errors 2026-04-27 05:42:59 +01:00
Peter Steinberger
b0c70786fd fix(cron): preserve structured denial failures 2026-04-27 04:34:38 +01:00
Peter Steinberger
fc3abc139b fix(cron): classify denied isolated runs 2026-04-27 03:01:55 +01:00
Josh Lehman
a3c51f91c5 fix: isolate cron context-engine session keys (#72292) 2026-04-26 14:21:01 -07:00
Josh Lehman
8ba82534e6 fix: preserve cron telegram topic delivery after timeout (#72317) 2026-04-26 13:30:54 -07:00
Peter Steinberger
c5bbf83904 fix: skip unresolved delivery targets for no-deliver cron 2026-04-26 08:17:28 +01:00
Peter Steinberger
1fae716a04 fix: recover stale cron task records 2026-04-26 07:23:39 +01:00
likewen-tech
86328585fa fix(tasks): terminalize gateway agent run ledger
Terminalize Gateway-backed async task records from the run result while preserving aborted, failed, cancelled, and lost outcomes.\n\nThanks @likewen-tech.
2026-04-26 05:06:33 +01:00
Peter Steinberger
566d2d73a3 fix: keep system events from extending session resets (#71845) 2026-04-26 02:29:44 +01:00
Scott Glover
371b69b3e2 Expose cron jobId in plugin hook context 2026-04-26 02:06:48 +01:00
Vincent Koc
924271385b fix(cron): record interrupted startup runs
* fix(cron): record interrupted startup runs

* test(cron): update interrupted startup expectations
2026-04-25 04:28:11 -07:00
Vincent Koc
e0546edd98 fix(cron): normalize flat legacy job rows 2026-04-25 03:29:30 -07:00
Vincent Koc
2896107153 fix(cron): tolerate malformed legacy jobs 2026-04-25 02:39:06 -07:00
Peter Steinberger
36eae5a2c7 fix: tighten silent cron exec notifications 2026-04-25 07:15:08 +01:00
Mark Goldenstein
bd60df3e53 fix: silence cron exec completion noise 2026-04-25 07:15:08 +01:00
Peter Steinberger
f2745aa03a refactor(cron): clarify ambient session context rollover 2026-04-25 06:37:18 +01:00
Peter Steinberger
576c6c240f fix(discord): collapse cron announce text 2026-04-25 06:22:30 +01:00
Vincent Koc
f0ceb4b68f fix(cron): isolate fresh cron session state
* fix(cron): isolate fresh cron session state

* fix(cron): deep-copy isolated session state

* fix(cron): reset isolated session context

* test(providers): avoid shared mock races

* test(providers): type injected stream fakes

* ci: refresh package boundary on reply runtime changes

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-24 22:15:19 -07:00
Matt Van Horn
b33eb93aac fix(cron): default missing sessionTarget on load and guard assertSupportedJobSpec (#70367)
* fix(cron): default missing sessionTarget on load and guard assertSupportedJobSpec

* fix(cron): use Object.hasOwn for payload.kind check and log the backfill

Address review feedback on #70367:
- Switch the new payload.kind lookup from `in` to `Object.hasOwn` so
  prototype pollution cannot drive the defaulter (Aisle Low finding).
- Log a warning when a job is auto-defaulted at load time, matching the
  adjacent legacyJobIdIssue pattern so operators can run `openclaw
  doctor --fix` to persist the canonical shape (Greptile P2).

* fix(cron): dedupe sessionTarget backfill warn per jobId and sharpen crash site reference

Address deep-review feedback on #70367:

- The code comment referenced assertSupportedJobSpec as the tick-time
  crash site, but that function is only called from create/patch
  (jobs.ts:607, 686) and manual-run preflight (ops.ts:516). The actual
  on-tick TypeError surfaces in runIsolatedAgentJob (server-cron.ts).
  Update the comment to say so.

- ensureLoaded runs with forceReload:true on every onTimer tick (~60s).
  Before this change, a persistent legacy job missing sessionTarget
  produced one warn line per tick, forever. Add a per-jobId dedupe set
  on CronServiceState (mirroring the existing warnedDisabled flag) so
  the warn fires once per job per process.

- Drop the 'run openclaw doctor --fix' remediation from the warn
  message. Doctor's cron-store migration has no trackIssue entry for
  missing sessionTarget (doctor-cron-store-migration.ts CronStoreIssueKey),
  so doctor --fix on a store whose only defect is missing sessionTarget
  silently returns without writing anything. Point operators at
  jobs.json directly until that gap is closed.

* docs(changelog): note cron session target repair

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-24 17:57:39 -07:00