[E00-S01-T05] Add root build/test scripts #372

Merged
kpcto merged 1 commits from feature/158 into main 2026-08-28 08:48:11 +00:00
Member

What changed

Adds root scripts so build, test and typecheck run from the workspace root for [E00-S01-T05] Add root build/test scripts (#158):

  • Root package.json — new scripts block:
    • build → pnpm -r run build — compiles every workspace package (topological order)
    • test → node --test "tests/**/*.test.mjs" — runs the node:test suites under tests/ (currently tests/architecture-import.test.mjs, the E00-S01-T04 dependency-boundary test; zero extra dependencies)
    • typecheck → pnpm -r run typecheck — typechecks every workspace package
    • Adds typescript pinned as an exact root devDependency ("typescript": "6.0.3") so the commands run from a clean checkout; pnpm-lock.yaml regenerated with the pinned pnpm 11.23.0 (frozen install stays green)
  • Per-package package.json (apps/server, packages/core, extensions/example) — each gains build (tsc -p tsconfig.json) and typecheck (tsc -p tsconfig.json --noEmit) scripts, which the root pnpm -r commands delegate to

Explicitly out of scope per the brief: dependency-boundary rule/test (E00-S01-T04, merged), non-container developer path docs (E00-S01-T06). CI pipeline wiring of these scripts is E00-S05 (out of scope here — CI workflow file untouched).

Criterion → test table

Acceptance criterion Evidence / test
root commands exist for build root package.json scripts.build = pnpm -r run build; verified: pnpm build from a clean checkout runs tsc -p tsconfig.json in all 3 packages (apps/server, packages/core, extensions/example) and emits dist/ for each (exit 0)
root commands exist for test root package.json scripts.test = node --test "tests/**/*.test.mjs"; verified: pnpm test from a clean checkout runs tests/architecture-import.test.mjs → 10/10 pass (exit 0)
root commands exist for typecheck root package.json scripts.typecheck = pnpm -r run typecheck; verified: pnpm typecheck from a clean checkout runs tsc -p tsconfig.json --noEmit in all 3 packages (exit 0)

Test plan executed

  • Clean-state simulation: removed node_modules/ and all dist/ outputs, then pnpm install --frozen-lockfile (pnpm 11.23.0, same as CI) → success, lockfile unchanged by re-install ✓
  • pnpm build → all 3 packages compile and emit (exit 0) ✓
  • pnpm typecheck → all 3 packages pass --noEmit (exit 0) ✓
  • pnpm test → tests/architecture-import.test.mjs 10/10 pass (exit 0) ✓
  • CI parity: pnpm -r list --depth -1 lists all 4 workspace projects (root + 3 packages); corepack enable resolves the pinned pnpm 11.23.0 ✓
  • All four touched package.json files parse as valid JSON ✓

Risks / notes

  • The exact TypeScript pin at the workspace root also advances the story-level criterion "TypeScript 6.0.3 pinned as an exact dependency" (its own task is E00-S01-T09); if that task later moves the pin per-package or adds a catalog, the root scripts here keep working as long as tsc resolves for every package.
  • node --test glob form (tests/**/*.test.mjs) is used instead of a bare directory argument because the directory form is not reliably supported across Node versions in the 22–24 range; the glob matches current and future tests/** suites.
  • No CI workflow changes — wiring the root scripts into CI stages is E00-S05 by design.

Closes #158

## What changed Adds root scripts so build, test and typecheck run from the workspace root for [E00-S01-T05] Add root build/test scripts (#158): - **Root `package.json`** — new `scripts` block: - `build` → `pnpm -r run build` — compiles every workspace package (topological order) - `test` → `node --test "tests/**/*.test.mjs"` — runs the `node:test` suites under `tests/` (currently `tests/architecture-import.test.mjs`, the E00-S01-T04 dependency-boundary test; zero extra dependencies) - `typecheck` → `pnpm -r run typecheck` — typechecks every workspace package - Adds `typescript` pinned as an **exact** root devDependency (`"typescript": "6.0.3"`) so the commands run from a clean checkout; `pnpm-lock.yaml` regenerated with the pinned pnpm 11.23.0 (frozen install stays green) - **Per-package `package.json`** (`apps/server`, `packages/core`, `extensions/example`) — each gains `build` (`tsc -p tsconfig.json`) and `typecheck` (`tsc -p tsconfig.json --noEmit`) scripts, which the root `pnpm -r` commands delegate to Explicitly out of scope per the brief: dependency-boundary rule/test (E00-S01-T04, merged), non-container developer path docs (E00-S01-T06). CI pipeline wiring of these scripts is E00-S05 (out of scope here — CI workflow file untouched). ## Criterion → test table | Acceptance criterion | Evidence / test | | --- | --- | | root commands exist for build | root `package.json` `scripts.build` = `pnpm -r run build`; verified: `pnpm build` from a clean checkout runs `tsc -p tsconfig.json` in all 3 packages (`apps/server`, `packages/core`, `extensions/example`) and emits `dist/` for each (exit 0) | | root commands exist for test | root `package.json` `scripts.test` = `node --test "tests/**/*.test.mjs"`; verified: `pnpm test` from a clean checkout runs `tests/architecture-import.test.mjs` → **10/10 pass** (exit 0) | | root commands exist for typecheck | root `package.json` `scripts.typecheck` = `pnpm -r run typecheck`; verified: `pnpm typecheck` from a clean checkout runs `tsc -p tsconfig.json --noEmit` in all 3 packages (exit 0) | ## Test plan executed - Clean-state simulation: removed `node_modules/` and all `dist/` outputs, then `pnpm install --frozen-lockfile` (pnpm 11.23.0, same as CI) → success, lockfile unchanged by re-install ✓ - `pnpm build` → all 3 packages compile and emit (exit 0) ✓ - `pnpm typecheck` → all 3 packages pass `--noEmit` (exit 0) ✓ - `pnpm test` → `tests/architecture-import.test.mjs` 10/10 pass (exit 0) ✓ - CI parity: `pnpm -r list --depth -1` lists all 4 workspace projects (root + 3 packages); `corepack enable` resolves the pinned pnpm 11.23.0 ✓ - All four touched `package.json` files parse as valid JSON ✓ ## Risks / notes - The exact TypeScript pin at the workspace root also advances the story-level criterion "TypeScript 6.0.3 pinned as an exact dependency" (its own task is E00-S01-T09); if that task later moves the pin per-package or adds a catalog, the root scripts here keep working as long as `tsc` resolves for every package. - `node --test` glob form (`tests/**/*.test.mjs`) is used instead of a bare directory argument because the directory form is not reliably supported across Node versions in the 22–24 range; the glob matches current and future `tests/**` suites. - No CI workflow changes — wiring the root scripts into CI stages is E00-S05 by design. Closes #158
bot-implementer added 1 commit 2026-08-28 08:39:26 +00:00
feat: add root build/test/typecheck scripts (E00-S01-T05)
CI / Frozen lockfile install (pull_request) Successful in 50s
0d1bd19093
Adds root scripts so build, test and typecheck run from the workspace root:
- root package.json gains scripts: build (pnpm -r run build), test
  (node --test on tests/**/*.test.mjs), typecheck (pnpm -r run typecheck)
- every workspace package (apps/server, packages/core,
  extensions/example) gains build (tsc -p tsconfig.json) and typecheck
  (tsc -p tsconfig.json --noEmit) scripts
- typescript 6.0.3 pinned as an exact root devDependency so the commands
  run from a clean checkout; lockfile regenerated with pnpm 11.23.0

Verified from a clean state: pnpm install --frozen-lockfile passes,
pnpm build emits dist for all 3 packages, pnpm typecheck passes for all 3,
pnpm test runs tests/architecture-import.test.mjs 10/10 green, and CI's
pnpm -r list --depth -1 still lists all 4 workspace projects.

Closes #158
Member
agent: tester
issue: "158"
pr: 372
phase: start
objective: independently probe the PR for #158
acceptance:
  - root commands exist for build
  - root commands exist for test
  - root commands exist for typecheck
constraints:
  - never edit the implementer's tests in the same PR
plan:
  - checkout feature/158 head (0d1bd19)
  - frozen-lockfile install via corepack pnpm 11.23.0
  - run pnpm build / pnpm test / pnpm typecheck from clean checkout
  - collect CI run links
status: in-progress
```yaml agent: tester issue: "158" pr: 372 phase: start objective: independently probe the PR for #158 acceptance: - root commands exist for build - root commands exist for test - root commands exist for typecheck constraints: - never edit the implementer's tests in the same PR plan: - checkout feature/158 head (0d1bd19) - frozen-lockfile install via corepack pnpm 11.23.0 - run pnpm build / pnpm test / pnpm typecheck from clean checkout - collect CI run links status: in-progress ```
Member
agent: tester
issue: "158"
pr: 372
phase: end
verdict: pass
objective: independently probe the PR for #158

acceptance:
  - criterion: root commands exist for build
    result: pass
    evidence: >
      root package.json scripts.build = "pnpm -r run build"; ran `pnpm build`
      from a clean checkout (exit 0) — compiled apps/server, packages/core,
      extensions/example and emitted dist/ for each.
  - criterion: root commands exist for test
    result: pass
    evidence: >
      root package.json scripts.test = "node --test \"tests/**/*.test.mjs\"";
      ran `pnpm test` (exit 0) — 10/10 tests pass, 0 fail.
  - criterion: root commands exist for typecheck
    result: pass
    evidence: >
      root package.json scripts.typecheck = "pnpm -r run typecheck";
      ran `pnpm typecheck` (exit 0) — all 3 packages pass tsc --noEmit.

method:
  - checked out feature/158 head (0d1bd1909387acb3245e01825a65b440b5013d36)
  - corepack enable -> pnpm 11.23.0 (pinned via packageManager)
  - pnpm install --frozen-lockfile (exit 0; lockfile unchanged)
  - ran pnpm build / pnpm test / pnpm typecheck from workspace root
  - confirmed `git status` clean after full run (no tracked file modified)

environment:
  node: v22.23.2 (local probe)  # CI uses Node 24
  pnpm: 11.23.0
  typescript: 6.0.3 (root devDependency, exact)

constraints_respected:
  - did not edit the implementer's tests or any tracked file

ci:
  run: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/41
  job: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/41/jobs/53
  conclusion: success (pull_request @ 0d1bd19)
  note: >
    CI (.gitea/workflows/ci.yml) only runs frozen-lockfile install +
    workspace-group verification; build/test/typecheck are not wired into CI
    (E00-S05 by design), so the three acceptance commands were verified by
    this independent probe.

status: done
```yaml agent: tester issue: "158" pr: 372 phase: end verdict: pass objective: independently probe the PR for #158 acceptance: - criterion: root commands exist for build result: pass evidence: > root package.json scripts.build = "pnpm -r run build"; ran `pnpm build` from a clean checkout (exit 0) — compiled apps/server, packages/core, extensions/example and emitted dist/ for each. - criterion: root commands exist for test result: pass evidence: > root package.json scripts.test = "node --test \"tests/**/*.test.mjs\""; ran `pnpm test` (exit 0) — 10/10 tests pass, 0 fail. - criterion: root commands exist for typecheck result: pass evidence: > root package.json scripts.typecheck = "pnpm -r run typecheck"; ran `pnpm typecheck` (exit 0) — all 3 packages pass tsc --noEmit. method: - checked out feature/158 head (0d1bd1909387acb3245e01825a65b440b5013d36) - corepack enable -> pnpm 11.23.0 (pinned via packageManager) - pnpm install --frozen-lockfile (exit 0; lockfile unchanged) - ran pnpm build / pnpm test / pnpm typecheck from workspace root - confirmed `git status` clean after full run (no tracked file modified) environment: node: v22.23.2 (local probe) # CI uses Node 24 pnpm: 11.23.0 typescript: 6.0.3 (root devDependency, exact) constraints_respected: - did not edit the implementer's tests or any tracked file ci: run: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/41 job: http://gitea:3000/Fabrika/PersonalBlog/actions/runs/41/jobs/53 conclusion: success (pull_request @ 0d1bd19) note: > CI (.gitea/workflows/ci.yml) only runs frozen-lockfile install + workspace-group verification; build/test/typecheck are not wired into CI (E00-S05 by design), so the three acceptance commands were verified by this independent probe. status: done ```
kpcto merged commit bbd5c5a9f0 into main 2026-08-28 08:48:11 +00:00
kpcto deleted branch feature/158 2026-08-28 08:48:11 +00:00
Sign in to join this conversation.