Commit 3acb36c
authored
fix(ci): give the web build a heap ceiling and repair stale typecheck filters (#150)
## Related Issue
No filed issue. Three release jobs failed on `main` at `ae4211f1f`, and
the failure then walked past two gates that should have caught it.
## Problem
**1. `apps/pythinker-web` outgrew Node's default heap on macOS
runners.** The workspace file editor pulled Monaco into the production
module graph (1 source file importing it before #145, 4 after), and the
vite build now needs a little over 2 GB of old space. macOS runners
default to a ~2053 MB ceiling, so three jobs died with `FATAL ERROR: ...
JavaScript heap out of memory` and exit 134:
| Workflow | Job |
|---|---|
| Desktop Release | `mac` — "Build workspace" |
| Release | Native bundle `darwin-x64` |
| Release | Native bundle `darwin-arm64` |
Linux and Windows runners default higher and stayed green, so `CI` and
`Nix Build` never saw it.
**2. A half-shipped release passed as a good one.**
`publish-native-assets` refused to publish a partial native set, exactly
as designed. But a job whose dependency failed reports `skipped`, not
`failure`, and `redeploy-cdn` only checked for `failure` — so it
deployed 1.0.0 to the CDN while the GitHub release
`@pymodel/pythinker-code@1.0.0` held **zero assets**. Every native
installer would have been sent to a release that has none.
`verify-cdn-release` had no `always()`, so the same skip propagated
through the graph and silently disabled the one gate that exists to
catch this. Both went quiet in precisely the run that needed them.
**3. Three typecheck gates in CI had gone quietly dead.** `pnpm --filter
<name>` exits 0 when the filter matches nothing, so a rename turns a
gate into a no-op with nothing red to show for it:
- `@pymodel/dashboard-server` and `@pymodel/dashboard-web` matched
nothing after the packages became `@pymodel/vis-server` /
`@pymodel/vis-web`.
- `pythinker-code` matched the CLI *directory* (`apps/pythinker-code`),
not the VS Code extension, whose package name is `pythinker`. The
extension was never typechecked in CI, and the CLI was already covered
by the tsgo step above it.
## What changed
**The heap ceiling lives in `apps/pythinker-web`'s own `build` script.**
That is the one point every consumer shares — CI, Nix, both release
workflows, and local builds — and it stays portable: a `NODE_OPTIONS=`
prefix would break the Windows desktop job, which runs the same script
under `cmd.exe`. Measured on this repo rather than guessed: 2048 MB
fails, 2560 MB passes, and the build peaks near 2.2 GB. 4096 leaves
headroom without reserving anything, since V8 only grows to what it
needs. Rebuilding the committed bundle produced a byte-identical
`dist-web` — only the input fingerprint moved, which confirms the change
is behaviour-neutral.
**`redeploy-cdn` now requires `publish-native-assets` to have
succeeded** whenever the release has native artifacts at all, so a
release with no assets leaves the CDN on the last installable version
instead of advertising one nobody can install. **`verify-cdn-release`
now runs on its own merits** and reports a stale CDN rather than
disappearing with it.
**The CI typecheck steps become one loop that resolves each filter to a
real workspace package before running it,** so a stale name fails
instead of passing silently. All five targets pass locally, including
the VS Code extension, which this turns on for the first time.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [x] I have linked a related issue (external PRs: the issue must have a
maintainer's `/approve`).
- [x] I have added tests that prove my feature works. — mutation-tested:
a bogus filter name exits 1, and 2048 MB reproduces the OOM locally.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.
[skip changeset] — build and CI infrastructure only; the shipped bundle
is byte-identical.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved release verification so incomplete native asset releases are
detected instead of being silently redeployed.
* CDN release checks now run consistently when applicable, helping
identify deployment issues earlier.
* **Chores**
* Improved build reliability for larger web projects.
* Strengthened automated type checking across all current packages.
* Refreshed web bundle metadata to keep deployed assets synchronized.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent ae4211f commit 3acb36c
4 files changed
Lines changed: 38 additions & 16 deletions
File tree
- .github/workflows
- apps
- pythinker-code/dist-web
- pythinker-web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
243 | 250 | | |
244 | 251 | | |
245 | 252 | | |
246 | | - | |
247 | | - | |
| 253 | + | |
| 254 | + | |
248 | 255 | | |
249 | 256 | | |
250 | 257 | | |
| |||
308 | 315 | | |
309 | 316 | | |
310 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
311 | 323 | | |
312 | | - | |
313 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
314 | 328 | | |
315 | 329 | | |
316 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments