results: Envelope::new and the role-labelled multi-instance fold - #66
Merged
Conversation
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.
This was referenced Aug 11, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-assembledEnvelope { 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_completeANDs,duration_msmaxes.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.