Unify model-switch persistence through compaction history

This commit is contained in:
Charles Cunningham
2026-02-18 00:26:02 -08:00
parent a46bcf3b8e
commit 25c22dcefc
5 changed files with 18 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
---
source: core/tests/suite/compact.rs
assertion_line: 2949
expression: "format_labeled_requests_snapshot(\"Pre-turn compaction during model switch (without pre-sampling model-switch compaction): current behavior strips incoming <model_switch> from the compact request and restores it in the post-compaction follow-up request.\",\n&[(\"Initial Request (Previous Model)\", &requests[0]),\n(\"Local Compaction Request\", &requests[1]),\n(\"Local Post-Compaction History Layout\", &requests[2]),])"
---
Scenario: Pre-turn compaction during model switch (without pre-sampling model-switch compaction): current behavior strips incoming <model_switch> from the compact request and restores it in the post-compaction follow-up request.
@@ -24,9 +25,9 @@ Scenario: Pre-turn compaction during model switch (without pre-sampling model-sw
## Local Post-Compaction History Layout
00:message/user:BEFORE_SWITCH_USER
01:message/user:<COMPACTION_SUMMARY>\nPRETURN_SWITCH_SUMMARY
02:message/developer:<PERMISSIONS_INSTRUCTIONS>
03:message/developer:<personality_spec> The user has requested a new communication st...
04:message/user:<AGENTS_MD>
05:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
06:message/developer:<model_switch>\nThe user was previously using a different model....
02:message/developer:<model_switch>\nThe user was previously using a different model....
03:message/developer:<PERMISSIONS_INSTRUCTIONS>
04:message/developer:<personality_spec> The user has requested a new communication st...
05:message/user:<AGENTS_MD>
06:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
07:message/user:AFTER_SWITCH_USER

View File

@@ -1,5 +1,6 @@
---
source: core/tests/suite/compact_remote.rs
assertion_line: 1538
expression: "format_labeled_requests_snapshot(\"Remote pre-turn compaction during model switch strips incoming <model_switch> from the compact request and restores it in the post-compaction follow-up request.\",\n&[(\"Initial Request (Previous Model)\", &initial_turn_request),\n(\"Remote Compaction Request\", &compact_request),\n(\"Remote Post-Compaction History Layout\", &post_compact_turn_request),])"
---
Scenario: Remote pre-turn compaction during model switch strips incoming <model_switch> from the compact request and restores it in the post-compaction follow-up request.
@@ -21,9 +22,9 @@ Scenario: Remote pre-turn compaction during model switch strips incoming <model_
## Remote Post-Compaction History Layout
00:message/user:BEFORE_SWITCH_USER
01:message/user:<COMPACTION_SUMMARY>\nREMOTE_SWITCH_SUMMARY
02:message/developer:<PERMISSIONS_INSTRUCTIONS>
03:message/developer:<personality_spec> The user has requested a new communication st...
04:message/user:<AGENTS_MD>
05:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
06:message/developer:<model_switch>\nThe user was previously using a different model....
02:message/developer:<model_switch>\nThe user was previously using a different model....
03:message/developer:<PERMISSIONS_INSTRUCTIONS>
04:message/developer:<personality_spec> The user has requested a new communication st...
05:message/user:<AGENTS_MD>
06:message/user:<ENVIRONMENT_CONTEXT:cwd=<CWD>>
07:message/user:AFTER_SWITCH_USER