Repository navigation
feat(evidence): name the side and issue path of comparison source integrity failures - #11049
Merged
Merged
Conversation
…ity failures compare_process_captures reported which side failed validation, and where, only in the message. EvidenceIntegrityError now carries an optional side and issue path, projected as details.side and details.issue_path, and the CLI's malformed-capture issue carries observed.issue_path. The first issue path comes from the same selection describeValidationFailure names.
Codex Review Summary: ❌ FailedThis 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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryAdds structured source locations to Evidence integrity errors across process comparisons and shared Evidence readers.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Selected Evidence] --> B[Authenticate record]
B -->|Record fails| C[Record-relative issue path]
B -->|Record passes| D[Validate normalized_result]
D -->|Payload fails| E[Prefix path with normalized_result]
C --> F[Attach selected side when known]
E --> F
F --> G[MCP details or CLI observed fields]
Reviews (2) · Last reviewed commit: "feat(evidence): report source authentica..." · Reviewed by Greptile |
22 tasks
…dence owner readEvidence and readImmutableEvidence now set the record-relative issue path on their integrity failure, and readEvidencePayload sets it when the caller says where the payload sits. compare_functions passes its side, so a tampered function source reports details.side and details.issue_path like compare_process_captures. Process capture result issue paths are now relative to the Evidence record (normalized_result.*) on both adapters.
22 tasks
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). When
compare_process_capturesrefuses capture Evidence that fails authentication or whose capture result is malformed, MCP returnedevidence_integrity_mismatchwith onlydetails.reason; which side failed and where was only in the message. The error now carriesdetails.sideanddetails.issue_path, and the CLI's equivalent input issue carriesobserved.issue_path.Problem and expected behavior
Change and scope
EvidenceIntegrityError: optionalsideandissuePath;analysisErrorProjectionadds them todetailswhen set. Other producers are unchanged.validationFailure.ts:firstValidationIssuePath(cause)returns the locationdescribeValidationFailurenames (undefined for a non-schema cause), so field and message cannot disagree.ProcessComparisonService.readProcessComparisonSource:invalid-evidenceandinvalid-capturesetsideand the issue path.ProcessCli.invalidCaptureEvidence: the[side]issue setsobserved.issue_path.Sibling sweep:
compare_functionsauthenticates sources throughreadEvidence, which had the same gap. The issue path now comes from that owner (readEvidence/readImmutableEvidencealways, root-relative;readEvidencePayloadonly when the caller states where the payload sits), andparseFunctionEvidencepasses its side. Process capture result paths are prefixed withnormalized_resulton both adapters so everyissue_pathis relative to the Evidence record.Not included: artifact comparison and other
readEvidencePayloadcallers (their payload position is not passed yet, so they omitissue_path); the remaining-issue count.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
readEvidence/readEvidencePayload(evidenceValidation.ts, source authentication owner) set the record-relative issue path;readProcessComparisonSource(MCP projection ofProcessCaptureEvidenceFailure) andprojectCaptureFileFailure(CLI);firstValidationIssuePathbesidedescribeValidationFailureowns the first-issue selection both the message and the field use;EvidenceIntegrityErrorcarries the factsevidence_integrity_mismatcherrors fromcompare_process_capturesandcompare_functionsgaindetails.sideanddetails.issue_path(relative to the Evidence record, e.g.["evidence_id"]or["normalized_result","manifest","rea_version"]); otherreadEvidencecallers gaindetails.issue_path; the CLI malformed-capture issue gainsobserved.issue_path. Codes, categories and messages unchangeddocs/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
processComparisonDiagnosticsMcp.test.ts: 7 message assertions becomedetails.side/details.issue_path(MCP) andobserved.issue_path(CLI); provider and contract-field issues drop redundant sentences (theirpath,reasonandexpectedalready carry the fact).functionComparisonMcp.test.tstampered-source case assertsside: "left",issue_path: ["evidence_id"].sessionMcp.test.tsnesting-depth case assertsside: "left",issue_path: ["parameters"]and keeps the depth limit numberinvalid-capturebranch and the CLI issue, 2 of 25 tests fail; withreadEvidenceignoring the caller's side, the function case failscompare_process_captureswith a tampered right capture →{"code":"evidence_integrity_mismatch","details":{"reason":"right Evidence failed validation","side":"right","issue_path":["evidence_id"]},…}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/processComparisonDiagnosticsMcp.test.ts tests/boundary/mcp/processComparisonVerificationMcp.test.ts: 27 passednpm run test:focused -- tests/boundary/mcp/sessionMcp.test.ts: 12 passed (11.1 s wall)npm run test:focused -- tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts tests/boundary/mcp/functionComparisonMcp.test.ts tests/boundary/mcp/functionComparisonIntegrityMcp.test.ts tests/boundary/mcp/processEvidenceIdentityMcp.test.ts tests/acceptance/tools/nativeFunctionMatching.test.ts: 90 passednpm run check:fast: passedcommand— resultCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.