Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Pull Request

Proposed Changes

The action silently fails with an empty report when END_DATE is set before START_DATE. This adds validation to catch the misconfiguration early with a clear error message.

Implementation

  • Added validate_date_range() in env.py: Validates END_DATE ≥ START_DATE using string comparison (YYYY-MM-DD allows lexicographic ordering). Only runs when both dates are provided.
  • Integrated into get_env_vars(): Called after format validation, before any processing.
  • Added test coverage: Three test cases covering invalid range (raises ValueError), equal dates (allowed), and valid range (allowed).

Error message:

END_DATE ('2024-01-01') must be on or after START_DATE ('2025-01-01')

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, maintenance or breaking
Original prompt

This section details on the original issue you should resolve

<issue_title>No check for end date that points to before start date</issue_title>
<issue_description>### Describe the bug

If you set the end date to a time before the start date the action will report success but have an empty report. (silent failure)

To Reproduce

set end date to 2024-01-01
set start date to 2025-01-01
set other required configs
observe an empty report with no indication of what you did wrong

Expected behavior

the action should run a check that the start date is pointing to a time before the end date.

Screenshots

No response

Additional context

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits December 30, 2025 15:38
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
…st readability

Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Co-authored-by: zkoppert <6935431+zkoppert@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix silent failure due to end date before start date fix: validate END_DATE is not before START_DATE Dec 30, 2025
Copilot AI requested a review from zkoppert December 30, 2025 15:46
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.

No check for end date that points to before start date

2 participants