Commit Graph

46639 Commits

Author SHA1 Message Date
Shakker
cffe71e2ba test: assert legacy sender warnings 2026-05-11 12:46:02 +01:00
Peter Steinberger
d26bc48ae7 test: tighten models http assertions 2026-05-11 12:45:55 +01:00
Peter Steinberger
5da239473c fix(sessions): stream transcript reverse scans 2026-05-11 12:44:59 +01:00
jack-stormentswe
9654239af9 fix(sessions): stream JSONL transcript scans instead of buffering whole files (#54296)
The remaining whole-file transcript scans flagged by ClawSweeper triage on
splitting on newlines. On long-running sessions where transcripts grow into
the multi-MB / 100s-of-MB range that scales peak RSS with file size and is
the practical OOM risk in the report.

Add a shared streaming helper module `src/config/sessions/transcript-stream.ts`
exposing:

- `streamSessionTranscriptLines(filePath, { signal? })`: forward async-iterator
  over trimmed non-empty lines using `fs.createReadStream` + `readline` with
  `crlfDelay: Infinity`. Bounded to one line of memory at a time and honours
  an abort signal between lines.
- `readSessionTranscriptTailLines(filePath, { maxBytes? })`: tail-only read of
  the last `maxBytes` of a file (default 4 MiB, clamped to [1 KiB, 64 MiB]),
  returning trimmed non-empty lines in reverse order. Drops the leading line
  of the slice when the window does not start at byte zero so callers never
  see a partial-line suffix.

Migrate every flagged whole-file scan to these helpers while preserving the
malformed-line tolerance and idempotency-key return semantics callers depend
on (see `Remaining risk / open question` on the issue):

- `src/config/sessions/transcript.ts`: `readLatestAssistantTextFromSessionTranscript`,
  `readTailAssistantTextFromSessionTranscript`, and the delivery-mirror dedupe
  helper `findLatestEquivalentAssistantMessageId` now use the tail helper;
  `transcriptHasIdempotencyKey` uses the forward stream helper.
- `src/gateway/server-methods/chat.ts`: the inline `transcriptHasIdempotencyKey`
  used by chat-method append idempotency now uses the forward stream helper
  and tolerates malformed lines mid-scan (matching the sibling helper in
  `config/sessions/transcript.ts`).
- `src/gateway/session-compaction-checkpoints.ts`: `readTranscriptEntriesForForkAsync`
  builds the fork entry array from the forward stream helper instead of one
  big `fileHandle.readFile("utf-8")` call.

Fixes #54296.
2026-05-11 12:44:59 +01:00
Shakker
69c2bc58fa test: assert cron model diagnostics 2026-05-11 12:44:21 +01:00
Kaspre
775a24e57c fix(doctor): warn when per-agent model omits fallbacks key and defaults chain is non-empty (#79826)
* fix(doctor): warn when per-agent model omits fallbacks key and defaults chain is non-empty

`resolveAgentModelFallbacksOverride` in `src/agents/agent-scope.ts` returns
`[]` (no fallbacks) when a per-agent model is configured without an explicit
`fallbacks` key. At runtime this silently clobbers
`agents.defaults.model.fallbacks`, leaving the agent with no fallbacks.

Two config patterns hit this:

1. String form: `"model": "openai/gpt-5.5"` — user likely means "use this model,
   inherit fallbacks from defaults".
2. Object without `fallbacks` key: `"model": { "primary": "openai/gpt-5.5" }` —
   user likely means "just set the primary, keep defaults fallbacks".

The only explicit "no fallbacks" signal is `fallbacks: []`. This change adds
`collectImplicitFallbackClobberWarnings` / `noteImplicitFallbackClobberWarnings`
to the doctor config-analysis flow, which warns on either ambiguous shape only
when `agents.defaults.model.fallbacks` is non-empty (so there is something to
clobber).

No semantic change to how fallbacks resolve; this is a doctor-only diagnostic.

Closes #79369. Extends the scope of closed PR #79389 (string-form only) to
also cover the object-without-fallbacks case.

* fix(doctor): mirror runtime model primary normalization

* fix(doctor): strengthen fallback warning proof

* fix(doctor): tolerate malformed agent lists

* fix(doctor): type guarded agent runtime policy

* fix(ui): sync quick settings i18n baseline

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-11 12:43:51 +01:00
Peter Steinberger
9c736af39d test: tighten session cost usage assertions 2026-05-11 12:43:05 +01:00
Shakker
2d73d59905 test: assert cron store loads 2026-05-11 12:41:55 +01:00
pashpashpash
2846d9ea56 test: type acp cli option mock assertions 2026-05-11 12:41:21 +01:00
Peter Steinberger
6ee0c9a696 fix(codex): honor codex fallback blocking 2026-05-11 12:41:21 +01:00
Peter Steinberger
3f05165c47 fix(codex): preserve codex auth order 2026-05-11 12:41:21 +01:00
pashpashpash
30ed0329cb fix(codex): avoid mutating rate limit candidates 2026-05-11 12:41:21 +01:00
Peter Steinberger
10c43aefd8 fix(codex): ignore blocked account fallback state 2026-05-11 12:41:21 +01:00
Peter Steinberger
554d80c060 fix(codex): scope auth state updates 2026-05-11 12:41:21 +01:00
pashpashpash
edd7e3c70c test: fix current extension test assertions 2026-05-11 12:41:21 +01:00
Peter Steinberger
b2b381ac4d fix(codex): prefer live account credential state 2026-05-11 12:41:21 +01:00
pashpashpash
e9f8387a63 docs: align slash command btw contract 2026-05-11 12:41:21 +01:00
Peter Steinberger
dbe568556e fix(codex): avoid app-server request cross-talk 2026-05-11 12:41:21 +01:00
Peter Steinberger
95cee42b5b fix(codex): prefer direct codex auth order 2026-05-11 12:41:21 +01:00
Peter Steinberger
8185eb40e8 fix(codex): complete side thread request parity 2026-05-11 12:41:21 +01:00
pashpashpash
3e5544cc76 test(zalouser): type mock Zalo constructor result 2026-05-11 12:41:21 +01:00
pashpashpash
ddc9581d00 fix(codex): preserve side thread tools 2026-05-11 12:41:21 +01:00
pashpashpash
e15f99e34e fix(codex): show api key profile handles 2026-05-11 12:41:21 +01:00
pashpashpash
ac618c6d9d fix(codex): preserve account ladder indentation 2026-05-11 12:41:21 +01:00
pashpashpash
7f5a10e0e4 fix(codex): clarify account auth ladder 2026-05-11 12:41:21 +01:00
pashpashpash
004854e76e fix(codex): preserve blank account separators 2026-05-11 12:41:21 +01:00
pashpashpash
1877c600ea fix(codex): infer api key account fallback 2026-05-11 12:41:21 +01:00
pashpashpash
e310824828 fix(codex): explain account auth fallback 2026-05-11 12:41:21 +01:00
pashpashpash
3ae2799e28 fix(codex): preserve auth candidates for auto profiles 2026-05-11 12:41:21 +01:00
pashpashpash
cc95d4dd28 fix(codex): rotate auth profiles inside harness 2026-05-11 12:41:21 +01:00
pashpashpash
f447e5b9db fix(btw): keep Codex side questions tool-free 2026-05-11 12:41:21 +01:00
pashpashpash
517566e39a fix(auth): accept friendly OpenAI order for Codex profiles 2026-05-11 12:41:21 +01:00
pashpashpash
a947e8fae0 fix(codex): align btw side thread semantics 2026-05-11 12:41:21 +01:00
pashpashpash
42e259a696 fix(codex): route btw through native side threads 2026-05-11 12:41:21 +01:00
Peter Steinberger
4aa13b5338 test: tighten outbound target assertions 2026-05-11 12:40:55 +01:00
Shakker
1c452ddabf test: assert aux reload failures 2026-05-11 12:40:15 +01:00
Shakker
996a38466f test: assert session usage errors 2026-05-11 12:38:28 +01:00
Peter Steinberger
f57bcb0788 test: tighten outbound route assertions 2026-05-11 12:37:21 +01:00
Shakker
5569973d90 test: assert restart sentinel warnings 2026-05-11 12:36:53 +01:00
Shakker
34186196df test: assert gateway startup logs 2026-05-11 12:35:03 +01:00
Peter Steinberger
691b760df3 test: tighten outbound action runner assertions 2026-05-11 12:34:58 +01:00
Peter Steinberger
1a7efcad4b docs: add memory symlink traversal changelog (#80331) (thanks @samzong) 2026-05-11 12:34:01 +01:00
samzong
5ad3fa0a17 fix(memory): preserve ENOTDIR missing reads
Signed-off-by: samzong <samzong.lu@gmail.com>
2026-05-11 12:34:01 +01:00
samzong
c6748a8eeb fix(memory): block extra path symlink traversal
## Considered and deferred

- packages/memory-host-sdk/src/host/read-file.ts:77 [BOT-SCOPE]: Fully race-proof parent traversal would need a lower-level pinned/openat-style primitive; this diff fixes static symlink traversal and rejects symlink components before read.
2026-05-11 12:34:01 +01:00
Shakker
d21c47d711 test: assert plugin route runtime scopes 2026-05-11 12:33:04 +01:00
Peter Steinberger
2f1a9faae8 test: tighten outbound storage assertions 2026-05-11 12:31:18 +01:00
Peter Steinberger
3756e5dc10 test: tighten infra edge-case assertions 2026-05-11 12:29:37 +01:00
Shakker
7d966238b3 test: assert whatsapp inbox payloads 2026-05-11 12:27:44 +01:00
Peter Steinberger
7aa8f69808 test: tighten approval runtime assertions 2026-05-11 12:27:02 +01:00
Peter Steinberger
e520d9b8f6 test: tighten proxy dispatcher assertions 2026-05-11 12:25:27 +01:00