Commit Graph

7 Commits

Author SHA1 Message Date
Mathews-Tom d5d3f2fcd7 Merge remote-tracking branch 'upstream/main' into feat/secret-friendly-names 2026-07-01 00:34:03 +05:30
can1357 d4be774eb2 chore: update stale tests 2026-06-30 03:35:30 +02:00
Mathews-Tom ac16eff49b Merge remote-tracking branch 'upstream/main' into feat/secret-friendly-names
# Conflicts:
#	packages/coding-agent/test/agent-session-snapcompact-auto-fallback.test.ts
2026-06-29 10:00:29 +05:30
can1357 ca9f2847e6 test(coding-agent): fixed snapcompact non-ascii auto-fallback fixture
The auto-snapcompact non-ASCII fallback test seeded a single CJK turn with a
245k-token usage. claude-sonnet-4-5's 200k context window made that an input
overflow, so the recovery path dropped the assistant turn and left nothing to
summarize; the default 20k keep-recent window also kept both tiny messages.
Either way prepareCompaction returned undefined, the renderability preflight
never ran, and the strategy stayed "snapcompact" instead of downgrading to
context-full.

Derive the synthetic prompt size from the active model's context window (above
the auto-compaction threshold, below the window) and force keepRecentTokens=1
so the CJK history is always summarized and scanned, regardless of model
metadata.
2026-06-29 05:04:35 +02:00
Mathews-Tom 4fbd7b1630 test(coding-agent): trip snapcompact non-ASCII fallback via threshold compaction
After the overflow-recovery change started dropping the failed assistant turn before compacting, the non-ASCII fallback test's minimal transcript was left with nothing to summarize (the lone CJK message is kept-recent), so snapcompact was skipped and the run never exercised the non-ASCII downgrade. Bill the trigger turn just under the model's context window so it routes through the threshold compaction path (which keeps the turn) instead of overflow recovery, restoring deterministic coverage of the high-non-ASCII context-full fallback.
2026-06-29 03:10:23 +05:30
roboomp a529ba41f1 style: bun run fix 2026-06-27 19:50:52 +00:00
roboomp df680f7211 fix(compaction): downgraded auto-snapcompact on every local blocker
Auto-compaction now falls back to context-full on any snapcompact preflight or post-render rejection (non-ASCII, kept history too large, projection overflow), matching the text-only-model handling. Manual /compact snapcompact keeps its local-only failure contract per #3599.

Fixes #3659
2026-06-27 19:49:32 +00:00