Skip to content

Fix plainMonthDay() default metavar to match canonical format#643

Merged
dahlia merged 2 commits intomainfrom
fix/issue-306-plainmonthday-metavar
Mar 19, 2026
Merged

Fix plainMonthDay() default metavar to match canonical format#643
dahlia merged 2 commits intomainfrom
fix/issue-306-plainmonthday-metavar

Conversation

@dahlia
Copy link
Copy Markdown
Owner

@dahlia dahlia commented Mar 19, 2026

Summary

The plainMonthDay() parser used "--MONTH-DAY" as its default metavar, which caused confusing help output. For example, --birthday --MONTH-DAY looked like two separate option flags rather than an option followed by its value. The canonical format produced by format() is "01-23" (without the -- prefix), so the metavar has been changed to "MONTH-DAY" to match.

The error message example in packages/temporal/src/index.ts has also been updated from "--01-23" to "01-23" for consistency.

Test plan

  • Updated existing metavar assertion to expect "MONTH-DAY"
  • Added canonical format inputs ("01-23", "12-31") to valid input tests
  • All tests pass across Deno (mise test)

Closes #306

The previous default metavar "--MONTH-DAY" was confusing in help text
because it looked like a CLI option flag (e.g., --birthday --MONTH-DAY).
The canonical format from toString() is "01-23" without the "--" prefix,
so the metavar should match.

Also updates the error message example to use "01-23" instead of
"--01-23" for consistency.

#306

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the plainMonthDay() parser's behavior and presentation to enhance user experience and maintain consistency across the system. The primary goal was to eliminate ambiguity in command-line help messages and ensure that examples and internal logic align with the standard representation of month-day values, making the API more intuitive and less prone to misinterpretation.

Highlights

  • Metavar Consistency: The default metavar for plainMonthDay() was changed from "--MONTH-DAY" to "MONTH-DAY" to prevent confusion in help output and align with the canonical format "01-23".
  • Documentation and Examples: Documentation and error message examples were updated to reflect the new canonical format without the -- prefix, improving clarity and consistency.
  • Test Coverage: Existing tests were updated to assert the new metavar, and new test cases were added to validate parsing of canonical month-day formats like "01-23".
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

#306

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dahlia dahlia force-pushed the fix/issue-306-plainmonthday-metavar branch from 678d965 to a4eeb41 Compare March 19, 2026 10:42
@dahlia dahlia added the bug Something isn't working label Mar 19, 2026
@dahlia dahlia self-assigned this Mar 19, 2026
@dahlia dahlia added this to the Optique 1.0 milestone Mar 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

Warning

Rate limit exceeded

@dahlia has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: da652a99-b7a4-44ff-8010-b17b3b74c956

📥 Commits

Reviewing files that changed from the base of the PR and between 6084dd3 and a4eeb41.

📒 Files selected for processing (4)
  • CHANGES.md
  • docs/integrations/temporal.md
  • packages/temporal/src/index.test.ts
  • packages/temporal/src/index.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-306-plainmonthday-metavar
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

@dahlia
Copy link
Copy Markdown
Owner Author

dahlia commented Mar 19, 2026

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 19, 2026

✅ Actions performed

Full review triggered.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request changes the default metavar for plainMonthDay() from "--MONTH-DAY" to "MONTH-DAY" to improve clarity in help messages. This change is consistently applied across the implementation, documentation, and tests. The updated tests properly cover the new canonical format. The changes adhere to the project's coding and documentation style guides. No issues were found during the review.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.93%. Comparing base (6084dd3) to head (a4eeb41).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #643      +/-   ##
==========================================
+ Coverage   94.91%   94.93%   +0.01%     
==========================================
  Files          38       38              
  Lines       17614    17614              
  Branches     4679     4681       +2     
==========================================
+ Hits        16718    16721       +3     
+ Misses        884      881       -3     
  Partials       12       12              

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dahlia dahlia merged commit 614f15c into main Mar 19, 2026
8 checks passed
@dahlia dahlia deleted the fix/issue-306-plainmonthday-metavar branch March 19, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plainMonthDay() advertises --MONTH-DAY, but parses and formats canonical values without --

1 participant