Skip to content

results: Envelope::new and the role-labelled multi-instance fold - #66

Merged
lann merged 1 commit into
mainfrom
results-role-fold
Aug 7, 2026
Merged

results: Envelope::new and the role-labelled multi-instance fold#66
lann merged 1 commit into
mainfrom
results-role-fold

Conversation

@lann

@lann lann commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Fixes #61 (umbrella #14).

Upstreams the results-shape half of webrtc-datachannels' two-party machinery into component-test-results, generalized to N roles for the next multi-instance consumer (component-iroh, per polymorph-test#62):

  • Envelope::new(target, suite) — the format defaults in one place (version, segment 0, "tags" scheduling); fields stay public for provenance. Kills the three hand-assembled Envelope { version: RESULTS_VERSION, … } sites in webrtc's driver.
  • fold_roles(&[(role, results)]) — the pair fold's semantics, exactly, N-ary: worst status wins (fail > not-reached > skipped > rest), ties to the earlier role, case order is first-report order, details/diagnostics role-labelled (winner leads), single reports pass through unlabelled, diagnostics_complete ANDs, duration_ms maxes.

Additive per frozen-surface rule #3; no wire-format change. Seven new unit tests pin the semantics (including the three-way generalization). webrtc adopts on its pin bump and deletes fold_pair/fold_case + the envelope sites; behavioral parity there is gated by its committed-matrix diff.

The first multi-instance consumer (webrtc-datachannels) built both
in-repo: envelope synthesis hand-assembled in three places (version
and scheduling defaults silently divergeable), and a two-party fold
whose rules — worst status wins, ties to the earlier role, details
and diagnostics role-labelled so a red cell names the failing side,
single reports passing through unmodified — are results-shape policy,
not WebRTC policy. component-iroh is the named second consumer of the
same shape.

fold_roles generalizes the pair fold to N roles with the pair
semantics preserved exactly (first-report case order, strict-greater
winner selection, rank>0 labelling, diagnostics-complete AND,
duration max). Additive only; the wire format is untouched.

Fixes #61.
@lann
lann merged commit 2a55f39 into main Aug 7, 2026
2 checks passed
@lann
lann deleted the results-role-fold branch August 7, 2026 04:08
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.

component-test-results: multi-instance fold + envelope synthesis (upstream webrtc's pair machinery)

1 participant