[PR #6285] [CLOSED] fix(javascript): attribute V8 role mismatch to runtime kind #7256

Closed
opened 2026-11-01 21:46:32 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6285
Author: @fengqiaoqu
Created: 10/22/2026
Status: ❌ Closed

Base: main ← Head: codex/issue-6041-v8-role-diagnostic


📝 Commits (1)

  • 0d25e02 fix(javascript): attribute V8 role mismatch to runtime kind

📊 Changes

2 files changed (+157 additions, -5 deletions)

View changed files

📝 src/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.ts (+9 -5)
➕ tests/boundary/mcp/javascriptRuntimeReconciliationMcp.test.ts (+148 -0)

📄 Description

Summary

Fixes #6041. When V8 runtime Evidence agrees on target_id but disagrees on runtime_kind, reconciliation now identifies runtime_observations[0].parameters.runtime_kind as the rejected field.

Problem and expected behavior

The capture parser combined the target and declared-role comparisons into one error at target_id. A role-only disagreement therefore directed callers to correct an agreeing value. Each comparison should identify its own parameter while retaining invalid_request and inspect_input_contract recovery.

Change and scope

Split the comparisons at the domain capture parser. Target mismatches retain their field and precedence when both values disagree. Matching and omitted optional roles remain accepted. Add a registered-MCP regression matrix with digest-valid synthetic Evidence.

Contract and boundary impact

  • Semantic owner and earliest changed stage: assertV8RuntimeParameters, during runtime reconciliation input validation; CLI and MCP share this parser.
  • Contribution scope and maintainer decision: ordinary diagnostic fix within existing reconciliation; a separate scope decision is not applicable.
  • CLI/MCP and Evidence contract: corrected issue path and field-specific message; schema, rejection category, retryability, recovery, and valid-result behavior retain their contracts.
  • Provider/platform compatibility and authority: no provider, target-selection, execution, network, or cleanup changes. The operation consumes supplied Evidence.
  • Generated metadata, packaging, and installation: no tracked changes required.

Evidence and regression coverage

  • Five MCP cases cover role-only, target-only, and simultaneous mismatches, plus matching and omitted roles. Every case checks a responsive session and zero provider acquisitions.
  • On unchanged base b6007e0a, the role-only case failed with received target_id versus expected runtime_kind; the other four cases passed. All five pass after the fix.
  • Executed built CLI output for the same role-only input: exit 1, code: invalid_request, recovery.kind: inspect_input_contract, issue path ["runtime_observations",0,"parameters","runtime_kind"], message Runtime Evidence declared role disagrees with its captured result.

Validation performed

  • npm run test:focused -- tests/boundary/mcp/javascriptRuntimeReconciliationMcp.test.ts tests/boundary/filesystem/javascript-applications/javascriptRuntimeReconciliation.test.ts — 19 passed, 12 existing platform skips.
  • npm run check — all six tasks and architecture guards passed; lint reported zero errors and repository warnings.
  • npm run verify:test-discovery — all 1,998 test files discovered exactly once.
  • Built reconcile-javascript-runtime <fixture.json> --format json — observed the corrected field diagnostic above.
  • git diff --check — passed.

Compatibility, safety, and release

  • No breaking call or migration; the intentionally corrected diagnostic path is externally visible.
  • Executed on Windows with pinned Node v24.18.0. The MCP server/SDK client and CLI are real; the supplied runtime/static Evidence is synthetic. No live Inspector, Electron, browser, Hopper, or Ghidra was exercised, and no real-provider behavior is claimed.
  • Package/release metadata is unchanged. Generated build outputs remain uncommitted.

Author readiness

Human owner: @fengqiaoqu

  • 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/6285 **Author:** [@fengqiaoqu](https://github.com/fengqiaoqu) **Created:** 10/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/issue-6041-v8-role-diagnostic` --- ### 📝 Commits (1) - [`0d25e02`](https://github.com/morluto/rea/commit/0d25e02abe4f7ebf38c7f8a610a1add9e0df8883) fix(javascript): attribute V8 role mismatch to runtime kind ### 📊 Changes **2 files changed** (+157 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptRuntimeReconciliationCaptureParsing.ts` (+9 -5) ➕ `tests/boundary/mcp/javascriptRuntimeReconciliationMcp.test.ts` (+148 -0) </details> ### 📄 Description ## Summary Fixes #6041. When V8 runtime Evidence agrees on `target_id` but disagrees on `runtime_kind`, reconciliation now identifies `runtime_observations[0].parameters.runtime_kind` as the rejected field. ## Problem and expected behavior The capture parser combined the target and declared-role comparisons into one error at `target_id`. A role-only disagreement therefore directed callers to correct an agreeing value. Each comparison should identify its own parameter while retaining `invalid_request` and `inspect_input_contract` recovery. ## Change and scope Split the comparisons at the domain capture parser. Target mismatches retain their field and precedence when both values disagree. Matching and omitted optional roles remain accepted. Add a registered-MCP regression matrix with digest-valid synthetic Evidence. ## Contract and boundary impact - Semantic owner and earliest changed stage: `assertV8RuntimeParameters`, during runtime reconciliation input validation; CLI and MCP share this parser. - Contribution scope and maintainer decision: ordinary diagnostic fix within existing reconciliation; a separate scope decision is not applicable. - CLI/MCP and Evidence contract: corrected issue path and field-specific message; schema, rejection category, retryability, recovery, and valid-result behavior retain their contracts. - Provider/platform compatibility and authority: no provider, target-selection, execution, network, or cleanup changes. The operation consumes supplied Evidence. - Generated metadata, packaging, and installation: no tracked changes required. ## Evidence and regression coverage - Five MCP cases cover role-only, target-only, and simultaneous mismatches, plus matching and omitted roles. Every case checks a responsive session and zero provider acquisitions. - On unchanged base `b6007e0a`, the role-only case failed with received `target_id` versus expected `runtime_kind`; the other four cases passed. All five pass after the fix. - Executed built CLI output for the same role-only input: exit 1, `code: invalid_request`, `recovery.kind: inspect_input_contract`, issue path `["runtime_observations",0,"parameters","runtime_kind"]`, message `Runtime Evidence declared role disagrees with its captured result`. ## Validation performed - `npm run test:focused -- tests/boundary/mcp/javascriptRuntimeReconciliationMcp.test.ts tests/boundary/filesystem/javascript-applications/javascriptRuntimeReconciliation.test.ts` — 19 passed, 12 existing platform skips. - `npm run check` — all six tasks and architecture guards passed; lint reported zero errors and repository warnings. - `npm run verify:test-discovery` — all 1,998 test files discovered exactly once. - Built `reconcile-javascript-runtime <fixture.json> --format json` — observed the corrected field diagnostic above. - `git diff --check` — passed. ## Compatibility, safety, and release - No breaking call or migration; the intentionally corrected diagnostic path is externally visible. - Executed on Windows with pinned Node v24.18.0. The MCP server/SDK client and CLI are real; the supplied runtime/static Evidence is synthetic. No live Inspector, Electron, browser, Hopper, or Ghidra was exercised, and no real-provider behavior is claimed. - Package/release metadata is unchanged. Generated build outputs remain uncommitted. ## Author readiness Human owner: @fengqiaoqu - [ ] 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-11-01 21:46:32 +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#7256
No description provided.