core-agent-ide/codex-rs/app-server/tests/common
Charley Cunningham 62266b13f8
Add thread/unarchive to restore archived rollouts (#9843)
## Summary
- Adds a new `thread/unarchive` RPC to move archived thread rollouts
back into the active `sessions/` tree.

## What changed
- **Protocol**
  - Adds `thread/unarchive` request/response types and wiring.
- **Server**
  - Implements `thread_unarchive` in the app server.
  - Validates the archived rollout path and thread ID.
- Restores the rollout to `sessions/YYYY/MM/DD/...` based on the rollout
filename timestamp.
- **Core**
- Adds `find_archived_thread_path_by_id_str` helper for archived
rollouts.
- **Docs**
  - Documents the new RPC and usage example.
- **Tests**
  - Adds an end-to-end server test that:
    1) starts a thread,
    2) archives it,
    3) unarchives it,
    4) asserts the file is restored to `sessions/`.

## How to use
```json
{ "method": "thread/unarchive", "id": 24, "params": { "threadId": "<thread-id>" } }
```

## Author Codex Session

`codex resume 019bf158-54b6-7960-a696-9d85df7e1bc1` (soon I'll make this
kind of session UUID forkable by anyone with the right
`session_object_storage_url` line in their config, but for now just
pasting it here for my reference)
2026-01-26 11:24:36 -08:00
..
auth_fixtures.rs [connectors] Support connectors part 1 - App server & MCP (#9667) 2026-01-22 16:48:43 -08:00
BUILD.bazel feat: add support for building with Bazel (#8875) 2026-01-09 11:09:43 -08:00
Cargo.toml feat: introduce codex-utils-cargo-bin as an alternative to assert_cmd::Command (#8496) 2025-12-23 19:29:32 -08:00
lib.rs Feat: request user input tool (#9472) 2026-01-19 10:17:30 -08:00
mcp_process.rs Add thread/unarchive to restore archived rollouts (#9843) 2026-01-26 11:24:36 -08:00
mock_model_server.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
models_cache.rs feat(core) ModelInfo.model_instructions_template (#9597) 2026-01-21 18:11:18 -08:00
responses.rs Feat: add isOther to question returned by request user input tool (#9890) 2026-01-26 09:52:38 -08:00
rollout.rs fix(core) Preserve base_instructions in SessionMeta (#9427) 2026-01-19 21:59:36 -08:00