Commit Graph

175 Commits

Author SHA1 Message Date
Peter Steinberger
6009b86f0d fix: bound stale task reload blockers 2026-05-07 05:25:54 +01:00
Satoshi F.
103cdd9d96 fix(gateway): add safe restart coordinator (#76923)
Add a safe restart coordinator that preflights active Gateway work before restart.

- expose gateway.restart.preflight and gateway.restart.request RPC methods
- add explicit openclaw gateway restart --safe / openclaw daemon restart --safe path
- narrow restart blockers to running non-ended tasks so queued records no longer block indefinitely
- keep existing restart behavior unchanged; --force remains the immediate override

Co-authored-by: NikolaFC <54186359+NikolaFC@users.noreply.github.com>
Co-authored-by: galiniliev <5711535+galiniliev@users.noreply.github.com>
2026-05-04 10:58:36 -07:00
Peter Steinberger
123a507fa2 fix(ci): narrow active task restart blockers 2026-05-02 23:08:56 +01:00
Peter Steinberger
2a7d6f6f13 fix(ci): satisfy lint after restart controls 2026-05-02 23:05:26 +01:00
Vincent Koc
f6f8d74419 fix(gateway): expose restart drain controls 2026-05-02 14:43:59 -07:00
Peter Steinberger
c06739d773 fix(heartbeat): type wake scheduling intent
Co-authored-by: Jordan Baker <jbb@scryent.com>
2026-05-02 14:52:18 +01:00
Peter Steinberger
be2768433c fix: mark task fallback events untrusted 2026-05-02 13:11:19 +01:00
Peter Steinberger
f46c699887 fix(tasks): speed up registry maintenance
Co-authored-by: Lightningxxl <yuanhangxurobin@gmail.com>
Co-authored-by: Gorin Lee <glfruit80@gmail.com>
2026-05-02 13:02:13 +01:00
Peter Steinberger
442f59508e refactor: trim shared test helper exports 2026-05-01 13:47:09 +01:00
Peter Steinberger
42d73fd955 refactor: remove dead private helpers 2026-05-01 06:55:26 +01:00
Val Alexander
df0ee092f0 fix: harden gateway recovery diagnostics and media delivery
Harden gateway recovery diagnostics and media delivery.\n\n- Accept gateway send asVoice and map it to outbound audioAsVoice.\n- Preserve generated Swift protocol models for the gateway send schema.\n- Keep the broader recovery hardening for install/update/status/vector/TTS paths in one reviewed PR.\n\nProof:\n- Focused local gateway/outbound/update/status/doctor/sqlite-vec tests passed.\n- oxfmt --check and git diff --check passed.\n- Testbox OPENCLAW_TESTBOX=1 pnpm check:changed passed at 2f5ef650e97763a61ff43c28e61707db84c50060.\n- GitHub required checks are green at the merge SHA; the qa-lab parity gate is optional/surface-only and was still pending.
2026-04-30 21:46:22 -05:00
Val Alexander
a102f4dede fix(gateway): harden artifact RPCs
Add Gateway artifact RPCs and SDK helpers for list/get/download, with transcript provenance checks, safer download source handling, task/run/session coverage, generated protocol models, docs, and the refreshed generated config schema baseline.

Closes #74706.
Refs #74898, #74769, #74804, #74786.
2026-04-30 19:35:48 -05:00
Peter Steinberger
0f120c09ba fix(agents): bound subagent orphan recovery 2026-04-30 14:43:18 +01:00
Alex Knight
bbf985d50a feat(plugins): add SQLite plugin state store (#74190)
* feat(plugins): add experimental sqlite plugin state store
2026-04-29 23:02:14 +10:00
Peter Steinberger
5a9c0efa54 fix(tasks): clean orphaned parent-owned acp sessions 2026-04-29 04:35:06 +01:00
Peter Steinberger
eb970bdb42 fix(tasks): repair terminal mirrored flow timestamps 2026-04-28 23:09:37 +01:00
Peter Steinberger
5dfc14d49b fix(tasks): close stale terminal acp sessions 2026-04-28 21:03:55 +01:00
Vincent Koc
f12dedb5c8 fix(tasks): keep media tool runs live 2026-04-28 03:21:00 -07:00
Peter Steinberger
0bc8b9a95a test: add shared OpenClaw test-state harness 2026-04-28 10:52:47 +01:00
Vincent Koc
210cccb0fe fix(tasks): index async media tasks by agent 2026-04-28 02:43:17 -07:00
Peter Steinberger
59faa023fe fix(gateway): unblock sidecar startup 2026-04-27 21:34:44 +01:00
Peter Steinberger
3bc29dd604 fix(sqlite): bound WAL sidecar growth 2026-04-27 12:25:10 +01:00
Vincent Koc
a1b6567059 fix(agents): fallback subagent completion delivery 2026-04-26 01:58:00 -07: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
0cf30b6a65 docs(tasks): document retained lost task audit 2026-04-26 03:50:40 +01:00
Likewen
de5b173546 fix(tasks): normalize task timestamps and retained lost audit
Normalize task lifecycle timestamps on create, update, and restore so startedAt/lastEventAt/endedAt cannot precede createdAt in audit-visible records.

Downgrade retained lost tasks with future cleanupAfter from audit errors to warnings while keeping expired or unstamped lost tasks as errors.

Verification: pnpm exec oxfmt --write --threads=1 src/tasks/task-registry.ts src/tasks/task-registry.test.ts src/tasks/task-registry.audit.ts src/tasks/task-registry.audit.test.ts

Verification: node scripts/test-projects.mjs src/tasks/task-registry.test.ts src/tasks/task-registry.audit.test.ts (task-registry.audit.test.ts 4 passed; task-registry.test.ts 45 passed)
2026-04-26 03:50:40 +01:00
Peter Steinberger
1d98853813 test: relax detached task recovery timing assertion 2026-04-21 08:22:35 +01:00
Peter Steinberger
874306a2ac test: use synthetic task delivery fixtures 2026-04-21 00:49:06 +01:00
Peter Steinberger
aecd709dfe test: use synthetic task channel fixtures 2026-04-21 00:47:12 +01:00
Garry Tan
c8086b731a tasks: add detached task recovery hook before markLost (#69313)
Merged via squash.

Prepared head SHA: 24322af4f7
Co-authored-by: garrytan <19957+garrytan@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
2026-04-21 00:58:20 +02:00
Peter Steinberger
5934a8eacc test: share task executor cancellation fixtures 2026-04-20 19:16:31 +01:00
Peter Steinberger
b7703616f0 refactor: share task audit sorting 2026-04-20 14:13:51 +01:00
Peter Steinberger
26a0172568 refactor: reuse detached task create params 2026-04-20 13:46:50 +01:00
Mariano
bd3ad3436e tasks: add detached runtime plugin registration contract (#68915)
* tasks: register detached runtime plugins

* tasks: harden detached runtime ownership

* tasks: extract detached runtime contract types

* changelog: note detached runtime contract

* changelog: attribute detached runtime contract
2026-04-19 13:13:11 +02:00
Ayaan Zaidi
d83215084f test(tasks): align detached runtime mock return types 2026-04-19 15:21:03 +05:30
Mariano
0787266637 tasks: extract detached task lifecycle runtime (#68886)
* tasks: extract detached task lifecycle runtime

* tests: relax gateway seam expectation

---------

Co-authored-by: Mariano Belinky <mariano@mb-server-643.local>
2026-04-19 10:56:31 +02:00
Peter Steinberger
3e081c5d21 refactor: share task executor param types 2026-04-19 05:28:03 +01:00
Peter Steinberger
2f84c47b8b refactor: share task flow create params 2026-04-19 05:16:38 +01:00
Peter Steinberger
4fa961d4f1 refactor(lint): enable map spread rule 2026-04-18 20:37:12 +01:00
Peter Steinberger
df525b90f2 chore(lint): enable unnecessary type parameter rule 2026-04-18 18:31:13 +01:00
Vincent Koc
f835da1667 fix(ci): trim slow task and gateway paths 2026-04-16 13:34:34 -07:00
Vincent Koc
6a8704cf26 fix(tasks): avoid leaking scheduled sweep failures 2026-04-13 16:26:55 +01:00
EVA
c15b295a85 Run context-engine turn maintenance as idle-aware background work (#65233)
Merged via squash.

Prepared head SHA: e9f6c679ba
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-13 06:50:22 -07:00
Vincent Koc
8a9ead6211 fix(reply): bypass heavy error helper imports 2026-04-11 21:47:40 +01:00
Vincent Koc
f630e8d440 fix(utils): bypass delivery context wrapper for shared consumers 2026-04-11 17:26:38 +01:00
Vincent Koc
2028fd53f0 fix(utils): split delivery context shared types 2026-04-11 17:03:38 +01:00
Vincent Koc
463190ed95 fix(tasks): lazy-load control runtime without static back-edge 2026-04-11 15:39:32 +01:00
Vincent Koc
543c14a4ed fix(cycles): split runtime delivery and registry seams 2026-04-11 13:26:50 +01:00
Vincent Koc
74e7b8d47b fix(cycles): bulk extract leaf type surfaces 2026-04-11 13:26:50 +01:00