- Update log_message function to write messages to both summary and detail log files
- Add output redirection to DETAIL_LOG in addition to existing SUMMARY_LOG
- Improve logging documentation comment to reflect dual log file writes
- Ensures comprehensive logging across all test execution phases
- Update set_terminal_style() to use phase-specific background colors (gray for starting, orange for building, blue for testing, green for complete)
- Add get_time_ms() function to capture millisecond timestamps across macOS and Linux platforms
- Implement record_phase_time() function to track duration of each test execution phase (starting, building, testing, complete)
- Store phase timing data in temporary file for performance analysis
- Replace grep -P (PCRE) with sed-based parsing for macOS compatibility in generate_summary()
- Update test statistics extraction to sum values across all modules instead of just the last run
- Add cleanup for stale phase_timing.tmp file during initialization
- Improve parsing of Maven output for duration, test counts, and test results using portable sed commands
Changed from full timestamp to hour-only format to match implementation.
OLD: /active-rate-limits/2025-12-31T13:34:46Z (YYYY-MM-DDTHH:MM:SSZ)
NEW: /active-rate-limits/2025-12-31-13 (YYYY-MM-DD-HH)
Benefits:
- API now matches actual implementation (hour-level caching)
- Eliminates timezone/minute truncation confusion
- Clearer semantics: 'active during this hour' not 'at this second'
- Direct cache key mapping improves performance
- Simpler date parsing (no timezone handling needed)
Files changed:
- APIMethods600.scala: Updated endpoint and date parsing
- RateLimitsTest.scala: Updated all test cases to new format
- Glossary.scala: Updated API documentation
- introductory_system_documentation.md: Updated user docs
This is a breaking change but necessary to align API with implementation.
Rate limits are cached and queried at hour granularity, so the API
should reflect that reality.
Bug #1: getActiveCallLimitsByConsumerIdAtDate ignored date parameter
- Used LocalDateTime.now() instead of provided date parameter
- Broke queries for future dates
- API endpoint /active-rate-limits/{DATE} was non-functional
Bug #2: Hour-based caching caused off-by-minute timing bug
- Query truncated to start of hour (12:00:00)
- Rate limits created mid-hour (12:01:47) not found
- Condition: fromDate <= 12:00:00 failed when fromDate = 12:01:47
Bug #3: Timezone mismatch between system and tests
- Code used ZoneId.systemDefault() (CET/CEST)
- Tests use ZoneOffset.UTC
- Caused hour boundary mismatches
Solution:
- Use actual date parameter in getActiveCallLimitsByConsumerIdAtDate
- Query full hour range (12:00:00 to 12:59:59) instead of point-in-time
- Use UTC timezone consistently
- Add debug logging for troubleshooting
Note: Test still failing - may be cache or transaction timing issue.
Further investigation needed.
See RATE_LIMITING_BUG_FIX.md for detailed analysis.
Bug #1: getActiveCallLimitsByConsumerIdAtDate ignored the date parameter
- Always used LocalDateTime.now() instead of the provided date
- Broke queries for future dates
- API endpoint /active-rate-limits/{DATE} was non-functional
Bug #2: Hour-based caching created off-by-minute query bug
- Query truncated to start of hour (12:00:00)
- Rate limits created mid-hour (12:01:47) were not found
- Condition: fromDate <= 12:00:00 failed when fromDate = 12:01:47
Solution:
- Use the actual date parameter in getActiveCallLimitsByConsumerIdAtDate
- Query full hour range (12:00:00 to 12:59:59) instead of point-in-time
- Ensures rate limits created anytime during the hour are found
Fixes test: RateLimitsTest.scala:259 - aggregated rate limits
Expected: 15 (10 + 5), Got: -1 (not found) → Now returns: 15 ✅
See RATE_LIMITING_BUG_FIX.md for detailed analysis.
Remove duplicate/corrupted lines that were accidentally introduced in commit 0d4a318.
The lines included:
- Duplicate 'Unlimited' bullet point
- Stray HTTP header lines (X-Rate-Limit-Remaining, X-Rate-Limit-Reset)
- Dangling opening brace
Also improved markdown formatting with blank lines before code blocks.