Commit Graph
3833 Commits
Author SHA1 Message Date
Charles Cunningham 8b290e8707 Drop redundant summary check for incoming compaction items 2026-02-17 19:06:33 -08:00
Charles Cunningham 52e6a54a6d Define real user predicate independent of keep policy 2026-02-17 19:03:04 -08:00
Charles Cunningham d53b588309 Base incoming compaction filtering on keep predicate 2026-02-17 18:58:35 -08:00
Charles Cunningham 4c2c861e15 Keep shell command records only in incoming compaction items 2026-02-17 18:51:30 -08:00
Charles Cunningham afebfffc93 Exclude user shell command records from compaction keep set 2026-02-17 18:49:38 -08:00
Charles Cunningham 6e6e718738 Use real user predicate for compaction reinjection 2026-02-17 18:47:38 -08:00
Charles Cunningham 01794f1a46 Reuse compaction keep filter for incoming items 2026-02-17 18:46:04 -08:00
Charles Cunningham 589b0763cc Fix compact test snapshot and include bazel lock update 2026-02-17 18:29:14 -08:00
Charles Cunningham 3964becfde dd comment 2026-02-17 18:29:13 -08:00
Charles Cunningham 15aa101bf6 Qualify Feature enum in compact suite tests 2026-02-17 18:29:13 -08:00
Charles Cunningham a38b1c9cf5 Move compact reinjection snapshots into suite coverage 2026-02-17 18:29:13 -08:00
Charles Cunningham 04b157bb4c Treat no-op pre-turn compaction as not-needed 2026-02-17 18:29:13 -08:00
Charles Cunningham 907e292ad9 Add comment 2026-02-17 18:29:13 -08:00
Charles Cunningham 3f2f817ab6 Make compact unit snapshots Bazel-stable 2026-02-17 18:29:13 -08:00
Charles Cunningham ccc270083f Persist pre-turn updates before interrupted auto-compaction exits 2026-02-17 18:29:13 -08:00
Charles Cunningham f7956ffabc Persist pre-turn updates before interrupted model-switch compact exits 2026-02-17 18:29:13 -08:00
Charles Cunningham d81d89ac0b Silence interrupted pre-turn compaction failures 2026-02-17 18:29:13 -08:00
Charles Cunningham 7139784970 Strip incoming model-switch updates from remote compaction input 2026-02-17 18:29:13 -08:00
Charles Cunningham 9d34abf954 core: snapshot pre-turn model-switch compaction strip behavior 2026-02-17 18:29:13 -08:00
Charles Cunningham b5aeb30d59 compact: strip incoming model-switch before compaction 2026-02-17 18:29:13 -08:00
Charles Cunningham 5929f058b0 compact: snapshot reinjection above last summary 2026-02-17 18:29:13 -08:00
Charles Cunningham 466c689766 compact: reinsert context above last summary 2026-02-17 18:29:12 -08:00
Charles Cunningham b029cc2d01 Reinject context for summary-only compacted history 2026-02-17 18:29:12 -08:00
Charles Cunningham f832de6371 Document manual compact turn-context reinjection policy 2026-02-17 18:29:12 -08:00
Charles Cunningham 3a04f2c689 Use explicit user-message predicate for compaction filtering 2026-02-17 18:29:12 -08:00
Charles Cunningham 54e606ade3 Comment 2026-02-17 18:29:12 -08:00
Charles Cunningham de959aafa2 Comments 2026-02-17 18:29:12 -08:00
Charles Cunningham 8595664092 Move pre-turn auto-compact error handling into helper 2026-02-17 18:29:12 -08:00
Charles Cunningham e3efe3a020 Return sentinel error from model-switch compaction helper 2026-02-17 18:29:12 -08:00
Charles Cunningham 5682f72551 Move previous-model compact failure handling into helper 2026-02-17 18:29:12 -08:00
Charles Cunningham b7b50d6e98 Add TODO for legacy compacted history context reinjection 2026-02-17 18:29:12 -08:00
Charles Cunningham 9e6ef13d4d Add comment 2026-02-17 18:29:12 -08:00
Charles Cunningham ce7777801d Enable compaction tests and remove stale TODO markers 2026-02-17 18:29:12 -08:00
Charles Cunningham d9b02b6a9e Differentiate model-switch compaction failures from oversize input 2026-02-17 18:29:12 -08:00
Charles Cunningham bddd53bae5 Rebase: align compaction snapshots and imports 2026-02-17 18:29:11 -08:00
Charles Cunningham c92190f130 Avoid wildcard pattern in ResponseEvent::Completed match 2026-02-17 18:29:11 -08:00
Charles Cunningham 15730c2fcb Align compaction tests with incoming-item and empty-history behavior 2026-02-17 18:29:11 -08:00
Charles Cunningham 8b2f5066a5 update snaps 2026-02-17 18:29:11 -08:00
Charles Cunningham 2a804d9f4d Update snaps 2026-02-17 18:29:11 -08:00
Charles Cunningham 59d3431a15 Fix clippy useless_vec in compact_remote test 2026-02-17 18:29:11 -08:00
Charles Cunningham 36499b59f0 Reinject canonical context for model-switch pre-turn compaction 2026-02-17 18:29:11 -08:00
Charles Cunningham 8d06dd5f8b Persist pre-turn updates before apps tool-list cancellation 2026-02-17 18:29:11 -08:00
Charles Cunningham e87455e284 codex: persist pre-turn updates when compaction fails 2026-02-17 18:29:11 -08:00
Charles Cunningham 4022de74ef compact: preserve incoming items during pre-turn trim retries 2026-02-17 18:29:11 -08:00
Charles Cunningham e0f99ebaa4 compact: split core logic changes from snapshot test coverage 2026-02-17 18:29:11 -08:00
Charles Cunningham 5c389f9f20 Update pre-sampling model-switch compaction snapshot 2026-02-17 18:29:11 -08:00
Charles Cunningham c7cef7dab1 update snapshot 2026-02-17 18:29:10 -08:00
Charles Cunningham a79bebe5ca Simplify 2026-02-17 18:29:10 -08:00
Charles Cunningham 2d4123c267 Fix model switch compaction 2026-02-17 18:29:10 -08:00
Charley Cunningham eb68767f2f Unify remote compaction snapshot mocks around default endpoint behavior (#12050)
## Summary
- standardize remote compaction test mocking around one default behavior
in shared helpers
- make default remote compact mocks mirror production shape: keep
`message/user` + `message/developer`, drop assistant/tool artifacts,
then append a summary user message
- switch non-special `compact_remote` tests to the shared default mock
instead of ad-hoc JSON payloads

## Special-case tests that still use explicit mocks
- remote compaction error payload / HTTP failure behavior
- summary-only compact output behavior
- manual `/compact` with no prior user messages
- stale developer-instruction injection coverage

## Why
This removes inconsistent manual remote compaction fixtures and gives us
one source of truth for normal remote compact behavior, while preserving
explicit mocks only where tests intentionally cover non-default
behavior.
2026-02-17 18:18:47 -08:00