Commit Graph

37611 Commits

Author SHA1 Message Date
Vincent Koc
7e028917c0 fix(android): remediate app CodeQL alerts 2026-04-28 01:37:01 -07:00
Vincent Koc
5ac6d7661c fix(ci): harden workflow checkouts 2026-04-28 01:37:00 -07:00
Peter Steinberger
f76c8322d3 test: route gateway audit through fast lane 2026-04-28 09:35:34 +01:00
Vincent Koc
474859aaaa test(agents): cover raw model cache trace stage 2026-04-28 01:32:34 -07:00
Peter Steinberger
99ceaaa76e test: fix attempt execution fixture lint 2026-04-28 09:32:02 +01:00
Peter Steinberger
a68ca1ae0b fix(auto-reply): acknowledge bare reset commands 2026-04-28 09:31:14 +01:00
Peter Steinberger
8178b62187 fix(android): include third-party sensitive handlers 2026-04-28 09:27:59 +01:00
Peter Steinberger
2276f660f3 refactor(android): split sensitive features by flavor 2026-04-28 09:27:39 +01:00
Peter Steinberger
8ff0ea50b0 ci: stabilize full release validation 2026-04-28 09:26:50 +01:00
Vincent Koc
bab403d0ee fix(plugins): avoid bundled install load path aliases 2026-04-28 01:26:21 -07:00
Peter Steinberger
169dba2042 fix(skills): require opt-in for coding-agent 2026-04-28 09:24:24 +01:00
Peter Steinberger
4f6dab852e ci: fix main test and boundary checks 2026-04-28 09:23:26 +01:00
Peter Steinberger
09ec5d2c4d fix(agents): suppress Anthropic beta headers for custom endpoints 2026-04-28 09:20:58 +01:00
Peter Steinberger
2a1e47ffcb fix(agents): restore raw model run type coverage 2026-04-28 09:20:58 +01:00
Peter Steinberger
732e5805e3 fix(ollama): preserve configured native thinking 2026-04-28 09:20:44 +01:00
Peter Steinberger
7092313b2f docs: advertise xhigh docs i18n thinking 2026-04-28 09:19:40 +01:00
Peter Steinberger
db40ec404a fix: honor Ollama thinking catalog metadata 2026-04-28 09:15:28 +01:00
Peter Steinberger
67b16a4a6d fix: centralize source reply delivery mode 2026-04-28 09:14:19 +01:00
Peter Steinberger
1257e0e4ae ci: prepare qa channel boundary types 2026-04-28 09:13:49 +01:00
Peter Steinberger
4e921808d1 fix(line): persist inbound media in shared store 2026-04-28 09:12:11 +01:00
Peter Steinberger
fb3ea9efb1 fix: keep gateway model probes raw 2026-04-28 09:11:47 +01:00
Peter Steinberger
bce6c10290 fix: harden docs i18n prompt echoes 2026-04-28 09:11:28 +01:00
Peter Steinberger
725d557de6 fix(plugins): shorten runtime mirror lock hold 2026-04-28 09:10:37 +01:00
Peter Steinberger
0ef6702af3 build(android): update dependencies and lint config 2026-04-28 09:10:13 +01:00
Ayaan Zaidi
8da2fb1920 fix: seed claude-cli fallback context (#72069) (thanks @stainlu) 2026-04-28 13:35:59 +05:30
Ayaan Zaidi
5e4c29e9bc fix(agents): require claude fallback source provider 2026-04-28 13:35:59 +05:30
stainlu
4369c20bfe fix(agents): make originalProvider optional in runAgentAttempt params
The required-typed param introduced in 9987e7797f broke
attempt-execution.cli.test.ts and auth-profile-runtime-contract.test.ts
which construct runAgentAttempt params without an originalProvider field.
Make it optional and explicitly require the typeof check before passing
to isClaudeCliProvider so a missing field correctly skips the seed
(defensive default for fallback paths that didn't plumb the original
provider through, no-op for non-fallback paths).
2026-04-28 13:35:59 +05:30
stainlu
0bfcdcf044 fix(agents): scope claude-cli fallback seed and pair summary with boundary
Addresses review on #72069:

- Codex P1 ("Gate Claude prelude seeding by source provider"): the
  guard checked the *current* fallback candidate but not the failed
  attempt. A session that still carried a stale
  cliSessionBindings["claude-cli"] from an unrelated past run would
  inject Claude transcript context into a fallback chain that started
  on a different provider (e.g. openai -> openai-codex), leaking
  irrelevant prior conversation. Plumb `originalProvider` (the
  user-requested provider for the chain) through to runAgentAttempt
  and require `isClaudeCliProvider(originalProvider)` before reading
  Claude history.

- Codex P2 ("Prefer latest compact boundary when summary is missing"):
  the resolver always preferred the most recent explicit summary, so
  a later compaction without its own summary entry (rare crash case)
  paired stale summary text with post-latest-boundary turns. Restructure
  readClaudeCliFallbackSeed to queue summaries into pendingSummary and
  flush each boundary's pair atomically. A boundary with no preceding
  summary now correctly falls back to the boundary's own content
  rather than serving an older summary alongside fresh turns.

- Greptile P2 (newest-first break vs sparse coverage): the
  formatFallbackTurns walk intentionally stops on the first oversized
  turn so the prelude stays a contiguous "what was happening just
  before the failure" window. Document the design choice inline so a
  future maintainer doesn't reflexively change it to skip-and-continue.

Tests:
- New gateway cases for the boundary-without-summary edge case and
  for trailing summaries written without a paired boundary.
- existing 33 attempt-execution + 14 cli-session-history tests still
  pass; broader src/agents/command suite stays green (63/63).
2026-04-28 13:35:59 +05:30
stainlu
9691399e53 fix(agents): drop unnecessary non-null assertion in fallback prelude formatter
Local default oxlint did not run --type-aware so the warning was missed
on the initial commit; CI surfaced it via check-lint. Hoist the heading
into a named const so its length is read directly without the assertion.
2026-04-28 13:35:59 +05:30
stainlu
a96f1fa5ef fix(agents): seed claude-cli fallback prompts with prior-session context (#69973)
When a claude-cli attempt failed with a fallbackable error (e.g. a 402
billing limit), the next candidate -- typically a non-CLI provider --
ran with no prior conversation context. Claude Code keeps its own
JSONL session under ~/.claude/projects/, but the fallback runner only
sees what OpenClaw assembles from its own transcript, which is empty
for claude-cli sessions. The fallback model therefore behaved as if
the conversation just started, even though Claude later resumed fine.

Resolution mirrors what Claude Code itself does on resume after
compaction: prefer the explicit `/compact` summary, then append the
most recent post-boundary turns up to a char budget. Concretely:

- `readClaudeCliFallbackSeed` (gateway): walks the Claude JSONL with
  awareness of `type: "summary"` and `type: "system",
  subtype: "compact_boundary"` entries. Pre-boundary turns are dropped
  (they are represented by the summary); post-boundary turns become
  the recent-window. Multiple compactions are handled by preferring
  the latest summary. Path safety reuses the existing
  `resolveClaudeCliSessionFilePath` validation.

- `formatClaudeCliFallbackPrelude` / `buildClaudeCliFallbackContext\
Prelude` (agents helpers): format the harvested seed into a labeled
  prelude. Tool blocks are coalesced to compact "(tool call: name)" /
  "(tool result: …)" hints to keep the prompt budget honest. Newest
  turns are kept first when truncating; the summary is clearly
  labeled "(truncated)" if it overflows.

- `resolveFallbackRetryPrompt`: gains an optional
  `priorContextPrelude` that prepends before the existing retry
  marker. Empty/whitespace preludes are ignored; first-attempt prompts
  are unchanged.

- `runAgentAttempt`: builds the prelude when `isFallbackRetry === true`
  AND the new candidate is non-claude-cli AND a Claude-cli session
  binding is present. Same-provider fallbacks (claude-cli to
  claude-cli) are unaffected because Claude's own --resume still works.

Verified the new tests (12 in cli-session-history, 12 added to
attempt-execution) catch the regression: removing the prelude prepend
in resolveFallbackRetryPrompt makes both new prelude cases fail,
restoring the original cold-start behavior.

References:
- https://code.claude.com/docs/en/how-claude-code-works
- "Inside Claude Code: The Session File Format"
  https://databunny.medium.com/inside-claude-code-the-session-file-format-and-how-to-inspect-it-b9998e66d56b
2026-04-28 13:35:59 +05:30
Shakker
290c7ab848 test: add future strict startup benchmark case 2026-04-28 09:05:11 +01:00
Vincent Koc
dbab162abd ci: split codeql quality workflow (#73404) 2026-04-28 01:04:59 -07:00
Peter Steinberger
a811e164e3 ci: speed up full release validation 2026-04-28 09:02:57 +01:00
Peter Steinberger
c7af9c765c ci: tolerate missing clawsweeper dispatch access 2026-04-28 09:02:28 +01:00
Vincent Koc
a9a689ed2a fix(plugins): keep qa sdk aliases private 2026-04-28 01:01:19 -07:00
Peter Steinberger
f3191b7962 fix(agents): abort stalled Anthropic SSE reads 2026-04-28 09:00:37 +01:00
Peter Steinberger
a8b64b7d52 fix(doctor): require confirmation for transcript archive 2026-04-28 08:56:18 +01:00
Peter Steinberger
04e774eeac feat(android): add authenticated presence alive beacons (#73373)
* feat: add Android presence alive beacons

* fix: harden Android presence beacon review findings

* fix: address Android presence review findings
2026-04-28 08:55:06 +01:00
Peter Steinberger
c788aa025e test: route session lifecycle test through fast lane 2026-04-28 08:52:20 +01:00
Peter Steinberger
2d575bc00e fix(onboarding): pin health auth during setup 2026-04-28 08:51:29 +01:00
Peter Steinberger
8b4a5d70e4 fix(build): preserve staged runtime deps on rebuild 2026-04-28 08:45:11 +01:00
Zhang Xiaofeng
a0900926c3 fix: add CJK error patterns to failover classification (#56242)
* fix: add CJK error patterns to failover classification

Chinese LLM providers (ZhipuAI/GLM, Bailian, Kimi/Moonshot, DeepSeek,
etc.) return error messages in Chinese. The existing failover
classification only matches English patterns, causing these errors to
fall through as unclassified — surfacing raw provider errors to users
instead of triggering model fallback.

Real production example: ZhipuAI error code 1234 returns
'网络错误,错误id:xxx,请联系客服。' (network error). This was not
matched by the existing 'network error' English pattern, so no failover
was triggered despite having a configured fallback model.

Changes:
- Add Chinese patterns to all error categories in failover-matches.ts:
  timeout, serverError, rateLimit, billing, auth, overloaded
- Add Chinese network error detection in formatTransportErrorCopy()
  for user-friendly error messages
- Add comprehensive test coverage for all CJK error categories

Follows the existing precedent set by Chinese context overflow patterns
in isContextOverflowError().

* fix: narrow billing pattern and fix placeholder issue URL

- Change '账户余额' to '账户余额不足' to avoid false positives on
  messages that merely mention account balance (per greptile review)
- Replace XXXXX placeholder with actual issue #56242

* fix: wire CJK auth failover patterns

* fix: classify CJK provider failover errors

* fix: place failover changelog entry in unreleased

---------

Co-authored-by: Altay <altay@uinaf.dev>
2026-04-28 10:44:17 +03:00
Peter Steinberger
47b6d3a334 test(video): isolate provider registry mocks 2026-04-28 08:43:20 +01:00
Peter Steinberger
f95f720b25 docs: separate mintlify list closings 2026-04-28 08:43:20 +01:00
Peter Steinberger
a30698166b fix(wizard): pin setup token for health check 2026-04-28 08:43:20 +01:00
Galin Iliev
274d05dfe7 fix(wizard): use setup token for onboarding health check
Fixes #72203

Co-authored-by: OpenClaw Bot <bot@openclaw.dev>
2026-04-28 08:43:20 +01:00
Scott Hanselman
146debf8c1 fix(tui): dedupe ASCII backspace events (#73335)
Merged via squash.

Prepared head SHA: 8f02f48acd
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Reviewed-by: @shanselman
2026-04-28 00:41:55 -07:00
Vincent Koc
0b82a7e718 test(ci): align main test expectations 2026-04-28 00:35:44 -07:00
Peter Steinberger
1dd011984a fix: add pricing bootstrap opt-out and sdk compat exports 2026-04-28 08:35:11 +01:00
Peter Steinberger
f5a7632ffc ci: allow legacy package stamp warnings 2026-04-28 08:31:16 +01:00