Skip to content

Fix ISO 8601 duration parsing for months - #95

Merged
itssimon merged 1 commit into
mainfrom
fix-iso-duration-months
Oct 29, 2026
Merged

itssimon merged 1 commit into
mainfrom
fix-iso-duration-months

Conversation

@itssimon

Copy link
Copy Markdown
Member

resolve_relative_datetime stripped all leading -, p and t characters, which discarded the ISO 8601 structure. As a result P1M (1 month) was treated as 1 minute, and malformed inputs like TP1M or PP5M were accepted.

The ISO designators are now parsed explicitly:

  • P<n>M, P<n>W, P<n>D for months, weeks and days (a month counts as 30 days)
  • PT<n>H, PT<n>M for hours and minutes
  • Compact forms (30m, 24h, 7d, 2w) are unchanged
  • Anything else (e.g. P1H, PT1D, TP1M) is passed through unchanged

Also documents the supported ISO duration forms in the agent skill command reference.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.99%. Comparing base (8d58c5e) to head (97991db).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
+ Coverage   91.89%   91.99%   +0.09%     
==========================================
  Files          13       13              
  Lines        2481     2485       +4     
==========================================
+ Hits         2280     2286       +6     
+ Misses        201      199       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@itssimon
itssimon merged commit 7dbdd63 into main Oct 29, 2026
7 checks passed
@itssimon
itssimon deleted the fix-iso-duration-months branch October 29, 2026 10:14
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.

1 participant