[PR #119] [MERGED] fix(errors): preserve artifact integrity details #1843

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/119
Author: @morluto
Created: 7/13/2026
Status: ✅ Merged
Merged: 7/13/2026
Merged by: @morluto

Base: main ← Head: fix/actionable-artifact-diagnostics


📝 Commits (1)

  • 489467d fix: preserve actionable artifact diagnostics

📊 Changes

7 files changed (+136 additions, -55 deletions)

View changed files

📝 AGENTS.md (+2 -0)
📝 src/cliInvestigationCommands.ts (+8 -6)
📝 src/contracts/toolOutputSchemas.ts (+9 -0)
📝 src/domain/errors.ts (+13 -2)
📝 tests/artifactMcp.test.ts (+68 -44)
📝 tests/cliOutput.test.ts (+29 -1)
📝 tests/errors.test.ts (+7 -2)

📄 Description

Description

REA 1.3.0 reduced ASAR integrity failures to a category and generic recovery message. That removed the logical entry path, declared digest, calculated digest, and unpacked state needed to diagnose the mismatch. investigate-versions also used a different error shape from direct CLI and MCP inventory.

This change projects a whitelisted details object for ArtifactOperationError integrity mismatches and uses the same projection in cross-version CLI failures. The projection includes only the artifact logical path, both SHA-256 values, and unpacked state. Existing secret causes, provider internals, credentials, and environment values remain excluded.

The MCP output schema now declares the optional integrity detail shape. Tests exercise both embedded and .asar.unpacked mismatches through the production artifact and MCP seams, plus ordinary and --full-output JSON CLI output.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passes (npm test via npm run check): 67 files, 481 tests
  • Real Hopper verification performed (npm run verify:hopper): not run because this change affects artifact error projection, not Hopper launch or analysis
  • Linux real Hopper verification performed (npm run verify:hopper:linux): not run for the same reason
  • Package verification performed (npm run verify:package)

Additional proof:

  • Focused CLI, MCP, and error-projection suites passed: 11 tests.
  • npm pack --dry-run listed 176 package files.
  • Final structured autoreview reported no accepted or actionable findings.

Tool Contract Impact

The 68-tool inventory is unchanged. Expected artifact integrity failures may now include error.details with logical_path, declared_sha256, calculated_sha256, and unpacked. Other error projections are unchanged.

Suggested Review Order

  1. src/domain/errors.ts and src/contracts/toolOutputSchemas.ts
  2. src/cliInvestigationCommands.ts
  3. tests/errors.test.ts, tests/artifactMcp.test.ts, and tests/cliOutput.test.ts
  4. AGENTS.md

Closes #111.


🔄 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/119 **Author:** [@morluto](https://github.com/morluto) **Created:** 7/13/2026 **Status:** ✅ Merged **Merged:** 7/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/actionable-artifact-diagnostics` --- ### 📝 Commits (1) - [`489467d`](https://github.com/morluto/rea/commit/489467d4ba5d027dc04790047eb91f77e1a3de99) fix: preserve actionable artifact diagnostics ### 📊 Changes **7 files changed** (+136 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+2 -0) 📝 `src/cliInvestigationCommands.ts` (+8 -6) 📝 `src/contracts/toolOutputSchemas.ts` (+9 -0) 📝 `src/domain/errors.ts` (+13 -2) 📝 `tests/artifactMcp.test.ts` (+68 -44) 📝 `tests/cliOutput.test.ts` (+29 -1) 📝 `tests/errors.test.ts` (+7 -2) </details> ### 📄 Description ## Description REA 1.3.0 reduced ASAR integrity failures to a category and generic recovery message. That removed the logical entry path, declared digest, calculated digest, and unpacked state needed to diagnose the mismatch. `investigate-versions` also used a different error shape from direct CLI and MCP inventory. This change projects a whitelisted `details` object for `ArtifactOperationError` integrity mismatches and uses the same projection in cross-version CLI failures. The projection includes only the artifact logical path, both SHA-256 values, and unpacked state. Existing secret causes, provider internals, credentials, and environment values remain excluded. The MCP output schema now declares the optional integrity detail shape. Tests exercise both embedded and `.asar.unpacked` mismatches through the production artifact and MCP seams, plus ordinary and `--full-output` JSON CLI output. ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Documentation update - [ ] Performance improvement - [ ] Refactoring (no functional change) - [x] Tool contract change (MCP schema modification) ## Testing Performed - [x] Unit tests added or updated - [x] TypeScript typecheck passes (`npm run typecheck`) - [x] Linting passes (`npm run lint`) - [x] Full test suite passes (`npm test` via `npm run check`): 67 files, 481 tests - [ ] Real Hopper verification performed (`npm run verify:hopper`): not run because this change affects artifact error projection, not Hopper launch or analysis - [ ] Linux real Hopper verification performed (`npm run verify:hopper:linux`): not run for the same reason - [x] Package verification performed (`npm run verify:package`) Additional proof: - Focused CLI, MCP, and error-projection suites passed: 11 tests. - `npm pack --dry-run` listed 176 package files. - Final structured autoreview reported no accepted or actionable findings. ## Tool Contract Impact The 68-tool inventory is unchanged. Expected artifact integrity failures may now include `error.details` with `logical_path`, `declared_sha256`, `calculated_sha256`, and `unpacked`. Other error projections are unchanged. ## Suggested Review Order 1. `src/domain/errors.ts` and `src/contracts/toolOutputSchemas.ts` 2. `src/cliInvestigationCommands.ts` 3. `tests/errors.test.ts`, `tests/artifactMcp.test.ts`, and `tests/cliOutput.test.ts` 4. `AGENTS.md` ## Related Issues Closes #111. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21: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#1843
No description provided.