Troubleshoot the local stack
Diagnose bootstrap, database, generated-contract, API, SSE, and static-doc failures without erasing evidence.
Outcome
You can isolate the failing boundary, reproduce one normal and one failure path, and recover without destructive cleanup.
Prerequisites
Run commands from the repository root. Preserve the first failing output and git status; unrelated
worktree changes belong to their owner.
Steps
- Run
pnpm bootstrapfor version, dependency, PostgreSQL, migration, seed, and generated-client setup. - Run
pnpm checkto identify the first contract or integration gate that fails. - For database readiness, inspect the exact
postgresCompose service before changing credentials. - For generated-client drift, run
pnpm api:generate, inspect the diff, and fix the canonical Python contract rather than editing generated TypeScript. - For documentation reference drift, run
pnpm --filter @lumen/docs generate:referenceand inspect which backend truth changed. - For SSE failures, verify the API is reachable, authentication is present, and the last opaque cursor is retried unchanged.
Verify
Rerun the narrow failing command, then pnpm check. Confirm the original failure path now produces its
documented rejection or recovery rather than disappearing from coverage.
Recover
Do not delete the database, artifact directory, lockfile, or build evidence as a first fix. If a local reset is eventually required in the disposable epoch, inspect and record the exact state first and use the repository's reviewed reset procedure when one exists.