Conversation
Codex session fixtures in the cost scanner tests stamped their events at now - 1h but filed the session under today's local date folder. In the first hour after local midnight (00:00-01:00Z on the UTC CircleCI runner) that hour fell on yesterday, so the tests read the wrong day bucket, and the fork fixtures landed in two different date folders, which flipped the folder scan order. CircleCI builds 977, 978 and 979 failed this way: codex_source_recovery_keeps_appended_duplicate_unpriced_after_cache_reload, paginated_continuation_raises_inherited_baseline_from_total_last and paginated_history_base_equal_parent_keeps_true_fork_subtraction. A shared helper now returns now - 1h, or the start of the local day when that hour reaches back into yesterday, and the fixtures take both the event time and the date folder from it. A unit test pins the helper at fixed times around midnight in UTC and UTC+7. Production code is unchanged.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe cost scanner test fixtures now use timezone-aware timestamps that align with their local-date directories. Cache-reload and paginated tests use the shared fixture-time helper. ChangesFixture timestamps
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The test-only changes address midnight fixture failures without changing production behavior. No merge-blocking issue is identified; merge after normal checks pass. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
|
Adversarial validation passed at afe1b747c816d0e1535e5c234f18545abf48701c Scope: keep Codex cost fixtures on the local day (#721, GAP row FIX-MIDNIGHT), validated as merged into release/v0.70.0 (merge afe1b74 = merge of 400f805). Attacks:
No defects found. READY for the un-draft rule. |
Summary
Three cost scanner tests fail on CircleCI when a build runs between 00:00 and 01:00 UTC. This PR fixes the test fixtures; production code is unchanged.
Failing builds, all with the same three tests (2157 passed, 3 failed):
port/micro-0.67.0-codex-direct-fork-baselinesport/micro-0.69.0-kimi-stale-cli-guidancefix/reset-timer-overflow(#720)codex_source_recovery_keeps_appended_duplicate_unpriced_after_cache_reload(tests.rs:1584)paginated_continuation_raises_inherited_baseline_from_total_last(paginated.rs:169)paginated_history_base_equal_parent_keeps_true_fork_subtraction(paginated.rs:230)Cause
The Codex session fixtures stamped their events at
now - 1hbut filed the session under today's local date folder. In the first hour after local midnight that hour falls on yesterday:Fix
recent_codex_fixture_time():now - 1h, or the start of the local day when that hour reaches back into yesterday.write_codex_session_fixtureandwrite_codex_session_fixture_with_inputstake both the event time and the date folder from it.recent_codex_fixture_time_stays_on_the_local_daypins the helper at fixed times around midnight in UTC+7 and UTC (the CI runner).Validation
Run in a worktree on this branch (base
main7695471), through the local build gate:cargo +1.98.0 fmt --all --checkcargo +1.98.0 clippy --workspace --all-targets -- -D warningscargo test -p codexbar cost_scannercargo test -p codexbarcargo test -p codexbar-desktop-tauribootstrap_payload_exposes_every_provider_variantfiltered; it needs #711)Affected areas
rust/src/cost_scanner/tests.rs,rust/src/cost_scanner/tests/paginated.rs(tests only)UI proof
Not applicable: test-only change, no UI or runtime behaviour changes.
Summary by CodeRabbit