Skip to content

Fix stats days filter for missing and invalid timestamps#323

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-stats-days-invalid-timestamps
Open

Fix stats days filter for missing and invalid timestamps#323
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-stats-days-invalid-timestamps

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53249.

Summary

  • Require sessions to have a valid RFC3339 timestamp before they can be included by stats --days.
  • Normalize parsed session timestamps to UTC before comparing with the rolling start date.
  • Add regression coverage for missing and invalid timestamps.

Validation

  • cargo +1.90.0 fmt --package cortex-cli --check
  • git diff --check
  • Isolated rustc --test harness for date-range filtering behavior

Note: targeted cargo test -p cortex-cli ... still fails before executing this test on this Windows/MSVC environment due an existing aws-lc-sys C build failure.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG][v0.0.7] stats --days skips sessions only when timestamp parses and is before the window; missing or bad timestamps bypass the filter

1 participant