Commit Graph

224 Commits

Author SHA1 Message Date
Sally O'Malley
8db6fcca77 fix(gateway/cli): relax local backend self-pairing and harden launchd restarts (#46290)
Signed-off-by: sallyom <somalley@redhat.com>
2026-03-14 14:27:52 -04:00
Josh Avant
f4fef64fc1 Gateway: treat scope-limited probe RPC as degraded reachability (#45622)
* Gateway: treat scope-limited probe RPC as degraded

* Docs: clarify gateway probe degraded scope output

* test: fix CI type regressions in gateway and outbound suites

* Tests: fix Node24 diffs theme loading and Windows assertions

* Tests: fix extension typing after main rebase

* Tests: fix Windows CI regressions after rebase

* Tests: normalize executable path assertions on Windows

* Tests: remove duplicate gateway daemon result alias

* Tests: stabilize Windows approval path assertions

* Tests: fix Discord rate-limit startup fixture typing

* Tests: use Windows-friendly relative exec fixtures

---------

Co-authored-by: Mainframe <mainframe@MainfraacStudio.localdomain>
2026-03-13 23:13:33 -05:00
Peter Steinberger
e794417623 fix: resolve current ci regressions 2026-03-14 00:51:12 +00:00
Peter Steinberger
5f87b1eba5 test: share schtasks gateway script fixture 2026-03-14 00:30:14 +00:00
Peter Steinberger
49cbcea429 refactor: share daemon launchd and path helpers 2026-03-14 00:30:14 +00:00
Peter Steinberger
c90b10b02f test: share daemon cli service helpers 2026-03-14 00:30:14 +00:00
Peter Steinberger
e91a5c72de test: share scheduled task stop helpers 2026-03-14 00:30:14 +00:00
Peter Steinberger
4fe59edd84 test: share systemd service test helpers 2026-03-14 00:30:14 +00:00
Val Alexander
158d970e2b [codex] Polish sidebar status, agent skills, and chat rendering (#45451)
* style: update chat layout and spacing for improved UI consistency

- Adjusted margin and padding for .chat-thread and .content--chat to enhance layout.
- Consolidated CSS selectors for better readability and maintainability.
- Introduced new test for log parsing functionality to ensure accurate message extraction.

* UI: polish agent skills, chat images, and sidebar status

* test: stabilize vitest helper export types

* UI: address review feedback on agents refresh and chat styles

* test: update outbound gateway client fixture values

* test: narrow shared ip fixtures to IPv4
2026-03-13 16:53:40 -05:00
Peter Steinberger
67f7d1e65f test: dedupe slack message event tests 2026-03-13 21:40:53 +00:00
Peter Steinberger
b84c7037de fix: repair ci audit and type drift 2026-03-13 21:02:19 +00:00
Peter Steinberger
7d69579634 refactor: share windows daemon test fixtures 2026-03-13 20:19:39 +00:00
Peter Steinberger
ea82458290 refactor: share launchd bootstrap assertions 2026-03-13 20:19:39 +00:00
Peter Steinberger
cba07a400a refactor: share launchd bootstrap ordering assertions 2026-03-13 20:19:39 +00:00
Peter Steinberger
60d308cff0 test: fix CI type regressions 2026-03-13 19:53:40 +00:00
Peter Steinberger
5189ba851c fix: stop windows startup fallback gateways 2026-03-13 19:10:57 +00:00
Peter Steinberger
6cb8729952 fix: harden windows gateway stop cleanup 2026-03-13 18:47:35 +00:00
Peter Steinberger
5ea03efe92 fix: harden windows gateway lifecycle 2026-03-13 18:33:59 +00:00
Peter Steinberger
80e7da92ce fix: stabilize macos daemon onboarding 2026-03-13 13:47:09 +00:00
Peter Steinberger
a0f09a4589 test: fix windows startup fallback mock typing 2026-03-13 05:00:55 +00:00
Peter Steinberger
32d8ec9482 fix: harden windows gateway fallback launch 2026-03-13 04:58:35 +00:00
Peter Steinberger
f803215474 fix(ci): restore full gate 2026-03-13 03:34:47 +00:00
Peter Steinberger
433e65711f fix: fall back to a startup entry for windows gateway install 2026-03-13 03:18:17 +00:00
Altay
b0f717aa02 build: align Node 22 guidance with 22.16 minimum 2026-03-12 20:07:44 +05:30
Altay
0a8d2b6200 build: raise Node 22 compatibility floor to 22.16 2026-03-12 20:07:44 +05:30
Peter Steinberger
b31836317a fix(cli): handle scheduled gateway restarts consistently 2026-03-12 01:38:39 +00:00
Robin Waslander
841ee24340 fix(daemon): address clanker review findings for kickstart restart
Bug 1 (high): replace fixed sleep 1 with caller-PID polling in both
kickstart and start-after-exit handoff modes. The helper now waits until
kill -0 $caller_pid fails before issuing launchctl kickstart -k.

Bug 2 (medium): gate enable+bootstrap fallback on isLaunchctlNotLoaded().
Only attempt re-registration when kickstart -k fails because the job is
absent; all other kickstart failures now re-throw the original error.

Follows up on 3c0fd3dffe.
Fixes #43311, #43406, #43035, #43049
2026-03-12 02:16:24 +01:00
Robin Waslander
3c0fd3dffe fix(daemon): replace bootout with kickstart -k for launchd restarts on macOS
On macOS, launchctl bootout permanently unloads the LaunchAgent plist.
Even with KeepAlive: true, launchd cannot respawn a service whose plist
has been removed from its registry. This left users with a dead gateway
requiring manual 'openclaw gateway install' to recover.

Affected trigger paths:
- openclaw gateway restart from an agent session (#43311)
- SIGTERM on config reload (#43406)
- Gateway self-restart via SIGTERM (#43035)
- Hot reload on channel config change (#43049)

Switch restartLaunchAgent() to launchctl kickstart -k, which force-kills
and restarts the service without unloading the plist. When the restart
originates from inside the launchd-managed process tree, delegate to a
new detached handoff helper (launchd-restart-handoff.ts) to avoid the
caller being killed mid-command. Self-restart paths in process-respawn.ts
now schedule the detached start-after-exit handoff before exiting instead
of relying on exit/KeepAlive timing.

Fixes #43311, #43406, #43035, #43049
2026-03-12 01:16:49 +01:00
Peter Steinberger
6c579d7842 fix: stabilize launchd paths and appcast secret scan 2026-03-09 08:37:37 +00:00
Peter Steinberger
ce9e91fdfc fix(launchd): harden macOS launchagent install permissions 2026-03-09 08:14:46 +00:00
scoootscooob
44beb7be1f fix(daemon): also enable LaunchAgent in repairLaunchAgentBootstrap
The repair/recovery path had the same missing `enable` guard as
`restartLaunchAgent`.  If launchd persists a "disabled" state after a
previous `bootout`, the `bootstrap` call in `repairLaunchAgentBootstrap`
fails silently, leaving the gateway unloaded in the recovery flow.

Add the same `enable` guard before `bootstrap` that was already applied
to `installLaunchAgent` and (in this PR) `restartLaunchAgent`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 05:36:27 +00:00
scoootscooob
69cd376e3b fix(daemon): enable LaunchAgent before bootstrap on restart
restartLaunchAgent was missing the launchctl enable call that
installLaunchAgent already performs. launchd can persist a "disabled"
state after bootout, causing bootstrap to silently fail and leaving the
gateway unloaded until a manual reinstall.

Fixes #39211

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 05:36:27 +00:00
Peter Steinberger
f72114173c fix(ci): resolve type regressions on main 2026-03-08 03:11:24 +00:00
Peter Steinberger
bd413263b2 refactor: register gateway service adapters 2026-03-08 03:02:25 +00:00
Peter Steinberger
2646739d23 refactor: centralize strict numeric parsing 2026-03-08 03:02:25 +00:00
Peter Steinberger
7f44bc5e94 fix: reject launchd pid sentinel values
Landed from contributor PR #39281 by @mvanhorn.

Co-authored-by: Matt Van Horn <mvanhorn@gmail.com>
2026-03-08 02:44:02 +00:00
Vincent Koc
556a74d259 Daemon: handle degraded systemd status checks (#39325)
* Daemon: handle degraded systemd status checks

* Changelog: note systemd status handling

* Update src/commands/status.service-summary.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-07 17:30:48 -08:00
Peter Steinberger
08597e817d fix(ci): stabilize detect-secrets baseline 2026-03-08 01:25:15 +00:00
Peter Steinberger
a2cb80b9c4 fix(daemon): preserve envfile auth provenance 2026-03-08 01:13:28 +00:00
Vincent Koc
0d66834f94 Daemon: scope relaxed systemd probes to install flows 2026-03-07 16:45:18 -08:00
Vincent Koc
60441c8ced Systemd: allowlist environment file fixtures 2026-03-07 16:43:21 -08:00
Vincent Koc
a56841b98c Daemon: harden WSL2 systemctl install checks (#39294)
* Daemon: harden WSL2 systemctl install checks

* Changelog: note WSL2 daemon install hardening

* Daemon: tighten systemctl failure classification
2026-03-07 16:43:19 -08:00
Josh Avant
25252ab5ab gateway: harden shared auth resolution across systemd, discord, and node host 2026-03-07 18:28:32 -06:00
Peter Steinberger
265367d99b fix(gateway): land #28428 from @l0cka
Landed from contributor PR #28428 by @l0cka.

Co-authored-by: Daniel Alkurdi <danielalkurdi@gmail.com>
2026-03-07 22:51:08 +00:00
Peter Steinberger
c934dd51c0 fix(daemon): normalize schtasks runtime from numeric result only (#39153, thanks @scoootscooob)
Co-authored-by: scoootscooob <zhentongfan@gmail.com>
2026-03-07 22:06:20 +00:00
Peter Steinberger
4dcd930923 fix(test): strip windows drive prefix from darwin hints 2026-03-07 21:46:34 +00:00
Peter Steinberger
eb616b709f fix(test): normalize darwin runtime hint paths 2026-03-07 21:40:52 +00:00
Peter Steinberger
cc7e61612a fix(gateway): harden service-mode stale process cleanup (#38463, thanks @spirittechie)
Co-authored-by: Jesse Paul <drzin69@gmail.com>
2026-03-07 21:36:24 +00:00
Peter Steinberger
b9dd6e99b6 fix(daemon): avoid freezing Windows PATH in task scripts (#39139, thanks @Narcooo)
Co-authored-by: majx_mac <mjxnarco@pku.edu.cn>
2026-03-07 21:15:01 +00:00
Peter Steinberger
b955ba1688 refactor: consolidate daemon runtime and start hints 2026-03-07 21:09:26 +00:00