Peter Steinberger
c89836a251
test: harden flaky timeout and resolver specs
2026-03-01 21:30:07 +00:00
Peter Steinberger
262bca9bdd
fix: restore dm command and self-chat auth behavior
2026-02-26 18:49:16 +01:00
joshavant
e8637c79b3
fix(secrets): harden sops migration sops rule matching
2026-02-26 14:47:22 +00:00
Peter Steinberger
c397a02c9a
fix(queue): harden drain/abort/timeout race handling
...
- reject new lane enqueues once gateway drain begins
- always reset lane draining state and isolate onWait callback failures
- persist per-session abort cutoff and skip stale queued messages
- avoid false 600s agentTurn timeout in isolated cron jobs
Fixes #27407
Fixes #27332
Fixes #27427
Co-authored-by: Kevin Shenghui <shenghuikevin@github.com>
Co-authored-by: zjmy <zhangjunmengyang@gmail.com>
Co-authored-by: suko <miha.sukic@gmail.com>
2026-02-26 13:43:39 +01:00
Peter Steinberger
df9a474891
test: stabilize no-output timeout exec test
2026-02-25 02:46:23 +00:00
Peter Steinberger
31f2bf9519
test: fix gate regressions
2026-02-24 04:39:53 +00:00
Peter Steinberger
3b5a276a48
test: speed up supervisor test timing
2026-02-23 20:15:56 +00:00
Peter Steinberger
fe62711342
test(gate): stabilize env- and timing-sensitive process/web-search checks
2026-02-23 19:19:58 +00:00
Peter Steinberger
86a8b65e9d
test: consolidate redundant suites and speed up timers
2026-02-23 04:44:42 +00:00
Peter Steinberger
a6a2a9276e
test: reduce exec timer test runtime
2026-02-23 04:25:00 +00:00
Peter Steinberger
427b4360b9
build: update deps and stabilize tests
2026-02-22 23:32:38 +01:00
Peter Steinberger
34ea33f057
refactor: dedupe core config and runtime helpers
2026-02-22 17:11:54 +00:00
Peter Steinberger
d01cc69ef0
test: tighten process timeout fixtures
2026-02-22 17:06:35 +00:00
Peter Steinberger
d116bcfb14
refactor(runtime): consolidate followup, gateway, and provider dedupe paths
2026-02-22 14:08:51 +00:00
Peter Steinberger
adfbbcf1f6
chore: merge origin/main into main
2026-02-22 13:42:52 +00:00
Peter Steinberger
00eb2541dc
test: shorten idle child timers in timeout assertions
2026-02-22 12:37:49 +00:00
Peter Steinberger
a4607277a9
test: consolidate sessions_spawn and guardrail helpers
2026-02-22 12:34:55 +01:00
Peter Steinberger
401106b963
fix: harden flaky tests and cover native google thought signatures ( #23457 ) (thanks @echoVic)
2026-02-22 12:24:53 +01:00
Peter Steinberger
bf52273a58
test: harden flaky timeout-sensitive tests
2026-02-22 12:21:19 +01:00
Peter Steinberger
78c3c2a542
fix: stabilize flaky tests and sanitize directive-only chat tags
2026-02-22 12:19:33 +01:00
Peter Steinberger
d6d73d0ed9
test(core): trim redundant test resets and use mockClear
2026-02-22 08:12:55 +00:00
Peter Steinberger
1f0695ba47
test(core): use lightweight clears in update, child adapter, and copilot token setup
2026-02-22 08:01:16 +00:00
Peter Steinberger
4ddaafee68
test(plugins): use lightweight clears in wired hooks setup
2026-02-22 08:01:16 +00:00
Peter Steinberger
185fba1d22
refactor(agents): dedupe plugin hooks and test helpers
2026-02-22 07:44:57 +00:00
Peter Steinberger
81a85c19ff
test(gateway): tighten e2e timeouts and dedupe invoke checks
2026-02-21 23:02:44 +00:00
Peter Steinberger
ae70bf4dca
refactor(test): simplify env scoping in exec and usage tests
2026-02-21 19:13:46 +00:00
Peter Steinberger
fa89ae8e9e
fix: stabilize swift protocol generation and flaky tests
2026-02-21 16:53:46 +01:00
Peter Steinberger
a1cb700a05
test: dedupe and optimize test suites
2026-02-19 15:19:38 +00:00
Peter Steinberger
7ebd213acf
perf(test): dedupe telegram thread cases and tighten PTY timer
2026-02-18 22:29:31 +00:00
Peter Steinberger
a011361784
perf(test): remove timer callbacks in command queue tests
2026-02-18 21:53:57 +00:00
Peter Steinberger
8f079afb38
perf(test): remove timer usage in command queue ordering test
2026-02-18 17:46:39 +00:00
Peter Steinberger
c7bc94436b
perf(test): fake queue timers and merge telegram reply-mode checks
2026-02-18 16:01:20 +00:00
Peter Steinberger
308e09c876
perf(test): shorten process timeout fixtures
2026-02-18 04:27:01 +00:00
Peter Steinberger
46278e22cf
perf(test): trim telegram duplicates and queue wait delays
2026-02-18 04:22:59 +00:00
Peter Steinberger
b8b43175c5
style: align formatting with oxfmt 0.33
2026-02-18 01:34:35 +00:00
Peter Steinberger
31f9be126c
style: run oxfmt and fix gate failures
2026-02-18 01:29:02 +00:00
cpojer
2a4ca7671e
chore: Fix types in tests 35/N.
2026-02-17 15:50:07 +09:00
cpojer
03e6acd051
chore: Fix types in tests 28/N.
2026-02-17 14:32:18 +09:00
cpojer
d0cb8c19b2
chore: wtf.
2026-02-17 13:36:48 +09:00
Sebastian
ed11e93cf2
chore(format)
2026-02-16 23:20:16 -05:00
Sebastian
f7d2e15a2e
test: stabilize infra tests
2026-02-16 22:37:34 -05:00
cpojer
01ea808876
chore: Format files.
2026-02-17 10:57:31 +09:00
Sebastian
fb996031bc
fix(process): harden graceful kill-tree cancellation semantics
2026-02-16 20:37:08 -05:00
Sebastian
726ad45c75
Revert "fix: add windowsHide: true to spawn in runCommandWithTimeout"
...
This reverts commit 32c66aff49 .
2026-02-16 20:27:32 -05:00
cpojer
90ef2d6bdf
chore: Update formatting.
2026-02-17 09:18:40 +09:00
artale
a1a1f56841
fix(process): disable detached spawn on Windows to fix empty exec output ( #18035 )
...
The supervisor's child adapter always spawned with `detached: true`,
which creates a new process group. On Windows Scheduled Tasks (headless,
no console), this prevents stdout/stderr pipes from properly connecting,
causing all exec tool output to silently disappear.
The old exec path (pre-supervisor refactor) never used `detached: true`.
The regression was introduced in cd44a0d01 (refactor process spawning).
Changes:
- child.ts: set `detached: false` on Windows, keep `detached: true` on
POSIX (where it's needed to survive parent exit). Skip the no-detach
fallback on Windows since it's already the default.
- child.test.ts: platform-aware assertions for detached behavior.
Fixes #18035
Fixes #17806
2026-02-16 23:59:53 +01:00
Guy
32c66aff49
fix: add windowsHide: true to spawn in runCommandWithTimeout
...
Fixes flashing conhost.exe windows on Windows when exec module spawns
child processes. The windowsHide: true option prevents orphaned conhost.exe
processes and eliminates disruptive terminal window flashing.
Closes #18613
2026-02-16 23:49:47 +01:00
Daniel Sauer
20957efa46
fix(process): graceful process tree termination with SIGTERM before SIGKILL
...
Process trees (pty sessions, tool exec) were being SIGKILL'd immediately
without any grace period for cleanup. This prevented child processes from:
- Flushing buffers and closing files cleanly
- Closing network connections
- Terminating their own child processes
- Removing temporary files
Changes:
- Send SIGTERM to process group first (Unix)
- Wait configurable grace period (default 3s)
- Then SIGKILL if process still alive
- Windows: taskkill without /F first, then with /F after grace period
- Use unref() on timeout to not block event loop exit
Fixes #18619
Co-authored-by: James <james@openclaw.ai>
2026-02-16 23:49:44 +01:00
Peter Steinberger
a177f7b9fe
refactor(tests): dedupe slack telegram and web monitor setup
2026-02-16 17:06:40 +00:00
Peter Steinberger
9684ae4c6d
test: tighten process timeout thresholds with stabilized emit guard
2026-02-16 05:09:47 +00:00
Peter Steinberger
0b780789bc
test: further reduce process timeout waits in fast suites
2026-02-16 04:48:55 +00:00
Peter Steinberger
795874711b
test: shorten process timeout waits in exec and supervisor suites
2026-02-16 04:45:44 +00:00
Peter Steinberger
17d8e2a1c8
test: reduce supervisor no-output wait threshold
2026-02-16 04:43:33 +00:00
Peter Steinberger
c53e4e6c8f
test: trim exec timeout waits for faster suite runtime
2026-02-16 04:41:45 +00:00
Peter Steinberger
1b223dbdd8
test: isolate git-hooks integration and stabilize exec timeout
2026-02-16 04:24:00 +00:00
Peter Steinberger
bc65e787c8
test: trim process no-output timeout waits
2026-02-16 04:17:38 +00:00
Peter Steinberger
a7385aa8ac
test: reduce process timeout test latency
2026-02-16 04:08:50 +00:00
Peter Steinberger
83ce48302f
test: trim timeout-heavy exec and telegram cases
2026-02-16 04:00:53 +00:00
Peter Steinberger
31939397a9
test: optimize hot-path test runtime
2026-02-16 03:49:05 +00:00
Peter Steinberger
38ac4b8083
test(pty): stabilize non-windows signal assertion
2026-02-16 03:06:03 +00:00
Peter Steinberger
273d70741f
refactor(supervisor): share env normalization
2026-02-16 01:41:35 +00:00
Onur
cd44a0d01e
fix: codex and similar processes keep dying on pty, solved by refactoring process spawning ( #14257 )
...
* exec: clean up PTY resources on timeout and exit
* cli: harden resume cleanup and watchdog stalled runs
* cli: productionize PTY and resume reliability paths
* docs: add PTY process supervision architecture plan
* docs: rewrite PTY supervision plan as pre-rewrite baseline
* docs: switch PTY supervision plan to one-go execution
* docs: add one-line root cause to PTY supervision plan
* docs: add OS contracts and test matrix to PTY supervision plan
* docs: define process-supervisor package placement and scope
* docs: tie supervisor plan to existing CI lanes
* docs: place PTY supervisor plan under src/process
* refactor(process): route exec and cli runs through supervisor
* docs(process): refresh PTY supervision plan
* wip
* fix(process): harden supervisor timeout and PTY termination
* fix(process): harden supervisor adapters env and wait handling
* ci: avoid failing formal conformance on comment permissions
* test(ui): fix cron request mock argument typing
* fix(ui): remove leftover conflict marker
* fix: supervise PTY processes (#14257 ) (openclaw#14257) (thanks @onutc)
2026-02-16 02:32:05 +01:00
Peter Steinberger
725f63f724
perf(test): fold restart recovery helper into spawn utils suite
2026-02-16 00:18:27 +00:00
Peter Steinberger
ee2fa5f411
refactor(test): reuse env snapshots in unit suites
2026-02-16 00:02:32 +00:00
Peter Steinberger
92f8c0fac3
perf(test): speed up suites and reduce fs churn
2026-02-15 19:29:27 +00:00
Peter Steinberger
a7eb0dd9a5
fix(security): harden Windows child process spawning
2026-02-15 03:24:55 +01:00
Peter Steinberger
5caf829d28
perf(test): trim duplicate gateway and auto-reply test overhead
2026-02-13 23:40:38 +00:00
Peter Steinberger
caebe70e9a
perf(test): cut setup/import overhead in hot suites
2026-02-13 21:23:50 +00:00
Joseph Krug
4e9f933e88
fix: reset stale execution state after SIGUSR1 in-process restart ( #15195 )
...
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 676f9ec451
Co-authored-by: joeykrug <5925937+joeykrug@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-02-13 15:30:09 -05:00
Yi LIU
a5ccfa57a8
refactor(process): use dedicated CommandLaneClearedError in clearCommandLane
...
Replace bare `new Error("Command lane cleared")` with a dedicated
`CommandLaneClearedError` class so callers that fire-and-forget
enqueued tasks can catch this specific type and avoid surfacing
unhandled rejection warnings.
2026-02-13 19:43:20 +01:00
Yi LIU
a49dd83b14
fix(process): reject pending promises when clearing command lane
...
clearCommandLane() was truncating the queue array without calling
resolve/reject on pending entries, causing never-settling promises
and memory leaks when upstream callers await enqueueCommandInLane().
Splice entries and reject each before clearing so callers can handle
the cancellation gracefully.
2026-02-13 19:43:20 +01:00
Shadow
be18f5f0f0
Process: fix Windows exec env overrides
2026-02-13 12:06:47 -06:00
Burak Sormageç
23b1b51568
fix(windows): normalize env entries for spawn
2026-02-13 17:48:04 +01:00
Burak Sormageç
e97aa45428
fix(windows): handle undefined environment variables in runCommandWithTimeout
2026-02-13 17:48:04 +01:00
Burak Sormageç
d7fb01afad
fix(windows): resolve command execution and binary detection issues
2026-02-13 17:48:04 +01:00
Peter Steinberger
9131b22a28
test: migrate suites to e2e coverage layout
2026-02-13 14:28:22 +00:00
0xRain
acb9cbb898
fix(gateway): drain active turns before restart to prevent message loss ( #13931 )
...
* fix(gateway): drain active turns before restart to prevent message loss
On SIGUSR1 restart, the gateway now waits up to 30s for in-flight agent
turns to complete before tearing down the server. This prevents buffered
messages from being dropped when config.patch or update triggers a restart
while agents are mid-turn.
Changes:
- command-queue.ts: add getActiveTaskCount() and waitForActiveTasks()
helpers to track and wait on active lane tasks
- run-loop.ts: on restart signal, drain active tasks before server.close()
with a 30s timeout; extend force-exit timer accordingly
- command-queue.test.ts: update imports for new exports
Fixes #13883
* fix(queue): snapshot active tasks for restart drain
---------
Co-authored-by: Elonito <0xRaini@users.noreply.github.com>
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-02-12 07:55:19 -06:00
Jhin
dc8a63cb8b
fix: skip extension append if command already has one
...
Addresses review feedback - now checks path.extname() before
appending .cmd to avoid producing invalid paths like npm.cmd.cmd
2026-01-31 20:39:33 -06:00
Jhin
5c8880ed3f
fix(process): resolve npm/pnpm spawn ENOENT on Windows
...
On Windows, non-.exe commands like npm, pnpm, yarn, npx require
their .cmd extension when using spawn(). This adds a resolveCommand()
helper that automatically appends .cmd on Windows for these commands.
Fixes #5773
2026-01-31 20:39:33 -06:00
cpojer
f06dd8df06
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.
2026-02-01 10:03:47 +09:00
cpojer
5ceff756e1
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
2026-01-31 16:19:20 +09:00
Peter Steinberger
9a7160786a
refactor: rename to openclaw
2026-01-30 03:16:21 +01:00
Peter Steinberger
c6cdbb630c
fix: harden exec spawn fallback
2026-01-25 06:37:39 +00:00
Peter Steinberger
242add587f
fix: quiet auth probe diagnostics
2026-01-23 19:53:01 +00:00
Peter Steinberger
6ea4cb0012
fix: suppress npm fund prompts
2026-01-21 03:47:50 +00:00
Peter Steinberger
6734f2d71c
fix: wire OTLP logs for diagnostics
2026-01-20 22:51:47 +00:00
Peter Steinberger
d91f0ceeb3
fix: polish matrix e2ee storage ( #1298 ) (thanks @sibbl)
2026-01-20 11:59:36 +00:00
Peter Steinberger
c9e3c14f9c
fix: finalize exec fish fallback ( #1297 ) (thanks @ysqander)
2026-01-20 11:25:49 +00:00
Peter Steinberger
48f733e4b3
refactor: use command lane enum
2026-01-20 10:51:25 +00:00
Peter Steinberger
2d4de656d2
test: avoid global SIGTERM emit in child-process-bridge
2026-01-17 19:20:48 +00:00
Peter Steinberger
79f340a410
chore: prep 2026.1.14 npm release
2026-01-15 07:47:18 +00:00
Peter Steinberger
154b8e3e0e
fix: bridge respawned child signals ( #933 ) (thanks @roshanasingh4)
...
Co-authored-by: Roshan Singh <roshanasingh4@users.noreply.github.com>
2026-01-15 06:37:27 +00:00
Roshan Singh
d9f2ee40f7
Fix entry respawn signal forwarding
...
Fixes #931
2026-01-15 06:33:28 +00:00
Peter Steinberger
c379191f80
chore: migrate to oxlint and oxfmt
...
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00
Peter Steinberger
3061d8e057
fix: preserve Windows cmd start URL quoting ( #794 ) (thanks @roshanasingh4)
2026-01-13 04:26:43 +00:00
Peter Steinberger
4a166cf227
fix: add update env regression test ( #713 ) (thanks @danielz1z)
2026-01-11 10:48:46 +00:00
danielz1z
4570e1db7d
fix(update): merge custom env with process.env in spawn
...
When the update runner passes custom env vars (like CLAWDBOT_UPDATE_IN_PROGRESS),
the current code uses `env ?? process.env` which replaces the entire environment
instead of merging — losing PATH, HOME, etc.
This causes the doctor step to fail with 'node: No such file or directory'.
Fix: merge custom env with process.env instead of replacing it.
2026-01-11 10:39:07 +00:00
Peter Steinberger
24c3ab6fe0
fix: unblock claude-cli live runs
2026-01-11 00:55:22 +00:00
Peter Steinberger
246adaa119
chore: rename project to clawdbot
2026-01-04 14:38:51 +00:00
Peter Steinberger
bb54e60179
fix(logging): decouple file logs from console verbose
2026-01-03 12:32:14 +00:00