Skip to content

feat(mcp): resolve room-scoped servers for Copilot connections - #799

Open
bandzalkin wants to merge 1 commit into
mainfrom
feat/copilot-acp-mcp-resolver
Open

bandzalkin wants to merge 1 commit into
mainfrom
feat/copilot-acp-mcp-resolver

Conversation

@bandzalkin

@bandzalkin bandzalkin commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Rebased onto main d7ab3429cbdb (2026-10-15)

Rebased onto current main (after #709, #804, #789/#775, #796 and #802) as one commit; head 975b266822599f7d4938ace864597b8e4c31665b. #762 is closed (superseded by #709), so this is reimplemented directly on #709's retained ACP room: no parallel retirement/shutdown machinery. A setup abandoned by its last waiter is recorded on the room, so a callback that swallows cancellation cannot publish a session or hand its late result to the next turn; a turn that keeps waiting reuses the session its shared setup published. docs/acp.md documents resolve_mcp_servers in its own section, leaving the shared configuration paragraph untouched.

CHANGELOG.md edits are dropped: Release Please generates it.

Verified at the new head (macOS, Python 3.13): uv sync --all-packages --locked --extra dev, all pre-commit hooks, and the full pytest -q: 8613 passed, 738 skipped. Verification notes further down refer to the previous head.


Summary

Resolve room-scoped external MCP servers for Copilot through the shared ACP initializer, preserving one owned snapshot and its cleanup boundary. Related: #709.

Changes

  • Resolve a fresh MCP snapshot per initializer and preserve Band's endpoint, precedence and structurally redacted launch settings. The shared path also covers Cursor.
  • Retain setup and runtime-close ownership through cancellation/teardown; refuse turns on a runtime held only for failed-close retry.
  • Keep resolver documentation independent of native OMP migration.
  • Update ACP configuration documentation and user-facing Unreleased entries.

Stack and merge order

No prerequisite; based on upstream d7ab3429cbdb5381b9ca572cf7eac210a8196052. Exact range: d7ab3429cbdb5381b9ca572cf7eac210a8196052..975b266822599f7d4938ace864597b8e4c31665b.

CI portability correction

The eager-host teardown regression now uses the existing conftest requires_eager_tasks/eager_tasks helpers. Python 3.11 explicitly skips that scheduling mode; 3.12/3.13 execute it. Product code and timeouts are unchanged. Test-only changelog entries were removed.

Testing

Prepared head differs from approved/tested b6d41cb8 only in CHANGELOG.md. At the tested head, managed Python 3.11/3.12/3.13 ACP resolver module: 50 passed / 1 eager-host skip; 51 passed; 51 passed. Fresh non-privileged Linux Python 3.11: 50 passed / 1 eager-host skip. All five static hooks passed freshly at the prepared head.
Historical pre-correction ACP/converter/shared-backend/conformance/Strands scope: 1843 passed, 69 skipped, 11 warnings at 626b87f1; not a new-head full-suite claim. Current source/index-delta stable patch ID: 4a909ddba317d3d3701f1cfba08bf2930e33ecfe, excluding only changelog/fork metadata. No new fork graph is claimed.
Local regressions are not native Copilot/Cursor or live-room receipts. Remote matrix and staged-package validation remain separate gates.

bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 14, 2026
Source-Base: c18df71
Source-Head: 56a679d
Applied-Over: 5021c7a
Conflict-Notes: None; exact feature delta, excluding CHANGELOG.md and FORK-CHANGES.md
Upstream-PR: band-ai#799
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 14, 2026
Source-Base: c18df71
Source-Head: 56a679d
Applied-Over: 5021c7a
Conflict-Notes: None; exact feature delta, excluding CHANGELOG.md and FORK-CHANGES.md
Upstream-PR: band-ai#799
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
Source-Base: c18df71
Source-Head: 56a679d
Applied-Over: 850b0c3
Conflict-Notes: Reimplemented resolver and shared initializer on band-ai#709 ACPRoom/RetainedRoom custody; dropped superseded parallel retirement/shutdown/respawn APIs and restartable cleanup flags; retained narrow child-reaping and closing-connection guards; moved legacy coverage to clientadapter/ and roomownership/ without restoring deleted files. Stacked after band-ai#763: docs/acp.md keeps band-ai#763's removal of OmpACPAdapterConfig beside resolve_mcp_servers. The room records the initializer its last waiter abandoned, so a callback that uncancel()s cannot publish a session or hand its late result to a successor (the original's SessionInitializer.invalidated). A setup already settling its own cancellation is recorded as abandoned too, without a second cancel. A successor joining a setup that was only settling its own cancellation reuses the live session it published.
Upstream-PR: band-ai#799
bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
Source-Base: c18df71
Source-Head: 56a679d
Applied-Over: 27431ce
Conflict-Notes: Reimplemented resolver and shared initializer on band-ai#709 ACPRoom/RetainedRoom custody; dropped superseded parallel retirement/shutdown/respawn APIs and restartable cleanup flags; retained narrow child-reaping and closing-connection guards; moved legacy coverage to clientadapter/ and roomownership/ without restoring deleted files. Stacked after band-ai#763: docs/acp.md keeps band-ai#763's removal of OmpACPAdapterConfig beside resolve_mcp_servers. The room records the initializer its last waiter abandoned, so a callback that uncancel()s cannot publish a session or hand its late result to a successor (the original's SessionInitializer.invalidated). A setup already settling its own cancellation is recorded as abandoned too, without a second cancel. A successor joining a setup that was only settling its own cancellation reuses the live session it published.
Upstream-PR: band-ai#799
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
Source-Base: c18df71
Source-Head: 56a679d
Applied-Over: 27431ce
Conflict-Notes: Reimplemented resolver and shared initializer on band-ai#709 ACPRoom/RetainedRoom custody; dropped superseded parallel retirement/shutdown/respawn APIs and restartable cleanup flags; retained narrow child-reaping and closing-connection guards; moved legacy coverage to clientadapter/ and roomownership/ without restoring deleted files. Stacked after band-ai#763: docs/acp.md keeps band-ai#763's removal of OmpACPAdapterConfig beside resolve_mcp_servers. The room records the initializer its last waiter abandoned, so a callback that uncancel()s cannot publish a session or hand its late result to a successor (the original's SessionInitializer.invalidated). A setup already settling its own cancellation is recorded as abandoned too, without a second cancel. A successor joining a setup that was only settling its own cancellation reuses the live session it published.
Upstream-PR: band-ai#799
@bandzalkin
bandzalkin force-pushed the feat/copilot-acp-mcp-resolver branch from 56a679d to 975b266 Compare October 15, 2026 03:43
@bandzalkin

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (d7ab3429) at 975b26682259; the description's new first section lists the conflict resolutions and the verification at this head.

bandzalkin added a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026
github-actions Bot pushed a commit to bandzalkin/band-sdk-python that referenced this pull request Oct 15, 2026

This branch has not been deployed

No deployments
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