[GH-ISSUE #160] Changed-behavior validation ignores process interaction and shim dimensions #108

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

Originally created by @morluto on GitHub (Jul 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/160

Problem

When validating compare_process_captures evidence, parseResult derives the expected status from only five dimensions (terminal, exit, filesystem, protocol, process) and ignores interaction + shim.

processCaptureComparisonSchema defines status from all seven dimensions (terminal, interaction, exit, filesystem, protocol, process, shim), so a result can be internally consistent in domain schema but rejected during changed-behavior evidence parsing.

Confirmed behavior

  • In src/domain/changedBehavior.ts (parseResult), the dimensions list omits interaction and shim.
  • In src/domain/processComparison.ts, processCaptureComparisonSchema.superRefine includes both interaction and shim in expected-status computation.

Impact

  • Change-only in interaction/shim cannot validate successfully.
  • Evidence for process-comparison results may throw TypeError: Process comparison status contradicts its dimensions even when the schema itself marks the record as consistent.
  • This blocks changed-behavior flows for affected comparisons.

Reproduction sketch

Use a compare_process_captures evidence payload with:

  • interaction: "changed" and all other non-runtime dimensions unchanged.
  • status: "changed" (matches schema logic).

parseResult currently computes expected as unchanged and throws on mismatch.

Suggested fix

Include both interaction and shim when computing expected status in parseResult for process comparisons.

Files

  • src/domain/changedBehavior.ts
  • src/domain/processComparison.ts
Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/160 ## Problem When validating `compare_process_captures` evidence, `parseResult` derives the expected `status` from only five dimensions (`terminal`, `exit`, `filesystem`, `protocol`, `process`) and ignores `interaction` + `shim`. `processCaptureComparisonSchema` defines status from all seven dimensions (`terminal`, `interaction`, `exit`, `filesystem`, `protocol`, `process`, `shim`), so a result can be internally consistent in domain schema but rejected during changed-behavior evidence parsing. ## Confirmed behavior - In `src/domain/changedBehavior.ts` (`parseResult`), the `dimensions` list omits `interaction` and `shim`. - In `src/domain/processComparison.ts`, `processCaptureComparisonSchema.superRefine` includes both `interaction` and `shim` in expected-status computation. ## Impact - Change-only in interaction/shim cannot validate successfully. - Evidence for process-comparison results may throw `TypeError: Process comparison status contradicts its dimensions` even when the schema itself marks the record as consistent. - This blocks changed-behavior flows for affected comparisons. ## Reproduction sketch Use a `compare_process_captures` evidence payload with: - `interaction: "changed"` and all other non-runtime dimensions `unchanged`. - `status: "changed"` (matches schema logic). `parseResult` currently computes expected as `unchanged` and throws on mismatch. ## Suggested fix Include both `interaction` and `shim` when computing expected status in `parseResult` for process comparisons. ## Files - `src/domain/changedBehavior.ts` - `src/domain/processComparison.ts`
bsakaguchi 2026-10-15 18:21:13 +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#108
No description provided.