core-agent-ide/codex-rs/app-server/tests/suite/v2
Owen Lin fc0fd85349
fix(app-server, core): defer initial context write to rollout file until first turn (#9950)
### Overview
Currently calling `thread/resume` will always bump the thread's
`updated_at` timestamp. This PR makes it the `updated_at` timestamp
changes only if a turn is triggered.

### Additonal context
What we typically do on resuming a thread is **always** writing “initial
context” to the rollout file immediately. This initial context includes:
- Developer instructions derived from sandbox/approval policy + cwd
- Optional developer instructions (if provided)
- Optional collaboration-mode instructions
- Optional user instructions (if provided)
- Environment context (cwd, shell, etc.)

This PR defers writing the “initial context” to the rollout file until
the first `turn/start`, so we don't inadvertently bump the thread's
`updated_at` timestamp until a turn is actually triggered.

This works even though both `thread/resume` and `turn/start` accept
overrides (such as `model`, `cwd`, etc.) because the initial context is
seeded from the effective `TurnContext` in memory, computed at
`turn/start` time, after both sets of overrides have been applied.

**NOTE**: This is a very short-lived solution until we introduce sqlite.
Then we can remove this.
2026-01-27 10:41:54 -08:00
..
account.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
analytics.rs feat(app-server): add an --analytics-default-enabled flag (#9118) 2026-01-13 11:59:39 -08:00
app_list.rs [connectors] Support connectors part 1 - App server & MCP (#9667) 2026-01-22 16:48:43 -08:00
collaboration_mode_list.rs Use collaboration mode masks without mutating base settings (#9806) 2026-01-25 07:35:31 +00:00
config_rpc.rs Add layered config.toml support to app server (#9510) 2026-01-21 14:21:48 -08:00
dynamic_tools.rs feat: dynamic tools injection (#9539) 2026-01-26 10:06:44 +00:00
initialize.rs fix(app-server): set originator header from initialize (re-revert) (#8988) 2026-01-09 12:09:30 -08:00
mod.rs Add thread/unarchive to restore archived rollouts (#9843) 2026-01-26 11:24:36 -08:00
model_list.rs feat(tui) /personality (#9718) 2026-01-25 21:59:42 -08:00
output_schema.rs Add text element metadata to types (#9235) 2026-01-14 16:41:50 -08:00
rate_limits.rs fix: taking plan type from usage endpoint instead of thru auth token (#7610) 2025-12-04 23:34:13 -08:00
request_user_input.rs change collaboration mode to struct (#9793) 2026-01-23 17:00:23 -08:00
review.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
thread_archive.rs chore: unify conversation with thread name (#8830) 2026-01-07 17:04:53 +00:00
thread_fork.rs feat: ephemeral threads (#9765) 2026-01-24 14:57:40 +00:00
thread_list.rs [app-server] feat: add filtering on thread list (#9897) 2026-01-26 21:54:19 +00:00
thread_loaded_list.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
thread_read.rs feat: ephemeral threads (#9765) 2026-01-24 14:57:40 +00:00
thread_resume.rs fix(app-server, core): defer initial context write to rollout file until first turn (#9950) 2026-01-27 10:41:54 -08:00
thread_rollback.rs Add text element metadata to types (#9235) 2026-01-14 16:41:50 -08:00
thread_start.rs Add layered config.toml support to app server (#9510) 2026-01-21 14:21:48 -08:00
thread_unarchive.rs Add thread/unarchive to restore archived rollouts (#9843) 2026-01-26 11:24:36 -08:00
turn_interrupt.rs Add text element metadata to types (#9235) 2026-01-14 16:41:50 -08:00
turn_start.rs chore(core) move model_instructions_template config (#9871) 2026-01-26 07:02:11 +00:00