[PR #603] [MERGED] fix(comparison): account for unpaired records after explicit bundle pairing #2101

Closed
opened 2026-10-16 21:14:18 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/603
Author: @rudycelekli
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: campaign/rea-oct5-domain-bundle-pairs


📝 Commits (3)

  • 768f056 fix(comparison): account for unpaired records after explicit bundle pairing
  • b69e42f test(browser): preserve unknown with-scope loader bindings
  • fbcc337 chore: merge upstream source-map fixture correction

📊 Changes

2 files changed (+53 additions, -2 deletions)

View changed files

📝 src/domain/bundleComparison.test.ts (+51 -0)
📝 src/domain/bundleComparison.ts (+2 -2)

📄 Description

Summary

Explicit cross-record pairs no longer discard leftover opposite-side occurrences; one-sided membership stays unknown, without inferred additions or removals.

No issue is linked: this is a narrow, reproduced correction to an existing comparison invariant discovered while reviewing current code, with no new feature, architectural change, or public contract requiring a proposal.

Problem and expected behavior

For two bundles both containing A, B, C, an explicit A-left to B-right pair produced one changed pair and one unchanged C but silently dropped leftover B-left and A-right. Every input-side record must be accounted for after caller-selected one-to-one pairing.

Change and scope

Preserve remaining opposite-side occurrences when that same ID has already been consumed by an explicit pair. Keep the current upstream contract: one-sided membership remains unknown with unresolved_branch conclusions, and records_added/records_removed remain zero. Existing pair validation and Evidence identities are preserved.

Contract and boundary impact

  • Semantic owner and earliest changed stage: Evidence bundle comparison / explicit record-pair accounting.
  • CLI and MCP/tool-catalog contract: same commands, schemas and result fields; corrected existing comparison values only.
  • Provider, bridge, target-format, or platform compatibility: no provider/bridge changes or new platform support.
  • Evidence, artifact, provenance, or reconstruction contract: existing content-addressed inputs and provenance preserved; no new artifact identity or authority claim.
  • Process execution, authorization, cleanup, or containment impact: none in production.
  • Generated metadata (docs/product-catalog.json), package, or installation impact: none; relevant metadata checks remain enforced.

Evidence and regression coverage

  • Tests added or updated: 7 focused canonical bundle comparison tests pass, including left/right count conservation and invalid-pair coverage.
  • Base reproduction or other evidence: executed production comparison regression fails on unchanged branch base; patched regression passes. No module mocks.
  • User-visible CLI/MCP output (if applicable): representative selected fields from the executed comparison fixture, not a claimed live CLI/provider session:
{"status":"unknown","summary":{"records_unchanged":1,"records_changed":1,"records_removed":0,"records_added":0,"unresolved":2}}
  • Remaining proof gaps: Caller-selected record alignment, not behavioral absence or runtime equivalence. The unmatched occurrence classifications retain existing limitations.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- src/domain/bundleComparison.test.ts — pass: 1 files, 7 tests.
  • npm run check — pass on final signed head.
  • Current upstream AGENTS.md/CONTRIBUTING (#599) makes full check:pr optional for narrow fixes. Previous full-suite, check:ci and package evidence remains archived for the pre-repair or pre-rebase head; those counts are not claimed for this head. No packaging/distribution or provider behavior changed.

Existing upstream lint/TypeDoc warnings remain; passing gates are not claimed warning-free.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; existing comparison result shape preserved.
  • Real Hopper/Ghidra, browser, or OS coverage: not required for this pure comparison correction; controlled Evidence/fixture coverage described above.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no secrets, production data, new process execution, authorization mechanism, or containment change.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed (no new public contract or metadata change).
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

AI assistance was used for investigation, implementation and testing. The commit is signed and includes DCO sign-off.

CI baseline fixture follow-up

CI exposed an upstream source-map recovery fixture expecting a require inside dynamic with scope to be a known unbound loader. The lexical producer correctly keeps that binding unknown. The maintainer independently corrected the fixture in #609. I merged that upstream change and preserved the owner's exact fixture; the final diff against that upstream parent contains only this comparison correction. No production source-map extraction was weakened.

At final signed merge head fbcc337221745a18c79c0684af0ae4082f5dcf2e, npm run build:cached, npm run check, and the pre-push npm run check:fast pass; 30 focused tests across 2 files pass, including the original comparison regressions and all 23 source-map boundary tests. Remote CI reruns are not claimed complete while pending.


🔄 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/603 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `campaign/rea-oct5-domain-bundle-pairs` --- ### 📝 Commits (3) - [`768f056`](https://github.com/morluto/rea/commit/768f056e647973fd0066f3ce0dd932f3f784de77) fix(comparison): account for unpaired records after explicit bundle pairing - [`b69e42f`](https://github.com/morluto/rea/commit/b69e42fa8b9bd66b0d70d1c8cd86338fd030fefc) test(browser): preserve unknown with-scope loader bindings - [`fbcc337`](https://github.com/morluto/rea/commit/fbcc337221745a18c79c0684af0ae4082f5dcf2e) chore: merge upstream source-map fixture correction ### 📊 Changes **2 files changed** (+53 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/bundleComparison.test.ts` (+51 -0) 📝 `src/domain/bundleComparison.ts` (+2 -2) </details> ### 📄 Description ## Summary Explicit cross-record pairs no longer discard leftover opposite-side occurrences; one-sided membership stays unknown, without inferred additions or removals. No issue is linked: this is a narrow, reproduced correction to an existing comparison invariant discovered while reviewing current code, with no new feature, architectural change, or public contract requiring a proposal. ## Problem and expected behavior For two bundles both containing A, B, C, an explicit A-left to B-right pair produced one changed pair and one unchanged C but silently dropped leftover B-left and A-right. Every input-side record must be accounted for after caller-selected one-to-one pairing. ## Change and scope Preserve remaining opposite-side occurrences when that same ID has already been consumed by an explicit pair. Keep the current upstream contract: one-sided membership remains unknown with unresolved_branch conclusions, and records_added/records_removed remain zero. Existing pair validation and Evidence identities are preserved. ## Contract and boundary impact - Semantic owner and earliest changed stage: Evidence bundle comparison / explicit record-pair accounting. - CLI and MCP/tool-catalog contract: same commands, schemas and result fields; corrected existing comparison values only. - Provider, bridge, target-format, or platform compatibility: no provider/bridge changes or new platform support. - Evidence, artifact, provenance, or reconstruction contract: existing content-addressed inputs and provenance preserved; no new artifact identity or authority claim. - Process execution, authorization, cleanup, or containment impact: none in production. - Generated metadata (`docs/product-catalog.json`), package, or installation impact: none; relevant metadata checks remain enforced. ## Evidence and regression coverage - Tests added or updated: 7 focused canonical bundle comparison tests pass, including left/right count conservation and invalid-pair coverage. - Base reproduction or other evidence: executed production comparison regression fails on unchanged branch base; patched regression passes. No module mocks. - User-visible CLI/MCP output (if applicable): representative selected fields from the executed comparison fixture, not a claimed live CLI/provider session: ```json {"status":"unknown","summary":{"records_unchanged":1,"records_changed":1,"records_removed":0,"records_added":0,"unresolved":2}} ``` - Remaining proof gaps: Caller-selected record alignment, not behavioral absence or runtime equivalence. The unmatched occurrence classifications retain existing limitations. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:focused -- src/domain/bundleComparison.test.ts` — pass: 1 files, 7 tests. - `npm run check` — pass on final signed head. - Current upstream AGENTS.md/CONTRIBUTING (#599) makes full check:pr optional for narrow fixes. Previous full-suite, check:ci and package evidence remains archived for the pre-repair or pre-rebase head; those counts are not claimed for this head. No packaging/distribution or provider behavior changed. Existing upstream lint/TypeDoc warnings remain; passing gates are not claimed warning-free. ## Compatibility, safety, and release - Breaking changes or migration steps: none; existing comparison result shape preserved. - Real Hopper/Ghidra, browser, or OS coverage: not required for this pure comparison correction; controlled Evidence/fixture coverage described above. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no secrets, production data, new process execution, authorization mechanism, or containment change. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed (no new public contract or metadata change). - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. AI assistance was used for investigation, implementation and testing. The commit is signed and includes DCO sign-off. ## CI baseline fixture follow-up CI exposed an upstream source-map recovery fixture expecting a require inside dynamic with scope to be a known unbound loader. The lexical producer correctly keeps that binding unknown. The maintainer independently corrected the fixture in #609. I merged that upstream change and preserved the owner's exact fixture; the final diff against that upstream parent contains only this comparison correction. No production source-map extraction was weakened. At final signed merge head `fbcc337221745a18c79c0684af0ae4082f5dcf2e`, `npm run build:cached`, `npm run check`, and the pre-push `npm run check:fast` pass; 30 focused tests across 2 files pass, including the original comparison regressions and all 23 source-map boundary tests. Remote CI reruns are not claimed complete while pending. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:18 +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#2101
No description provided.