[GH-ISSUE #169] Process capture schema rejects interaction and shim residual scopes #117

Closed
opened 2026-10-15 18:21:16 +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/169

Problem

When parsing a Process Capture v4, residual_unknowns.scope only allows
terminal, exit, process, filesystem, protocol, cleanup, and network.
There is no interaction or shim scope, even though process comparisons and MCP prompts now
model those dimensions as part of scope-level residual handling.

Evidence

  • src/domain/processCapture.ts interface declares residual scope union without interaction or shim.
  • src/domain/processCapture.ts residual_unknowns z.enum([...]) uses the same limited list.
  • src/domain/processComparison.ts includes interaction and shim dimensions in comparisons.

Impact

A capture with residual unknowns for interactions or shim replay limitations cannot be
parsed as ProcessCapture v4 and will be rejected by Zod validation when those scopes appear.

Repro

  1. Validate a capture object containing
    residual_unknowns: [{ scope: "interaction", reason: "..." }]
    through parseProcessCapture (or equivalent CLI ingestion path).
  2. processCaptureSchema.parse rejects with a Zod enum error on
    residual_unknowns.scope.

Proposed fix

  • Extend both the ProcessCapture interface and residual_unknowns zod enum to include "interaction" and "shim".
  • Preserve or adjust migration expectations where needed for backward compatibility.
Originally created by @morluto on GitHub (Jul 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/169 ## Problem When parsing a Process Capture v4, `residual_unknowns.scope` only allows `terminal`, `exit`, `process`, `filesystem`, `protocol`, `cleanup`, and `network`. There is no `interaction` or `shim` scope, even though process comparisons and MCP prompts now model those dimensions as part of scope-level residual handling. ## Evidence - `src/domain/processCapture.ts` interface declares residual scope union without `interaction` or `shim`. - `src/domain/processCapture.ts` `residual_unknowns` `z.enum([...])` uses the same limited list. - `src/domain/processComparison.ts` includes `interaction` and `shim` dimensions in comparisons. ## Impact A capture with residual unknowns for interactions or shim replay limitations cannot be parsed as ProcessCapture v4 and will be rejected by Zod validation when those scopes appear. ## Repro 1. Validate a capture object containing `residual_unknowns: [{ scope: "interaction", reason: "..." }]` through `parseProcessCapture` (or equivalent CLI ingestion path). 2. `processCaptureSchema.parse` rejects with a Zod enum error on `residual_unknowns.scope`. ## Proposed fix - Extend both the `ProcessCapture` interface and `residual_unknowns` zod enum to include `"interaction"` and `"shim"`. - Preserve or adjust migration expectations where needed for backward compatibility.
bsakaguchi 2026-10-15 18:21:16 +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#117
No description provided.