Commit Graph

314 Commits

Author SHA1 Message Date
Val Alexander
fa79e9754e fix(gateway): harden macOS update restart lifecycle
Summary:
- Clear stale SIGUSR1 restart state before rejected or externally allowed restart handling can leave an in-flight token stuck.
- Verify the live gateway version after macOS package-update service refreshes and skip redundant restarts when the refreshed LaunchAgent already serves the expected version.
- Set generated LaunchAgents to a 10s throttle plus 20s shutdown window and widen gateway bind retries around supervisor-owned restarts.

Fixes #79577. Refs #78699 and #60885.

Verification:
- pnpm test src/cli/gateway-cli/run-loop.test.ts src/infra/infra-runtime.test.ts
- pnpm test src/cli/update-cli.test.ts src/daemon/launchd.test.ts src/gateway/server/http-listen.test.ts
- pnpm exec oxfmt --check --threads=1 src/cli/gateway-cli/run-loop.ts src/cli/gateway-cli/run-loop.test.ts
- pnpm check:changed
- Crabbox/Blacksmith wrapper smoke passed focused tests plus pnpm check:changed: https://github.com/openclaw/openclaw/actions/runs/25595985603
- PR CI was green before upstream main advanced; the latest rebased heads hit unrelated broad lint failures also reproduced on current main CI (for example https://github.com/openclaw/openclaw/actions/runs/25598671666). No failing lint diagnostics referenced this gateway/update diff.
2026-05-09 05:21:17 -05:00
Ruben Cuevas
105c1ec8c8 fix(gateway): avoid false event-loop health degradation 2026-05-09 02:39:03 -04:00
Shakker
0924eb0731 test: tighten gateway array assertions 2026-05-09 05:54:12 +01:00
Josh Avant
3391c5b050 fix(gateway): preserve trusted-proxy Control UI scopes (#79643)
* fix(gateway): preserve trusted proxy control ui scopes

* docs: add trusted proxy control ui changelog
2026-05-08 23:15:19 -05:00
sallyom
eebbe41da2 fix(gateway): allow no-auth backend self-pairing
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-08 01:42:46 -04:00
Ava Daigo
f29efde73a fix(gateway): scoped no-auth local backend bypass (#75781)
When gateway.auth.mode is 'none', the local backend self-pairing skip was
gated on sharedAuthOk, which stays false for no-auth mode. The missing-device
handler still rejected with 1008: device identity required.

Fix: shouldSkipLocalBackendSelfPairing now bypasses sharedAuthOk entirely
when authMethod is 'none' and the connection is local (direct_local or
shared_secret_loopback_local) without browser origin. Remote and
browser-originated connections still require proper device auth.

ClawSweeper P1: Make the none-auth backend bypass reachable
ClawSweeper P2: Test the reachable none-auth connect state

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-08 01:42:46 -04:00
samzong
1819e41d26 fix(gateway): preserve node reconnect state (#78351)
Preserve node registry ownership across same-node WebSocket reconnect races so stale old-socket closes cannot clear the replacement session or complete the wrong pending invoke.

Thanks @samzong.
2026-05-08 12:32:18 +08:00
Peter Steinberger
9ef37d1907 test: tighten assertions and harness coverage 2026-05-08 05:28:12 +01:00
Vincent Koc
c97998ce21 chore(channels): remove bluebubbles bundled surface 2026-05-07 12:52:48 -07:00
Peter Steinberger
8b701ce1c7 fix: repair ci regressions 2026-05-07 11:46:21 +01:00
Vincent Koc
1831e124b2 fix(lint): clean up main lint regressions 2026-05-07 01:39:46 -07:00
Peter Steinberger
bece8dcbb8 fix: harden generated surface pruning 2026-05-07 09:07:18 +01:00
Peter Steinberger
330ba1fa31 refactor: move canvas to plugin surfaces 2026-05-07 09:07:18 +01:00
Kevin Lin
5b9672b4bb fix: surface cron model rejection diagnostics
Fixes #78597
2026-05-06 23:28:02 -07:00
Shakker
7af1a87830 fix: stabilize event loop health samples 2026-05-06 00:36:33 +01:00
Pavan Kumar Gondhi
0e702f1063 fix(gateway): clamp unbound websocket auth scopes [AI] (#77413)
* fix: clamp unapproved trusted proxy websocket scopes

* addressing claude review

* addressing claude review

* addressing ci

* addressing ci

* docs: add changelog entry for PR merge
2026-05-04 23:16:07 +05:30
Vincent Koc
be21d64d08 fix(gateway): preserve canvas tls urls 2026-05-04 01:12:51 -07:00
Peter Steinberger
72072d8b2e perf(gateway): lazy load ws and aux handlers 2026-05-03 15:52:57 +01:00
Josh Avant
ba31afb099 fix(discord): surface stalled transport health (#76327)
* fix(discord): surface stalled transport health

* fix(discord): surface stalled transport health

* fix(discord): surface stalled transport health

---------

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-02 22:33:19 -05:00
Val Alexander
4532e5d858 fix(control-ui): preserve Stop after reconnect
Fixes #70991.

Adds authenticated Gateway WebSocket protocol pings, exposes active session-run state to Control UI, and keeps session-scoped Stop available after reconnect or reload when the browser lost the local run id.

Validation:
- pnpm test ui/src/ui/app-chat.test.ts ui/src/ui/app-gateway.node.test.ts src/gateway/server.sessions.list-changed.test.ts src/gateway/server/ws-connection.test.ts
- OPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm check:changed
- GitHub CI and high-signal security checks passed on head 1f4c8728c8
2026-05-02 10:41:27 -05: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
d678bcfcc7 fix: hot reload plugin management changes (#75976)
Summary:
- The PR changes Gateway reload planning, CLI plugin install-index writes, plugin runtime/cache cleanup, docs, changelog, and tests so plugin enable/disable hot reloads while install/update/uninstall stay restart-backed.
- Reproducibility: yes. The earlier blocker has a source-level reproduction: run an external plugin install/up ...  watches config and only the managed plugin index changes; the PR now tests that path and queues a restart.

ClawSweeper fixups:
- Included follow-up commit: fix: hot reload plugin management changes
- Included follow-up commit: fix(clawsweeper): address review for automerge-openclaw-openclaw-7597…
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 860594f722.
- Required merge gates passed before the squash merge.

Prepared head SHA: 860594f722
Review: https://github.com/openclaw/openclaw/pull/75976#issuecomment-4363168379

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-02 13:19:24 +00:00
Peter Steinberger
81e0fc3d99 refactor: hide gateway helper internals 2026-05-02 06:58:49 +01:00
Peter Steinberger
ed8f50f240 refactor: simplify plugin dependency handling
Simplify plugin installation and runtime loading around package-manager-owned dependencies, with Jiti reserved for local/TS fallback paths.

Also scans npm plugin install roots so hoisted transitive dependencies are covered by dependency denylist and node_modules symlink checks.
2026-05-01 21:32:22 +01:00
Peter Steinberger
250376f885 fix: simplify bundled runtime dependency repair (#75183)
Summary:
- Merged fix: simplify bundled runtime dependency repair after ClawSweeper review.

ClawSweeper fixups:
- Included follow-up commit: fix: verify cached bundled runtime roots
- Included follow-up commit: refactor: simplify plugin runtime startup paths
- Included follow-up commit: refactor: trim plugin startup policy helpers
- Included follow-up commit: refactor: trust package manager runtime deps materialization
- Included follow-up commit: fix: narrow channel runtime deps skip policy
- Included follow-up commit: refactor: defer startup plugin runtime deps
- Ran the ClawSweeper repair loop before final review.

Validation:
- ClawSweeper review passed for head 04dc566534.
- Required merge gates passed before the squash merge.

Prepared head SHA: 04dc566534
Review: https://github.com/openclaw/openclaw/pull/75183#issuecomment-4358383786

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Shakker <shakkerdroid@gmail.com>
Co-authored-by: clawsweeper-repair <clawsweeper-repair@users.noreply.github.com>
2026-05-01 07:49:02 +00:00
openclaw-clownfish[bot]
2f31184d07 fix(hooks): repair shared-hook announcement policy (#73800)
* fix(hooks): repair shared-hook announcement policy

* fix(hooks): audit suppressed hook successes

---------

Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-29 05:28:16 -07:00
Peter Steinberger
8d58ad4c15 fix(gateway): retry startup handshakes before surfacing failures 2026-04-29 10:25:53 +01:00
Peter Steinberger
bcc6a2400d fix(gateway): make handshake timeout configurable 2026-04-28 23:50:24 +01:00
Peter Steinberger
4a24b23e3e fix(ci): stabilize full release validation 2026-04-28 20:14:14 +01:00
Vincent Koc
75ba8398f9 fix(gateway): expose event loop health in readiness 2026-04-28 03:56:58 -07:00
Vincent Koc
6f38425e5c security(gateway): route hook completion events to target agent session (#73228) 2026-04-27 20:53:52 -07:00
Peter Steinberger
1f256306c9 test: align gateway tests with config io split 2026-04-27 21:02:26 +01:00
Peter Steinberger
161b722303 test(gateway): mock split config modules 2026-04-27 20:54:23 +01:00
Vincent Koc
1497425b8d fix(gateway): trim startup config imports 2026-04-27 11:34:24 -07:00
Vincent Koc
be6263da4f fix(gateway): preserve runtime-backed health state (#72417)
* fix(gateway): preserve runtime-backed health state

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

* fix(gateway): harden health snapshot exposure
2026-04-27 11:04:59 -07:00
Peter Steinberger
4bd356d03a fix(channels): clarify message target syntax 2026-04-27 13:18:04 +01:00
Peter Steinberger
b6c8e51dcb fix(gateway): build hello snapshot after presence update 2026-04-27 13:09:30 +01:00
Peter Steinberger
3517b25482 fix: remove duplicate hello snapshot build 2026-04-27 13:09:16 +01:00
Peter Steinberger
e91f9a3f67 fix: include connected client in hello snapshot 2026-04-27 13:07:45 +01:00
Peter Steinberger
fef4b57b39 fix(gateway): include connected client in hello snapshot 2026-04-27 13:06:30 +01:00
Peter Steinberger
047c03cc88 fix(gateway): drop stale webchat handshakes 2026-04-27 12:51:17 +01:00
Peter Steinberger
7f3f108521 refactor(config): migrate plugin config access 2026-04-27 12:35:58 +01:00
Vincent Koc
a494eea6d4 fix(gateway): defer hook request handler imports 2026-04-27 01:26:38 -07:00
Vincent Koc
3200378ab4 fix(gateway): defer hook agent runner imports 2026-04-27 00:26:55 -07:00
Vincent Koc
b02cca4e00 fix(gateway): trim startup imports 2026-04-26 22:48:31 -07:00
Vincent Koc
dc8b881c11 fix(gateway): defer startup runtime imports 2026-04-26 21:50:50 -07:00
Vincent Koc
3ae6f01d61 feat(logging): propagate request trace scopes 2026-04-26 14:13:14 -07:00
Peter Steinberger
e29d3516bf fix(gateway): skip Tailscale Control UI pairing 2026-04-26 09:42:25 +01:00
Peter Steinberger
164aaa48db style: format gateway imports 2026-04-26 09:00:33 +01:00
Longbiao CHEN
e74c079b22 fix(gateway): remove duplicate ws client import 2026-04-26 06:19:35 +01:00