Skip to content

chore: prepare Release D (v2.9.1)#25

Merged
magmacomputing merged 8 commits intomainfrom
release/D
May 3, 2026
Merged

chore: prepare Release D (v2.9.1)#25
magmacomputing merged 8 commits intomainfrom
release/D

Conversation

@magmacomputing
Copy link
Copy Markdown
Owner

@magmacomputing magmacomputing commented May 2, 2026

Summary by CodeRabbit

  • Chores

    • Version bumped to 2.9.1 across root and packages.
    • Added CI debug diagnostics and small internal robustness tweaks.
  • New Features

    • Introduced an alias management engine for event/period aliasing.
    • Tempo now wires per-instance alias state during initialization.
  • Release Process

    • Publishing now enforces running from the main branch before build.
  • Documentation

    • Updated docs links, added Release D planning doc and expanded wishlist.
  • Tests

    • Added alias engine unit tests and consolidated console spies.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 2, 2026

Warning

Rate limit exceeded

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

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 779876ce-7a03-4212-b134-83b029d51133

📥 Commits

Reviewing files that changed from the base of the PR and between fed3f71 and ef10d08.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • packages/tempo/src/discrete/discrete.format.ts
  • packages/tempo/test/core/alias-engine-protochain.test.ts
📝 Walkthrough

Walkthrough

Adds an AliasEngine for event/period alias registration, resolution, and collision detection; wires per-instance alias engines into Tempo state and types; expands tests, docs, and release planning; updates VitePress srcDir, doc cross-links, console-spy test helpers, CI debug step, and bumps package versions + prepublish branch gating.

Changes

Alias resolution & Tempo wiring

Layer / File(s) Summary
Data Shape / Types
packages/tempo/src/tempo.type.ts
Adds optional aliasEngine?: AliasEngine to Internal.State and imports AliasEngine.
New Core Implementation
packages/tempo/src/engine/engine.alias.ts
Introduces AliasEngine, AliasTarget (now allows number), registration, resolution (invokes Function targets with thisArg), parent chaining, collision detection, retrieval, and clear.
Runtime Integration
packages/tempo/src/tempo.class.ts
Wires per-instance aliasEngine into [$setEvents]/[$setPeriods], clears/registers aliases when building capture groups, removes prior inline collision logic, and sets a non-enumerable tempoInstance on local state.
Tests / Test infra
packages/tempo/test/core/alias-engine.test.ts, packages/tempo/test/core/alias-engine-protochain.test.ts, packages/tempo/test/core/sandbox-factory.test.ts, packages/tempo/test/support/setup.console-spy.ts
Adds comprehensive AliasEngine unit tests (registration, resolution, collisions, clearing, proto-chain behavior, edge cases); replaces global console spies with exported spies and updates sandbox tests to assert warn emission expectations.
Docs / Plans
packages/tempo/plan/RELEASE-D.md, packages/tempo/plan/.WISHLIST.md, packages/tempo/archive/tempo.api.md
Adds Release D planning doc; expands wishlist with extraction outlines; updates archive doc cross-links to ../doc/... paths.

Release / packaging / site config

Layer / File(s) Summary
Package versions
package.json, packages/library/package.json, packages/tempo/package.json
Bumps root to 2.9.1, @magmacomputing/library to 2.9.1, and @magmacomputing/tempo to 2.9.1; updates tempo devDependency on library to 2.9.1.
Publish gating
packages/library/package.json, packages/tempo/package.json
prepublishOnly scripts now error/exit unless current git branch is main, then run build.
Site config & docs
packages/tempo/.vitepress/config.ts, packages/tempo/archive/tempo.api.md
Sets VitePress srcDir: './doc' and updates doc links to new ../doc/... locations.
CI debug step
.github/workflows/ci.yml
Adds a debug step printing GitHub event/ref/context details in test-parse-prefilter job.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Tempo as Tempo Instance
  participant Alias as AliasEngine
  participant Parent as Parent AliasEngine
  participant Logger as Logger/Console

  Tempo->>Alias: ensure/create aliasEngine(parent, logger)
  Tempo->>Alias: clear('event'|'period')
  Tempo->>Alias: registerEvents/registerPeriods(entries)
  Note right of Alias: store maps, detect collisions (local + parent)
  Alias-->>Logger: warn(...) when collisions found
  Tempo->>Alias: resolveEvent/resolvePeriod(name, thisArg)
  Alias->>Parent: fallback lookup if not found locally
  Parent-->>Alias: return parent mapping (string/number or invoked Function)
  Alias-->>Tempo: resolved alias target
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐇 I stitched a map of names and time,

whispers warn when patterns rhyme,
Tempo keeps aliases in line,
parents lend what locals hide,
hop—new versions, neat and prim.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the primary purpose: preparing and releasing version 2.9.1 of the Tempo library with Release D changes, including alias engine implementation and version bumps across packages.
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 release/D

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


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
Review rate limit: 0/1 reviews remaining, refill in 35 minutes and 8 seconds.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 3: The package.json "version" field is incorrect for this PR; update the
value of the "version" key from "2.9.0" to "2.9.1" so the package.json matches
the intended Release D tag/version (ensure the "version" property is exactly
"2.9.1").
🪄 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: 04b21aae-cdea-48bd-8390-609d5e75c39e

📥 Commits

Reviewing files that changed from the base of the PR and between 6c53fb7 and aadb7da.

📒 Files selected for processing (3)
  • package.json
  • packages/library/package.json
  • packages/tempo/package.json

Comment thread package.json Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/tempo/src/engine/engine.alias.ts`:
- Line 8: AliasTarget currently omits number which causes numeric Logic alias
values to be ignored; update the AliasTarget type to include number (export type
AliasTarget = string | number | Function) or, if you want to disallow numbers,
explicitly validate/reject numeric aliases where aliases are parsed. Also update
the alias resolution code that currently only handles Function and String (the
resolver around the block that checks typeof === "function" or === "string") to
handle numeric alias targets: if the alias is a number, return that numeric
value directly (or throw an explicit error if rejecting numbers). Ensure
references to Logic/Tempo types remain compatible with the updated AliasTarget.
- Around line 150-168: The multi-hop lookup flips map type because the code
compares map === this.#eventMap inside the loop; capture the intended map kind
before iterating (e.g., const isEvent = map === this.#eventMap) and then inside
the loop when moving to the parent use that flag to pick the next registry (map
= isEvent ? currentEngine.#eventMap : currentEngine.#periodMap). Update the
`#resolveAlias` method in AliasEngine to initialize isEvent before the while loop
and use it instead of comparing map to this.#eventMap when assigning map for
currentEngine.
🪄 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: 7f27576e-d16b-4af5-a016-9feffae3f828

📥 Commits

Reviewing files that changed from the base of the PR and between aadb7da and e462af7.

📒 Files selected for processing (15)
  • package.json
  • packages/library/package.json
  • packages/tempo/.vitepress/config.ts
  • packages/tempo/archive/tempo.api.md
  • packages/tempo/package.json
  • packages/tempo/plan/.WISHLIST.md
  • packages/tempo/plan/RELEASE-D.md
  • packages/tempo/src/engine/engine.alias.ts
  • packages/tempo/src/engine/engine.layout.resolver.ts.bak
  • packages/tempo/src/engine/engine.layout.ts.bak
  • packages/tempo/src/tempo.class.ts
  • packages/tempo/src/tempo.type.ts
  • packages/tempo/test/core/alias-engine.test.ts
  • packages/tempo/test/core/sandbox-factory.test.ts
  • packages/tempo/test/support/setup.console-spy.ts
✅ Files skipped from review due to trivial changes (4)
  • packages/tempo/.vitepress/config.ts
  • package.json
  • packages/tempo/archive/tempo.api.md
  • packages/tempo/plan/RELEASE-D.md

Comment thread packages/tempo/src/engine/engine.alias.ts Outdated
Comment thread packages/tempo/src/engine/engine.alias.ts Outdated
Comment thread packages/tempo/src/tempo.class.ts
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 (2)
.github/workflows/ci.yml (1)

43-64: ⚡ Quick win

Remove temporary debug step before merging; line 63 dumps the full event payload.

This step appears to be a one-off debugging aid (the step name says "for debug"). Two concerns:

  1. Cleanup: Debug steps in main-targeting CI are noisy and add unnecessary log volume. Remove before merge.
  2. Info exposure (line 63): cat $GITHUB_EVENT_PATH writes the raw event JSON — including PR body, labels, author details, and any other metadata — to the public workflow log. While not typically a hard secret, it is unnecessary disclosure and should be dropped along with the rest of the step.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 43 - 64, Remove the temporary debug
workflow step named "Print GitHub event context (for debug)" from the CI job:
delete the entire step block that echoes GITHUB_REF, github.* vars and
especially the line that uses GITHUB_EVENT_PATH (cat $GITHUB_EVENT_PATH) to
avoid dumping the raw event payload; ensure no other steps depend on those
echoed values and commit the trimmed .github/workflows/ci.yml without this debug
step.
packages/tempo/test/core/alias-engine-protochain.test.ts (1)

7-20: ⚡ Quick win

Move describe-level fixture setup into beforeEach to prevent cross-test mutation.

The second test permanently mutates localShape.aliasEngine at line 42 by registering 'globalEvt' → 'localShadow'. Because all fixtures are created once at describe scope, any test added after the collision test that expects the pre-mutation state of localShape.aliasEngine will silently receive stale data.

♻️ Proposed refactor
 describe('AliasEngine prototype chain (Global → Sandbox → Instance)', () => {
   const logger = new Logify({ debug: true });
 
-  // Simulate a global state
-  const globalShape = {} as { aliasEngine: AliasEngine };
-  globalShape.aliasEngine = new AliasEngine({ logger });
-  globalShape.aliasEngine.registerEventAlias('globalEvt', 'globalValue');
-
-  // Simulate a sandbox state inheriting from global
-  const sandboxShape = Object.create(globalShape);
-  sandboxShape.aliasEngine = new AliasEngine({ parent: globalShape.aliasEngine, logger });
-  sandboxShape.aliasEngine.registerEventAlias('sandboxEvt', 'sandboxValue');
-
-  // Simulate a local/instance state inheriting from sandbox
-  const localShape = Object.create(sandboxShape);
-  localShape.aliasEngine = new AliasEngine({ parent: sandboxShape.aliasEngine, logger });
-  localShape.aliasEngine.registerEventAlias('localEvt', 'localValue');
+  let globalShape: { aliasEngine: AliasEngine };
+  let sandboxShape: { aliasEngine: AliasEngine };
+  let localShape: { aliasEngine: AliasEngine };
+
+  beforeEach(() => {
+    // Simulate a global state
+    globalShape = {} as { aliasEngine: AliasEngine };
+    globalShape.aliasEngine = new AliasEngine({ logger });
+    globalShape.aliasEngine.registerEventAlias('globalEvt', 'globalValue');
+
+    // Simulate a sandbox state inheriting from global
+    sandboxShape = Object.create(globalShape);
+    sandboxShape.aliasEngine = new AliasEngine({ parent: globalShape.aliasEngine, logger });
+    sandboxShape.aliasEngine.registerEventAlias('sandboxEvt', 'sandboxValue');
+
+    // Simulate a local/instance state inheriting from sandbox
+    localShape = Object.create(sandboxShape);
+    localShape.aliasEngine = new AliasEngine({ parent: sandboxShape.aliasEngine, logger });
+    localShape.aliasEngine.registerEventAlias('localEvt', 'localValue');
+  });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/tempo/test/core/alias-engine-protochain.test.ts` around lines 7 -
20, The current test creates shared fixtures (globalShape, sandboxShape,
localShape) at describe scope and mutates localShape.aliasEngine via
registerEventAlias which causes cross-test pollution; move the fixture creation
into a beforeEach block so each test gets a fresh AliasEngine graph: create new
instances for globalShape.aliasEngine, sandboxShape.aliasEngine (parent:
globalShape.aliasEngine) and localShape.aliasEngine (parent:
sandboxShape.aliasEngine) inside beforeEach, and remove or replace the top-level
describe-scope initializations to ensure tests do not share or retain mutations
across runs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Line 51: The echo currently interpolates the untrusted github.head_ref
directly into the shell which can be shell-injected; instead, pass
github.head_ref into a step environment variable and reference that variable
(properly quoted) in the shell. Update the step so it sets an env like HEAD_REF
from the github.head_ref value and replace the direct interpolation of `${{
github.head_ref }}` in the echo command with a quoted reference to the env var
(e.g., "$HEAD_REF"), keeping the only identifiers changed being github.head_ref
and the echo invocation.
- Around line 94-116: Remove the duplicated CI steps block that repeats "Install
monorepo dependencies", "Run all tests with parse.preFilter", "Run end-to-end
benchmark", "Upload benchmark output", and "Validate benchmark output" (the copy
at lines 94–116); keep the original occurrence and delete the second copy so npm
ci, tests, benchmark, artifact upload (actions/upload-artifact@v4 with name
bench-parse-prefilter-e2e) and validation only run once to avoid double
execution and artifact name collision.

In `@packages/tempo/src/discrete/discrete.format.ts`:
- Around line 69-71: The conditional that builds template uses hasOwn(formats,
fmt as string) which only checks own properties and fails to detect inherited
keys from enums.FORMAT; update the condition in the template assignment to use
the in operator (e.g., fmt as string in formats) so inherited format names like
weekDate/logStamp/display resolve correctly, and remove the now-unused hasOwn
import from the top of the file; ensure you reference the same symbols (formats,
fmt, template, enums.FORMAT) when making the change.

In `@packages/tempo/test/core/alias-engine-protochain.test.ts`:
- Around line 40-47: The test currently only asserts resolution order but never
verifies that collision reporting is invoked; update the test to spy on the
shared Logify logger instance method that AliasEngine uses (e.g., logger.warn)
before calling localShape.aliasEngine.registerEventAlias('globalEvt',
'localShadow'), then assert the spy was called with an appropriate collision
message when the colliding alias is registered; locate the logger used by
AliasEngine (the Logify instance constructed outside the it block) and restore
the spy after the test.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 43-64: Remove the temporary debug workflow step named "Print
GitHub event context (for debug)" from the CI job: delete the entire step block
that echoes GITHUB_REF, github.* vars and especially the line that uses
GITHUB_EVENT_PATH (cat $GITHUB_EVENT_PATH) to avoid dumping the raw event
payload; ensure no other steps depend on those echoed values and commit the
trimmed .github/workflows/ci.yml without this debug step.

In `@packages/tempo/test/core/alias-engine-protochain.test.ts`:
- Around line 7-20: The current test creates shared fixtures (globalShape,
sandboxShape, localShape) at describe scope and mutates localShape.aliasEngine
via registerEventAlias which causes cross-test pollution; move the fixture
creation into a beforeEach block so each test gets a fresh AliasEngine graph:
create new instances for globalShape.aliasEngine, sandboxShape.aliasEngine
(parent: globalShape.aliasEngine) and localShape.aliasEngine (parent:
sandboxShape.aliasEngine) inside beforeEach, and remove or replace the top-level
describe-scope initializations to ensure tests do not share or retain mutations
across runs.
🪄 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: 4cb44da1-b93e-4fbc-81c6-2af7d718b2c7

📥 Commits

Reviewing files that changed from the base of the PR and between e462af7 and fed3f71.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • packages/tempo/src/discrete/discrete.format.ts
  • packages/tempo/src/engine/engine.alias.ts
  • packages/tempo/src/plugin/plugin.util.ts
  • packages/tempo/src/support/tempo.init.ts
  • packages/tempo/src/support/tempo.register.ts
  • packages/tempo/src/tempo.class.ts
  • packages/tempo/test/core/alias-engine-protochain.test.ts
✅ Files skipped from review due to trivial changes (1)
  • packages/tempo/src/support/tempo.register.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/tempo/src/engine/engine.alias.ts
  • packages/tempo/src/tempo.class.ts

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
Comment thread packages/tempo/src/discrete/discrete.format.ts Outdated
Comment thread packages/tempo/test/core/alias-engine-protochain.test.ts
Copy link
Copy Markdown
Owner Author

@magmacomputing magmacomputing left a comment

Choose a reason for hiding this comment

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

approved

@magmacomputing
Copy link
Copy Markdown
Owner Author

@coderabbitai please review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Tip

For best results, initiate chat on the files or code changes.

@magmacomputing Sure! I'll kick off a full review of PR #25 right away.

[review]

@magmacomputing magmacomputing merged commit ed17bfc into main May 3, 2026
3 checks passed
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