Skip to content

Prevent one case's comparison bug from crashing the whole matrix run - #114

Merged
chrisuthe merged 1 commit into
mainfrom
fix-matrix-crash-on-missing-audio
Sep 4, 2026
Merged

Prevent one case's comparison bug from crashing the whole matrix run#114
chrisuthe merged 1 commit into
mainfrom
fix-matrix-crash-on-missing-audio

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

The actual bug behind "legacy-unencrypted not showing up on the site"

The last two publish workflow runs (main push after #112, and the manual workflow_dispatch after #113) both failed to produce a report at all:

File ".../runner.py", line 543, in _compare_audio_summaries
    received_hash = client_summary["audio"]["received_pcm_sha256"]
KeyError: 'audio'

This exception propagates straight out of asyncio.gather() in run_matrix() with no handling, so run_all.py exits non-zero before the report/Pages-publish steps ever run. The workflow's Check site was built step then just skips publishing (index.html not found) rather than failing loudly, which made it look like only the new server-initiated-legacy-unencrypted scenario was missing -- really, the whole site has been stuck on a stale snapshot from before #109/#112 merged, since neither of the two most recent runs produced any report at all.

Fix

  • Wrap the per-case summary comparison in run_case() in a try/except so a bug in any single scenario's comparison logic fails only that one case with a descriptive reason, instead of crashing the entire matrix.
  • Harden _compare_audio_summaries() to fail with a clear message when either summary is missing its audio section, rather than raising KeyError.

Verification

  • python -m compileall src scripts passes.
  • Local aiosendspin -> aiosendspin full matrix run produces the same pass/fail results as before (including the new legacy-unencrypted and protocol-baseline scenarios), and conformance.cli report succeeds end-to-end.

Follow-up

Once merged, we should re-trigger (or wait for the next scheduled) publish run to confirm the live site picks back up and shows the scenarios that have been invisible since #109/#112.

The macOS publish workflow has been failing to produce a report at all
for the last two runs: a single case's summary comparison raised an
unhandled KeyError ('audio') deep in _compare_audio_summaries(), which
propagated straight out of asyncio.gather() in run_matrix() and killed
run_all.py before the report/Pages-publish steps ever ran. This is why
recently-added scenarios (e.g. server-initiated-legacy-unencrypted from
#112) appeared to be "missing" from the published site -- the whole
report generation had silently stopped succeeding, not just that one
scenario's row.

- runner.py: wrap _compare_summaries() in run_case() so any exception
  it raises is turned into a failed case with a descriptive reason
  instead of crashing the entire matrix run. A bug in one scenario's
  comparison logic should now only fail that one case.
- _compare_audio_summaries(): guard against a missing/malformed
  "audio" section in either summary with an explicit, readable failure
  reason instead of a raw KeyError, since that's the concrete bug that
  triggered this.

Verified locally: python -m compileall src scripts passes, and a full
aiosendspin -> aiosendspin matrix run (including the new
server-initiated-legacy-unencrypted and
server-initiated-protocol-baseline-v1 scenarios) still produces the
same pass/fail results as before, plus report generation still
succeeds end-to-end.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chrisuthe
chrisuthe merged commit ff88c2f into main Sep 4, 2026
1 check failed
@chrisuthe
chrisuthe deleted the fix-matrix-crash-on-missing-audio branch September 4, 2026 22:02
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.

1 participant