Skip to content

fix(process): give process-command failures their own recovery instead of doctor - #11101

Merged
morluto merged 2 commits into
mainfrom
fix/process-cli-recovery-without-doctor
Nov 15, 2026
Merged

morluto merged 2 commits into
mainfrom
fix/process-cli-recovery-without-doctor

Conversation

@morluto

@morluto morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Summary

An unexpected process-command failure (capture_process_scenario, compare_process_captures) told the agent to have the user "check the input files, then run rea doctor". Doctor does not check process commands, so that step cannot help. This follows the doctor-scope rule from #10565: name doctor only where it can check the failing part. The recovery now says what to do instead: tell the user the reported reason, check the scenario or capture files it read, and report the failure with its diagnostics if those files are valid.

Problem and expected behavior

PROCESS_UNEXPECTED_FAILURE_REMEDIATION in src/application/process/ProcessCli.ts ended with "then run rea doctor". Expected: no doctor advice for a scope doctor cannot inspect, and a concrete next step instead.

Change and scope

  • ProcessCli.ts: the remediation names the reported reason, the scenario or capture files, and reporting the failure. It still says not to repeat the command, and it still never asks for a retry.
  • docs/user-visible-errors.csv (hand-written on main; its process row is asserted by the test) and docs/design/limits-and-recovery.md are updated to match.
  • Sibling sweep: every other generic rea doctor advice in src/ (MCP startup in src/main/messages.ts, provider selection in providerSelectionError.ts, invalid configuration and Hopper diagnostics in analysisErrorPresentation.ts) points at something doctor does check, so those are unchanged.
  • Contribution scope: not applicable (recovery text within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: the process CLI's boundary projection owns this remediation.
  • Contribution scope fit and linked maintainer decision: not applicable; coordinator decision to remove the doctor advice.
  • CLI and MCP/tool-catalog contract: same code (execution_failure), non-retryable; only remediation.action text changes.
  • Provider, bridge, target-format, or platform compatibility: none.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none.
  • Generated metadata, package, or installation impact: none.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • 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 and regression coverage

  • Tests added or updated: tests/boundary/filesystem/processCliFileInput.test.ts now also requires the projected action not to mention doctor, for both operations.
  • Base reproduction: with the old ProcessCli.ts and CSV restored, the 2 "projects an unexpected ... failure canonically" tests fail on the new assertion.
  • User-visible CLI/MCP output: remediation.action = "Do not repeat this command. Tell the user the process command could not complete, give them the reported reason, and ask them to check the scenario or capture files it read. If those files are valid, report the failure with its diagnostics."
  • Remaining proof gaps: none known.

Validation performed

  • npm run test:focused -- tests/boundary/filesystem/processCliFileInput.test.ts: 39 passed; with the old code restored, 2 failed.
  • npx oxfmt --check on the changed files: passed.
  • Pre-push hook (typecheck, lint): passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: the action still contains no cause text (asserted).

Author readiness

Human owner:

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

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-15T12:27:16.255427Z
We couldn’t complete this review. Comment @codex review to try again.
d36393f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no blocking issues remain.

Summary

Gives unexpected process-command failures recovery advice that does not send users to rea doctor.

  • Process-command failures now point users to the files and diagnostics to check.

Reviews (3) · Last reviewed commit: "test(process): check the delivered proce..." · Reviewed by Greptile

@morluto
morluto merged commit 8110c98 into main Nov 15, 2026
7 checks passed
@morluto
morluto deleted the fix/process-cli-recovery-without-doctor branch November 15, 2026 12:50
@morluto morluto added area: runtime Process capture and runtime observation bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant