Repository navigation
fix(process): retain selected freshness requirement in comparison Evidence parameters - #4065
Conversation
…dence parameters Preserve caller-selected max_capture_age_ms in compare_process_captures Evidence parameters so returned and session-retained records distinguish freshness-constrained comparisons and derive distinct semantic Evidence identities. Add boundary MCP regression coverage asserting that max_capture_age_ms is omitted when unconstrained, retained in parameters and session evidence when specified, and differentiates comparison Evidence IDs. Closes morluto#4000
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. |
[Medium impact] This PR appears safe to merge. SummaryPreserves caller-selected
Reviews (1) · Last reviewed commit: "fix(process): retain selected freshness ..." · Reviewed by Greptile |
|
Thanks for preserving the caller's freshness requirement in comparison Evidence, @Swatantra-66. Including |
|
Thanks @morluto, and happy to be contributing to REA |
Summary
Fixes #4000.
compare_process_capturesenforces an explicitmax_capture_age_msrequirement but previously omitted it from returned and session-retained comparison Evidenceparameters. This caused otherwise identical process comparisons with and without an explicit freshness requirement to derive identicalevidence_idhashes, losing the provenance of the freshness check.This PR projects caller-selected
max_capture_age_msinto the recorded Evidenceparameters, ensuring that freshness-constrained comparisons derive distinct semantic Evidence identities and preserve their provenance across returned tool results and session storage.Problem and expected behavior
When
compare_process_captureswas called withmax_capture_age_ms, the freshness constraint was passed tocompareProcessCaptures(), but omitted duringcreateEvidence()parameters construction inregisterProcessComparisonTool.ts. As a result:max_capture_age_msproduced the sameevidence_id, violating semantic uniqueness.Expected behavior: A caller's explicit
max_capture_age_msselection is preserved in the Evidenceparameters, distinguishing its derivedevidence_idfrom an unconstrained comparison and maintaining traceability insession.evidenceById().Change and scope
src/server/registerProcessComparisonTool.ts, projectmax_capture_age_msintocreateEvidence({ parameters: { ... } })when defined on the tool input.tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts.Contract and boundary impact
compare_process_captures)processComparisonInputSchema.parameters.Expected effects:
Evidence and regression coverage
tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts("retains a selected max_capture_age_ms requirement in comparison Evidence parameters")mainwith:For evidence-bearing changes:
Validation performed
Executed locally on Windows 11 x64 (Node 24.18.0):
npm run test:focused -- tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts— 16/16 tests passed.npm run check:fast— turbo typecheck & lint passed.npm run docs:check— 6/6 documentation and catalog conformance checks passed.Compatibility, safety, and release
Author readiness
Human owner: @Swatantra-66
Before merge
type(scope): outcome.