every.channel/evolution/proposals/ECP-0020-determinism-moq-selftest.md
2026-02-15 16:17:27 -05:00

1 KiB

ECP-0020: deterministic encode checks + MoQ self-test CLI

Status

Draft

Context

We need a repeatable way to validate deterministic encoding and to verify MoQ publish/subscribe flows from the CLI without the UI.

Decision

Add CLI tooling for (1) deterministic re-encoding checks using the libx264 single-thread profile, and (2) a local MoQ round-trip self-test that compares object hashes.

Details

  • ec-cli determinism-test re-encodes the same input multiple times using deterministic_h264_profile and compares segment hashes.
  • ec-node moq-selftest publishes a chunked stream and subscribes to it using a second endpoint, verifying object hashes per chunk index.
  • The self-test waits for the subscriber to acknowledge each published chunk to avoid MoQ track drops, and waits briefly for endpoint addresses to appear.
  • Defaults are conservative: single-thread x264, bitexact flags, fixed GOP.

Consequences

  • Determinism regressions are detectable early.
  • MoQ path can be validated headlessly without the Tauri app.