Repository navigation
test(llc): drive the usage-after-exit polls explicitly (#20466) - #21201
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Trainmaster review at 7b73f6c: APPROVE. It is the already-approved #21068 fix 1f8b069 (delta review issuecomment-6721194788), cherry-picked unchanged; the diff lines are identical. That fix missed merge train #21184, which carried #21068 at its earlier head. Test-only, one file. Landing individually. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
Thinking Path
Refs #20466. PR #21068 was approved with a deterministic version of its usage-after-exit test (commit 1f8b069, approved at b9783e8). Merge train T97 (#21184) landed #21068 at its earlier approved head, so that commit never reached main. Main still has the timing-dependent version, which asserts
>= 3live polls and can flake under CI load. This PR brings the approved fix to main by cherry-picking it from current main.Single-issue rationale
It is one approved change to one test file, and it completes PR #21068's review.
What Changed
autobot-backend/llc/adapters/tests/test_usage_read_after_exit_20466.py: the real child process now blocks onsys.stdin.readline()instead oftime.sleep. The test calls the realClaudeCodeAdapter.status3 times while the child is alive, then writes to stdin, closes it and awaits the exit. It asserts the exact sequence[RUNNING]*3 + [COMPLETED]: the 3 alive polls have tokens None, and the final poll is COMPLETED with 123/45 and billed usage 123/45. Theasyncio.wait_for(30)bound is kept.Verification
Model Used
Claude (Opus coordinating).
🤖 Generated with Claude Code