Skip to content

fix(cli): set end-of-day timestamp for bare dates in audit list --until - #1187

Open
amir-rezaei wants to merge 1 commit into
Kohei-Wada:mainfrom
amir-rezaei:fix/audit-list-until-end-of-day-bound
Open

fix(cli): set end-of-day timestamp for bare dates in audit list --until#1187
amir-rezaei wants to merge 1 commit into
Kohei-Wada:mainfrom
amir-rezaei:fix/audit-list-until-end-of-day-bound

Conversation

@amir-rezaei

Copy link
Copy Markdown
Contributor

Description

This PR resolves issue #1181 by setting end-of-day timestamp (23:59:59.999999) for bare dates in _parse_date_filter (packages/taskdog-ui/src/taskdog/cli/commands/audit/list.py).

Details

  • Fixes taskdog audit list --until YYYY-MM-DD dropping audit logs generated on the target date.

@Kohei-Wada

Copy link
Copy Markdown
Owner

Confirmed — datetime.fromisoformat("2026-07-25") has parsed bare dates since 3.7, so the except branch this relied on never ran and --until <date> dropped that day's logs. Fix is correct.

Two things before merging:

  1. Tests are missing. Please add unit tests for _parse_date_filter covering: bare date with end_of_day=True23:59:59.999999; bare date with end_of_day=False → midnight; an explicit timestamp like 2026-07-25T09:00:00 left untouched even with end_of_day=True; and the fallback path. The first case must fail on the current code.
  2. Formatting. ruff format --check wants to reformat one file on this branch — run make format.

Verified locally against current main: lint, typecheck and the full suite pass (ruff is 0.16 on main now, so please rebase).

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.

3 participants