Skip to content

[SYMPP-3107] Retry read-only requests after backend recovery - #625

Merged
Pimpmuckl merged 6 commits into
integration/mcp-first-caller-lifecyclefrom
fix/sympp-on-demand-backend-only-read-recovery
Aug 18, 2026
Merged

[SYMPP-3107] Retry read-only requests after backend recovery#625
Pimpmuckl merged 6 commits into
integration/mcp-first-caller-lifecyclefrom
fix/sympp-on-demand-backend-only-read-recovery

Conversation

@Pimpmuckl

@Pimpmuckl Pimpmuckl commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Context

Backend-only loss can leave a reused connection in an ambiguous delivery state. Read-only MCP requests must recover, while tool calls must remain indeterminate.

TL;DR

Retry read-only MCP requests after backend recovery without replaying ambiguous tool calls.

Summary

  • Retry non-tools/call requests after successful Node and PowerShell recovery.
  • Keep ambiguous singleton tools/call results indeterminate with replayed=false.
  • Add backend-exit recovery coverage for Node and Windows PowerShell fallback.

Alternatives

  • Replaying every singleton request was rejected because a tool call can mutate before transport failure.
  • Mixed-batch collation was excluded because shipped HTTP /mcp rejects arrays before member execution.
  • Broader status-based migration was rejected; recovery stays limited to managed backend absence.

Test Plan

  • make -C elixir all
  • make -C elixir ci-full (not required by this WorkPackage)
  • Focused Node backend-only tools/list recovery with final-zero cleanup
  • Focused Windows PowerShell fallback parity with final-zero cleanup
  • Focused Node ambiguous tools/call: one mutation and replayed=false
  • Focused Windows PowerShell fallback ambiguous tools/call, including lossy parse: one mutation and replayed=false
  • Three canonical HTTP /mcp batch-rejection tests
  • Isolated 10-client owner_loss recovery
  • Full launcher suite: the one permitted run failed once in unchanged owner_loss; its exact case passed in isolation

Summary:
- retry non-tool-call requests after successful backend recovery
- cover Node and PowerShell backend-only read recovery in the launcher smoke

Rationale:
- read-only requests are safe to repeat even when a dead transport may have
  received them
- ambiguous tool calls must remain indeterminate and must not replay

Tests:
- focused Node and Windows PowerShell backend-only recovery cases
- focused ambiguous tool-call and 10-client owner-loss cases
- make -C elixir all
- full launcher suite attempted once; unchanged owner-loss case failed once
  before passing in isolation

Co-authored-by: Codex <codex@openai.com>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: acec8512-431d-406f-9282-a70b9fcc38bb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@Pimpmuckl

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4be1534d51

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/symphony-plus-plus-mcp/scripts/start-sympp-mcp-bridge.js
Pimpmuckl and others added 5 commits August 18, 2026 04:06
Summary:
- classify tool calls inside JSON-RPC batches in both bridge implementations
- prove Node and PowerShell do not replay a batch containing a mutation

Rationale:
- a top-level method check treated every JSON-RPC batch as read-only
- assigning the PowerShell payload preserves array enumeration on 5.1

Tests:
- focused Node and Windows PowerShell ambiguous batch recovery cases
- focused Node and Windows PowerShell backend-only read recovery cases
- focused singleton ambiguous tool-call recovery case

Co-authored-by: Codex <codex@openai.com>
Summary:
- remove mixed-batch recovery handling from both bridge implementations
- retain focused singleton read recovery and mutation ambiguity coverage

Rationale:
- the shipped HTTP /mcp endpoint rejects arrays before member execution
- source-only direct STDIO batch support does not use the recovery bridges

Tests:
- three focused HTTP endpoint batch rejection tests
- focused Node and Windows PowerShell backend-only read recovery cases
- focused singleton ambiguous tool-call recovery case

Co-authored-by: Codex <codex@openai.com>
@Pimpmuckl

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 8bcfb75904

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Pimpmuckl
Pimpmuckl merged commit 518edc8 into integration/mcp-first-caller-lifecycle Aug 18, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant