Skip to content

Revert AV sync assertion weakening#92

Merged
chrisgleissner merged 2 commits into
fix/e2e-avsync-pop-detectionfrom
copilot/sub-pr-89
Jan 13, 2026
Merged

Revert AV sync assertion weakening#92
chrisgleissner merged 2 commits into
fix/e2e-avsync-pop-detectionfrom
copilot/sub-pr-89

Conversation

Copilot AI commented Jan 13, 2026

Copy link
Copy Markdown
Contributor

The original PR weakened the AV sync assertion to treat "no matched A/V pop pairs" as a warning instead of a failure. This change reverts that weakening.

Rationale

The concurrency fix in PR #90 should have resolved the underlying CI instability. Only two tests were affected, and the proper fix is addressing the race condition, not weakening the assertion.

Changes

  • Restored tests/e2e/framework/validation/av_sync.py to strict behavior
  • Removed special case handling for total_analyzed == 0
  • AV sync now fails hard when no pop pairs are matched, as originally designed

Before (weakened)

if total_analyzed == 0:
    msg = f"No matched A/V pop pairs (audio_pops={total_audio_pops}, video_pops={total_video_pops})"
    # Would pass with warning

After (strict)

msg = f"Accuracy: {accuracy:.1f}%"
if not passed:
    total_analyzed = results.get('total_analyzed', 0)
    perfect_count = results.get('perfect_sync_count', 0)
    msg += f" ({total_analyzed - perfect_count} mismatches)"
# Fails when passed=False, regardless of reason

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: chrisgleissner <3969147+chrisgleissner@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix AV sync issue in E2E tests when no pop pairs found Revert AV sync assertion weakening Jan 13, 2026
Copilot AI requested a review from chrisgleissner January 13, 2026 21:33
@chrisgleissner chrisgleissner marked this pull request as ready for review January 13, 2026 21:34
Copilot AI review requested due to automatic review settings January 13, 2026 21:34
@chrisgleissner chrisgleissner merged commit d8037fc into fix/e2e-avsync-pop-detection Jan 13, 2026
15 checks passed
@chrisgleissner chrisgleissner deleted the copilot/sub-pr-89 branch January 13, 2026 21:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts a previous change that weakened the AV sync assertion by converting "no matched A/V pop pairs" cases from failures to warnings. The revert restores strict behavior where all AV sync issues fail hard, relying on PR #90's concurrency fix to resolve the underlying CI instability.

Changes:

  • Removed special case handling for total_analyzed == 0 that treated it as a warning
  • Restored strict assertion behavior where passed=False always results in test failure
  • Simplified message formatting by removing conditional logic based on total_analyzed
Comments suppressed due to low confidence (1)

tests/e2e/framework/validation/av_sync.py:4

  • Import of 'Optional' is not used.
from typing import Tuple, Optional, Dict, Any

if not passed:
total_analyzed = results.get('total_analyzed', 0)
perfect_count = results.get('perfect_sync_count', 0)
msg += f" ({total_analyzed - perfect_count} mismatches)"

Copilot AI Jan 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When total_analyzed == 0, this code will show 'Accuracy: 0.0% (0 mismatches)' which is misleading. The results.py file at lines 362-365 handles this case by treating it as a warning with a more descriptive message. However, after this revert, av_sync.py will return passed=False when total_analyzed == 0 (since sync_accuracy == 0 means is_perfectly_synced=False), but the message won't explain why it failed. The removed code provided a clear message: 'No matched A/V pop pairs (audio_pops=X, video_pops=Y)'. Consider whether the strict behavior should include a more descriptive message for the zero-analysis case, or verify that results.py's handling at line 362 will catch this before it becomes an error.

Suggested change
msg += f" ({total_analyzed - perfect_count} mismatches)"
if total_analyzed == 0:
audio_pops = results.get('audio_pops', 0)
video_pops = results.get('video_pops', 0)
msg = (
f"No matched A/V pop pairs "
f"(audio_pops={audio_pops}, video_pops={video_pops})"
)
else:
mismatches = max(total_analyzed - perfect_count, 0)
msg += f" ({mismatches} mismatches)"

Copilot uses AI. Check for mistakes.
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.

3 participants