[PR #4137] [CLOSED] fix(reconstruction): accept artifact comparisons sourced from inspect_artifact #6078

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4137
Author: @Totopo27
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/3984-reconstruction-inspection-sources


📝 Commits (1)

  • ece3186 fix(reconstruction): accept artifact comparisons sourced from inspect_artifact

📊 Changes

2 files changed (+70 additions, -14 deletions)

View changed files

📝 src/domain/reconstructionVerification.test.ts (+46 -0)
📝 src/domain/reconstructionVerification.ts (+24 -14)

📄 Description

Summary

Fixes #3984. Accepts inspect_artifact Evidence as valid sources for compare_artifacts in verify_reconstruction.

Problem and expected behavior

compare_artifacts accepts complete inspect_artifact Evidence (and its authenticated retained summaries) alongside inventory_artifact Evidence as comparison inputs. However, verify_reconstruction's readValidatedSourceFacts in src/domain/reconstructionVerification.ts strictly required source.operation === "inventory_artifact" for structural-artifact claims, throwing TypeError: Comparison source Evidence has an unexpected observation type. Additionally, its payload parser only parsed with artifactInventoryResultSchema, which failed on inspection payloads.

Expected behavior: verify_reconstruction accepts inspect_artifact or inventory_artifact Evidence as sources for structural-artifact claims, parsing inspect_artifact sources against artifactInspectionResultSchema, and allowing verification evaluation to proceed normally.

Change and scope

  • Updated readValidatedSourceFacts in src/domain/reconstructionVerification.ts so structural-artifact claims accept both inventory_artifact and inspect_artifact source operations (with predicate rea.analysis).
  • Parsed inspect_artifact source normalized results with artifactInspectionResultSchema.
  • Added unit regression test in src/domain/reconstructionVerification.test.ts.

Ordinary fix within existing boundaries; contribution scope fit is not applicable.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/domain/reconstructionVerification.ts.
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: allows structural-artifact verification claims to consume comparison evidence derived from inspect_artifact.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: src/domain/reconstructionVerification.test.ts ("accepts artifact comparisons sourced from inspect_artifact Evidence").
  • Base reproduction or other evidence: Calling verifyReconstruction with comparisons referencing inspect_artifact Evidence threw TypeError: Comparison source Evidence has an unexpected observation type on base.
  • User-visible CLI/MCP output (if applicable): verify_reconstruction tool calls now return schema-valid verification Evidence rather than invalid_request.
  • Remaining proof gaps: none.

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 check:fast — passed (typecheck and lint via turbo).
  • npm run test:focused -- src/domain/reconstructionVerification.test.ts — passed (11 tests passed).
  • npm run test:local -- src/domain/reconstructionVerification.test.ts — passed (11 tests passed).

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: none.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none.

Author readiness

Human owner: @Totopo27

  • 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

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • 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.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/4137 **Author:** [@Totopo27](https://github.com/Totopo27) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3984-reconstruction-inspection-sources` --- ### 📝 Commits (1) - [`ece3186`](https://github.com/morluto/rea/commit/ece31865f8089df1a03a350556a27282f67074b2) fix(reconstruction): accept artifact comparisons sourced from inspect_artifact ### 📊 Changes **2 files changed** (+70 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/reconstructionVerification.test.ts` (+46 -0) 📝 `src/domain/reconstructionVerification.ts` (+24 -14) </details> ### 📄 Description ## Summary Fixes #3984. Accepts `inspect_artifact` Evidence as valid sources for `compare_artifacts` in `verify_reconstruction`. ## Problem and expected behavior `compare_artifacts` accepts complete `inspect_artifact` Evidence (and its authenticated retained summaries) alongside `inventory_artifact` Evidence as comparison inputs. However, `verify_reconstruction`'s `readValidatedSourceFacts` in `src/domain/reconstructionVerification.ts` strictly required `source.operation === "inventory_artifact"` for `structural-artifact` claims, throwing `TypeError: Comparison source Evidence has an unexpected observation type`. Additionally, its payload parser only parsed with `artifactInventoryResultSchema`, which failed on inspection payloads. Expected behavior: `verify_reconstruction` accepts `inspect_artifact` or `inventory_artifact` Evidence as sources for `structural-artifact` claims, parsing `inspect_artifact` sources against `artifactInspectionResultSchema`, and allowing verification evaluation to proceed normally. ## Change and scope - Updated `readValidatedSourceFacts` in `src/domain/reconstructionVerification.ts` so `structural-artifact` claims accept both `inventory_artifact` and `inspect_artifact` source operations (with predicate `rea.analysis`). - Parsed `inspect_artifact` source normalized results with `artifactInspectionResultSchema`. - Added unit regression test in `src/domain/reconstructionVerification.test.ts`. Ordinary fix within existing boundaries; contribution scope fit is not applicable. ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/domain/reconstructionVerification.ts`. - Contribution scope fit and linked maintainer decision: not applicable. - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: none. - Evidence, artifact, provenance, or reconstruction contract: allows structural-artifact verification claims to consume comparison evidence derived from inspect_artifact. - Target selection, authority, upstream behavior, and cleanup details (if applicable): none. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: `src/domain/reconstructionVerification.test.ts` ("accepts artifact comparisons sourced from inspect_artifact Evidence"). - Base reproduction or other evidence: Calling `verifyReconstruction` with comparisons referencing `inspect_artifact` Evidence threw `TypeError: Comparison source Evidence has an unexpected observation type` on base. - User-visible CLI/MCP output (if applicable): `verify_reconstruction` tool calls now return schema-valid verification Evidence rather than `invalid_request`. - Remaining proof gaps: none. 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 check:fast` — passed (typecheck and lint via turbo). - `npm run test:focused -- src/domain/reconstructionVerification.test.ts` — passed (11 tests passed). - `npm run test:local -- src/domain/reconstructionVerification.test.ts` — passed (11 tests passed). ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: none. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none. ## Author readiness Human owner: @Totopo27 - [ ] 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 - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] 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. - [ ] User-visible CLI/MCP changes include representative output. - [ ] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:11:41 +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#6078
No description provided.