[PR #4178] [MERGED] fix(process): preserve unrelated trace comparison uncertainty #6112

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4178
Author: @N0zoM1z0
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/process-trace-dimension-3931


📝 Commits (1)

  • 7bcca90 fix(process): preserve unrelated trace comparison uncertainty

📊 Changes

4 files changed (+159 additions, -7 deletions)

View changed files

📝 docs/process-capture.md (+3 -1)
📝 src/domain/process/processComparison.ts (+3 -3)
📝 src/domain/process/processTraceComparison.test.ts (+44 -0)
📝 tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts (+109 -3)

📄 Description

Summary

Fixes #3931. A process-only trace failure could change an unrelated truncated terminal comparison from unknown to changed. Trace diagnostics now affect only their attributed dimensions; other dimensions retain their independently determined status, including unknown, added and removed.

Change and boundaries

The semantic owner is applyTraceVerdict in the shared process-comparison domain. CLI and MCP use that owner. The fix removes the blanket promotion of every non-unchanged status; no downstream correction, new cache, schema, tool or provider is introduced. Existing diagnostic source/location attribution and source-coverage checks remain authoritative. The process-capture guide documents the rule.

Contribution scope: an ordinary correctness fix within existing read-only capture comparison; no new execution, injection, mutation or recovery capability, so a new maintainer scope decision is not applicable. Caller inputs, Evidence identities/links, complete bundle access and provider support are preserved. Generated catalog/package/installation impact: none.

Executed validation

  • Public CLI issue recipe reproduced on fresh main 62bf09809ef7bb224028916424f8f07652a20f4f: unknown terminal became changed under a worker-only diagnostic. New boundary cases against that production code: 6 failed / 17 passed, with complete controls passing.
  • Fixed focused suite: 45 passed across process capture/trace comparison and registered MCP boundary tests. Covers omissions on either/both sides, reversed process differences, complete controls, independent additions/removals and identical CLI/MCP Evidence.
  • Real Linux PTY captures of two Node programs both writing Ready, exiting 0/1: the actual five-byte retention budget keeps all raw output and omits the rendered frame. Unmodified source Evidence through production stdio MCP reproduces the false terminal change before the fix. Afterward, both the public CLI and stdio MCP return identical Evidence: terminal: unknown, exit: changed, overall changed, lifecycle-only trace diagnostic and unknown first divergence. Seven repeated MCP comparisons succeed; full bundle retains both original source records exactly and every comparison source link resolves. No Ghidra/Hopper/browser runtime coverage is claimed for this offline comparison change.
  • npm run check, npm run docs:check (5 consistency tests), and git diff --check passed.

Cost and resource observations

Two-core affinity, serial heavy jobs, 3 GiB Node heap cap; maximum sampled family RSS across local checks 4.42 GiB, with no resource-guard stop or session OOM. No extra analysis pass, retained state or output field is added.

Equivalent real-capture MCP workflows (one cold + six warm calls per version) used identical 207-tool catalogs. cl100k_base JSON proxies: catalog 814,202 tokens unchanged; request+reply 7,116 → 7,114; recorded workflow including catalog and bundle 877,222 → 877,188. Whole run 8.94 → 10.19 s, reaped CPU 10.43 → 11.87 s, peak family RSS 807 → 807 MiB; first comparison 5.89 → 6.80 s, six warm-call median 12.58 → 15.13 ms. These are single shared-host observations, not evidence of a causal speed or memory change. Proxy counts exclude wire framing/model billing; per-request CPU is unmeasured, and 200 ms RSS sampling can miss brief peaks or double-count shared pages. No caching is warranted for this local classification rule.

Author readiness

Human owner: @N0zoM1z0

The human owner explicitly authorized delegated review, proxy completion of these declarations, ready-for-review publication and normal merge for this batch. The agent reviewed the final diff and evidence; this records that delegation and does not assert a separate manual review occurred.

  • 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.

🔄 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/4178 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/process-trace-dimension-3931` --- ### 📝 Commits (1) - [`7bcca90`](https://github.com/morluto/rea/commit/7bcca902c07a64994de226ffe0b1e0dc2d9d7623) fix(process): preserve unrelated trace comparison uncertainty ### 📊 Changes **4 files changed** (+159 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `docs/process-capture.md` (+3 -1) 📝 `src/domain/process/processComparison.ts` (+3 -3) 📝 `src/domain/process/processTraceComparison.test.ts` (+44 -0) 📝 `tests/boundary/mcp/processComparisonDiagnosticsMcp.test.ts` (+109 -3) </details> ### 📄 Description ## Summary Fixes #3931. A process-only trace failure could change an unrelated truncated terminal comparison from `unknown` to `changed`. Trace diagnostics now affect only their attributed dimensions; other dimensions retain their independently determined status, including `unknown`, `added` and `removed`. ## Change and boundaries The semantic owner is `applyTraceVerdict` in the shared process-comparison domain. CLI and MCP use that owner. The fix removes the blanket promotion of every non-`unchanged` status; no downstream correction, new cache, schema, tool or provider is introduced. Existing diagnostic source/location attribution and source-coverage checks remain authoritative. The process-capture guide documents the rule. Contribution scope: an ordinary correctness fix within existing read-only capture comparison; no new execution, injection, mutation or recovery capability, so a new maintainer scope decision is not applicable. Caller inputs, Evidence identities/links, complete bundle access and provider support are preserved. Generated catalog/package/installation impact: none. ## Executed validation - Public CLI issue recipe reproduced on fresh main `62bf09809ef7bb224028916424f8f07652a20f4f`: `unknown` terminal became `changed` under a worker-only diagnostic. New boundary cases against that production code: **6 failed / 17 passed**, with complete controls passing. - Fixed focused suite: **45 passed** across process capture/trace comparison and registered MCP boundary tests. Covers omissions on either/both sides, reversed process differences, complete controls, independent additions/removals and identical CLI/MCP Evidence. - Real Linux PTY captures of two Node programs both writing `Ready`, exiting 0/1: the actual five-byte retention budget keeps all raw output and omits the rendered frame. Unmodified source Evidence through production stdio MCP reproduces the false terminal change before the fix. Afterward, both the public CLI and stdio MCP return identical Evidence: `terminal: unknown`, `exit: changed`, overall `changed`, lifecycle-only trace diagnostic and unknown first divergence. Seven repeated MCP comparisons succeed; full bundle retains both original source records exactly and every comparison source link resolves. No Ghidra/Hopper/browser runtime coverage is claimed for this offline comparison change. - `npm run check`, `npm run docs:check` (5 consistency tests), and `git diff --check` passed. ## Cost and resource observations Two-core affinity, serial heavy jobs, 3 GiB Node heap cap; maximum sampled family RSS across local checks **4.42 GiB**, with no resource-guard stop or session OOM. No extra analysis pass, retained state or output field is added. Equivalent real-capture MCP workflows (one cold + six warm calls per version) used identical 207-tool catalogs. `cl100k_base` JSON proxies: catalog 814,202 tokens unchanged; request+reply 7,116 → 7,114; recorded workflow including catalog and bundle 877,222 → 877,188. Whole run 8.94 → 10.19 s, reaped CPU 10.43 → 11.87 s, peak family RSS 807 → 807 MiB; first comparison 5.89 → 6.80 s, six warm-call median 12.58 → 15.13 ms. These are single shared-host observations, not evidence of a causal speed or memory change. Proxy counts exclude wire framing/model billing; per-request CPU is unmeasured, and 200 ms RSS sampling can miss brief peaks or double-count shared pages. No caching is warranted for this local classification rule. ## Author readiness Human owner: @N0zoM1z0 The human owner explicitly authorized delegated review, proxy completion of these declarations, ready-for-review publication and normal merge for this batch. The agent reviewed the final diff and evidence; this records that delegation and does not assert a separate manual review occurred. - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <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:57 +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#6112
No description provided.