# setup-agents Weekly Port Review: 2026-06-03 Through 2026-06-08

Task: `SETUP-AGENTS-CLOSED-ISSUES-CHAT-MCP-REVIEW`
Source repository: `~/dev/setup-agents`
Primary branch reviewed: `feat/chat-persistence-mcp-server-fixes`
Merge reference: PR #408, merge commit `e394468`

## Summary

The reviewed setup-agents commits contain several patterns worth keeping in
Open Orchestra, but most should not be cherry-picked directly because module
boundaries differ. The strongest portable areas are chat continuity,
provider/session recovery, MCP/OAuth UX, primary skill injection, QA prompt
examples, command snapshot guards, and deterministic diagram/story-map renderer
quality.

Several items are already covered or partially covered in Open Orchestra:

- Chat continuity and stale stream protection: addressed by `GH-526`.
- Chat context compaction: addressed by `GH-530`.
- Real provider evidence and protected smoke controls: addressed by
  `GH-549/GH-550` and related provider evidence hardening.
- QA profile examples: partially addressed by `GH-535` hardening and should
  remain part of QA prompt maintenance.
- Command manifest precheck: aligned with the current `npm run precheck`
  command-manifest validation.

## Reviewed Commits and Recommendations

| Date | Commit | Subject | Area | Relevance to Open Orchestra | Recommended action | Risk | Target |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 2026-06-03 | `67e9797` | prevent orphaned EventSource from killing active chat process | Chat/SSE lifecycle | High. Same stale stream/orphaned lifecycle class as Open Orchestra chat continuity. | Keep as validation pattern, not cherry-pick. Ensure stale streams cannot emit terminal events for active turns. | Active chat corruption if missed. | `GH-526` done; add future browser E2E when UI consumes continuity cursor metadata. |
| 2026-06-03 | `6bb08ca` | preserve conversation context on session loss and auto-resend | Chat reconnect | High. Maps to refresh/reconnect/provider session loss behavior. | Covered by `GH-526` service/API layer; add UI Playwright refresh/reconnect coverage later. | Duplicate sends or replaying wrong history. | Follow-up under chat E2E epic. |
| 2026-06-03 | `ec1d0d5` | inject conversation history when resuming a saved session | Chat restore | High. Open Orchestra uses bounded stored history replay metadata. | Keep concept; do not port storage shape directly. | Raw prompt leakage if history injection is not bounded/redacted. | `GH-526`, `GH-530`. |
| 2026-06-03 | `308abce` | give recent messages more context budget in restored sessions | Context budgeting | Medium-high. Same need as context compaction threshold/recent-turn preservation. | Covered by `GH-530`; retain as regression idea for restored-session context. | Loss of recent intent after compaction. | `GH-530` plus future E2E. |
| 2026-06-04 | `8864e58` | persist chat conversations and resume CLI session on restore | Chat persistence | High. Valuable E2E shape and restore semantics. | Do not cherry-pick. Use as benchmark for Open Orchestra web chat E2E coverage. | Forked session state or cross-scope restoration. | Chat product E2E epic / `GH-491` unblock. |
| 2026-06-04 | `d1bb511` | stop killing the live chat process on duplicate send | Idempotency/process lifecycle | High. Mirrors idempotency and orphan process concerns. | Ensure Open Orchestra idempotency conflict/replay stays process-safe; covered by chat API tests, needs browser duplicate-send E2E. | Exit 143 or active process termination. | `GH-526` regression backlog. |
| 2026-06-05 | `4df708a` | recover provider session on reconnect so chat keeps context | Provider continuity | High. Directly relevant to provider-backed chat continuity. | Covered at metadata/fallback level in `GH-526`; real-provider continuity needs provider E2E. | Provider-native continuity can be overstated if only fallback replay exists. | `GH-528` child stories after unblock. |
| 2026-06-05 | `3288192` | MCP tab tools + Salesforce orgs, with cmd+k connect fixes | MCP/web console | Medium-high. Useful UX and route-contract patterns for MCP status/tools/org connection. | Compare against Open Orchestra MCP/web console surfaces before porting. Create targeted stories only if gaps remain. | Scope leakage through org/MCP connection state. | MCP console follow-up, setup-agents review backlog. |
| 2026-06-05 | `e33a29f` | MCP tab grid layout, default org detection, use-as-mcp feedback | MCP UX | Medium. Improves user feedback and default detection. | Use as UX reference, not direct code. | Misleading default org status. | MCP UX backlog. |
| 2026-06-04 | `d8b2c93` | MCP server registration and OAuth flow in web console | MCP/OAuth | Medium-high. Registration/OAuth flow patterns can inform Open Orchestra MCP hardening. | Review against current Open Orchestra MCP server registration before deciding port. | OAuth callback and target-setting mistakes. | MCP/OAuth follow-up. |
| 2026-06-04 | `08c9ceb` | reuse running bridge server instead of spawning duplicates | Runtime/web bridge | High. Applies to local web/server lifecycle and port reuse. | Add a future Open Orchestra hardening issue if duplicate bridge/server spawns are observed. | Duplicate local servers, stale callbacks, port contention. | Runtime/web bridge backlog. |
| 2026-06-03 | `e447416` | OAuth flow for MCP servers via bridge callback listener | MCP/OAuth | Medium-high. Relevant for browser-assisted MCP auth. | Keep as source reference for Open Orchestra OAuth UX. | Callback spoofing, localhost binding, stale state. | MCP/OAuth follow-up. |
| 2026-06-04 | `89592af` | point MCP Claude target to CLI settings, detect installed servers | MCP target detection | Medium. Similar to runtime-specific config target issues. | Verify Open Orchestra target detection in MCP setup flows before port. | Writing config to wrong scope. | MCP config hardening. |
| 2026-06-06 | `5538b1d` | inject phase primary skill into spawned agents | Skills/subagents | High. Matches user concern about persona/skill propagation to subagents. | Open Orchestra should expose and test role/skill/capability injection through runtime spawn packets. | Subagents execute without intended rules/skills. | Existing skill/rules injection issues and E2E stories. |
| 2026-06-06 | `711c4a5` | QA profile worked examples for Salesforce artifacts | QA prompt quality | High. Aligns with requested QA examples for chat/API/CLI/cloud/db/mobile/desktop evidence. | Keep expanding Open Orchestra QA playbook examples by surface and expected assertions. | QA accepts simulated evidence or misses acceptance criteria. | `GH-535` and QA playbook hardening. |
| 2026-06-08 | `6581418` | regenerate command snapshot + schemas, guard them pre-merge | Release/CLI contract | High. Open Orchestra has command manifest precheck; snapshot/schema guard pattern remains useful. | Current `precheck` aligns with manifest generation. Consider schema snapshot guard only if command JSON contracts become published API. | Drift between CLI help, schema, and generated docs. | `GH-534/GH-547` lineage; future CLI contract hardening. |
| 2026-06-07 | `65bcc23`, `f2776d6`, `d68cba8`, `840373d` | story-map diagram renderer and Format 2 polish | Diagrams/story maps | Medium. Useful if Open Orchestra keeps deterministic artifact generation. | Treat as product inspiration; port only after confirming Open Orchestra diagram renderer scope. | Large renderer drift and visual QA burden. | Diagram/story-map backlog. |
| 2026-06-07/08 | `185d3e0`, `4e3f07a`, `830312a` | flowchart layout, dynamic sequence spacing, diagram fit/center | Diagram quality | Medium-high. Matches existing diagram-quality expectations. | Add visual QA scenarios if Open Orchestra renderer has analogous defects. | Poor diagram readability, overlapping labels/edges. | Diagram quality backlog. |

## Follow-Up Backlog Recommendations

1. Add browser E2E for chat refresh/reconnect and duplicate-send behavior using
   the `setup-agents` chat restore tests as scenario references.
2. Reconcile Open Orchestra MCP web console against setup-agents MCP tools,
   OAuth callback, installed-server detection, and use-as-MCP feedback.
3. Add/verify runtime spawn packet tests that prove phase primary skill,
   role/persona rules, and exposed CLI capabilities reach subagents.
4. Keep QA prompt examples expanding by surface: chat response, CLI command,
   API result, cloud side effect, DB state, mobile/desktop UI, generated
   artifact, and provider/MCP evidence.
5. Consider command schema snapshot guarding only after command JSON contracts
   are treated as external/public API.

## Non-Recommended Ports

- Do not cherry-pick setup-agents chat storage/process code directly; Open
  Orchestra already has different chat storage and event-stream boundaries.
- Do not copy MCP OAuth flows without revalidating localhost binding, callback
  state, target scope, and tenant/workspace isolation.
- Do not port diagram renderer changes unless tied to a specific Open Orchestra
  diagram defect and visual evidence.
