release gate / check (push) Failing after 5m49s
- .opencode/agents/superbrain.md: primary project engineer agent - .opencode/agents/invariant-reviewer.md: read-only diff reviewer subagent - .opencode/skills/: db-migration, add-endpoint, web-invariants, verify, release - RUNNING.md: warn that the repo docker-compose.yml is local dev/test only and must never be run on a core (cores use the federated render + shared postgresql)
45 lines
2.3 KiB
Markdown
45 lines
2.3 KiB
Markdown
---
|
|
name: Verify
|
|
description: Pick and run the right Superbrain verification gate for a change — Go unit/integration, schema convergence, web lint/typecheck/build, browser regressions, e2e. Use before declaring work done or before a release.
|
|
---
|
|
|
|
# Verification gates
|
|
|
|
Run the narrowest gate that covers your change, then the full gate before a
|
|
release. Local gates are authoritative (the CI `check.yml` runner has a
|
|
pre-existing environment failure — do not chase it as a code regression).
|
|
|
|
## Choose the gate
|
|
|
|
| Change | Run |
|
|
| --- | --- |
|
|
| Go code (any `internal/*`) | `make test` (unit; DB tests skip without `TEST_DATABASE_URL`) |
|
|
| Go code touching DB / queries | `make integration` (inside Docker) or `docker compose run --rm tests go test -race -run TestName ./internal/http` |
|
|
| Schema / migration | `make db-converge` (see the db-migration skill) |
|
|
| `web/*` | from `web/`: `yarn lint`, `yarn build` (includes typecheck), `yarn eslint -c eslint.ssr.config.mjs .` |
|
|
| Browser / UI behavior | `npm --prefix scripts run test:regressions` (needs a prior `yarn build` in `web/`) |
|
|
| Full stack smoke | `make e2e` against a running composed stack (`BASE_URL` default `http://localhost:3000`) |
|
|
| Everything (release) | `make check` |
|
|
|
|
## Notes
|
|
|
|
- `make check` sequence: `build → vet → integration → db-converge → yarn lint +
|
|
SSR eslint + yarn build → browser regressions`. It fails (by design) when
|
|
Docker is unavailable — DB-backed coverage is mandatory for release.
|
|
- If `yarn` comes through corepack, use `make check YARN="corepack yarn"`.
|
|
- Go tests using `t.Setenv` cannot be parallel; the `tests` container mounts
|
|
only `go.mod`, `go.sum`, `internal/`, `db/` (never the repo root or `.env`),
|
|
so tests must set their own secrets via `t.Setenv`.
|
|
- The Go toolchain is pinned in lockstep in the app `Dockerfile`
|
|
(`golang:1.26.1-alpine3.22`) and the `tests` service in `docker-compose.yml` —
|
|
upgrade both together.
|
|
- Browser suites launch Chromium from `CHROMIUM_PATH` (default
|
|
`/usr/bin/chromium`), not the Playwright-bundled browser.
|
|
- `make e2e` tests built images; rebuild with `make run` after source changes.
|
|
Cleanup requires the local Compose db.
|
|
- `make audit` is opt-in (needs network + `govulncheck`).
|
|
|
|
## Reference
|
|
|
|
- `Makefile` (all targets).
|
|
- Root `AGENTS.md` → "Setup & Commands" and "Testing Quirks". |