Skip to content

Feature/v3.3.1 - #49

Merged
magmacomputing merged 4 commits into
mainfrom
feature/v3.3.1
Jun 22, 2026
Merged

Feature/v3.3.1#49
magmacomputing merged 4 commits into
mainfrom
feature/v3.3.1

Conversation

@magmacomputing

@magmacomputing magmacomputing commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Introduced Slick Object Mutations for relative date navigation using directional operators
    • Extended shorthand modifier support for advanced offset calculations
    • Added week-based date calculation capabilities
    • Improved validation with stricter key checking and clearer error messages
  • Documentation

    • Updated release notes and cookbook with examples of new relative navigation patterns

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@magmacomputing, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e1c51f07-0edf-4218-9ef7-d77eaa627021

📥 Commits

Reviewing files that changed from the base of the PR and between ab88ef2 and 17bc887.

📒 Files selected for processing (3)
  • packages/tempo/plan/slick-syntax-duration-keys.md
  • packages/tempo/src/engine/engine.term.ts
  • packages/tempo/src/module/module.mutate.ts
📝 Walkthrough

Walkthrough

Version 3.3.1 introduces "Slick Object Mutations" for Tempo.set(): a new SLICK_KEYS constant (yy, mm, ww, dd, hh, mi, ss, wkd) enables relative Slick math via string payloads, backed by a new ww token, extended regex and weekday engine modifier handling (+, -, =), updated SlickOffset/MutateSet types, and expanded tests. Plan files are updated and licensing_strategy.md and localized_modifiers.md are removed.

Changes

Slick Object Mutations for Tempo.set()

Layer / File(s) Summary
SLICK_KEYS constant, ww token, and regex updates
packages/tempo/src/support/support.default.ts, packages/tempo/src/support/support.symbol.ts
Defines the SLICK_KEYS array and type, inserts the ww week snippet token (range 01–53), updates slick-shifter regexes to allow negative numeric components, and moves ord after fraction in the snippet symbol registry.
SlickKey, SlickOffset, and MutateSet type contracts
packages/tempo/src/tempo.type.ts
Imports SLICK_KEYS, defines SlickKey and SlickOffset type aliases, and intersects SlickOffset into the exported MutateSet type.
Engine term modifier expansions for + / - / =
packages/tempo/src/engine/engine.term.ts
Updates the slick shorthand parsing regex to accept = as a modifier and negative numbers; expands the weekday offset branch so + maps to forward-diff and - maps to backward-diff.
Slick key handling in module.mutate.ts
packages/tempo/src/module/module.mutate.ts
Adds Match and SLICK_KEYS imports; implements a type === 'set' branch that validates slick key payloads, parses operator/number/unit groups via Match.slickValue, routes wkd to resolveTermMutation, and applies other unit shifts via currZdt.add().
Expanded Tempo#set test suite
packages/tempo/test/instance/instance.set.test.ts
Reorganizes existing set tests and adds a Slick Object Mutations suite covering validation errors, numeric forward/backward shifts, wkd operator aliases (>, <, >=, <=, =, +, -), and deterministic insertion-order chaining.
Docs, changelog, plan updates, and version bumps
packages/tempo/src/tempo.version.ts, packages/tempo/package.json, package.json, packages/library/package.json, packages/tempo/CHANGELOG.md, packages/tempo/doc/releases/v3.x.md, packages/tempo/doc/tempo.cookbook.md, packages/tempo/plan/slick-syntax-duration-keys.md
Bumps all package versions to 3.3.1; adds CHANGELOG and v3.x release notes; adds cookbook section on Slick Object Mutations with insertion-order warnings; rewrites slick-syntax-duration-keys.md as a concrete Snippet Keys spec; removes licensing_strategy.md and localized_modifiers.md.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant MutateSET as module.mutate (set branch)
  participant SlickParser as Match.slickValue
  participant TermEngine as resolveTermMutation
  participant ZDT as currZdt (ZonedDateTime)

  Caller->>MutateSET: .set({ mm: '>2', wkd: '>monday' })
  MutateSET->>MutateSET: key 'mm' in SLICK_KEYS → validate string payload
  MutateSET->>SlickParser: parse '>2'
  SlickParser-->>MutateSET: operator='>', sh_nbr='2', unit='mm'
  MutateSET->>ZDT: currZdt.add({ months: 2 })
  ZDT-->>MutateSET: advanced ZonedDateTime
  MutateSET->>MutateSET: key 'wkd' in SLICK_KEYS → validate string payload
  MutateSET->>SlickParser: parse '>monday'
  SlickParser-->>MutateSET: operator='>', unit='monday'
  MutateSET->>TermEngine: resolveTermMutation('set', state, '>', 'monday')
  TermEngine-->>MutateSET: weekday-shifted ZonedDateTime
  MutateSET-->>Caller: mutated Tempo instance
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 Hop forward, hop back, with a > or <,
The ww token blooms — week numbers in sight!
Slick keys in order (don't let ESLint sort!),
wkd: '>monday' — a temporal sport.
Signed, sealed, and bumped to three-three-one,
The rabbit's date math is officially done! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feature/v3.3.1' is vague and generic, using a branch-naming convention rather than describing the actual changes in the pull request. Provide a descriptive title that summarizes the main change, such as 'Add Slick Object Mutations and extend modifier support in Tempo v3.3.1' or similar.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/v3.3.1

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🧹 Nitpick comments (1)
packages/tempo/plan/slick-syntax-duration-keys.md (1)

65-67: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Minor wording: simplify "exactly the same".

Line 66 uses "exactly the same" which could be concise as "the same" without loss of meaning. The mathematical equivalence is still clear.

✏️ Proposed wording improvement
-- **Analysis:** Mathematically, advancing by a negative number is stepping backwards. `>-2` should evaluate exactly the same as `<2` (and similarly `<-2` = `>2`).
+- **Analysis:** Mathematically, advancing by a negative number is stepping backwards. `>-2` should evaluate the same as `<2` (and similarly `<-2` = `>2`).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/tempo/plan/slick-syntax-duration-keys.md` around lines 65 - 67, In
the Analysis section of the slick-syntax-duration-keys.md file, simplify the
wording in the sentence that describes the mathematical equivalence of advancing
by negative numbers. Replace the phrase "exactly the same" with simply "the
same" to make the sentence more concise while maintaining clarity about the
mathematical equivalence. This change applies to the sentence structure
discussing how ">-2" should evaluate in relation to "<2".

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/tempo/plan/slick-syntax-duration-keys.md`:
- Around line 3-4: The Status section in the slick-syntax-duration-keys.md plan
file currently indicates the feature is "Proposed for a future release (not
scheduled in the current release)" but this feature has been implemented and
released in v3.3.1. Update the Status section to reflect the actual completion
and release status of this feature instead of keeping it marked as proposed.
Change the status line to clearly indicate that this has been implemented and
released in version 3.3.1.

In `@packages/tempo/src/engine/engine.term.ts`:
- Around line 110-113: The weekday shift calculation is incorrectly handling
negative repeat counts (such as `>-2` or `<-3`). The repeat logic around lines
125-130 only applies when `nbr > 1`, which means negative counts are silently
treated as single positive-direction steps. To fix this, extend the repeat logic
condition to check for both `nbr > 1` AND `nbr < -1`, ensuring that the sign of
the repeat count properly controls the direction of the shift application
instead of being ignored.

In `@packages/tempo/src/module/module.mutate.ts`:
- Around line 80-93: The custom modifier words parsed from
state.config.registry.modifiers are not being normalized for backward
operations. When building the words Set from the registry modifiers, you need to
track which custom words correspond to backward operations (those mapped from
backward symbols like '-', '<', '<=', etc.). Then, when the sign logic checks
matchSlickValue at the line checking canonical backward values, extend the logic
to also recognize these custom backward words so they are properly treated as
backward shifts instead of forward shifts.
- Around line 63-70: The slick mutation early-returns in the 'set' type check
block and related slick paths (visible in the diff around lines 63-70, and also
at lines 105-121) occur before mutateDepth is incremented around line 132, but
the corresponding decrement always occurs around line 240-242, causing an
imbalance that allows mutateDepth to underflow and bypass recursion protection.
Fix this by ensuring mutateDepth is incremented before these early-return
checks, or by modifying the decrement logic around line 240-242 to only
decrement when a corresponding increment occurred, so the depth tracking remains
balanced across all code paths in the mutation handler.

---

Nitpick comments:
In `@packages/tempo/plan/slick-syntax-duration-keys.md`:
- Around line 65-67: In the Analysis section of the
slick-syntax-duration-keys.md file, simplify the wording in the sentence that
describes the mathematical equivalence of advancing by negative numbers. Replace
the phrase "exactly the same" with simply "the same" to make the sentence more
concise while maintaining clarity about the mathematical equivalence. This
change applies to the sentence structure discussing how ">-2" should evaluate in
relation to "<2".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8b7d0a92-992f-4cba-903d-d2b818608a66

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8ced1 and ab88ef2.

📒 Files selected for processing (16)
  • package.json
  • packages/library/package.json
  • packages/tempo/CHANGELOG.md
  • packages/tempo/doc/releases/v3.x.md
  • packages/tempo/doc/tempo.cookbook.md
  • packages/tempo/package.json
  • packages/tempo/plan/licensing_strategy.md
  • packages/tempo/plan/localized_modifiers.md
  • packages/tempo/plan/slick-syntax-duration-keys.md
  • packages/tempo/src/engine/engine.term.ts
  • packages/tempo/src/module/module.mutate.ts
  • packages/tempo/src/support/support.default.ts
  • packages/tempo/src/support/support.symbol.ts
  • packages/tempo/src/tempo.type.ts
  • packages/tempo/src/tempo.version.ts
  • packages/tempo/test/instance/instance.set.test.ts
💤 Files with no reviewable changes (2)
  • packages/tempo/plan/licensing_strategy.md
  • packages/tempo/plan/localized_modifiers.md

Comment thread packages/tempo/plan/slick-syntax-duration-keys.md Outdated
Comment thread packages/tempo/src/engine/engine.term.ts
Comment thread packages/tempo/src/module/module.mutate.ts
Comment thread packages/tempo/src/module/module.mutate.ts
@magmacomputing
magmacomputing merged commit 5e82d5b into main Jun 22, 2026
2 checks passed
@magmacomputing
magmacomputing deleted the feature/v3.3.1 branch June 22, 2026 07:14
@coderabbitai coderabbitai Bot mentioned this pull request Jul 6, 2026
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