test(app-server): assert persisted subagent source

This commit is contained in:
Brent Traut
2026-07-08 10:51:29 -07:00
parent 3bbf127f33
commit de6f2d2aa1
2 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -424,7 +424,7 @@ replace that sweep or recover mutations missed while disconnected.
`threadCatalog/changed` contains persisted sidebar metadata only. It never contains turns, items,
messages, deltas, tool state, or loaded runtime status. Subagent summaries include relationship and
display metadata such as `parentThreadId`, `threadSource`, `agentNickname`, and `agentRole`; clients
display metadata such as `parentThreadId`, `source`, `agentNickname`, and `agentRole`; clients
compose runtime state from `thread/status/changed` rather than this feed.
### Example: List descendant threads
@@ -4030,16 +4030,14 @@ config_file = "./custom-role.toml"
assert_eq!(
(
child_summary.parent_thread_id.as_deref(),
child_summary.thread_source.as_ref(),
matches!(
child_summary.source,
codex_app_server_protocol::SessionSource::SubAgent(_)
),
child_summary.agent_nickname.as_deref().map(str::is_empty),
child_summary.agent_role.as_deref(),
),
(
Some(thread.id.as_str()),
Some(&ThreadSource::Subagent),
Some(false),
Some("custom"),
)
(Some(thread.id.as_str()), true, Some(false), Some("custom"),)
);
let turn_completed = timeout(DEFAULT_READ_TIMEOUT, async {