Repository navigation
Fix cost_scanner token-count test that ages out of the 30-day window - #110
Merged
Merged
Conversation
The test wrote a fixture event with a hardcoded 2026-05-27 timestamp and scanned with a 30-day window, so it silently began failing (0 sessions instead of 1) once that date fell more than 30 days in the past. Use a timestamp relative to now so the event always lands inside the window.
darknight105
added a commit
to darknight105/Win-CodexBar
that referenced
this pull request
Jul 2, 2026
Resolved conflicts: - main.rs: take upstream's startup-reveal timing (VISIBLE_START_ACTIVATION_DELAY 500ms + new STARTUP_TRAY_BLUR_GRACE const). - transition.rs: keep upstream's new mark_tray_panel_shown fn alongside the dead_code annotation on the (still-unused) tray-reveal fallback. - Thread SurfaceMode through upstream's two new apply_window_layout(TrayPanel, ...) callers to match the refactored signature. Verified on the merged tree: desktop-tauri 256/0, frontend tsc + vitest 111/0, core lib 442 pass. The cost_scanner flaky test is split to PR nesszer#110.
Finesssee
approved these changes
Jul 2, 2026
Finesssee
left a comment
Collaborator
There was a problem hiding this comment.
Thermo-nuclear code-quality review: approved. This is the right shape for the fix: one isolated test fixture timestamp, no production-path branching, no new abstraction, no file-size or layering regression. The relative timestamp keeps the test inside the scanner's existing 30-day window without changing scanner behavior. Focused validation: cargo test --manifest-path rust\Cargo.toml cost_scanner::tests::parses_current_codex_payload_token_count_events --quiet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standalone fix split out of #108 per review.
cost_scanner::tests::parses_current_codex_payload_token_count_eventswrites a fixture event dated 2026-05-27 and scans with a 30-day window, so it fails with 0 sessions once that date is more than 30 days old (it fails onmaintoday). The fixture timestamp is now computed relative to now, so the event always lands inside the window.