Skip to content

feat(mcp): fluent typed client and A/V probe socket transport - #4457

Merged
zackees merged 61 commits into
masterfrom
infra/control-api-client
Nov 10, 2026
Merged

zackees merged 61 commits into
masterfrom
infra/control-api-client

Conversation

@zackees

@zackees zackees commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Adds a fluent typed Rust client for the control socket and MCP transport to the independent A/V sync probe. --transport mcp requires no websocket or GUI; auto falls back only when the websocket connection cannot open. Existing websocket control remains available.

Stacked on #4456 and the no-X startup PR #4466; slice 5 starts at RED 3a96a9d. Refs #4449, parent #4444.

RED: two shared-harness Rust tests panic against client todo stubs; the Python structured exchange test raises NotImplementedError. GREEN: the client reuses server Input/Output structs, preserves structured domain errors and rejects wrong JSON-RPC IDs. Probe tests cover framing, fallback, playback wait/order, unique-source cleanup and forced kill/reap after a capture deadline. Additive source_remove enables cleanup without GUI interaction. Schema snapshot includes it.

Validation: all 78 MCP cases and five Python transport/probe tests pass. Native Clippy passes. Domain-error extension regression was RED at 897e36c and GREEN at d8a5060: new error fields no longer turn a domain failure into a protocol failure. Request structs remain strict. The local Rust lane passed 7,687 tests (six skipped) and Windows GNU compilation; the duplicate local C Tier 2 build was stopped after more than 12 minutes, with Tier 2 CI already green on #4452. No full-local-gate attestation is claimed.

Final rebuilt native CLI smoke on the Wayland host (DISPLAY=:0 unreachable, XDG_SESSION_TYPE=wayland, WAYLAND_DISPLAY=wayland-0) succeeds, including initialize: --mcp tools/list exits 0 with 30 tools, all outputSchema; stats_get returns a structured snapshot, wait_for inactive succeeds, and missing media returns structured error 600. Socket listen + attach returns the same 30 tools, exits 0 and removes its socket on stdin EOF. Module export audit shows exactly the seven module entry points. Actual GUI/device measurements remain for bosn and are still tracked by the client issue.

Test cost: new Rust client cases use in-memory streams and no own threads; no new test binary. New socket tests (prior slice) start one server thread. Tier 2 remains unchanged; Tier 3 does not apply to this new client/protocol adapter.

Raw final host initialize/tools/list/stats/wait responses are retained in .git/control-wayland-smoke.jsonl and the concise summary in .git/control-wayland-smoke-summary.json. The no-display regression is separately RED/GREEN in bosn under #4466. Current origin/master is merged; required CI is pending and no full local-gate attestation is claimed.

Closes #4478: the repeated native-build failure was in the MCP plugin build after the main Tier 2 uncached recovery had succeeded. ZCCACHE_DISABLE was exported only inside the recovery subshell. RED 9b14acc proves the subsequent child sees an unset flag; GREEN fbaaaf0 keeps the flag in the validation process. All 12 existing/new build-error checks pass (5.769 s), including a healthy daemon and no retry for real compiler errors. Ruff and bash syntax checks pass. The original single-retry/cache-health behavior is preserved. No workflow, public header or C test changed.

@zackees
zackees marked this pull request as draft November 9, 2026 23:44
@zackees zackees changed the title test(mcp): RED typed client and probe transport contracts (#4449) feat(mcp): fluent typed client and A/V probe socket transport Nov 9, 2026
…ransport

# Conflicts:
#	docs/features.md
#	docs/rust-port/control-api.schema.json
#	rust/obs-mcp/src/backend/control.rs
#	rust/obs-mcp/src/backend/mod.rs
#	rust/obs-mcp/src/ffi/control.rs
#	rust/obs-mcp/src/tools/control.rs
#	rust/obs-mcp/src/tools/mod.rs
#	rust/obs-mcp/tests/mcp/main.rs
…lient

# Conflicts:
#	docs/features.md
#	docs/rust-port/control-api.schema.json
#	rust/obs-mcp/src/backend/control.rs
#	rust/obs-mcp/src/backend/mod.rs
#	rust/obs-mcp/src/ffi/control.rs
#	rust/obs-mcp/src/tools/control.rs
#	rust/obs-mcp/src/tools/mod.rs
#	rust/obs-mcp/tests/mcp/main.rs
@zackees
zackees marked this pull request as ready for review November 10, 2026 02:30
@github-actions github-actions Bot added the claim-conflict A PR closing reference conflicts with the issue claim label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

Claim conflict: keep this PR out of the merge queue until resolved.

@github-actions github-actions Bot added claim-conflict A PR closing reference conflicts with the issue claim and removed claim-conflict A PR closing reference conflicts with the issue claim labels Nov 10, 2026
@github-actions github-actions Bot removed the claim-conflict A PR closing reference conflicts with the issue claim label Nov 10, 2026
@zackees
zackees added this pull request to the merge queue Nov 10, 2026
Merged via the queue into master with commit 88b60f6 Nov 10, 2026
74 of 77 checks passed
@zackees
zackees deleted the infra/control-api-client branch November 10, 2026 06:44
@obs-rust-project-manager obs-rust-project-manager Bot moved this from Needs fix to Done in obs-rust Multiview Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci: retain uncached Tier 2 recovery for MCP plugin builds

1 participant