Skip to content

test(agents): stabilize agent session timing assertions#5597

Closed
shizhigu wants to merge 1 commit intolivekit:mainfrom
shizhigu:codex/stabilize-agent-session-timing
Closed

test(agents): stabilize agent session timing assertions#5597
shizhigu wants to merge 1 commit intolivekit:mainfrom
shizhigu:codex/stabilize-agent-session-timing

Conversation

@shizhigu
Copy link
Copy Markdown

Summary

  • Split wall-clock event timestamp checks from deterministic duration and playback-position checks.
  • Allow a small extra late margin for created_at event emissions under CI scheduler load while keeping early events strict.
  • Preserve the wider early tolerance that test_generate_reply already used for its late conversation events.

Tests

  • uv run ruff check tests/test_agent_session.py
  • uv run ruff format --check tests/test_agent_session.py
  • uv run pytest tests/test_agent_session.py::test_tool_call tests/test_agent_session.py::test_interruption_before_speaking tests/test_agent_session.py::test_generate_reply tests/test_agent_session.py::test_preemptive_generation -q
  • uv run pytest tests/test_agent_session.py -q
  • git diff --check

Claude reviewed the diff after the tolerance split and found no blocking issues.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@shizhigu shizhigu closed this Apr 29, 2026
@shizhigu
Copy link
Copy Markdown
Author

Closing this separate test-only PR because the same stabilization commit is now folded into #5593, which was repeatedly hitting the same AgentSession timing assertion in CI. Keeping the docs fixes and the CI-unblocker together avoids making reviewers coordinate two dependent PRs.

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