Commit Graph

62164 Commits

Author SHA1 Message Date
brokemac79 3aa5229691 fix: fallback on safe prompt timeouts (#96142)
(cherry picked from commit 0da26499da)
2026-07-14 01:50:11 -07:00
Radek Sienkiewicz 23f1f130f8 fix(cli): sync official plugins during update all (#96831)
Co-authored-by: ooiuuii <169449607+ooiuuii@users.noreply.github.com>
(cherry picked from commit 0247eab773)
2026-07-14 01:50:11 -07:00
Yzx 7a6c6efc10 fix: cron stream stalls fail over before job timeout (#96096)
* fix(agents): cap cron stream idle stalls

* fix(agents): preserve cron hostname timeout

* fix: bound cron idle timeout local exceptions

* fix: bound cron idle timeout local exceptions

---------

Co-authored-by: Radek Sienkiewicz <mail@velvetshark.com>
(cherry picked from commit 7fefc5ff58)
2026-07-14 01:50:11 -07:00
Yzx 71590a267f fix(cron): avoid gateway restart on setup timeout (#96396)
* fix(cron): avoid gateway restart on setup timeout

* fix(cron): avoid gateway restart on setup timeout

---------

Co-authored-by: Radek Sienkiewicz <mail@velvetshark.com>
(cherry picked from commit 19707cce1d)
2026-07-14 01:50:11 -07:00
张贵萍0668001030 183122fe42 fix(outbound): fail closed heartbeat reserved Telegram misses
(cherry picked from commit 3092b4fd0d)
2026-07-14 01:50:11 -07:00
sheyanmin 94bd74c5cd fix: recover channel after stop timeout in health monitor
When a channel stop times out (e.g. during a Telegram API outage),
the channel enters recoveryStopTimedOut state. The health monitor's
subsequent start call would set restartPending and return without
actually starting the channel.

If the stuck stop never completes, the channel stays in limbo forever
with the health monitor retrying every cycle but never recovering.

Fix: when the health monitor retries recovery (recoveryStartRequested
already set), clean up the stuck task state and allow the channel to
start normally.

Closes #94008

(cherry picked from commit 8b4be2fdd4)
2026-07-14 01:50:10 -07:00
rosenlo 27513d21ca fix(outbound): advance queue entry to unknown_after_send on mid-batch failure with send evidence
When a required-mode batch send fails mid-batch after an earlier payload
already succeeded, the wrapper catch in deliverOutboundPayloadsWithQueueCleanup
called failDelivery. failDelivery only bumps retryCount/lastError; it does
not advance recoveryState, so the entry stayed in send_attempt_started (set
earlier by markDeliveryPlatformSendAttemptStarted via onPlatformSendStart).

On the next Telegram reconnect, drainQueuedEntry sees send_attempt_started
and calls reconcileUnknownQueuedDelivery. When adapter reconciliation
misreports not_sent (the message was actually sent, per the outbound send
ok / messageId evidence), the entry is replayed and the user receives a
duplicate.

Fix: when the error carries send evidence (OutboundDeliveryError with
sentBeforeError === true and platformSendStarted === true), call
markQueuedPlatformOutcomeUnknown instead of failDelivery. This advances the
entry to unknown_after_send, which drain already routes through
reconcileUnknownQueuedDelivery, preserving the entry for adapter
reconciliation rather than leaving it in send_attempt_started for replay.

When there is no send evidence (sentBeforeError === false), failDelivery
remains correct: nothing reached the channel, so retrying is safe.

This is a third duplicate path distinct from #89812 (mirror best-effort)
and #92274 (subagent-announce-delivery retry); it is the outbound/deliver
wrapper catch, which neither prior fix covers.

Tests:
- regression: two payloads, first succeeds, second throws; asserts
  markDeliveryPlatformOutcomeUnknown called, failDelivery/ackDelivery not.
- guard: no send evidence; failDelivery still called.

(cherry picked from commit 71422a9a5a)
2026-07-14 01:50:10 -07:00
clawsweeper[bot] f04b0d8b1b fix(cron): preserve enabled-with-defaults failure alert through store roundtrip (fixes #96589) (AI-assisted) (#96615)
Summary:
- The PR preserves `failure_alert_disabled === 0` as the enabled-with-defaults failure-alert state and adds focused codec roundtrip tests.
- PR surface: Source +2, Tests +54. Total +56 across 2 files.
- Reproducibility: yes. At source level, current main encodes `failureAlert: {}` with `failure_alert_disabled = 0`, then decodes it as `undefined` when all explicit alert option columns are null.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

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

Prepared head SHA: bd9b2a1798
Review: https://github.com/openclaw/openclaw/pull/96615#issuecomment-4794949533

Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: liuhao1024 <11816344+liuhao1024@users.noreply.github.com>
Approved-by: takhoffman
(cherry picked from commit a21144d8a6)
2026-07-14 01:50:10 -07:00
Sarah Fortune 554b80de67 fix: surface provider authentication failures in channels (#96599)
* fix: surface provider authentication failures in channels

* fix: handle typed provider auth failures

---------

Co-authored-by: Sarah Fortune <sarah.fortune@gmail.com>
(cherry picked from commit 113d6f3c64)
2026-07-14 01:49:47 -07:00
Dallin Romney 43d833343f fix(gateway): fail closed at auth limiter capacity
(cherry picked from commit 2c7d423516)
2026-07-14 01:49:25 -07:00
Agustin Rivera 0c9bb85b29 fix(gateway): cap auth limiter entries (#96224)
(cherry picked from commit bcbd521c1b)
2026-07-14 01:49:22 -07:00
Dallin Romney 56ef98b492 docs(diagnostics): document blocked-tool recovery floor
(cherry picked from commit 6cabced3c2)
2026-07-14 01:48:48 -07:00
Ayaan Zaidi d7d93d4ffc fix(agents): fall stale_run steer refusals through to direct delivery
(cherry picked from commit fc3b79d7f4)
2026-07-14 01:48:37 -07:00
Dallin Romney cd0e989d95 fix(agents): complete stale-run steering backport
Partial prerequisite backport from 969efdac4f for PR #102160.

(cherry picked from commit 868027e5a0)
2026-07-14 01:48:30 -07:00
Peter Steinberger 5fbb28544d fix(browser): reject credentialed page URLs safely (#102952)
Co-authored-by: bitkyc08 <bitkyc08@gmail.com>
(cherry picked from commit d5fb4903f1)
2026-07-14 01:47:23 -07:00
Alix-007 cb6325f056 fix(google): add timeout to Vertex ADC token refresh (#102050)
* fix(google): add timeout to Vertex ADC token refresh

* test(google): consolidate ADC timeout proof

* fix(google): bound all ADC token refreshes

* test(google): observe ADC timeout before advancing time

* fix(google): keep dependency timeout claims exact

* fix(google): bound library-managed ADC refreshes

* fix(google): recover after ADC refresh timeout

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit e5259fa8bb)
2026-07-14 01:47:14 -07:00
Dallin Romney 95dcba5345 fix(google): bound Vertex token response bodies
Partial prerequisite backport from aaf5ab910c (#100483).

(cherry picked from commit 8a7a6acb6d)
2026-07-14 01:46:27 -07:00
qingminlong 311f664e69 fix(tool-payload): enforce UTF-8 byte limits for serialized payloads (#102450)
* fix(tool-payload): reject oversized XML payload bytes

* fix(tools): enforce serialized payload byte limits

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit b20b02a476)
2026-07-14 01:45:47 -07:00
wangmiao0668000666 1918ea2563 fix(google-meet): contain node host stream failures (#102105)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit 624dfa6cf6)
2026-07-14 01:45:38 -07:00
Peter Steinberger 75f0470c6c fix(infra): contain SSH config probe stream failures (#101160)
* fix(infra): harden ssh config probe cleanup

Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>

* fix(infra): satisfy ssh probe lint

* chore(changelog): defer ssh probe release note

---------

Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>
(cherry picked from commit b7d73e3b23)
2026-07-14 01:45:32 -07:00
cxbAsDev a0d0b92c37 fix(extensions/huggingface): bound model discovery JSON response read to prevent OOM (#101079)
* fix(extensions/huggingface): bound model discovery JSON response read to prevent OOM

* test(huggingface): prove bounded discovery cleanup

* test(huggingface): avoid unbound reader assertions

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit a464620141)
2026-07-14 01:45:24 -07:00
huangjianxiong ac2ec7759c fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit (#99479)
* fix(openai): bound Codex OAuth token response body reads with readResponseWithLimit

Replace unbounded response.arrayBuffer() in postTokenForm with
readResponseWithLimit using a 1 MiB cap to prevent OOM from oversized
token endpoint responses. Add real node:http loopback server tests.

* fix(openai): wrap readResponseWithLimit result in Uint8Array for TS BodyInit compat

- Fixes TS2345: Buffer<ArrayBufferLike> not assignable to BodyInit
- Resolves check-prod-types, check-test-types, and
  check-additional-extension-package-boundary CI failures

Ref. https://github.com/openclaw/openclaw/pull/99479

* test(openai): verify OAuth response release

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit a89fe705b8)
2026-07-14 01:45:17 -07:00
wings1029 f860bc32f5 fix(discord): bound gateway metadata response body reads to prevent OOM (#98682)
* fix(discord): bound gateway metadata response body reads to prevent OOM

The materializeGuardedResponse helper in the Discord gateway metadata path
buffered the full upstream Response body via response.arrayBuffer() without
any size cap. A malicious or malfunctioning /gateway/bot endpoint that returns
an oversized payload could exhaust gateway memory.

Replace arrayBuffer() with readResponseWithLimit(4 MiB), consistent with
DISCORD_API_RESPONSE_BODY_LIMIT_BYTES in api.ts. Overflow throws an Error
with the byte counts.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(discord): wrap readResponseWithLimit result in Uint8Array for type compat

readResponseWithLimit returns Buffer which is not assignable to BodyInit in
the undici Response constructor type. Wrap in new Uint8Array() to satisfy the
boundary dts check. Also remove testExports export and mock fetchWithSsrFGuard
in tests via vi.hoisted + vi.mock to avoid leaking internal test-only exports.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(discord): tighten gateway metadata proof

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit fc77c2b04b)
2026-07-14 01:45:10 -07:00
Omar Garcia aaa2c95c32 fix: heartbeat survives transient filesystem read races (#100389)
* fix(heartbeat): retry transient workspace reads

* fix(heartbeat): bound transient filesystem retries

* fix(sessions): stop retrying permanent read failures

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit 92af54b64f)
2026-07-14 01:45:00 -07:00
Narahari Raghava 2166bc1c8c fix(gateway): truncateCloseReason drops partial UTF-8 code point instead of emitting mojibake (#100047)
* fix(gateway): truncateCloseReason drops partial UTF-8 code point instead of emitting mojibake

Buffer.subarray at a raw byte offset can cut inside a multi-byte UTF-8
sequence. Node decodes the dangling continuation bytes as U+FFFD (3 bytes
each), so the re-encoded result can exceed the intended maxBytes cap —
violating the RFC 6455 close-reason size contract and surfacing garbled
text to clients.

Back up from the cut point to the nearest UTF-8 sequence start before
slicing (UTF-8 continuation bytes match 10xxxxxx; skip them).

Closes #99976

* fix(lint): remove unnecessary non-null assertion on Buffer index

* ci: retrigger checks

(cherry picked from commit 161c4581a7)
2026-07-14 01:44:54 -07:00
pick-cat ce0640a784 fix(infra): bound jsonl-socket response buffer to prevent OOM (#98130)
* fix(infra): bound jsonl-socket response buffer to prevent OOM

* fix(macos): cap exec host socket output

* fix(macos): satisfy swiftformat for exec limiter

* test(macos): prove exec host output cap on command output

* chore: keep jsonl socket cap scoped to infra

* fix(infra): raise jsonl socket buffer cap

* test(infra): prove jsonl socket cap beats timeout

* ci: rerun jsonl socket buffer bound checks

* fix(macos): cap exec host response output

* test(macos): avoid private exec response fixtures

* fix(macos): satisfy exec output limiter formatting

* fix(macos): avoid static self formatting conflict

* chore: keep jsonl socket guard infra-only

* fix(jsonl-socket): parse complete lines before enforcing the buffer cap

* chore: remove unnecessary return after finish(null)

* fix(infra): frame bounded JSONL socket lines

* fix(infra): frame bounded JSONL socket lines

* style(macos): keep exec limiter patch focused

* style(macos): keep exec limiter patch focused

* style(macos): satisfy exec limiter formatting

* style(infra): satisfy socket loop lint

---------

Co-authored-by: Peter Steinberger <peter@steipete.me>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit b2620d7153)
2026-07-14 01:44:48 -07:00
Peter Lee 2d80d940d5 fix(logging): redact Telegram bot tokens from timeout URLs (#99428)
* fix(net-policy): redact Telegram bot tokens from timeout URLs

* fix(net-policy): extend Telegram bot token redaction to all hostnames

* refactor(net-policy): centralize bot token URL redaction

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit 4abdf0f3b5)
2026-07-14 01:44:42 -07:00
chenyangjun-xy c510b7623f Fix/issue 98958 gateway lock fd leak (#99291)
* fix(infra): close fd and remove lock file on writeFile failure (#98958)

When fs.open(lockPath, "wx") succeeds but handle.writeFile() fails
(e.g. disk full / ENOSPC), close the file handle and remove the
partially-written lock file before re-throwing to avoid a file
descriptor leak and stale lock artifact.

Changes:
- src/infra/gateway-lock.ts: nested try-catch around writeFile
- src/infra/gateway-lock.test.ts: test for fd close + lock cleanup
- scripts/verify-gateway-lock-fd-leak*.mjs: fault-injection proof

Co-Authored-By: Claude <noreply@anthropic.com>

* test(infra): strengthen gateway lock cleanup proof

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit 36dd9ee3c3)
2026-07-14 01:44:34 -07:00
Fede Kamelhar 3faf92d6c7 fix(gateway): cap agentRunCache to prevent unbounded growth under run fan-out (#77973)
* fix(gateway): cap agentRunCache to prevent unbounded growth under run fan-out

Time-based prune only reclaims entries past the 10-minute TTL window; a burst
of run fan-out can add far more entries than the window reclaims, so the cache
could grow without bound between prunes. Add a FIFO entry cap (5000) enforced
on insert, mirroring the existing Discord REST entity-cache bound.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(gateway): preserve waited run snapshots under cache cap

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
(cherry picked from commit f35fbc898c)
2026-07-14 01:44:27 -07:00
mushuiyu886 daf5d96c05 fix(browser): bound client fetch success JSON reads (#100889)
* fix(browser): bound client fetch success JSON reads

* fix(browser): preserve supported response body sizes

* docs(changelog): note browser response bounds

* chore: keep release changelog owner-only

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit 8f7d0a36f9)
2026-07-14 01:44:18 -07:00
wings1029 62bfb62ba9 fix(browser): bound error body read in fetchHttpJson to prevent OOM (#98455)
* fix(browser): bound error body read in fetchHttpJson to prevent OOM

* fix(browser): enforce strict error response limit

---------

Co-authored-by: Peter Steinberger <58493+steipete@users.noreply.github.com>
(cherry picked from commit cc0980cb7a)
2026-07-14 01:44:10 -07:00
Pavan Kumar Gondhi 69f94b4c43 fix: gate group activation changes by owner (#97838)
(cherry picked from commit 3d4b7cade9)
2026-07-14 01:43:36 -07:00
Agustin Rivera 391b5d3204 fix(imessage): require authorization for group actions (#97961)
(cherry picked from commit 587eefe5ad)
2026-07-14 01:43:29 -07:00
lin-hongkuan 274a54f7e2 fix(auth): strip controls from masked API keys (#96445)
* fix(auth): strip controls from masked API keys

* test(auth): cover DEL and C1 masked key controls

* chore: retrigger PR checks

---------

Co-authored-by: lin-hongkuan <lin-hongkuan@users.noreply.github.com>
(cherry picked from commit 2906d6c38f)
2026-07-14 01:43:22 -07:00
pick-cat 75be2f72d6 fix(chutes): bound OAuth token error response reads (#97808)
* fix(chutes): bound OAuth token error response reads

* ci: re-trigger checks (fs-safe unhandled-rejection flake on prior run)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Pick-cat <266665499+Pick-cat@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 9949f6bd85)
2026-07-14 01:43:05 -07:00
wangmiao0668000666 de1ae2545b fix(chutes-oauth): bound core helper JSON response reads
(cherry picked from commit f83cdec217)
2026-07-14 01:42:59 -07:00
cxbAsDev 99c6eeaebf fix(provider-usage): bound Anthropic usage error response reads to prevent OOM (#97614)
Replace unbounded res.json() with readProviderJsonResponse in the
fetchClaudeUsage error path to cap error body reads at 16 MiB.

(cherry picked from commit 615558f6fb)
2026-07-14 01:42:53 -07:00
Alix-007 a817aec1cf fix(inworld): bound TTS audio, voices, and error response reads to prevent OOM (#95416)
* fix(inworld): bound TTS audio, voices, and error response reads to prevent OOM

* fix(inworld): enforce decoded TTS audio cap

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Vincent Koc <25068+vincentkoc@users.noreply.github.com>
(cherry picked from commit 4c8470c069)
2026-07-14 01:42:40 -07:00
Alix-007 db0d55f5ff fix(zai): bound Z.AI endpoint-probe error body reads to prevent OOM (#97540)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
(cherry picked from commit 411a5e63be)
2026-07-14 01:42:32 -07:00
Alix-007 df77e3bcf7 fix(proxy-capture): bound captured response bodies to prevent OOM (#97551)
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
(cherry picked from commit c1d17c8ddd)
2026-07-14 01:42:25 -07:00
ZOOWH e9cac25864 fix(copilot): redact OAuth error response body in fetchJson error messages (#102953)
* fix(copilot): redact OAuth error response body in fetchJson error messages

Replace raw response body text with bounded, redacted structured error detail
extracted via extractProviderErrorDetail so OAuth error responses containing
tokens, device codes, or other sensitive fields are not leaked into Error
messages and downstream logs.

* test(copilot): add device-code and non-JSON error body redaction cases

Add regression tests covering the device code flow and non-JSON error
bodies alongside the existing token refresh coverage. Also include live
proof output showing real Response object redaction via
extractProviderErrorDetail.

Ref: #102953

* fix(copilot): normalize OAuth HTTP failures

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
(cherry picked from commit 6b90610cdb)
2026-07-14 01:42:19 -07:00
wangmiao0668000666 2f3bd162d2 fix(oauth): bound github-copilot OAuth response reads at 16 MiB (#97499)
* fix(oauth): bound github-copilot OAuth response reads at 16 MiB

* chore: trigger CI re-run after PR body update

(cherry picked from commit bd0c052aa5)
2026-07-14 01:42:14 -07:00
Alix-007 cfa366feca fix(discord): bound REST response body to prevent OOM flood (#95412)
The Discord REST main response path read the body with an unbounded
await response.text() before JSON-parsing it. A controlled or hijacked
endpoint could stream an arbitrarily large body and exhaust memory (OOM).

Wrap the read in the canonical readResponseWithLimit helper with an 8 MiB
cap (well above any legitimate Discord JSON payload) plus an idle timeout
tied to the request timeout, so the stream is cancelled at the cap or on
stall instead of buffering unbounded. Normal payloads still parse fully.

This mirrors PR #95108 which bounded the analogous Anthropic Messages
error-response read with the same helper.

(cherry picked from commit 2d2a50c00d)
2026-07-14 01:42:08 -07:00
Ayaan Zaidi b6516e4d3d test(provider-transport-fetch): cover split large SSE event
(cherry picked from commit 3f147ae5ca)
2026-07-14 01:41:41 -07:00
Peter Lindsey e15a93ab34 fix(provider-transport-fetch): raise SSE sanitize buffer cap to 16 MiB
The 64 KiB inter-event SSE sanitize buffer added in #96989 rejects a single
legitimate event larger than 64 KiB — e.g. a large gpt-5.5 reasoning summary on
the openai-chatgpt-responses API — throwing "SSE response exceeded max buffer
size (65536 bytes) without event boundary" and failing the whole request. The
default ChatGPT-subscription gpt-5.5 path is unusable (present in v2026.6.11-beta.1).

Decouple the two bounds: keep the non-OK error-body cap tight at 64 KiB
(SSE_NONOK_BODY_MAX_BYTES), and raise the inter-event sanitize buffer to the same
16 MiB ceiling as the JSON-synthesis path. The guard still trips on a genuinely
boundary-less (hostile/broken) stream, just not on a real large event.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 81d60ca30d)
2026-07-14 01:41:18 -07:00
wangmiao0668000666 7e95c02be5 fix(provider-transport-fetch): bound SSE buffer to prevent OOM (#96989)
* fix(provider-transport-fetch): bound SSE buffer to prevent OOM

* fix(provider-transport-fetch): appease oxlint curly rule in test

* fix(provider-transport-fetch): drain events before cap + cancel reader on overflow

* fix(provider-transport-fetch): remove unused encoder from coalesced chunk test

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(transport): tighten SSE buffer guards

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
(cherry picked from commit 1bccd29304)
2026-07-14 01:40:49 -07:00
yetval f63e6e1752 fix(config): fail closed when config is unreadable before a full-file write
A present-but-unreadable openclaw.json (for example EACCES after a sudo
command leaves it root-owned) returns an empty best-effort fallback
snapshot. A later full-file write (openclaw doctor, including the update
doctor pass) then serialized a skeletal config over the still-rich file,
dropping gateway.mode and bricking gateway startup.

The fallback base has no raw bytes and an empty resolved config, so the
existing size-drop and gateway-mode-removed guards never fired, and the
update path passes allowConfigSizeDrop=true.

Record the read failure on the snapshot (readError) and treat an
unreadable base as an always-blocking write reason
(unreadable-config-before-write) that allowConfigSizeDrop does not bypass.
The allowDestructiveWrite escape hatch and the rejected-artifact path are
preserved, so explicit recovery still works and the blocked payload is
saved to openclaw.json.rejected.<timestamp>.

Refs #78493.

(cherry picked from commit 14198836b2)
2026-07-14 01:40:41 -07:00
moguangyu5-design 69470b8517 fix(config/sessions): narrow reply-session initialization revision to identity fields (#98835)
* fix(config/sessions): narrow reply-session initialization revision to identity fields

The initialization guard compared the full persisted session entry, so
background touches to updatedAt, heartbeat timestamps, context-budget
metadata, etc. produced false-positive stale-snapshot conflicts and the
"reply session initialization conflicted" error.

Only sessionId and sessionFile matter for detecting a session rotation.
Narrow the revision to those identity fields and add a regression test.

Fixes #98672

* fix(config/sessions): merge current metadata when reply-init identity guard passes

* fix(config/sessions): preserve only snapshot-drifted metadata in reply-init commit

* fix: preserve cleared reply-session metadata

* fix: allow same-session reply initialization drift

---------

Co-authored-by: moguangyu5-design <moguangyu5-design@users.noreply.github.com>
Co-authored-by: Josh Lehman <josh@martian.engineering>
(cherry picked from commit 826c84ea19)
2026-07-14 01:40:03 -07:00
Ayaan Zaidi a38c075762 fix(auto-reply): serialize reply session initialization
(cherry picked from commit d2da8c79d9)
2026-07-14 01:37:15 -07:00
Vincent Koc e085fa1a3f ci(release): stabilize anthropic live smoke selection v2026.6.11 2026-06-29 19:00:39 -07:00