Skip to main content

Development setup

Keep development sources and test state separate from any installed Burrow runtime. Documentation builds do not require a running application, provider credentials, or database.

Choose the correct checkout​

  • The public Burrow repository contains an assembled backend/UI payload and this documentation
  • Burrow-Backend owns runtime source, full backend tests, upstream API artifacts, and deployment source
  • Burrow-UI owns frontend source, UI tests/configuration, and upstream UI documentation

Backend/UI source repositories may require repository access. Do not infer access to them merely from a public Burrow clone. See repository layout.

For documentation-only work, use the documentation workflow. Do not install or start the runtime simply to edit prose.

Checks available in a public assembled snapshot​

The public snapshot intentionally omits development assembly workflow tests and private workflow inputs. From its root, run the self-contained installer contracts:

node --test scripts/install/*.test.mjs

For an already built image matching that snapshot, the packaged smoke runner is:

node scripts/assembly/packaged-smoke.mjs IMAGE ASSEMBLED_ROOT

It requires Docker and creates/removes its own temporary container and volume; ASSEMBLED_ROOT is the absolute snapshot path. It checks runtime/source identity, served UI/API documentation and a disposable native install, not a live deployment. The full scripts/assembly/*.test.mjs contracts belong to the development assembly repository, where their private workflow inputs exist. The contributor commands below apply to the separate source repositories, not the public payload.

Backend contributor environment​

Use Node24+ and npm. In an authorized Backend checkout:

npm ci
npm run check:postgres-only
npm run test:files -- tests/agent-context-config.test.mjs
npm test

npm run check also checks unused bindings, syntax-checks source/tests/bin/scripts, and runs the suite. Inspect the exact scripts before selecting the aggregate check for your change. The public assembly includes the OpenAPI JSON artifact but not backend tests or the full upstream documentation, so these commands do not have the same meaning in its bundled backend/ directory.

The test runner creates private temporary runtime roots, clears selected runtime/key environment values, provides a test-only key, and enforces a whole-suite timeout (120 seconds normally, or 900 seconds with BURROW_TEST_DISPOSABLE_POSTGRES=1; configurable through BURROW_TEST_TIMEOUT_MS). Do not point tests at a deployed database or live workspace.

Disposable PostgreSQL mode starts an isolated local database (PostgreSQL17 binaries by default) and defaults to one test worker rather than four. Some database integration tests are opt-in and need PostgreSQL17/pgvector or Docker. Passing pure tests, or skipping unavailable integration tests, is not equivalent to a full database lifecycle pass. The optional deployed-isolation verification mode reads deployed paths; do not use it without intentionally selecting that environment.

Use a clean contributor shell: the runner rejects inherited DATABASE_URL, BURROW_POSTGRES_*, BURROW_ACCESS_TEST_SOCKET and PG* connection variables rather than accepting a deployed database target. Remove those values from the test process environment; do not pass production credentials or a deployment environment file.

For the runner-owned database integration mode, install the PostgreSQL17 binaries required by the checkout and run:

BURROW_TEST_DISPOSABLE_POSTGRES=1 npm test

This creates its own temporary cluster and Unix socket, supplies fixture-only connection settings to child tests, and stops the cluster during cleanup. The separate Docker lifecycle rehearsal below is a different check, not a prerequisite for the isolated suite. A plain npm test does not opt into this disposable database mode; report any skipped database cases rather than treating them as verified.

Frontend contributor environment​

In an authorized UI checkout:

npm ci
npm test
npm run build

The source UI uses React/TypeScript/Vite and Vitest. npm test uses scripts/test-isolated.mjs: it runs Vitest with a temporary home/temp directory, a minimal environment and the bundled network-denial preload. Directly invoking Vitest bypasses that wrapper; use the package script for the documented isolated test path. npm run build performs TypeScript checking and creates dist/. npm run dev starts Vite; npm run body selects the source workflow's standard UI port. Inspect package.json and vite.config.ts before exposing the development server or connecting it to a runtime.

Use an isolated development API target. A local frontend can still issue real mutations to whichever backend is selected. Browser origin and backend execution host are different concepts.

API contract checks​

In the Backend source tree:

npm run openapi:validate
npm run openapi:drift
npm run openapi:types:check
npm run postman:check

These check schema structure, literal-route coverage, generated TypeScript, and generated Postman content. They do not replace method/body/authorization review against handlers.

Check scripts against the source checkout

openapi:check includes tests/live-api-contract.test.mjs; the public assembly does not ship the backend test tree, so confirm that stage exists in your authorized Backend checkout before running the aggregate. runtime:restore:rehearsal is no longer defined in the published backend package. Use the supported lifecycle rehearsal below for its documented coverage. Report missing/skipped stages explicitly; a subset passing is not an aggregate pass.

Database migration development​

Keep published migration definitions immutable and append new versions. Test fresh startup, repeat startup, rollback on a failed migration, and refusal of a future/incompatible ledger in an isolated database. See persistence and storage schema.

The existing lifecycle rehearsal uses a disposable PostgreSQL17/pgvector Docker container and exercises concurrent migration, rollback, dump/restore, and restart. Review its prerequisites and commands before running; it invokes Docker through noninteractive sudo and is not a production-volume acceptance test.

Before proposing a change​

  1. Check repository status and nearby conventions
  2. Identify source versus generated ownership
  3. Add focused regression coverage where behavior changes
  4. Run applicable checks and report skipped/blocked stages
  5. Update API/config/docs if the public contract changes
  6. Keep runtime state, credentials, and generated dependency directories out of the diff

Source pushes can trigger assembly through the upstream dispatch workflow. A source push and a running user's upgrade are distinct events; do not restart or update a live runtime as an unrequested development step.

Source review​

Reviewed on 25 October 2026 against development assembly f9d1bc5b1b04e3d7f29c6b4f62e0feb935bff487 (build2026.10.25.9), Backend 3bf50374d3601c821e787912d52b9044eaf649ec and UI 0610bac85b2e636b79bbdf09fc3a95c3a519fa5a. This is static source review, not a claim that tests, installation or provider calls were run. Public snapshots can lag development; these pins are provenance, not an installed-version compatibility promise.

Delta review on 26 October 2026: contributor commands and isolation behavior checked against Backend 4df4b424e2b2856cb2c25c8464da7f806eb661e0 and UI 4d5dcd253dfc58dcd032b14e22020ceaad478a52. Commands are instructions, not checks executed by this documentation pass.