Deploy docs site has failed on every push to main since before 2026-08-18.
It ran `pnpm --filter @lawsynth/docs-site run render` directly, which only
builds docs-site itself — never its workspace deps `@lawsynth/world-schema`
and `@lawsynth/world-viewer`, whose package.json `exports` point at
`./dist/src/index.*` which only exists after each package's own `tsc`
build runs. `pnpm install` just symlinks workspace packages, it doesn't
build them, so tsc failed with TS2307 (cannot find module) every time.
pr.yml's `typescript` job never hit this because it calls the root
`build` script (`pnpm -r --if-present run build && pnpm --filter
@lawsynth/docs-site run render`), which builds every workspace package in
topological order first — that's why PR checks passed while deploys kept
failing.
Fix: add the same `pnpm -r --if-present run build` step to deploy-site.yml
before the render step, mirroring the root build script. Verified locally:
`pnpm -r --if-present run build` builds all 10 packages in order, then
`pnpm --filter @lawsynth/docs-site run render` renders 330 files
successfully (previously failed in ~13s with TS2307).
This is unrelated to PR #9's merge-conflict-marker fix — that issue was
already independently resolved on main in 760bc7e (2026-10-17).
- release-build.yml: new workflow_dispatch-independent job triggered on v*
tags, building the lawsynth CLI on a macos-latest/ubuntu-latest matrix
(same cargo build --release --locked -p lawsynth-cli command release.yml's
verification job already runs) and uploading the packaged binaries as
GitHub Release assets via softprops/action-gh-release. Does not modify
release.yml, which stays verify-only and workflow_dispatch-triggered.
- nightly-science.yml: was running `pytest tests/scientific tests/conformance`
directly, which collects zero tests (exit code 5) because those directories
hold declarative run.py fixtures, not test_*.py files. Added a Rust
toolchain + CLI build step and a new tests/test_scientific.py pytest
wrapper (mirroring the existing tests/test_conformance.py pattern) that
parametrizes one test per case and runs each case's own run.py via
runpy.run_path against the native engine, then pointed the job at the two
real wrapper modules.
Verified locally: cargo fmt --check, cargo clippy --workspace --all-targets
-- -D warnings, and cargo test --workspace all clean; actionlint clean on
release-build.yml, nightly-science.yml, and (unchanged) release.yml;
`pytest tests/test_scientific.py tests/test_conformance.py` passes (22/22)
against the compiled CLI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Regenerated pnpm-lock.yaml online so it matches the manifests (it was missing
typescript@^5.8.3 and @types/node) — `pnpm install --frozen-lockfile` now passes,
which is exactly what Cloudflare runs (ERR_PNPM_OUTDATED_LOCKFILE gone).
Regenerating resolved typescript 5.9.3 (from 5.8.x), which surfaced TS2488 in
world-viewer: iterating a NodeListOf now needs DOM.Iterable in `lib`. Added it to
packages/world-viewer/tsconfig.json. Full workspace build + typecheck + test are
green under the new toolchain.
Restored --frozen-lockfile in pr.yml/deploy-site.yml (the lock is correct now).
Cloudflare: set the build command to `pnpm run build:site`; deploy stays
`npx wrangler deploy`.
The .npmrc auto-install-peers=false didn't resolve the Cloudflare
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH: pnpm 10 reads autoInstallPeers from
pnpm-workspace.yaml, so pin it there (the canonical location) to match the
lockfile's recorded `settings.autoInstallPeers: false`.
The lockfile is also stale (missing @types/node), which needs a networked
regeneration this offline repo can't do. Added a manual
`Regenerate pnpm lockfile` GitHub Action (workflow_dispatch): from the Actions
tab it runs `pnpm install --no-frozen-lockfile` on GitHub's network and commits
the fixed lockfile back — no local pnpm required. After it runs, Cloudflare's
frozen install passes.
The Cloudflare build failed at install with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH
(autoInstallPeers) and the committed pnpm-lock.yaml is also out of date (it
predates @types/node in @lawsynth/state-store), so --frozen-lockfile can't
proceed.
- .npmrc: pin auto-install-peers=false so the resolved config matches the
lockfile's recorded settings (fixes the CONFIG_MISMATCH).
- pr.yml + deploy-site.yml: install with --no-frozen-lockfile so CI/deploy
regenerate the lockfile on the networked runner instead of hard-failing on the
stale lock. (Restore --frozen-lockfile after committing a regenerated lock.)
- wrangler.jsonc (root): a static-assets Worker (assets -> apps/docs-site/public,
no `main`) so `npx wrangler deploy` serves the pre-rendered site.
- package.json: `build:site` = build the workspace then render the docs site to
apps/docs-site/public (verified: 16-file static tree).
Cloudflare Workers Build settings: build command `pnpm run build:site`, deploy
`npx wrangler deploy`, root `/`. The permanent lockfile fix is one command on a
networked machine: `pnpm install --no-frozen-lockfile && git commit pnpm-lock.yaml`.
.github/workflows/deploy-site.yml: on push to main touching the site (or manual
dispatch), install the pnpm workspace, run the deterministic static render
(pnpm --filter @lawsynth/docs-site run render → apps/docs-site/public), and
publish to the `lawsynth` Cloudflare Pages project via cloudflare/wrangler-action.
The publish step is gated on CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID
repository secrets being present, so the build still runs (and forks/PRs never
fail) when they're absent. Render verified locally (15-file tree).
The Rust workspace and python/lawsynth were covered by CI, but the entire pnpm
TypeScript workspace — world-schema, api-client, chart-core, design-system,
layout-engine, state-store, world-viewer, and apps studio/playground/docs-site
(including all the SDK parsers, Studio analysis module, docs-site, and playground
wasm loader added this cycle) — had NO CI coverage.
- .github/workflows/pr.yml: new `typescript` job — pnpm/action-setup +
setup-node 22 (pnpm cache), `pnpm install --frozen-lockfile`, then
`pnpm run build` / `pnpm run typecheck` / `pnpm run test` (the root recursive
scripts). Verified locally: build + typecheck + test are green across all
10 packages/apps (api-client 30, docs-site 11, playground 12, chart-core/
state-store/design-system 10 each, others Done; 0 failures).
- justfile + Makefile: new `ts` target (install/build/typecheck/test) folded
into `verify`, so `just verify` / `make verify` now match CI (Rust + Python +
TypeScript) instead of skipping the web workspace.