test(mcp): take the first settled search before pinning freshness - #1891
Conversation
search_returns_the_named_symbol_and_rejects_a_missing_query warmed the index and then pinned the next search's freshness to fresh. The warm-up proves the generation is current and every lane complete, but the seat can still have a continuation pass in flight, and a search taken while it runs reports verifying. The distribution acceptance battery saw that once in 517 tests. The test now takes the first search that reports the settled state before pinning the literal payload. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e42ea4858
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if hit["freshness"] == json!({ "state": "fresh" }) { | ||
| break; | ||
| } | ||
| tokio::time::sleep(std::time::Duration::from_millis(250)).await; |
There was a problem hiding this comment.
Retry only the expected verifying state
When the post-warm search is possibly_stale because of a real stale generation, generation mismatch, stale lane, or unavailable authority—not the expected continuation-pass verifying state—this loop silently retries until a later response becomes fresh, allowing the regression this assertion previously detected to pass. Inspect freshness.indexing.staleness_state and retry only verifying, failing immediately for other non-fresh verdicts.
AGENTS.md reference: AGENTS.md:L177-L178
Useful? React with 👍 / 👎.
The shared warm helper waited for status=current, a search on the sealed generation, and complete lane coverage. A seat can still owe its source proof to a continuation pass at that point, and a read taken before the pass binds it reports verifying. #1891 fenced that window in one search test; the context test then hit the same window on CI. The helper now also takes the first search that answers fresh, so every test that warms first is fenced in one place. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The distribution acceptance run at 70517b8 ran the packaged MCP suite and failed one test of 517:
search_returns_the_named_symbol_and_rejects_a_missing_queryreadfreshness.state = verifyingwhere it pinsfresh. The warm-up helper proves the generation is current and every lane complete, but the seat can still have a continuation pass in flight (the same trough #1887 closed for the runtime crate's dashboard-ready helper), and a search taken while that pass runs reportsverifying.The test now takes the first search that reports the settled state, bounded to ten seconds, before pinning the literal payload. Test-only.
🤖 Generated with Claude Code