test(app-server): add findFilesStream integration scenarios

Cover 10 scenarios: single match; empty query; empty roots; no matches; multi-root merge; same token updates request id/query; same token + different roots cancels old stream; per-root limit; chunking over chunk size; sorted unique indices.

Also fix a stream completion race by tracking walker liveness in codex-file-search’s DebouncedSearchManager/SearchManager.
This commit is contained in:
Dylan Hurd
2026-01-26 16:11:41 -07:00
parent 1d67af9f04
commit a91e974efb
4 changed files with 500 additions and 12 deletions

View File

@@ -573,6 +573,23 @@ impl McpProcess {
self.send_request("fuzzyFileSearch", Some(params)).await
}
/// Send a `findFilesStream` JSON-RPC request.
pub async fn send_find_files_stream_request(
&mut self,
query: &str,
roots: Vec<String>,
cancellation_token: Option<String>,
) -> anyhow::Result<i64> {
let mut params = serde_json::json!({
"query": query,
"roots": roots,
});
if let Some(token) = cancellation_token {
params["cancellationToken"] = serde_json::json!(token);
}
self.send_request("findFilesStream", Some(params)).await
}
async fn send_request(
&mut self,
method: &str,