Skip to content

Protocol manifests: cross-language parity tests (#747) - #753

Merged
iamfatness merged 1 commit into
mainfrom
test/747-protocol-parity
Oct 2, 2026
Merged

iamfatness merged 1 commit into
mainfrom
test/747-protocol-parity

Conversation

@iamfatness

Copy link
Copy Markdown
Owner

Fixes #747

Why

#745 retired the five ContractParity tests that compared core/Protocol.h with the TypeScript prototype. That left the capability, request and event manifests checked against nothing, and they had drifted.

What the tests now check

Manifest Checked against
kNativeMediaCoreCapabilities the keys of profile().capabilityStates on a constructed core, both directions
kRequiredMvpCapabilities the C# NativeMediaCoreProfileValidator.RequiredMvpCapabilities list, exact; and each must be a capability the core reports
kCoreRequestTypes every hasType(request, …) in JsonRpcServer.cpp, both directions
requests the shells send every ["type"] = "…" in the C# shell and every "type": "…" in the Swift shell must be a handled request or command
kCoreEventTypes each is emitted in native/src and parsed in the C# shell

Drift found and fixed

  • tiles-layer and webrtc-output were in the capability manifest but the core never reports them. Removed.
  • kCoreRequestTypes listed 5 of the 33 requests the dispatcher handles. It now lists all of them.
  • kNativeBridgeCommandTypes and kZoomMediaSpineSyncTypeNames described the deleted TypeScript bridge; nothing referenced them. Removed.
  • The C# enum NativeMediaCoreCapability was unused and disagreed with the core on three names (virtual-camera, tiles-layer, ndi-ingest). Removed.

No runtime behaviour changes: the manifests are referenced only by tests.

Verification

  • Local dev (non-stub, D3D11) build: full native suite 1,374 pass, including the 5 new tests.
  • Planted mismatches (a bogus C# request, a renamed dispatcher branch) made the two request tests fail; reverted.
  • CoreVideoPro.MediaCore.Tests pass after the enum removal.

🤖 Generated with Claude Code

The five ContractParity tests that compared core/Protocol.h with the
TypeScript prototype were retired with it (#738), leaving the capability,
request and event manifests checked against nothing.

- kNativeMediaCoreCapabilities is now exactly what a constructed core reports
  in profile().capabilityStates. tiles-layer and webrtc-output were never
  reported and are removed.
- kCoreRequestTypes is every request JsonRpcServer dispatches on (33), compared
  with the dispatcher in both directions. Each request the C# shell sends and
  each type the Swift shell sends must be handled by the core.
- kRequiredMvpCapabilities must equal the C# validator's list.
- Each core event must be emitted by the core and parsed by the C# shell.
- kNativeBridgeCommandTypes and kZoomMediaSpineSyncTypeNames described the
  deleted TypeScript bridge and are removed, as is the unused C# enum
  NativeMediaCoreCapability (it disagreed with the core on three names).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@iamfatness
iamfatness merged commit 0f5d522 into main Oct 2, 2026
28 of 29 checks passed
@iamfatness
iamfatness deleted the test/747-protocol-parity branch October 2, 2026 21:14
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.

Protocol manifests in Protocol.h have no cross-language parity test

2 participants