Skip to content

test(aggregator): cover non-ISO stream timestamps (#5073) - #5257

Merged
dezren39 merged 3 commits into
mainfrom
queue/8706-5073-iso-at-tests
Nov 7, 2026
Merged

dezren39 merged 3 commits into
mainfrom
queue/8706-5073-iso-at-tests

Conversation

@dezren39

@dezren39 dezren39 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Closes #5073. The production ISO gate was already merged in #5158; this adds the missing regression coverage named by #5073.

  • Rejects both March 2, 2026 and 03/02/2026 at validateStreamEvent with the precise ISO error.
  • Retains impossible-date rejection and valid leap-date, offset, fractional-second, and date-only controls.

Tests: bun test test/events.test.ts — 28 pass. Full aggregator bun test — 1514 pass, 1 unrelated failure because existing aw-server holds 127.0.0.1:5600 (also causing watchdog-priming timeout).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Tests
    • Expanded automated checks for invalid date inputs, including locale-dependent, non-ISO date strings. Tests now verify that each invalid value returns the expected ISO-timestamp error response.
    • Existing coverage for impossible calendar dates remains in place, along with valid timestamp controls. No user-facing behavior changes are included in this update.

@dezren39
dezren39 requested a review from a team as a code owner November 4, 2026 02:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T04:49:10.035785Z 7dda53a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4097e6a7-41d9-40b7-8754-0651f0906c40
Commits

Reviewing files that changed from the base of the PR and between 1045acc and 7dda53a.

Files selected for processing: 1
  • pm-stack/aggregator/test/events.test.ts

No actionable comments were generated in the recent review.

Walkthrough

The event timestamp tests now cover locale-dependent date strings and require invalid timestamp values to return the exact ISO-timestamp error. Existing impossible-date cases remain, and valid timestamp controls are unchanged.

Changes: Event timestamp validation tests

Layer / File(s) Summary
Invalid timestamp assertions
pm-stack/aggregator/test/events.test.ts
The tests check the exact error object for impossible calendar dates and the strings "March 2, 2026" and "03/02/2026". Valid timestamp controls remain unchanged.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · previous review 1045a

The added tests strengthen timestamp validation coverage without changing production behavior. No actionable merge-blocking risk is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the added regression tests for non-ISO stream timestamps. It matches the main change in the pull request.
Linked Issues check Passed Issue #5073 requires real-calendar ISO validation, rejection of March 2, 2026 and 03/02/2026, preservation of valid timestamp forms, use of the shared ISO helper, and regression tests. At the revi…
Out of Scope Changes check Passed The whole-PR diff changes only pm-stack/aggregator/test/events.test.ts. The added assertions directly implement issue #5073 regression coverage. No unrelated production or test changes are present.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Linked Issues check

Explanation

Issue #5073 requires real-calendar ISO validation, rejection of March 2, 2026 and 03/02/2026, preservation of valid timestamp forms, use of the shared ISO helper, and regression tests. At the reviewed head, validateStreamEvent imports and calls isIsoDate and returns the existing exact error. The updated test covers both non-ISO values, impossible dates, and valid leap-date, offset, fractional-second, and date-only controls. The source also routes audit-record validation through validateStreamEvent.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9924a15b-47d7-494f-8b3b-fdf5aca40c15
Commits

Reviewing files that changed from the base of the PR and between ece818d and 1045acc.

Files selected for processing: 1
  • pm-stack/aggregator/test/events.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@dezren39
dezren39 merged commit fb484ef into main Nov 7, 2026
2 of 3 checks passed
@dezren39
dezren39 deleted the queue/8706-5073-iso-at-tests branch November 7, 2026 03:32
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.

pm-stack(aggregator): validateStreamEvent accepts impossible and non-ISO at timestamps — Date.parse-only gate behind an ISO error message

1 participant