Skip to content

test: add edge-case coverage for windowing and rules#5

Merged
stacknil merged 6 commits intomainfrom
codex/feat/v0.2-edge-case-tests
Mar 23, 2026
Merged

test: add edge-case coverage for windowing and rules#5
stacknil merged 6 commits intomainfrom
codex/feat/v0.2-edge-case-tests

Conversation

@stacknil
Copy link
Copy Markdown
Owner

Summary

This PR implements issue #4 by adding focused edge-case tests for the telemetry MVP.

Closes #4.

What changed

  • added tests/test_edge_cases.py

Added coverage

  • empty input produces no windows, features, or alerts
  • single-event input creates one window with one counted event
  • duplicate timestamps are counted in the same window
  • window boundaries follow left-closed / right-open behavior
  • small window and step sizes keep overlapping counts explicit
  • out-of-order timestamps are normalized before windowing
  • threshold equality is explicit for strict vs inclusive rules

Verification

Commands run:

pytest
pytest tests/test_edge_cases.py

Observed results:

  • pytest passed: 13 passed
  • README unchanged and still accurate
  • no runtime behavior changed

Scope

  • tests only
  • no production features
  • no runtime code changes
  • no unrelated refactors

Review focus

Please focus on:

@stacknil
Copy link
Copy Markdown
Owner Author

@codex review
Focus on:

@stacknil stacknil added this to the v0.2 milestone Mar 20, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 031281e407

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@stacknil
Copy link
Copy Markdown
Owner Author

@codex review
Focus on:

  • whether the updated assertion now protects against duplicate-alert regressions
  • whether any other edge-case test still loses multiplicity information

@stacknil
Copy link
Copy Markdown
Owner Author

@codex review
Focus on:

  • whether the invalid-timestamp test now covers the normalization failure path
  • whether any remaining time-parsing edge case is still missing

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 561c7fdf4c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@stacknil
Copy link
Copy Markdown
Owner Author

@codex review
Focus on:

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5020001983

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@stacknil
Copy link
Copy Markdown
Owner Author

@codex review
Focus on:

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0fc7a6fe77

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@stacknil stacknil merged commit c0440f3 into main Mar 23, 2026
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.

v0.2: add edge-case tests for timestamp parsing, window boundaries, and empty input

1 participant