Skip to content

test: obs-websocket v5 Tier 4 black-box suite - #104

Merged
zackees merged 3 commits into
obs-rust:masterfrom
chriscoveries:tier4/obs-websocket
Oct 10, 2026
Merged

zackees merged 3 commits into
obs-rust:masterfrom
chriscoveries:tier4/obs-websocket

Conversation

@chriscoveries

Copy link
Copy Markdown
Contributor

Black-box protocol test suite for the obs-websocket v5 server (testing-policy Tier 4; Phase 5 item 3). It launches a real headless OBS, talks to the server over the wire only, and asserts on op/d envelopes, requestStatus codes, event deliveries and close codes — no implementation hooks. The same client runs unchanged against the current C++ server today and the future Rust server.

Coverage

  • Hello/Identify handshake, with and without authentication (challenge, wrong-password close 4009, request-before-Identify 4007, double-Identify 4008, rpcVersion violations)
  • All 147 request types in plugins/obs-websocket/docs/generated/protocol.json (General, Config, Scenes, Scene Items, Inputs, Media Inputs, Sources, Filters, Transitions, Outputs, Stream, Record, UI, Canvases)
  • Event subscription delivery and EventSubscription::None isolation
  • Request batches: serial, haltOnFailure, no-halt error propagation, parallel
  • Error codes for malformed JSON (4002), unknown opcode (4006), missing requestType (4003), missing/invalid fields (300/401), unknown types (204), not-found resources (600)

Status against the C++ server (obs-websocket 5.5.2): 178/178 checks pass, 147/147 request types exercised.

Run command documented in test/websocket-tier4/README.md (xvfb + packaged OBS >= 30 or in-repo build + Python websockets).

Refs #45

chriscoveries and others added 3 commits October 10, 2026 09:13
Language-independent obs-websocket v5 black-box test client under
test/websocket-tier4/ (Python + websockets). Runs headless OBS with
obs-websocket enabled and asserts wire-level behavior only:

- Hello/Identify handshake with and without auth (challenge, wrong
  password, request-before-Identify, double-Identify, rpcVersion)
- All 147 documented v5 request types across every category
- Event subscription delivery and SUB_NONE isolation
- Request batches (serial, haltOnFailure, no-halt, parallel)
- Error codes for malformed/unknown requests and connection close codes

Passes 178/178 checks against the current C++ server (obs-websocket
5.5.2). Run command documented in test/websocket-tier4/README.md.

Refs #45

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…h readiness

Deinterlace requests now target the async media input and expect 100 (the
pinned obs-websocket 5.7.5 implements them; a sync color source answers 604,
asserted separately). Drop WAYLAND_DISPLAY and force QT_QPA_PLATFORM=xcb so
OBS stays on the Xvfb display (on Wayland it opened on the user's session
and crashed in GetOutputList / projector teardown). Retry the authed
GetVersion while the server answers 207 NotReady. Pin websockets==13.1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Local-Gate: v1 tree=4c36bc665ce64d20c8b245f182405c8584ee44f9 secs=80 lanes=lint:run,rust-test:run,tier2-linux:run
Ci-Attestation: {"at":1791649727,"gate":"rust/all/fmt","host":"linux-x86_64","key":"1ffd2637ad2ae4be6579f5976688338bb939a0266c59ef358bde5a380deffc9b","lane":"lint","parents":["29c4fe9dfe721f8a71d090632243dd06316c7e07"],"secs":32,"stamp":"7cb83970c1afe89585d6bbbcdf86556e","tree":"4c36bc665ce64d20c8b245f182405c8584ee44f9","v":1,"via":"run"}
Ci-Attestation: {"at":1791649727,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"1ffd2637ad2ae4be6579f5976688338bb939a0266c59ef358bde5a380deffc9b","lane":"lint","parents":["29c4fe9dfe721f8a71d090632243dd06316c7e07"],"secs":32,"stamp":"2711dcfd237cdd70fc0cd6bedb5682f2","tree":"4c36bc665ce64d20c8b245f182405c8584ee44f9","v":1,"via":"run"}
Ci-Attestation: {"at":1791649727,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"694b1f06e997b5934c217c971e5bca2a46931dae2db59436e00f145660f2fa26","lane":"rust-test","parents":["29c4fe9dfe721f8a71d090632243dd06316c7e07"],"secs":13,"stamp":"d6c0fff441b1f8c663875d6d00088d50","tree":"4c36bc665ce64d20c8b245f182405c8584ee44f9","v":1,"via":"run"}
Ci-Attestation: {"at":1791649727,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"4a5f6e7f0a5ff5f9e370d9110ae84cc969f22b445ab22e89078493321b131242","lane":"tier2-linux","parents":["29c4fe9dfe721f8a71d090632243dd06316c7e07"],"secs":35,"stamp":"562ad1ec00bcba406d3011f4fe36b2be","tree":"4c36bc665ce64d20c8b245f182405c8584ee44f9","v":1,"via":"run"}
@zackees
zackees marked this pull request as ready for review October 10, 2026 16:28
@zackees
zackees force-pushed the tier4/obs-websocket branch from 675fd80 to eb15e7e Compare October 10, 2026 16:28
@zackees

zackees commented Oct 10, 2026

Copy link
Copy Markdown
Member

Rebased on master and fixed what broke when the suite ran against a real server.

  • Deinterlace: the pinned submodule is obs-websocket 5.7.5, which implements the Deinterlace requests. They were sent to a color source, which is not async, so the server answered 604. They now target the async media input and expect 100. A separate check asserts that the color source gets 604.
  • Headless: the suite now drops WAYLAND_DISPLAY and forces QT_QPA_PLATFORM=xcb. Before this, OBS opened on the developer's Wayland session instead of Xvfb and segfaulted in GetOutputList and during projector teardown.
  • Auth phase: the authed GetVersion is retried while the server answers 207 NotReady.
  • Deps and docs: pinned websockets==13.1. The README now says the client only connects to localhost and the suite is not wired into CI or the gate.

Results (OBS 32.1.2 on Xvfb): before the fix, 4 Deinterlace checks failed and OBS crashed. After the fix, 179/179 checks pass and all 147 documented request types run. Local gate passed and stamped.

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.

2 participants