Local Development
Sigroom uses a pnpm workspace for web, API, gateway, worker, and shared packages, plus Rust crates for HACP Control.
Prerequisites
- Node.js >= 22.14.0 and pnpm 11.28.9 through Corepack.
- Rust and Cargo for launcher and sandbox crates.
- Docker Desktop or Colima for local Postgres, Redis, and object storage.
- Git plus standard shell tools such as bash, awk, find, grep, tar, and checksum utilities.
Standard Commands
Run from the Teamwork checkout after installing Node.js and Corepack. The detached command returns before health checks; dev:full follows logs in the foreground. Stop this local stack with pnpm run dev:full:stop.
- After installing the frozen workspace dependencies, run pnpm --filter @sigroom/web run build to compile the production Web app. Its fonts are included in the checkout and served from the Web origin.
- The full-stack command seeds its development database. To load the same sample workspace and reference harness into an already migrated development database, set DATABASE_URL to that local database, run pnpm --filter @sigroom/db run prisma:generate, then run pnpm --filter @sigroom/db run seed. The seed command prints a JSON result listing the fixtures it created or updated.
corepack enable
corepack prepare "$(node -p 'require("./package.json").packageManager')" --activate
pnpm install --frozen-lockfile --ignore-scripts
pnpm run dev:full:detached
pnpm run health:localSecure Windows WSL Local Qualification
Run the sole onboarding entrypoint from native Windows PowerShell. It keeps the ordinary Ubuntu distro as the local Sigroom host and imports a separate signed windows.wsl2.runsc appliance. The wizard writes a protected marker-owned local profile that later dev:full and health:local commands load automatically after the base and TLS environments; never source or copy that file. This qualification supports only the default local-process stack. Docker/hybrid application-service modes are not claimed for WSL L5, and hosted values are intentionally deferred.
powershell.exe -NoLogo -NoProfile -ExecutionPolicy Bypass -File "\\wsl.localhost\<Ubuntu-distro>\home\<linux-user>\code\teamwork\ops\hacp-control\onboard-wsl-hacp.ps1"Source security scans
From the Teamwork checkout, pnpm run security:supply-chain scans the current tracked files and new source files allowed by Git ignore rules. The source manifest, supply-chain-inputs.json, records the file count, Git revision and content digest used by the filesystem scanners. You can also run the capture command from a checkout opened through a symbolic link. Git-ignored credentials and generated output stay out of that copy. Gitleaks scans the Git history and the changes in the captured source against its starting commit, including new files. The redacted reports are gitleaks.repo.json for history and gitleaks.working.json for working changes. The launcher checks render the Helm charts before scanning their Kubernetes resources. If Checkov reports an incomplete result or its exit status disagrees with the finding list, rerun the scan to collect fresh evidence. If a scanner report contains only null or another JSON scalar, rerun that scanner to obtain its structured results. Both pnpm audit reports must include numeric totals for moderate, high and critical findings. If a total is missing or conflicts with the exit status, rerun the production and full dependency audits. A complete report with failed checks lists findings to review.
Rebuilding HACP tools
- The Control host runbook covers Grype, Syft, OSV-Scanner and Trivy. The builder verifies upstream source and locked dependencies, runs package tests and records the modules included in each Linux AMD64 executable.
- Syft’s image-format tests need a dedicated Docker engine and the pinned Alpine test image. OSV-Scanner’s supplemental tests cover package identifiers and scan results. Keep test dependencies in source scans and check the shipped executables separately.
- The gVisor builder needs an idle x86-64 Linux guest. Its qualification covers runsc and the four companion programs. The build defaults to three hours. For a six-hour local run, pass --build-timeout-hours 6 to build-gvisor-candidate.mjs. The Railway release runbook describes how to verify the resulting binaries and exercise the sandbox.
Validation Before Handoff
Run source checks from the Teamwork checkout with the documented local prerequisites. Compiler/test temporary output is disposable; these checks do not qualify a production release.
(
set -e
SIGROOM_CHECK_DIR=$(mktemp -d /tmp/teamwork-XXXXXX)
trap 'rm -rf -- "$SIGROOM_CHECK_DIR"' EXIT
export TMPDIR="$SIGROOM_CHECK_DIR"
export CARGO_TARGET_DIR="$SIGROOM_CHECK_DIR/cargo-target"
pnpm run type-check
pnpm run test:all
pnpm run lint:all
cargo test --manifest-path rust/Cargo.toml --workspace
pnpm run guard:no-legacy-harness-name
)Source Material
- docs/deployment/guides/local-development.md
- docs/deployment/runtimes/windows-wsl2/local-development-walkthrough.md
- ops/hacp-control/onboard-wsl-hacp.ps1
- scripts/local/run-full-stack.sh
- scripts/local/check-health.sh
- scripts/security/check-supply-chain.sh
- packages/db/src/seed.ts
- deployment/railway/lima/CONTROL-HOST-RUNBOOK.md
- deployment/railway/qualification/build-gvisor-candidate.mjs
- package.json
- pnpm-workspace.yaml