Skip to content

fix: unbreak CI (frozen lockfile), fix 3 real bugs, and run tests in CI - #81

Merged
macalinao merged 2 commits into
masterfrom
devin/1790654274-fix-lockfile-ci
Sep 29, 2026
Merged

macalinao merged 2 commits into
masterfrom
devin/1790654274-fix-lockfile-ci

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Master's bun install --frozen-lockfile fails (Build/Lint, Docs, Release all die at the install step) with error: lockfile had changes, but lockfile is frozen.

Cause: the release commit fdb19d5 ran ci:version = changeset version && bun update. bun update bumped the root devDependency specs in package.json but left the workspace spec strings in bun.lock stale:

package.json  devDependencies: temporal-polyfill ^1.0.3, turbo ^2.10.8
bun.lock      workspaces[""].devDependencies: temporal-polyfill ^1.0.1, turbo ^2.10.7

Lockfile/CI:

  • regenerated bun.lock so it matches package.json
  • catalog @types/bun: "latest" → ^1.4.2; a floating latest re-resolves on every install and re-breaks --frozen-lockfile whenever a new @types/bun ships (it had already drifted from 1.3.14 to 1.4.2 in the lockfile)
  • ci:version now ends with bun install, so a version bump always writes a lockfile consistent with the bumped package.json
  • packageManager/engines → bun@1.4.2, and every workflow now pins Bun via bun-version-file: package.json instead of installing whatever setup-bun defaults to (as macalinao/coda does). On 1.3.1 oxfmt --check also throws DataCloneError, so the lint step would have failed right after the install step was fixed.
  • added ~/.bun/install/cache caching, and a Test step — no workflow ran bun test, which is why the three bugs below sat on master.

Bug fixes found by running the suite:

  1. formatTemporal dropped the month name for ISO-calendar PlainYearMonth/PlainMonthDay: CLDR has no month names under iso8601, so 2023-05 formatted as "2023 " and --05-15 as " 15". These two types reject a formatter whose calendar differs from their own, so an ISO value is now re-expressed in the calendar the formatter resolved to; non-ISO values keep their own calendar (hebrew → "Iyar 5783").

  2. parsePlainDateTimeYYYYMMDDHHMMp("… 12:05 AM") returned noon:

    - hour: hours + (amOrPm === "PM" && hours < 12 ? 12 : 0)
    + hour: (hours % 12) + (amOrPm === "PM" ? 12 : 0)

    Its leap-year test also asserted hour: 0, minute: 0 for the input "2024/02/29 12:50 PM" — a copy-paste error, now 12:50.

  3. temporal-orpc's non-ISO round-trip test serialized with toJSON(). temporal-polyfill 1.0.3 drops [u-ca=…] from PlainDateTime.prototype.toJSON(), although the spec defines it as toString({ calendarName: "auto" }); the test now serializes explicitly so it checks the contract against the string a compliant runtime sends. No production code change — the emitted pattern and parse already handle the annotation.

bun install --frozen-lockfile, bun run build, bun run lint, bun run test (217 pass), and bun run typedoc all pass locally on bun 1.4.2.

Link to Devin session: https://app.devin.ai/sessions/501e23215c264ebabb22c082a83d092f
Open in Devin Desktop: https://app.devin.ai/desktop/session/501e23215c264ebabb22c082a83d092f?variant=devin
Requested by: @macalinao

Summary by Sourcery

Stabilize Bun-based CI and correct Temporal formatting and 12-hour parsing edge cases.

Bug Fixes:

  • Correct ISO PlainYearMonth and PlainMonthDay formatting so localized month names are preserved while non-ISO calendars continue formatting correctly.
  • Fix 12 AM parsing to produce midnight while retaining correct AM and PM hour conversion.

Enhancements:

  • Use the Bun version declared by the project in CI and cache Bun installation dependencies.
  • Run the test suite as part of the build workflow.

Build:

  • Pin Bun catalog and package-manager versions, regenerate the lockfile, and ensure versioning updates leave dependencies synchronized.

CI:

  • Make build and documentation workflows use the declared Bun version with cached installs, and add automated test execution to builds.

Tests:

  • Add coverage for ISO and non-ISO calendar formatting, leap-day month formatting, and 12-hour time parsing.
  • Update calendar serialization tests to validate the standard string representation across runtimes.

Pin @types/bun in the catalog and re-run bun install after changeset version.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@sourcery-ai

sourcery-ai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR fixes frozen-lockfile failures by regenerating bun.lock with Bun 1.3.1, replacing the floating @types/bun catalog entry with a stable ^1.4.2 range, and updating ci:version to reinstall and write a consistent lockfile after version bumps. Reviewers should verify the generated lockfile contains only the intended resolution updates and that the revised versioning flow remains CI-safe.

Sequence diagram for CI versioning and lockfile synchronization

sequenceDiagram
    participant CI
    participant Changesets
    participant Bun
    participant PackageJSON
    participant BunLock

    CI->>Changesets: changeset version
    Changesets->>PackageJSON: Update package versions
    CI->>Bun: bun update
    Bun->>PackageJSON: Update dependency specifications
    CI->>Bun: bun install
    Bun->>BunLock: Regenerate consistent lockfile
    CI->>Bun: bun install --frozen-lockfile
    Bun-->>CI: Install succeeds
Loading

File-Level Changes

Change Details Files
Regenerate the Bun lockfile to match the versions declared in the root package configuration.
  • Synchronize workspace specs for temporal-polyfill and turbo with package.json.
  • Pin @types/bun to ^1.4.2 instead of the floating latest range.
  • Review the generated lockfile diff for unintended dependency or resolution changes.
bun.lock
package.json
Ensure versioning automation refreshes the lockfile after dependency metadata changes.
  • Append bun install to ci:version after changeset version and bun update.
  • Confirm the command produces a frozen-lockfile-compatible result in CI.
package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: macalinao/temporal-utils/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f875f1d5-ab2b-4600-b8eb-594edfd6baaf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

… contract

Also pin Bun from package.json in CI, cache the Bun install cache, and run tests in CI.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration devin-ai-integration Bot changed the title fix: sync bun.lock so CI's --frozen-lockfile passes on master fix: unbreak CI (frozen lockfile), fix 3 real bugs, and run tests in CI Sep 29, 2026
with:
bun-version-file: package.json
- name: Cache Bun install cache
uses: actions/cache@v5
with:
bun-version-file: package.json
- name: Cache Bun install cache
uses: actions/cache@v5
@macalinao
macalinao merged commit 04d013c into master Sep 29, 2026
12 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.

2 participants