Skip to content

fix(process): propagate comparison contradictions - #6298

Merged
morluto merged 1 commit into
morluto:mainfrom
gongfpp:fix/process-comparison-contradiction-6218
Oct 22, 2026
Merged

morluto merged 1 commit into
morluto:mainfrom
gongfpp:fix/process-comparison-contradiction-6218

Conversation

@gongfpp

@gongfpp gongfpp commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #6218. Reject inconsistent imported process-comparison aggregates at their shared schema boundary instead of allowing a false successful reconstruction check.

Problem and expected behavior

A content-authenticated record could retain a contradictory dimension with an overall unchanged status. The shared aggregate derivation omitted contradiction, so both the schema and overall verification accepted it. Content authentication does not establish semantic consistency.

Change and scope

Contract and boundary impact

  • Owner: canonical process-comparison derivation/schema. CLI/MCP properties and enums are unchanged; runtime cross-field validation is tightened.
  • Imported Evidence IDs, source links and original records remain unchanged and retained. No provider/bridge, package, installation or generated-metadata change.
  • Read existing files or captured data.

No target execution, injection, mutation, network acquisition or protection recovery is added.

Evidence and regression coverage

  • On base 933af60eba43c29f1fb1c606fddcd725ae0d9d96, the new regressions failed: 12 failures / 7 passes, including the production-registration MCP scenario returning success for the inconsistent comparison.
  • Domain cases cover each of five contradictory dimensions and seven mixed-status pairs in both orders.
  • The MCP SDK in-memory workflow imports a canonical bundle, rejects both overall and selected claims on the inconsistent record with invalid_request / invalid_value, and retains every original record. A consistent contradiction fails both claims; the public compare_process_captures unchanged control still verifies successfully. The same connection remains usable; no provider launches.

Validation performed

macOS arm64, pinned Node.js 24.18.0 / npm 11.16.0, complete locked dependencies. After incorporating upstream 66aacc6fba7fb498302ca58894f179d77a847444:

  • Focused source/MCP regression selection below: 95 tests passed across 7 files.
  • npm run check — passed (typecheck, lint, format, knip, metadata, module and architecture guards).
  • npm run verify:test-discovery — passed; every test file discovered exactly once.
  • git diff --check — passed.
Focused test command
npm run test:focused -- src/domain/process/processCapture.comparison.test.ts src/domain/changedBehavior.test.ts src/domain/staticRuntimeCorrelation.test.ts src/domain/reconstructionVerification.test.ts tests/boundary/mcp/processComparisonVerificationMcp.test.ts tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts tests/boundary/mcp/processEvidenceIdentityMcp.test.ts

Compatibility, safety, and release

Previously accepted comparison aggregates that disagree with contradictory dimensions must be recomputed from retained source captures before consumption. Generic import still retains those records; this change does not rewrite or rehash them. Consistent contradiction records remain explicit failures for reconstruction verification.

This does not redefine all downstream contradiction reporting: existing find_changed_behavior aggregation and static/runtime correlation semantics have separate limitations (#6217 concerns the latter). No claim of complete contradiction-consumer correctness is made.

Not run: stdio/installed-client, real process capture/provider, Windows/Linux, or the full CI suite. No performance claim. Upstream CI and maintainer approval are not established by local checks.

Author readiness

Human owner: @gongfpp

AI-assisted contribution; the human owner confirmed completion of the review and readiness declaration and requested initial maintainer review.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • Human ownership/readiness and required current-head CI checks are complete.
  • Maintainer review confirms the intended mixed-status precedence and contribution scope.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-22T12:43:26.936091Z
We couldn’t complete this review. Comment @codex review to try again.
49a0d66 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issue was found in the changed code.

Summary

Makes deriveProcessComparisonStatus carry contradiction into the overall result. The shared schema now rejects comparisons whose overall status disagrees with their dimensions.

  • Process comparisons now carry contradictions into their overall status.

Reviews (1) · Last reviewed commit: "fix(process): propagate comparison contr..." · Reviewed by Greptile

@morluto
morluto merged commit 77c72b9 into morluto:main Oct 22, 2026
45 of 47 checks passed
@morluto morluto mentioned this pull request Oct 25, 2026
3 tasks done
@morluto morluto added area: runtime Process capture and runtime observation bug Something isn't working labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Overall replay verification passes an imported contradictory process dimension

2 participants