[PR #4664] [CLOSED] fix(mcp): keep bounded process capture guidance preparatory #6350

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4664
Author: @z2Ace0107
Created: 10/17/2026
Status: ❌ Closed

Base: main ← Head: fix/3954-process-capture-preparation


📝 Commits (2)

  • 9c0ed68 fix(mcp): keep bounded process capture guidance preparatory
  • 1ea8ce6 chore: merge upstream main into process capture prompt fix

📊 Changes

2 files changed (+40 additions, -3 deletions)

View changed files

📝 src/contracts/promptContracts.ts (+3 -3)
➕ tests/acceptance/tools/processCapturePrompt.test.ts (+37 -0)

📄 Description

Summary

Fixes #3954. The process-capture preparation prompt described planning but told the caller to run the scenario.

 prepare_bounded_process_capture
- objective: run the experiment
- first suggestion: run the scenario
+ objective: design the experiment before execution
+ first suggestion: plan inputs, observations, limits and stopping conditions

Problem and expected behavior

A normal prompts/get returned an execution objective and run instruction, despite advertising preparation before execution. Returned guidance should consistently help design the bounded experiment. No downstream target execution or consuming-agent behavior is claimed.

Change and scope

Align the existing prompt objective and first suggestion with preparation. Prior compatible capture Evidence now refines the plan and requirements for later comparisons. Keep prompt arguments, tool suggestions, provider behavior and authority unchanged. Routine wording correction within existing scope; advance maintainer decision not applicable.

Contract and boundary impact

  • Semantic owner: canonical prompt workflow text in promptContracts.ts.
  • Scope decision: not applicable to this bounded correctness correction.
  • CLI/MCP/tool catalog: same prompt names, arguments and suggested tools; corrected rendered prompt text. No tool schema change.
  • Provider/bridge/platform: unchanged.
  • Evidence/artifact/provenance: existing discipline and untrusted selection data remain unchanged.
  • Target/authority/cleanup: prompt retrieval does not authorize or execute a target.
  • Generated/package/installation: ignored outputs regenerated for checks; no package/install changes.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence

  • Before (historical execution, 2026-10-15): new real compiled stdio MCP regression failed on the original objective (Run a caller-selected process experiment); 1 failed /9 existing tests passed.
  • After: prompts/get describes design/planning before execution and includes inputs, observations, limits, stopping conditions, working directory, environment and permissions. Caller executable context remains literal selection data, never authorization.
  • Existing prompt regressions cover tool inventory, argument validation, rendering without analysis, completion and lifecycle behavior.

Validation performed

Refreshed on 2026-10-17, Windows x64, pinned Node 24.18.0 / npm 11.16.0:

  • npm run test:focused -- tests/acceptance/tools/processCapturePrompt.test.ts tests/boundary/mcp/promptMcp.test.ts tests/boundary/mcp/promptCompletion.test.ts — 23 passed, zero skipped. Tests executed freshly; runtime build reused its valid cache.
  • npm run check — passed; six Turbo tasks reused cached results, architecture guards executed. Cached lint reported 0 errors / 1448 repository warnings.
  • npm run docs:check — passed; six generation/check tasks reused cached results; five README consistency tests executed and passed.
  • npm run verify:test-discovery — all 1322 test files discovered exactly once.
  • git diff --check 6fcfc5b5e0c063300cd5278dd8bad5b1ab1374f6 HEAD — passed.
  • Fresh source inspection of upstream main still found the reported execution-oriented wording. Runtime checks above exercise the contribution branch, not a rebuilt current-main integration.

Compatibility, safety, and release

No argument, tool, permission, process-handler or package change. Real stdio MCP prompt retrieval ran on Windows, without target execution. No macOS/Linux or full-suite run; consuming-agent behavior remains untested. This corrects guidance, not an execution-control mechanism.

Merge Danger

Door: two-way — revert the prompt wording and regression test.

Blast Radius: guidance — callers receive preparation-first text for this prompt.

Author readiness

Human owner: @z2Ace0107

  • 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/4664 **Author:** [@z2Ace0107](https://github.com/z2Ace0107) **Created:** 10/17/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3954-process-capture-preparation` --- ### 📝 Commits (2) - [`9c0ed68`](https://github.com/morluto/rea/commit/9c0ed68249f685bb89408b4e2739b14cdeb1b6bc) fix(mcp): keep bounded process capture guidance preparatory - [`1ea8ce6`](https://github.com/morluto/rea/commit/1ea8ce692d9083f57056c3c4384cacc8f7dcb333) chore: merge upstream main into process capture prompt fix ### 📊 Changes **2 files changed** (+40 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/contracts/promptContracts.ts` (+3 -3) ➕ `tests/acceptance/tools/processCapturePrompt.test.ts` (+37 -0) </details> ### 📄 Description ## Summary Fixes #3954. The process-capture preparation prompt described planning but told the caller to run the scenario. ```diff prepare_bounded_process_capture - objective: run the experiment - first suggestion: run the scenario + objective: design the experiment before execution + first suggestion: plan inputs, observations, limits and stopping conditions ``` ## Problem and expected behavior A normal `prompts/get` returned an execution objective and run instruction, despite advertising preparation before execution. Returned guidance should consistently help design the bounded experiment. No downstream target execution or consuming-agent behavior is claimed. ## Change and scope Align the existing prompt objective and first suggestion with preparation. Prior compatible capture Evidence now refines the plan and requirements for later comparisons. Keep prompt arguments, tool suggestions, provider behavior and authority unchanged. Routine wording correction within existing scope; advance maintainer decision not applicable. ## Contract and boundary impact - Semantic owner: canonical prompt workflow text in `promptContracts.ts`. - Scope decision: not applicable to this bounded correctness correction. - CLI/MCP/tool catalog: same prompt names, arguments and suggested tools; corrected rendered prompt text. No tool schema change. - Provider/bridge/platform: unchanged. - Evidence/artifact/provenance: existing discipline and untrusted selection data remain unchanged. - Target/authority/cleanup: prompt retrieval does not authorize or execute a target. - Generated/package/installation: ignored outputs regenerated for checks; no package/install changes. Expected effects: - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence - **Before (historical execution, 2026-10-15):** new real compiled stdio MCP regression failed on the original objective (`Run a caller-selected process experiment`); 1 failed /9 existing tests passed. - **After:** `prompts/get` describes design/planning before execution and includes inputs, observations, limits, stopping conditions, working directory, environment and permissions. Caller executable context remains literal selection data, never authorization. - Existing prompt regressions cover tool inventory, argument validation, rendering without analysis, completion and lifecycle behavior. ## Validation performed Refreshed on 2026-10-17, Windows x64, pinned Node 24.18.0 / npm 11.16.0: - `npm run test:focused -- tests/acceptance/tools/processCapturePrompt.test.ts tests/boundary/mcp/promptMcp.test.ts tests/boundary/mcp/promptCompletion.test.ts` — 23 passed, zero skipped. Tests executed freshly; runtime build reused its valid cache. - `npm run check` — passed; six Turbo tasks reused cached results, architecture guards executed. Cached lint reported 0 errors / 1448 repository warnings. - `npm run docs:check` — passed; six generation/check tasks reused cached results; five README consistency tests executed and passed. - `npm run verify:test-discovery` — all 1322 test files discovered exactly once. - `git diff --check 6fcfc5b5e0c063300cd5278dd8bad5b1ab1374f6 HEAD` — passed. - Fresh source inspection of upstream main still found the reported execution-oriented wording. Runtime checks above exercise the contribution branch, not a rebuilt current-main integration. ## Compatibility, safety, and release No argument, tool, permission, process-handler or package change. Real stdio MCP prompt retrieval ran on Windows, without target execution. No macOS/Linux or full-suite run; consuming-agent behavior remains untested. This corrects guidance, not an execution-control mechanism. ## Merge Danger **Door:** two-way — revert the prompt wording and regression test. **Blast Radius:** guidance — callers receive preparation-first text for this prompt. ## Author readiness Human owner: @z2Ace0107 - [ ] 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-10-31 01:13:46 +00:00
bsakaguchi changed title from [PR #4664] [CLOSED] fix(mcp): keep bounded process capture guidance preparatory to [PR #4664] fix(mcp): keep bounded process capture guidance preparatory 2026-11-03 13:32:56 +00:00
bsakaguchi changed title from [PR #4664] fix(mcp): keep bounded process capture guidance preparatory to [PR #4664] [CLOSED] fix(mcp): keep bounded process capture guidance preparatory 2026-11-03 14:34:40 +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#6350
No description provided.