Skip to content

fix(release): rebuild the web bundle when the release PR bumps versions - #353

Merged
elkaix merged 2 commits into
mainfrom
fix/release-pr-ci
Oct 1, 2026
Merged

elkaix merged 2 commits into
mainfrom
fix/release-pr-ci

Conversation

@elkaix

@elkaix elkaix commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Requirement or Bug

The release PR (#348) fails build, test, nix build, Artifact security and the preview publish.

Bug Reproduction Steps

  1. Merge any PR with a changeset that names @pymodel/pythinker-web.
  2. The Release workflow opens ci: release packages, which bumps apps/pythinker-web/package.json version.
  3. Every job that runs check-web-assets.mjs fails: "The committed web bundle is stale".

Root Cause

vite.config.ts compiles the web package version into the bundle (__PYTHINKER_WEB_VERSION__), and package.json is a fingerprinted build input. changeset version bumps it but nothing rebuilt dist-web, so the committed bundle was genuinely stale. Earlier releases (#301) were fixed by rebuilding by hand on the release branch. Fundamental fix: version:release now runs pnpm run build:web after changeset version, so the changesets action commits the rebuilt bundle with the bump. The release job already installs dependencies and runs pnpm build before this step.

Second, unrelated failure in the same run: towerService.test.ts "leaves the roster untouched when another session owns the tower store" asserted the order of two log lines written by two independent async event handlers. It failed on CI when the order flipped. The test now checks both lines without order and finds the payload by message.

Code Changes

  • package.json: version:release appends && pnpm run build:web.
  • towerService.test.ts: order-independent assertion.

Behavior Changes and Affected Users

None for users. Release PRs now include the rebuilt dist-web whenever a version that reaches the bundle changes; the release job takes about one web build longer.

Verification:

  • Simulated the bump locally: set the web version to 9.9.9. The stale check failed; after pnpm run build:web it passed, and the new version appears in the bundle. Then I reverted.
  • towerService.test.ts passes: 108 of 108.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

The release PR bumps apps/pythinker-web's version, which Vite compiles into
the bundle, so the committed dist-web went stale and build, test, nix and
preview publish all failed. version:release now runs build:web after
changeset version.

Also stop the tower roster test from assuming the order of two log lines
written by independent async handlers.
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: PyModel/pythinker-code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6f599a2a-d85d-4abe-b743-91532fef3ceb

📥 Commits

Reviewing files that changed from the base of the PR and between 772e69a and 4070a6d.

📒 Files selected for processing (2)
  • package.json
  • packages/agent-core-v2/test/features/tower/towerService.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pymodel/pythinker-code@4070a6d
npx https://pkg.pr.new/@pymodel/pythinker-code@4070a6d

commit: 4070a6d

@elkaix
elkaix enabled auto-merge (squash) October 1, 2026 23:27
@elkaix
elkaix merged commit 98e2ed5 into main Oct 1, 2026
25 checks passed
@elkaix
elkaix deleted the fix/release-pr-ci branch October 1, 2026 23:29
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