Skip to content

fix: reject out-of-order voice timing - #17

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
mikemikimike:codex/reject-out-of-order-timing
Sep 6, 2026
Merged

fix: reject out-of-order voice timing#17
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
mikemikimike:codex/reject-out-of-order-timing

Conversation

@mikemikimike

Copy link
Copy Markdown
Contributor

Summary / Problem

Fixes #15.

check_latency only reported gaps above the response budget. A corrupt call
whose agent turn started before the caller turn ended therefore produced no
finding and could look like a fast response.

Changes

  • Report negative response gaps as a high-severity invalid_timing finding.
  • Point the finding at the agent turn and include the overlap duration in the
    diagnostic message.
  • Preserve the existing slow_response behavior for non-negative gaps.
  • Add a regression test covering the finding, severity, turn index, and
    message, and update the documented test count.

Tests

  • RED verification: the new regression test failed against the base commit
    with zero invalid_timing findings.
  • pytest -q: 20 passed
  • Focused regression test: 1 passed
  • Ruff check: passed
  • Ruff format check for modified files: passed
  • CLI smoke tests: the clean fixture exits 0 and the misheard fixture exits 1
    with --strict
  • Wheel build: passed with python -m build --wheel

Compatibility / Known limitations

  • Existing positive latency gaps and severity thresholds are unchanged.
  • Negative gaps are treated as invalid timing data and fail strict evaluation
    because the new finding is high severity.
  • This check only evaluates adjacent user/agent pairs exposed by
    Interaction.pairs(); it does not infer timing across unrelated turns.

Issue

#15

Fixes AgentPostmortem#15

Signed-off-by: mikemikimike <13286568797@163.com>
@royalpinto007
royalpinto007 merged commit b522615 into AgentPostmortem:main Sep 6, 2026
2 checks passed
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.

Negative/out-of-order clocks silently pass check_latency

2 participants