Skip to content

fix(release): the release build gets the shared monorepo it depends on - #79

Merged
alichherawalla merged 1 commit into
mainfrom
release/sync-cross-platform
Aug 11, 2026
Merged

fix(release): the release build gets the shared monorepo it depends on#79
alichherawalla merged 1 commit into
mainfrom
release/sync-cross-platform

Conversation

@alichherawalla

@alichherawalla alichherawalla commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@offgrid/sync is a file:../shared dependency, so it has to sit beside the checkout before npm ci runs. An install cannot resolve a path that is not there, and the typecheck inside npm run build then fails on every import of it.

That is how tonight's beta died — run 31502834587, build-mac, ~40 TS2307 lines naming one missing module.

ci.yml has staged shared since the sync work landed; this workflow never did, which is why no release has built since 2026-07-30. Both build-mac and build-win now check out shared at the release's own ref, fall back to shared main, install at the workspace root and build packages/sync — the same sequence ci.yml uses.

Workflow-only change. No source touched.

Greptile Summary

The PR stages and builds the adjacent shared monorepo before installing the application dependencies in both release jobs.

  • Checks out a matching shared ref with a fallback to shared main.
  • Installs the shared workspace and builds packages/sync.
  • The Windows copy of the setup script lacks the Bash shell declaration required by its POSIX commands.

Confidence Score: 4/5

The PR should not merge until the Windows shared-workspace step explicitly uses Bash or is rewritten in PowerShell, because every Windows release build currently aborts there.

The macOS setup follows a compatible shell path, but the identical POSIX script is executed by default PowerShell on windows-2022, preventing the Windows release job from reaching dependency installation or artifact generation.

Files Needing Attention: .github/workflows/release.yml

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds shared-monorepo staging to both release jobs, but the Windows staging script uses Bash syntax under the default PowerShell shell.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Manual release dispatch] --> B[Build macOS]
  B --> C[Checkout matching shared ref]
  C -->|Failure| D[Fallback to shared main]
  C -->|Success| E[Move shared beside checkout]
  D --> E
  E --> F[Install and build shared sync package]
  F --> G[Build application]
  G --> H[Build Windows]
  H --> I[Run shared setup with default PowerShell]
  I --> J[Bash syntax rejected]
  J --> K[Windows artifacts not produced]
Loading

Reviews (1): Last reviewed commit: "fix(release): the release build gets the..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Summary by CodeRabbit

  • Chores
    • Improved macOS and Windows release build preparation.
    • Release builds now verify required shared components are available and built before packaging.
    • Added clearer failure handling when required build resources cannot be retrieved.

`@offgrid/sync` is a file: dependency on ../shared, so it has to sit beside the checkout before
`npm ci` - an install cannot resolve a path that is not there, and the typecheck inside `npm run build`
then fails on every import of it. That is exactly how tonight's beta died: 40-odd TS2307 lines naming
one missing module.

ci.yml has staged shared since the sync work landed; this workflow never did, which is why no release
has built since 2026-07-30. Both build-mac and build-win now do it, at the release's own ref, falling
back to shared main.
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 48300619-7196-48f1-ba89-8fbc49d8a15f

📥 Commits

Reviewing files that changed from the base of the PR and between e7c1bf2 and e778736.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The macOS and Windows release jobs now check out the shared repository, fall back to its default branch when needed, install workspace dependencies, and build packages/sync before installing application dependencies.

Changes

Release shared sync preparation

Layer / File(s) Summary
Shared monorepo setup for release jobs
.github/workflows/release.yml
The macOS and Windows jobs check out the matching shared repository ref, fall back to main, fail when the checkout is unavailable, install workspace dependencies, and build packages/sync before npm ci.

Estimated code review effort: 3 (Moderate) | ~15–30 minutes

Suggested reviewers: anurag-wednesday

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/sync-cross-platform

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.

@sonarqubecloud

Copy link
Copy Markdown

@alichherawalla
alichherawalla merged commit 2e7efe9 into main Aug 11, 2026
3 of 4 checks passed
Comment on lines +456 to +467
run: |
if [ ! -d _shared ]; then
echo "::error::off-grid-ai/shared was not checked out - @offgrid/sync cannot resolve. Check CI_CROSS_REPO_TOKEN."
exit 1
fi
rm -rf ../shared
mv _shared ../shared
# Install at the WORKSPACE ROOT: shared is an npm-workspaces monorepo whose lockfile and
# build tool live at the root, and packages/sync declares neither. A locked install, so a
# drifted lock stops the release instead of resolving a graph nobody committed.
npm --prefix ../shared ci
npm --prefix ../shared/packages/sync run build

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Windows setup runs as PowerShell

When a release reaches build-win, this step runs under the Windows default PowerShell shell but uses Bash constructs such as if [ ... ], rm -rf, and mv, causing the step to fail before dependency installation and preventing Windows release artifacts from being produced.

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