[PR #2223] [MERGED] fix(comparison): recheck historical calls-only changes #5094

Closed
opened 2026-10-31 01:03:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2223
Author: @dakjdakd
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/function-comparison-coverage


📝 Commits (4)

  • f2c956e fix(comparison): preserve incomplete function call evidence
  • c1276cd Merge remote-tracking branch 'upstream/main' into fix/function-comparison-coverage
  • 61609b2 fix(comparison): recheck historical calls-only changes
  • bcfa3ab chore: merge main into function call coverage fixes

📊 Changes

3 files changed (+154 additions, -12 deletions)

View changed files

📝 src/domain/reconstructionVerification.functionSources.test.ts (+116 -1)
📝 src/domain/reconstructionVerification.ts (+35 -11)
📝 tests/boundary/mcp/comparisonUnknownsMcp.test.ts (+3 -0)

📄 Description

Refs #2222

Problem

A historical function comparison can record overall = changed because one source exposed fewer calls, even though that source's call coverage was incomplete. Reconstruction verification must distinguish that uncertain difference from an independently established function change.

The original call-coverage correction is now on main in 049132ab43. Its guard rechecks incomplete source calls for calls claims and for overall claims whose recorded status is not changed. Historical overall changes therefore still bypass the guard: a calls-only difference can incorrectly become a definitive verification failure.

For example, a stored comparison can report one changed dimension, calls, with unchanged pseudocode. If one source omitted edges or could not resolve a computed call, the missing relationships can explain the recorded difference. That evidence supports unknown, not fail. Conversely, independently changed pseudocode remains a valid counterexample even when call coverage is partial.

Change

The branch merges the current main implementation and uses its existing parsed function-source facts and shared call-coverage interpretation. Superseded helpers and duplicate tests from the original branch are removed.

Comparison parsing now returns the recorded observed status together with whether a function change is independently established. For an overall function claim, a mismatched function identity or a changed non-call dimension on a matched function establishes that independent difference. Otherwise, overall verification applies the same source call-coverage limitations as a calls claim.

The decision becomes unknown when incomplete calls are the only basis for the historical overall change. The stored comparison remains unchanged, including its original observed_status: changed; verification records the source limitations instead of rewriting historical Evidence.

Regression coverage

The new admitted-bundle cases cover missing coverage, explicit unknown coverage, partial coverage, and unresolved calls despite a nominally complete relationship set. Each case verifies both the calls claim and the overall claim, including the source limitation and retained historical observed status.

Controls establish that complete calls-only differences still fail, the unchanged pseudocode claim still passes, and the original comparison Evidence is not mutated. Existing coverage for an independent pseudocode change continues to require failure despite incomplete calls.

Compatibility and scope

The change affects reconstruction classification of historical function comparisons. It introduces no tool arguments, schema fields, provider execution, dependencies, or mutation authority. Finite non-call dimensions retain their own verdicts. It builds on the existing call-coverage ownership on main rather than introducing another interpretation of provider output.

Validation

With the pinned Node.js 24.18.0 and npm 11.16.0 toolchain on Windows:

  • Seven focused domain/MCP suites passed, with 119 tests passed.
  • npm run check passed all six tasks and the architecture guards.
  • npm run docs:check passed, including the README documentation tests.
  • git diff --check passed.

The focused selection covers function comparison semantics, function dossier evidence, reconstruction classification, and public MCP comparison/unknown propagation. The new cases exercise admitted stored comparison bundles and their linked source Evidence. No live IDA, Hopper, or Ghidra run is claimed; this remaining change is historical domain verification and deterministic MCP coverage.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2223 **Author:** [@dakjdakd](https://github.com/dakjdakd) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/function-comparison-coverage` --- ### 📝 Commits (4) - [`f2c956e`](https://github.com/morluto/rea/commit/f2c956e2b34f133537969250746a1df3f2854d97) fix(comparison): preserve incomplete function call evidence - [`c1276cd`](https://github.com/morluto/rea/commit/c1276cd6525ef780476ca6a531ee0b2321610f32) Merge remote-tracking branch 'upstream/main' into fix/function-comparison-coverage - [`61609b2`](https://github.com/morluto/rea/commit/61609b25f1e2ac4c9d1aea52256b9f794874881b) fix(comparison): recheck historical calls-only changes - [`bcfa3ab`](https://github.com/morluto/rea/commit/bcfa3abccc1c76b130c06a39cd16cace062dc7ce) chore: merge main into function call coverage fixes ### 📊 Changes **3 files changed** (+154 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/reconstructionVerification.functionSources.test.ts` (+116 -1) 📝 `src/domain/reconstructionVerification.ts` (+35 -11) 📝 `tests/boundary/mcp/comparisonUnknownsMcp.test.ts` (+3 -0) </details> ### 📄 Description Refs #2222 ## Problem A historical function comparison can record `overall = changed` because one source exposed fewer calls, even though that source's call coverage was incomplete. Reconstruction verification must distinguish that uncertain difference from an independently established function change. The original call-coverage correction is now on main in 049132ab43fa962d31774f2b258c15a71217148b. Its guard rechecks incomplete source calls for calls claims and for overall claims whose recorded status is not `changed`. Historical overall changes therefore still bypass the guard: a calls-only difference can incorrectly become a definitive verification failure. For example, a stored comparison can report one changed dimension, `calls`, with unchanged pseudocode. If one source omitted edges or could not resolve a computed call, the missing relationships can explain the recorded difference. That evidence supports `unknown`, not `fail`. Conversely, independently changed pseudocode remains a valid counterexample even when call coverage is partial. ## Change The branch merges the current main implementation and uses its existing parsed function-source facts and shared call-coverage interpretation. Superseded helpers and duplicate tests from the original branch are removed. Comparison parsing now returns the recorded observed status together with whether a function change is independently established. For an overall function claim, a mismatched function identity or a changed non-call dimension on a matched function establishes that independent difference. Otherwise, overall verification applies the same source call-coverage limitations as a calls claim. The decision becomes `unknown` when incomplete calls are the only basis for the historical overall change. The stored comparison remains unchanged, including its original `observed_status: changed`; verification records the source limitations instead of rewriting historical Evidence. ## Regression coverage The new admitted-bundle cases cover missing coverage, explicit unknown coverage, partial coverage, and unresolved calls despite a nominally complete relationship set. Each case verifies both the calls claim and the overall claim, including the source limitation and retained historical observed status. Controls establish that complete calls-only differences still fail, the unchanged pseudocode claim still passes, and the original comparison Evidence is not mutated. Existing coverage for an independent pseudocode change continues to require failure despite incomplete calls. ## Compatibility and scope The change affects reconstruction classification of historical function comparisons. It introduces no tool arguments, schema fields, provider execution, dependencies, or mutation authority. Finite non-call dimensions retain their own verdicts. It builds on the existing call-coverage ownership on main rather than introducing another interpretation of provider output. ## Validation With the pinned Node.js 24.18.0 and npm 11.16.0 toolchain on Windows: - Seven focused domain/MCP suites passed, with 119 tests passed. - `npm run check` passed all six tasks and the architecture guards. - `npm run docs:check` passed, including the README documentation tests. - `git diff --check` passed. The focused selection covers function comparison semantics, function dossier evidence, reconstruction classification, and public MCP comparison/unknown propagation. The new cases exercise admitted stored comparison bundles and their linked source Evidence. No live IDA, Hopper, or Ghidra run is claimed; this remaining change is historical domain verification and deterministic MCP coverage. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:03:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5094
No description provided.