Skip to content

feat(mcp): private socket transport and in-app control module - #4456

Merged
zackees merged 32 commits into
masterfrom
infra/control-api-transport
Nov 10, 2026
Merged

zackees merged 32 commits into
masterfrom
infra/control-api-transport

Conversation

@zackees

@zackees zackees commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Adds an owner-only Unix control socket, stdio attach proxy and a loadable frontend module that uses the running app's libobs. Existing stdio startup remains available. Windows named pipes are explicitly tracked in #4455.

Stacked on #4454; the transport slice starts at RED commit 3b16073. Refs #4448, parent #4444.

RED: shared obs-tests-core endpoint test panics against the production todo stub. GREEN: all 74 MCP tests pass, native Clippy passes, and the module builds. nm -D --defined-only shows exactly the seven OBS module entry points; no libobs implementations are bundled. Private socket framing/permissions/multi-client cleanup tests pass. GUI/device lifecycle smoke remains pending in bosn.

Local ./lint --fix also ran: its new shared-build registrations and Tier 2 proof exclusions were corrected (10 focused checks pass); the existing browser-submodule pointer check remains red without a pointer change in this PR.

Test cost: socket integration starts one server thread and uses bounded I/O; no new test binary. Tier 2 remains unchanged. Tier 3 does not apply to this new transport. GUI/device validation in bosn remains outstanding for the transport issue.

Closes #4468: run 42742487152 / job 129599466460 failed only the unchanged transition-video fixture (busy_textures_draw_b, 0 callbacks instead of 1). Its wall-clock/frame assertions can race the production nonblocking texture lock under concurrent graphics load. RED 1c29021 makes timing-lock policy and real CTest-registration checks fail; GREEN 7beb525 adds timing resource isolation plus RUN_SERIAL. All four focused checks pass (0.886 s), ruff and diff whitespace checks pass. Existing C tests, public headers and transition production behavior are untouched. These two commits are pushed together in one requested ./push fixup; required Tier 2 CI remains the real-fixture gate.

@zackees
zackees marked this pull request as draft November 9, 2026 23:29
@zackees zackees changed the title test(mcp): RED local endpoint contract (#4448) feat(mcp): private socket transport and in-app control module Nov 9, 2026
@zackees

zackees commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Native transport validation succeeded on the complete stack: --mcp-listen SOCKET starts a headless runtime, --mcp-attach SOCKET relays tools/list (30 tools, all outputSchema) and exits 0; closing server stdin exits 0 and removes the socket. All 74 core MCP/socket tests passed before the client cases; native Clippy and module build passed. Export audit shows exactly obs_module_{author,description,load,name,set_pointer,unload,ver}; it imports libobs rather than bundling implementations. Frontend attach constructor preserves global coordinate settings and resolves current scene/output handles. GUI/device lifecycle validation is still pending in bosn, so keeping this draft and Refs #4448.

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Read the new Tier 2 build failure (run 42723880715, job 129526411017). It is an infrastructure failure: zccache reports broken connection to daemon / Connection reset by peer, then unrelated C compile targets fail with code 125. No source diagnostic from the control changes. A pending lifecycle fix will trigger fresh CI on the new head; avoiding a redundant rerun of the old head. Local native CLI + socket attach smoke already passed.

@zackees

zackees commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Final transport fixes are pushed: typed frontend request/response capabilities, stop at SCRIPTING_SHUTDOWN before scene cleanup (EXIT fallback), and discard buffered requests immediately after cancellation. Cancellation RED b30179d reproduced two calls instead of one; GREEN 3f4ee74 fixes it. All 78 MCP cases pass on the combined client stack. Native Clippy on that final stack passes. Previous zccache daemon-disconnect CI failure is superseded by this fresh run. GUI/device validation remains explicitly pending in bosn.

…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
@zackees
zackees added this pull request to the merge queue Nov 10, 2026
Merged via the queue into master with commit 09ec6d4 Nov 10, 2026
76 of 78 checks passed
@zackees
zackees deleted the infra/control-api-transport branch November 10, 2026 05:08
@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: isolate transition video timing fixture from competing native tests

1 participant