Repository navigation
test(mcp): assert snapshot-import and unknown-receipt facts instead of guidance prose - #11004
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis 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. |
Contributor
[Low impact] This test-only change appears safe to merge. SummaryThis test-only PR replaces guidance-sentence checks with structured error facts. Production code is unchanged.
Reviews (2) · Last reviewed commit: "test(mcp): assert snapshot-import and un..." · Reviewed by Greptile |
This was referenced Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #10508 (Phase 6.1, first MCP slice). Two MCP boundary test files matched guidance sentences for facts the error already carries as structured fields:
details.reason,retryableandreported_limits.committed_unknown. They now assert those fields, plus tool and parameter names where no field exists. Production code is unchanged.Problem and expected behavior
workflowSnapshotReplayMcp.test.ts: the snapshot-import helper checked five fragments of one guidance sentence, including "loads and updates" and "not been validated". A second test checked "not been validated" again. The structureddetails: { operation: "read", reason: "wrong-kind" }was not asserted.serverUnknownsMcp.test.ts: checked "cannot reconcile" next tocode: "evidence_integrity_mismatch", "do not repeat record_unknown" next toretryable: falseanddetails.reason: "already-exists", and "Do not repeat the completed mutation" and "may be too large" next toreported_limits.committed_unknownandevidence_reference.Change and scope
codeplusdetails.operationanddetails.reason. The remediation keeps only the restore route names,open_binary,snapshot_pathand--snapshot, and the snapshot-shaped case assertssnapshot_path. No structured field says "the input is an analysis snapshot", so those parameter names are what tells snapshot guidance apart from otherwrong-kindrefusals.export_evidence_bundle(a tool name) stays.not.toContain("or page list_unknowns")(whether paging is offered), and the overflow list guidance "same connection" / "smaller limit" / not "CLI JSON". The retry route has no structurednext_operation(see [Design] Assert structured remediation facts instead of guidance prose #10508).Not included: other MCP files.
largeToolResult.test.tsalready compares against the producer functions (stdioResponseBudgetRecovery,nodeStringCeilingRecovery) rather than literal prose.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
EvidenceBundleFiles(snapshot refusal), unknown registry receiptsdocs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): noneExpected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
resemblesAnalysisSnapshotbranch insrc/application/EvidenceBundleFiles.tsdisabled, snapshot-shaped input falls through to the integrity error. Four tests fail, including "does not authenticate snapshot-shaped or unrelated malformed bundle input", on thecode/detailsmatch.For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/mcp/workflowSnapshotReplayMcp.test.ts: 9 passed (5.4 s)npm run test:focused -- tests/boundary/mcp/serverUnknownsMcp.test.ts: 8 passed (15.1 s)npx oxfmt --checkon both files: cleanCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.