Commit Graph

5767 Commits

Author SHA1 Message Date
Peter Steinberger
fa2f53993a test: trim skills and bundle mcp overhead 2026-04-18 17:42:02 +01:00
Peter Steinberger
53239102f8 test: speed up agent model auth tests 2026-04-18 17:42:02 +01:00
Vincent Koc
6f9cebf1ca test(agents): relax exec wake payload assertions 2026-04-18 08:44:12 -07:00
Vincent Koc
791dbf4f9d fix(openrouter): heal stale provider base urls (#68574)
* fix(openrouter): heal stale provider base urls

* chore(changelog): fix openrouter baseurl entry placement

* fix(arcee): keep catalog config optional
2026-04-18 08:42:51 -07:00
Vincent Koc
d13869aab9 fix(models): resolve openrouter compat aliases (#68579)
* fix(models): resolve openrouter compat aliases

* fix(models): cover openrouter free interactive alias

* fix(models): mirror openrouter compat aliases in runtime resolver

* fix(models): align openrouter free allowlist aliases
2026-04-18 08:24:34 -07:00
Peter Steinberger
464cbbc9f9 perf: trim plugin and skills test overhead 2026-04-18 16:23:00 +01:00
Peter Steinberger
aa73df571d perf: narrow auth test mocks 2026-04-18 16:23:00 +01:00
Peter Steinberger
4852935e8e perf: speed exec event test waits 2026-04-18 16:23:00 +01:00
Vincent Koc
68502c90d1 fix(openrouter): parse visible reasoning_details output (#68577)
* fix(openrouter): parse visible reasoning_details output

* fix(openrouter): preserve reasoning_details ordering

* fix(openrouter): harden reasoning details compat

* fix(openrouter): queue post-tool-call reasoning text

* chore(config): refresh generated schema baselines

* fix(openrouter): keep fallback reasoning with visible details

* fix(openrouter): bound streaming tool-call buffers
2026-04-18 08:18:13 -07:00
Peter Steinberger
66385670e4 refactor: reduce unnecessary dynamic imports 2026-04-18 16:15:33 +01:00
Frank Yang
442deb0816 fix(cli): normalize reply-media paths for agent --deliver (#68516) 2026-04-18 20:05:41 +08:00
junyuc25
ef3f9796c8 fix(failover): widen raw 402 detection for third-party proxy messages (#45827)
Merged via squash.

Prepared head SHA: 5f4b5d7283
Co-authored-by: junyuc25 <10862251+junyuc25@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-18 12:38:04 +03:00
Val Alexander
f45bc09206 [codex] fix(auth): harden OAuth refresh and Codex CLI bootstrap flows (#68396)
* Harden OAuth refresh and Codex CLI bootstrap flows

- Treat near-expiry OAuth credentials as unusable for bootstrap and refresh
- Add clearer timeout and callback validation handling for OpenAI Codex OAuth
- Tighten file lock retry behavior for stale OAuth refresh contention

* fix(auth): address PR review threads

* fix(auth): adopt fresher imported refresh tokens

* test(auth): align oauth expiry fixtures with refresh margin

* fix(auth): tighten Codex OAuth bootstrap and local fallback

* Keep explicit local auth over CLI bootstrap

- Preserve existing non-OAuth local profiles during external CLI OAuth sync
- Add regression coverage for OpenAI Codex and generic external OAuth overlays

* fix(auth): distinguish oauth lock timeout sources

* fix(auth): reject cross-account external oauth bootstrap

* fix(auth): narrow refresh contention classification
2026-04-18 01:02:29 -05:00
Onur
361750775d CI: stabilize live release lanes (#67838)
* CI: stabilize live release lanes

* CI: widen codex live exclusions

* Gateway: stop live config/auth lazy re-imports

* CI: mount writable live Docker homes

* Live: tighten retry and provider filter overrides

* CI: use API-key auth for codex live lanes

* CI: fix remaining live lanes

* CI: stop forwarding live OpenAI base URLs

* Gateway: fix live startup loader regression

* CI: stop expanding OpenAI keys in live Docker lanes

* CI: stop expanding installer secrets in Docker

* CI: tighten live secret boundaries

* Gateway: pin Codex harness base URL

* CI: fix reusable workflow runner label

* CI: avoid template expansion in live ref guard

* CI: tighten live trust gate

* Gateway: ignore empty Codex harness base URL

* CI: stabilize remaining live lanes

* CI: harden live retries and canvas auth test

* CI: extend cron live probe budget

* CI: keep codex harness lane on api-key auth

* CI: stage live Docker OpenAI auth via env files

* CI: bootstrap codex login for Docker API-key lanes

* CI: accept hosted-runner codex fallback responses

* CI: accept additional codex sandbox fallback text

* CI: accept hosted-runner live fallback variants

* CI: accept codex current-model fallback

* CI: broaden codex sandbox model fallbacks

* CI: cover extra codex sandbox wording

* CI: extend cli backend cron retry budget

* CI: match codex models fallbacks by predicate

* CI: accept configured-models live fallback

* CI: relax OpenAI websocket warmup timeout

* CI: accept extra codex model fallback wording

* CI: generalize codex model fallback matching

* CI: retry cron verify cancellation wording

* CI: accept interactive codex model entrypoint fallback

* Agents: stabilize Claude bundle skill command test

* CI: prestage live Docker auth homes

* Tests: accept current Codex models wording

* CI: stabilize remaining live lanes

* Tests: widen CLI backend live timeout

* Tests: accept current Codex model summary wording

* CI: disable codex-cli image probe in Docker lane

* Tests: respect CLI override for Codex Docker login

* Tests: accept current Codex session models header

* CI: stabilize remaining live validation lanes

* CI: preserve Gemini ACP coverage in auth fallback

* CI: fix final live validation blockers

* CI: restore Codex auth for CLI backend lane

* CI: drop local Codex config in live Docker lane

* Tests: tolerate Codex cron and model reply drift

* Tests: accept current Codex live replies

* Tests: retry more Codex cron retry wording

* Tests: accept environment-cancelled Codex cron retries

* Tests: retry blank Codex cron probe replies

* Tests: broaden Codex cron retry wording

* Tests: require explicit Codex cron retry replies

* Tests: accept current Codex models environment wording

* CI: restore trusted Codex config in live lane

* CI: bypass nested Codex sandbox in docker

* CI: instrument live codex cron lane

* CI: forward live CLI resume args

* Tests: accept interactive Codex model selection

* Tests: bound websocket warm-up live lane

* CI: close live lane review gaps

* Tests: lazy-load gateway live server

* Tests: avoid gateway live loader regression

* CI: scope reusable workflow secrets

* Tests: tighten codex models live assertion

* Tests: normalize OpenAI speech live text
2026-04-18 03:18:12 +02:00
Peter Steinberger
c8d722d093 test: fix rebased local gates 2026-04-18 01:49:54 +01:00
chaoliang yan
4749993bb5 [AI-assisted] fix(agents): mark failed TTS tool synthesis as an error (#67980)
Merged via squash.

Prepared head SHA: fa12d93c79
Co-authored-by: lawrence3699 <247479654+lawrence3699@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-17 20:30:03 -04:00
Vincent Koc
d834d270df fix(test): preserve new module exports in mocks 2026-04-17 14:28:16 -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
Peter Steinberger
af0f7e1bc7 test: type runtime auth overlay mock 2026-04-17 21:56: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
Vincent Koc
a8a701291b refactor(auth): drop persisted external oauth ownership metadata 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
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
Gustavo Madeira Santana
462074c4c2 Fix check type errors 2026-04-17 14:35:36 -04:00
Vincent Koc
eed71160ae fix(status): align oauth health with runtime 2026-04-17 10:36:51 -07:00
Peter Steinberger
1519b006b8 test(auth): isolate provider alias registry mock 2026-04-17 18:35:06 +01:00
Vincent Koc
3ed0995fa9 fix(auth): keep codex oauth canonical in openclaw 2026-04-17 10:20:43 -07:00
Peter Steinberger
8448569aca test: narrow skills config imports 2026-04-17 18:16:43 +01:00
Peter Steinberger
dfca5bd0fe test: isolate oauth refresh queue mocks 2026-04-17 18:10:07 +01:00
Peter Steinberger
89d3117ad0 test: narrow auth profile runtime mocks 2026-04-17 18:06:01 +01:00
Gustavo Madeira Santana
42817a1707 Tests: isolate OAuth mirror external auth lookup
Use the existing external auth test hook and a lightweight OAuth package mock so mirror-refresh coverage does not load provider runtime work while seeding test stores.
2026-04-17 12:50:52 -04:00
Peter Steinberger
97f713f459 test(agents): isolate compaction token estimator mocks 2026-04-17 17:18:12 +01:00
Gustavo Madeira Santana
c66703300a Tests: narrow bootstrap routing coverage 2026-04-17 12:17:41 -04:00
Gustavo Madeira Santana
8de7aefe0a Tests: narrow embedded timeout wiring 2026-04-17 11:37:46 -04:00
Gustavo Madeira Santana
d6c90b5af1 Tests: avoid memory-search cold plugin loads 2026-04-17 11:37:46 -04:00
Tak Hoffman
62703d8430 fix(bootstrap): workspace bootstrap prompt routing (#68000)
* fix(bootstrap): workspace bootstrap prompt routing

* Fix bootstrap routing edge cases

* Refine bootstrap mode routing and reset prompts

* Fix bootstrap workspace routing for embedded runs

* Fix embedded bootstrap compile follow-up

* Align bare reset bootstrap file access

* Honor reset override model for bootstrap gating

* Align chat reset bootstrap topology
2026-04-17 10:18:50 -05:00
Peter Steinberger
310b5e4f6a test: reduce core command hotspots 2026-04-17 16:05:10 +01:00
Peter Steinberger
a861da41b5 test: trim CLI and doctor hotspots 2026-04-17 16:05:09 +01:00
Peter Steinberger
82355d1d9f test: isolate agent runtime config imports 2026-04-17 16:05:08 +01:00
Val Alexander
0b6c39be18 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev
Co-authored-by: Val Alexander <bunsthedev@gmail.com>
2026-04-17 02:48:30 -05:00
Gustavo Madeira Santana
5775fe272a Docs: refresh agent instructions 2026-04-17 02:46:38 -04:00
Viz
8e79080bef fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) 2026-04-16 23:44:03 -07:00
Gustavo Madeira Santana
89706d323c Docs: add test performance guardrails 2026-04-17 02:23:49 -04:00