Commit Graph

31962 Commits

Author SHA1 Message Date
Vincent Koc
420b1da82f test(plugins): trim tts summarization contract boot 2026-04-17 14:25:21 -07:00
Vincent Koc
afdbf48914 test(plugins): fast-path bundled setup web providers 2026-04-17 14:25:21 -07:00
Vincent Koc
c0b8250f4f test(plugins): trim contract registry runtime fanout 2026-04-17 14:25:21 -07:00
Vincent Koc
d89cee8787 test(plugins): avoid runtime loads for id-only registry checks 2026-04-17 14:25:21 -07:00
Vincent Koc
815e2fc529 test(plugins): trim tts contract mock startup 2026-04-17 14:25:21 -07:00
Vincent Koc
18b45e63f2 test(plugins): speed up tts contract helper boot 2026-04-17 14:25:21 -07:00
Vincent Koc
855c7cf989 test(plugins): keep loader contracts inventory-backed 2026-04-17 14:25:21 -07:00
Vincent Koc
78f0fb660c test(plugins): avoid per-test discovery reloads 2026-04-17 14:25:21 -07:00
Vincent Koc
30895f7135 fix(auth): restore cli bootstrap split on rebase 2026-04-17 14:19:45 -07:00
Vincent Koc
76812401ca test(auth): align cli overlay coverage after rebase 2026-04-17 14:14:03 -07:00
Vincent Koc
5edf876a5e test(auth): add codex oauth red-blue coverage 2026-04-17 14:14:03 -07:00
Vincent Koc
1e7c7dd02f refactor(auth): polish external oauth bootstrap flow 2026-04-17 14:11:41 -07:00
Vincent Koc
f61712437f refactor(auth): tighten external oauth bootstrap policy 2026-04-17 14:05:26 -07:00
Agustin Rivera
99ef3a63c5 fix(gateway): require read scope for assistant media (#68175)
* fix(gateway): enforce assistant media scopes

* changelog: require read scope for assistant media (#68175)

* skip scope enforcement for auth.mode=none

Exclude method "none" from the identity-bearing scope gate so
gateway.auth.mode=none deployments are not regressed by the new
operator.read check.

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-17 15:03:53 -06:00
Peter Steinberger
af0f7e1bc7 test: type runtime auth overlay mock 2026-04-17 21:56:25 +01:00
Peter Steinberger
8742e8fae3 test: stub channel migration setup surfaces 2026-04-17 21:53:25 +01:00
Peter Steinberger
8dde0acbae test: trim agent test hot spots 2026-04-17 21:53:08 +01:00
Vincent Koc
ff55cd5c16 refactor(auth): drop legacy external cli oauth sync path 2026-04-17 13:52:37 -07:00
Devin Robison
0e7a992d3f fix(agents): filter bundled tools through final policy (#68195)
* fix(agents): filter bundled tools through final policy

* changelog: filter bundled tools through final policy (#68195)

* forward agentId into compaction tool-policy filter

Pass effectiveSkillAgentId to applyFinalEffectiveToolPolicy in the
compaction path so per-agent tool policies apply to bundled tools
during compaction the same way they do during normal runs.

* scope final tool-policy filter to bundled tools only

Running the full tool-policy pipeline on the merged core + bundled tool list
re-filters core tools whose plugin WeakMap metadata no longer survives the
normalize/hook wrappers applied by createOpenClawCodingTools(). Narrow the
helper to only the newly-appended bundled MCP/LSP tools so plugin-provided
core tools keep matching group:plugins and plugin-id allowlist entries.

* harden authorization signals on final tool policy

- message.action gateway handler now server-derives senderIsOwner from the
  authenticated gateway client scopes (ADMIN_SCOPE on client.connect.scopes)
  and ignores any senderIsOwner value on the wire, so a non-admin scoped
  caller cannot spoof owner status to unlock owner-only channel actions or
  owner-only tool policy. Schema keeps the field optional for wire compat
  but documents that it is ignored.

- applyFinalEffectiveToolPolicy now cross-checks caller-provided groupId
  against the session-derived group context resolved from sessionKey (and
  spawnedBy). When they disagree, the caller groupId plus its adjacent
  groupChannel/groupSpace are dropped and a warn is emitted, so a caller
  that fabricates a different group id cannot reach a more permissive
  group-scoped tool policy during the final bundled-tool filter. Added a
  JSDoc trust invariant on the helper input describing the required
  server-verified identity contract.

* align compact agentId resolution with core tools

Drop the explicit agentId on applyFinalEffectiveToolPolicy during
compaction. The core tool set produced just above via
createOpenClawCodingTools(...) also omits agentId, so resolveEffectiveToolPolicy
falls back to resolveAgentIdFromSessionKey(sessionKey) in both places.
Passing effectiveSkillAgentId only to the final filter made the two
policy lookups diverge on legacy/non-agent session keys where the
sessionKey path resolves to main but effectiveSkillAgentId follows the
configured default-agent path, which could deny or allow bundled tools
under a different per-agent policy than the already-created core tools.

* tighten trusted propagation for owner and group signals

- message.action gateway handler: full-operator callers (shared-secret
  bearer or operator.admin scope) now propagate the request-provided
  senderIsOwner through to channel action handlers instead of having it
  hard-coded off. Previously the hardened path force-derived ownership
  from ADMIN_SCOPE alone, which broke owner-gated actions when the
  trusted runtime forwards them via the least-privilege gateway path
  (callGatewayLeastPrivilege requests only the method scope, so even
  legitimate owner senders were downgraded to senderIsOwner=false).
  Narrowly-scoped callers (e.g. operator.write-only) still have the wire
  value forced to false so a non-admin caller cannot assert ownership.

- applyFinalEffectiveToolPolicy: fail-closed when the session key and
  spawnedBy encode no group context. Previously the helper only dropped
  a caller-provided groupId that conflicted with a non-empty set of
  session-derived group ids, which left an accept-caller fallback open
  when the session had no group context at all (direct/cron/subagent
  session keys). An attacker who could run without a group-bound session
  could then supply an arbitrary groupId and reach a more permissive
  group-scoped tool policy. Now: no session-derived group context plus
  any caller-provided groupId drops the caller value and warns.

* suppress unavailable-core-tool warnings in bundled-only pass

applyToolPolicyPipeline infers its coreToolNames reference set from the
tools array it is filtering. The bundled-only second pass only sees the
MCP/LSP subset, so normal core allowlist entries (for example
tools.allow: ['read', 'exec']) would look "unknown" during this pass
and emit misleading warnings even when the config is valid for the full
effective tool set — polluting logs and potentially evicting real
diagnostics from the shared warning cache. Set
suppressUnavailableCoreToolWarning on every step of this pass so known
core-tool allowlist entries stay silent; genuinely unknown entries
still surface through the otherEntries warning path.
2026-04-17 14:45:12 -06:00
Gustavo Madeira Santana
77e588ebc3 test: avoid bundled session normalizer fallback
Keep explicit session-key normalization on loaded channel plugins so
unknown provider contexts pass through without cold-loading bundled channel
runtimes. This preserves active plugin behavior and removes the slow
unknown-provider test path.
2026-04-17 16:41:46 -04:00
Gustavo Madeira Santana
5ae059db16 test: speed legacy state migration discovery
Keep bundled legacy migration discovery on narrow setup-entry surfaces so
state-migration tests and doctor cold paths avoid unrelated channel runtime
loads. Add targeted setup feature metadata, narrow Telegram/WhatsApp legacy
contracts, and a path-only pairing SDK helper.
2026-04-17 16:41:43 -04:00
Vincent Koc
a8a701291b refactor(auth): drop persisted external oauth ownership metadata 2026-04-17 13:28:54 -07:00
Vincent Koc
2c7c06c9b3 docs(changelog): note runtime-only external oauth import 2026-04-17 13:28:54 -07:00
Altay
d0cf6731aa fix(failover): classify INTERNAL 500 responses as retryable timeouts (#68238)
* Agents: treat Google INTERNAL 500 as timeout failover

(cherry picked from commit c2538523a22d39b65c6b4056ab4857ee84f06887)

* test(failover): narrow INTERNAL timeout patterns

* fix: document INTERNAL timeout retry guard

* fix: ignore plain status prose in server error classification

* fix(failover): preserve mixed server-error retry signals

* test(failover): dedupe internal status samples

* fix(failover): retry status prose with code 500

* fix: classify INTERNAL 500 responses as retryable timeouts

* fix: classify INTERNAL 500 responses as retryable timeouts

---------

Co-authored-by: Kosbling <github@kosbling.com>
Co-authored-by: Openbling <github@openbling.ai>
2026-04-17 23:24:26 +03:00
Vincent Koc
a001b5343f refactor(auth): make external cli oauth runtime-only 2026-04-17 13:14:17 -07:00
Gustavo Madeira Santana
50e71daaa0 test: keep inbound group policy tests hermetic 2026-04-17 15:50:41 -04:00
Gustavo Madeira Santana
8b76bcba90 test: avoid real Telegram config writes in retry tests 2026-04-17 15:50:41 -04:00
Gustavo Madeira Santana
c550642cde test: keep command registry native overrides hermetic 2026-04-17 15:50:39 -04:00
Peter Steinberger
fde25bfb8c test: isolate browser facade cache tests 2026-04-17 20:35:23 +01:00
Peter Steinberger
08e1eb7a9f test: narrow system run dispatch matrix 2026-04-17 20:27:52 +01:00
Peter Steinberger
c408bbe9c9 perf: cache browser plugin sdk facades 2026-04-17 20:26:14 +01:00
Peter Steinberger
809f42eeea test: trim UI and entry test overhead 2026-04-17 20:23:07 +01:00
Peter Steinberger
087f1584df test: streamline system run hotspot coverage 2026-04-17 20:18:01 +01:00
bwjoke
f7422e1fbc fix(failover): detect bare leading 402 assistant errors (#47579)
Merged via squash.

Prepared head SHA: ff336a0d97
Co-authored-by: bwjoke <1284814+bwjoke@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-17 22:06:55 +03:00
Peter Steinberger
169b68d709 test: narrow chat avatar fallback 2026-04-17 20:04:30 +01:00
Peter Steinberger
014eaa8492 test: merge env rejection invoke cases 2026-04-17 20:03:35 +01:00
Peter Steinberger
e9d052d728 test: merge shell payload plan checks 2026-04-17 20:01:58 +01:00
Peter Steinberger
f897025d9b test: narrow chat attachment rendering 2026-04-17 20:00:46 +01:00
Peter Steinberger
5f075d3d49 test: reuse session file fixture root 2026-04-17 19:57:19 +01:00
Gustavo Madeira Santana
8747351383 Media: keep inbound roots on media contracts 2026-04-17 14:56:47 -04:00
Peter Steinberger
bb5d9948c2 test: mock side result markdown 2026-04-17 19:56:17 +01:00
Peter Steinberger
be6dbd4084 test: mock chat sidebar markdown 2026-04-17 19:55:39 +01:00
Peter Steinberger
bbbb57f7f8 test: source install version helper only 2026-04-17 19:52:33 +01:00
Peter Steinberger
4dd999274b test: merge chat helper render tests 2026-04-17 19:51:43 +01:00
Peter Steinberger
7c862da6a1 test: split chat helper coverage 2026-04-17 19:50:39 +01:00
Peter Steinberger
125b1e0e20 test: reuse node-host runtime bins 2026-04-17 19:47:43 +01:00
Peter Steinberger
55c7776364 test: simplify acp and install test seams 2026-04-17 19:46:40 +01:00
Peter Steinberger
16e7f04a43 test: avoid login shell in install version test 2026-04-17 19:45:51 +01:00
Peter Steinberger
2e2f927d5d test: mock proxy capture store 2026-04-17 19:45:06 +01:00
Peter Steinberger
0a38098248 test: mock tts facade explicitly 2026-04-17 19:44:02 +01:00