Skip to content

test(mcp): take the first settled search before pinning freshness - #1891

Merged
ScriptedAlchemy merged 1 commit into
masterfrom
fix/search-freshness-settle
Sep 20, 2026
Merged

ScriptedAlchemy merged 1 commit into
masterfrom
fix/search-freshness-settle

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

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_query read freshness.state = verifying where it pins fresh. 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 reports verifying.

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

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>
@changeset-bot

changeset-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0e42ea4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T17:25:27.476138Z 0e42ea4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +79 to +82
if hit["freshness"] == json!({ "state": "fresh" }) {
break;
}
tokio::time::sleep(std::time::Duration::from_millis(250)).await;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@ScriptedAlchemy
ScriptedAlchemy merged commit c020ead into master Sep 20, 2026
26 checks passed
ScriptedAlchemy added a commit that referenced this pull request Sep 21, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant