Skip to content

Conversation

knudtty
Copy link
Contributor

@knudtty knudtty commented Oct 16, 2025

Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: bf97eea

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/api Patch
@hyperdx/app Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@knudtty knudtty marked this pull request as ready for review October 16, 2025 15:56
Copy link

vercel bot commented Oct 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Oct 16, 2025 10:46pm
Copy link

claude bot commented Oct 16, 2025

PR Review

Overall Assessment: Good fix for preventing ClickHouse query timeouts

Code Quality Issues:

  • Logging inaccuracy in util.ts:79 - numWindows value in second log message is stale (calculated before first truncation). Consider recalculating or removing from second log.

  • Minor: Variable oneDayMs in tests (line 344) is defined but never used - Remove unused variable.

Positive Notes:

  • Comprehensive test coverage (10 test cases)
  • Clear documentation in changeset
  • Proper error prevention logic
  • Good use of logging for observability

Recommendation: Address the logging accuracy issue before merge to avoid confusion during debugging.

Copy link
Contributor

github-actions bot commented Oct 16, 2025

E2E Test Results

All tests passed • 25 passed • 3 skipped • 225s

Status Count
✅ Passed 25
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 3

View full report →

dhable
dhable previously approved these changes Oct 16, 2025
Copy link
Contributor

@dhable dhable left a comment

Choose a reason for hiding this comment

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

+1 with one minor nitpick

@knudtty
Copy link
Contributor Author

knudtty commented Oct 16, 2025

@claude remove the unused variable that the reviewer Dan mentioned

Copy link

claude bot commented Oct 16, 2025

Code Review

No critical issues found.

The implementation looks solid:

  • ✅ Good test coverage with 11 comprehensive test cases
  • ✅ Proper handling of edge cases (zero time range, fractional windows, exact limits)
  • ✅ Clear logging added for debugging truncation behavior
  • ✅ Constants well-defined (MAX_NUM_WINDOWS, maxLookbackTime)
  • ✅ Logic correctly applies the more restrictive limit when both are exceeded

Minor observations (non-blocking):

  • The magic numbers (50, 6, 24) are now constants but could benefit from comments explaining the rationale
  • Consider adding JSDoc to calcAlertDateRange to document the truncation behavior for future maintainers
Co-authored-by: Aaron Knudtson <knudtty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants