Repository navigation
fix(ci): validate artifact MCP replies against named schemas - #6021
Conversation
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. |
|
@codex review Please review exact head e105a9c. A real stdio reply with canonical_path:number was accepted by the fresh unlisted SDK client; the forged guard failed before and passes after named-schema binding. Check connection-scoped static REA schema ownership, same-client reconnect, duplicate-name rejection, request options and both cleanup owners. Nine new guards and284 related tests passed; fullci:full run39611862870 is pending. Native Apple/browser/Windows coverage must come from executed CI, not the Linux admission probe. |
[Medium impact] The PR appears safe to merge; no new actionable defects were found. SummaryArtifact verification now selects each tool’s advertised output schema through one shared helper.
The merge-base checks differed, so the full PR diff was reviewed as changes since the last review. Tests were not run locally. Live supersession status could not be checked because GitHub access was unavailable. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Artifact verification call] --> B{Caller supplied toolDefinition?}
B -->|Yes| C[Reject before dispatch]
B -->|No| D[Get advertised definitions for connection]
D --> E[Require unique tool name and output schema]
E --> F[Call SDK with selected definition and request options]
F --> G[Return reply or validation error]
Reviews (4) · Last reviewed commit: "fix(ci): reject artifact MCP schema over..." · Reviewed by Greptile |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
@codex review |
|
@greptileai review Please re-review the schema ownership fix at 3d8410f. The supplied-definition bypass is now rejected before dispatch; the red-before/green-after regression and preservation of explicit request timeouts both pass. Full CI is running on this exact revision. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
A fresh SDK client has no cached tools/list, so generic tool calls in artifact verification can skip their output schema. Bind actual advertised definitions before lifecycle and analysis calls; compile only the selected schema, reuse one discovery within a negotiated connection and invalidate across reconnects. Keep request options, all existing provider assertions and both cleanup owners. Remove the duplicated provenance definition index and raw artifact call paths. A real stdio boundary fault changes canonical_path from string to number: the unfixed helper accepts it, while the selected SDK schema rejects it. Preserve healthy, space/Unicode, missing-schema, ambiguous-catalog and connection reuse controls. No production provider authority or CLI/MCP contract change. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage) Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Keep schema selection with the advertised-catalog owner while preserving request options. Prove that a permissive override accepts a corrupted real reply before the fix, then rejects it before dispatch afterwards. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage) Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
3d8410f to
f734d46
Compare
|
@codex review @greptileai review Rebased onto current main 2319166, producing f734d46. Both authored patches are identical by git range-diff; the preceding head passed complete CI (24,222 portable tests) and both reviews. This revision also incorporates five intervening runtime fixes, so full CI is running again to qualify the integration. |
|
@codex review |
|
@greptileai review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Summary
A fresh MCP SDK client has no held tools/list, so the artifact verification helper can skip output-schema validation. A real stdio boundary probe changed result.canonical_path from string to number while retaining the caller path: the old helper passed, although the advertised contract requires a string.
Discover actual tool definitions once per negotiated REA connection and bind lifecycle/analysis calls to the named SDK schema. Reject absent schemas, duplicate names and caller-supplied schema overrides. Share concurrent discovery, discard failed loads and rebind on reconnect. Preserve request options and attempt both owned cleanup operations while retaining the primary error. Raw artifact calls share this owner; the duplicated native-provenance definition index is removed. Existing provider/parity/identity assertions remain. Verification scope only; no new provider capability or authority.
Validation
PR head
f734d463c9fe881887d454ee20e5ded2b614b11b; full PR CI tested merge preview760a75011with main2319166c2. Node 24.18.0/npm 11.16.0; four-core affinity, two compiler checkers, one test worker and serial Turbo.npm run checkpassed (28.3s,54.0 CPU seconds,1530MiB); diff checks passed. The earlier cleanup/SDK/routing guard set passed 284 tests with no skips.f86206535without findings. The actionable supplied-schema finding is fixed and resolved.8e3bf56e1. Its conflict-free integration with this PR has treece5264688d5ed5198e6607edd061a6ad041629cd:complete static checks passed, and287 tests passed with1 named skip across11 files (all ten newly changed test files plus this PR guard). This ran391.8s,406.7 CPU seconds,1999MiB sampled family RSS. Full qualification of the actual merge commit passed on its first attempt:24,272 portable tests passed,200 named skips,1901 files passed and24 skipped, with all selected real-platform lanes passing. The earlier main feedback failure at8e3bf56e1exposed an unrelated fluctuating heap-observation fixture; its reproduced structural fix is fix(ci): use one heap snapshot for JavaScript admission #6081.Two-session admission/close measurements on the earlier
6d356b843runtime: warm filesystem, fresh parent process, separate initially empty child compile-cache roots, equivalent replies with SDK validation active:The original unvalidated helper took 4.4s and is not an equivalent baseline. RSS samples can double-count shared pages/miss short children. Agent tokens and whole-Apple-job speedup are unmeasured; the historical Apple 15m cancellation's cause is not established by this fix. Linux resource-only admission does not prove native provider behavior; current real-platform CI must pass before merge.
Author readiness
Human owner: @gensokyo-dev
Declarations entered under the user's explicit delegation; independent human review was not observed in this session.
Before merge