core-agent-ide/codex-rs/app-server/tests/suite
Charley Cunningham 07aefffb1f
core: bundle settings diff updates into one dev/user envelope (#12417)
## Summary
- bundle contextual prompt injection into at most one developer message
plus one contextual user message in both:
  - per-turn settings updates
  - initial context insertion
- preserve `<model_switch>` across compaction by rebuilding it through
canonical initial-context injection, instead of relying on
strip/reattach hacks
- centralize contextual user fragment detection in one shared definition
table and reuse it for parsing/compaction logic
- keep `AGENTS.md` in its natural serialized format:
  - `# AGENTS.md instructions for {dirname}`
  - `<INSTRUCTIONS>...</INSTRUCTIONS>`
- simplify related tests/helpers and accept the expected snapshot/layout
updates from bundled multi-part messages

## Why
The goal is to converge toward a simpler, more intentional prompt shape
where contextual updates are consistently represented as one developer
envelope plus one contextual user envelope, while keeping parsing and
compaction behavior aligned with that representation.

## Notable details
- the temporary `SettingsUpdateEnvelope` wrapper was removed; these
paths now return `Vec<ResponseItem>` directly
- local/remote compaction no longer rely on model-switch strip/restore
helpers
- contextual user detection is now driven by shared fragment definitions
instead of ad hoc matcher assembly
- AGENTS/user instructions are still the same logical context; only the
synthetic `<user_instructions>` wrapper was replaced by the natural
AGENTS text format

## Testing
- `just fmt`
- `cargo test -p codex-app-server
codex_message_processor::tests::extract_conversation_summary_prefers_plain_user_messages
-- --exact`
- `cargo test -p codex-core
compact::tests::collect_user_messages_filters_session_prefix_entries
--lib -- --exact`
- `cargo test -p codex-core --test all
'suite::compact::snapshot_request_shape_pre_turn_compaction_strips_incoming_model_switch'
-- --exact`
- `cargo test -p codex-core --test all
'suite::compact_remote::snapshot_request_shape_remote_pre_turn_compaction_strips_incoming_model_switch'
-- --exact`
- `cargo test -p codex-core --test all
'suite::client::includes_apps_guidance_as_developer_message_when_enabled'
-- --exact`
- `cargo test -p codex-core --test all
'suite::client::includes_developer_instructions_message_in_request' --
--exact`
- `cargo test -p codex-core --test all
'suite::client::includes_user_instructions_message_in_request' --
--exact`
- `cargo test -p codex-core --test all
'suite::client::resume_includes_initial_messages_and_sends_prior_items'
-- --exact`
- `cargo test -p codex-core --test all
'suite::review::review_input_isolated_from_parent_history' -- --exact`
- `cargo test -p codex-exec --test all
'suite::resume::exec_resume_last_respects_cwd_filter_and_all_flag' --
--exact`
- `cargo test -p core_test_support
context_snapshot::tests::full_text_mode_preserves_unredacted_text --
--exact`

## Notes
- I also ran several targeted `compact`, `compact_remote`,
`prompt_caching`, `model_visible_layout`, and `event_mapping` tests
while iterating on prompt-shape changes.
- I have not claimed a clean full-workspace `cargo test` from this
environment because local sandbox/resource conditions have previously
produced unrelated failures in large workspace runs.
2026-02-26 00:12:08 -08:00
..
v2 Enforce user input length cap (#12823) 2026-02-25 22:23:51 -08:00
archive_thread.rs Defer persistence of rollout file (#11028) 2026-02-07 23:05:03 -08:00
auth.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
bash refactor: delete exec-server and move execve wrapper into shell-escalation (#12632) 2026-02-23 20:10:22 -08:00
codex_message_processor_flow.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
config.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
create_thread.rs Add text element metadata to protocol, app server, and core (#9331) 2026-01-15 17:26:41 -08:00
fork_thread.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
fuzzy_file_search.rs [app-server] add fuzzyFileSearch/sessionCompleted (#11773) 2026-02-13 15:08:14 -08:00
interrupt.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
list_resume.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
login.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
mod.rs feat: fork conversation/thread (#8866) 2026-01-08 12:54:20 -08:00
output_schema.rs Enforce user input length cap (#12823) 2026-02-25 22:23:51 -08:00
send_message.rs core: bundle settings diff updates into one dev/user envelope (#12417) 2026-02-26 00:12:08 -08:00
set_default_model.rs feat: arcticfox in the wild (#6906) 2025-11-19 16:31:06 +00:00
user_agent.rs fix(app-server): set originator header from initialize (re-revert) (#8988) 2026-01-09 12:09:30 -08:00
user_info.rs chore: use anyhow::Result for all app-server integration tests (#5836) 2025-10-28 08:10:23 -07:00
zsh refactor: delete exec-server and move execve wrapper into shell-escalation (#12632) 2026-02-23 20:10:22 -08:00