Repository navigation
fix(managed): share native verification input diagnostics - #2901
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. |
|
|
Thank you for removing the duplicate managed/native input validator, @ShitK. Reusing the domain schema keeps the diagnostic for a reused Evidence ID consistent. Welcome to REA! |
Summary
Fixes #2621.
A single native observation that reuses the managed boundary's Evidence ID now reports only the role-distinctness error. Genuine duplicate native observations still report the uniqueness error.
Problem and expected behavior
The request validator seeded its native-ID set with the managed boundary ID, so one observation could incorrectly produce both diagnostics. The domain validator already distinguished these rules correctly.
Change and scope
Use
managedNativeVerificationInputSchemadirectly in the tool contract, removing the duplicate validator and its superseded export. Move the existing native-observation field description to that canonical schema to preserve caller guidance. The domain owns validation for both the workflow and its advertised request contract.Contract and boundary impact
Evidence and regression coverage
The updated contract test asserts exact messages and paths for one observation reusing the boundary, repeated native observations, repeated observations also reusing the boundary, and valid distinct observations. It exercises the domain schema, named tool contract, and metadata-wrapped Standard Schema validator.
On base
7e3a19863835215491b55fba7127a78bad6a7709, the updated test reproduced the bug: 2 failed, 4 passed. With the fix, the four selected files passed 35 tests, including existing managed verification and in-memory MCP SDK coverage.Validation performed
macOS arm64, Node.js 24.18.0, npm 11.16.0:
src/contracts/workflowInputContracts.test.ts,src/contracts/toolInputReferences.test.ts,tests/conformance/providers/managed/managedNativeVerification.test.ts, andtests/boundary/mcp/managedMcp.test.ts— 35 passed (6 + 16 + 11 + 2).knip, module-boundary and architecture guards, test discovery (1,108 files exactly once),git diff --check, and the normal pre-commit hook — passed.npm run test:focusedandnpm run docs:check— blocked by existingSupportedClients.tsTS2322 errors at lines 542, 744, and 809 (devinformat).npm run check— stopped on existing formatting failures infunctionComparison.test.tsandIdaOperationRunner.ts.clientProfileLifecycle.test.ts:297and duplicatejoinimports (TS2300) inghidraInventoryMcp.test.ts:4,17.These blockers were independently reproduced on an exported pristine copy of the base revision with the same runtime. The standard checks remain blocked. The normal pre-push hook also failed on the unchanged duplicate
joinimport; this branch was pushed with a one-commandHUSKY=0override.Compatibility, safety, and release
No migration or release metadata change is needed. The executed MCP tests use an in-memory transport; compiled CLI, stdio transport, real engines, and CI results are not claimed. This fix was prepared with AI assistance.
Before merge