Skip to content

fix(core,ai,tui,cli): calendar-check non-ISO date strings in all six date parsers (#798) - #801

Merged
dezren39 merged 1 commit into
mainfrom
queue/2954-798-noniso-dates
Oct 29, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/2954-798-noniso-dates

Conversation

@dezren39

@dezren39 dezren39 commented Oct 29, 2026 •

Copy link
Copy Markdown

Closes #798

The calendar check in all six copies of the checked date parser only round-tripped an ISO YYYY-MM-DD prefix and returned the bare Date.parse result for every other shape — so "Feb 30 2026" rolled to Mar 2 and passed, reopening the Feb-30 class for every consumer routed through these parsers (#785/#779/#717).

Fix, applied identically in all six copies (core Form.isDateTime, core ModelRouteLimits.parseAbsoluteTime, ai executor parseHttpDate, ai Replicate parseCompletedAt, tui validDateTime, cli validDateTime):

  • A new local namedDateParts helper extracts calendar components from non-ISO forms whose parts are named or ordered unambiguously — "Feb 30 2026", "Feb 30, 2026", "30 Feb 2026", "2026/02/30" — and the existing round-trip probe now runs on those components as well as ISO ones.
  • The hour-24 check now also applies to non-ISO forms (previously short-circuited by the !iso return, so "Feb 30 2026 24:00" passed on both counts).
  • Ambiguous numeric forms (e.g. 02/03/2026) and shapes without named components keep the documented lenient behaviour; valid non-ISO forms ("Jan 5 2026", IMF-fixdate HTTP-dates) parse exactly as today.

Tests (laptop, packages/core: 45/45 across the two files, including 2 new tests): parseAbsoluteTime rejects all named overflow spellings + non-ISO hour-24 and keeps valid controls exact; Form.validateAnswer rejects the same spellings for date-time fields and keeps valid non-ISO answers. The ai/tui/cli copies are byte-identical logic and are covered by CI for their packages.

Queue task 2954 (repo-health-opencode-pilot).


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

@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

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 19 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: 1fc753cd-8636-453b-8eb7-98f9850ae380
Commits

Reviewing files that changed from the base of the PR and between f58571a and 24511d3.

Files selected for processing: 8
  • packages/ai/src/protocols/replicate-images.ts
  • packages/ai/src/route/executor.ts
  • packages/cli/src/commands/handlers/auth/form.ts
  • packages/core/src/form.ts
  • packages/core/src/model-route-limits.ts
  • packages/core/test/form.test.ts
  • packages/core/test/model-route-limits.test.ts
  • packages/tui/src/util/form.ts
  • 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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 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-10-29T01:43:26.447612Z 24511d3 PR opened
ℹ️ 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.

@github-actions

Copy link
Copy Markdown

The following comment was made by an LLM, it may be inaccurate:

@github-actions

Copy link
Copy Markdown

Hey! Your PR title fix(core,ai,tui,cli): calendar-check non-ISO date strings in all six date parsers (#798) doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(core,ai,tui,cli): calendar checks skip non-ISO date strings — 'Feb 30 2026' rolls to Mar 2 in all six date parsers

1 participant