rea-ci-tests-audit
MOmorluto/rea485k7,690 new stars in the last 7 days
Rules for running several coding agents on this repo at once (PR authors, reviewers, fixers, rebases), so they do not break each other's runs and do not burn tokens on repeated work. Read before you start more than one agent that writes code, runs integration tests or opens PRs.
These rules come from running seven connector PRs with agents on accelerate. Each one names
a mistake that actually happened.
acceleration/internal/config/testing.yaml wins over ROUTER_POSTGRES_DSN
(TestTheTestingFileWinsOverTheEnvironment). Setting the env alone does not isolate a run.
testing.yaml at a database of its own, such as model_router_test_<slug>_test.
Do it through a go test -overlay copy or in the agent's own worktree.ROUTER_POSTGRES_DSN to the DSN of its testing.yaml copy (database
model_router_test_<slug>_test) and ROUTER_REDIS_ADDR to its own Redis. It sets the Redis
address in its testing.yaml copy as well (see below).internal/testenv replaces both variables with the testing.yaml values in every package that
imports it. With -tags integration, internal/imagerouter and internal/testenv/redisready
do not import it, so they read the shell's values. Without the tag, cmd/router
(sandboxproxy_test.go:65, main_test.go:58) and internal/session (timeout_test.go:108)
also read ROUTER_REDIS_ADDR from the shell: set your own Redis there.imagerouter does not create its database. On a fresh slug it fails with
database "model_router_test_<slug>_test" does not exist. Run a package that imports
internal/testenv first, on the same testing.yaml: it creates the database.testing.yaml before it commits. Never commit it.model_router_test drop each other's schema in the middle of a run.fsync=off, synchronous_commit=off and
full_page_writes=off: the suites truncate their tables before every test, and each TRUNCATE
waits on fsync. testing.yaml points at localhost:55432, which is the compose router's
Postgres (fsync on). Start the shared server on its own port once, and put that port in each
agent's testing.yaml copy:
docker run -d --name va-test-pg --restart unless-stopped --shm-size=2g -p 127.0.0.1:55433:5432 \
-e POSTGRES_PASSWORD=postgres -v va-test-pg19data:/var/lib/postgresql postgres:19-alpine \
-c fsync=off -c synchronous_commit=off -c full_page_writes=off -c max_connections=1000
--shm-size=2g. Postgres keeps every table's statistics in shared memory, which never
shrinks: with Docker's default 64 MB, 450 test databases made every query fail with "could not
resize shared memory segment".redis: addr: in its testing.yaml copy, next to its dsn.
ROUTER_REDIS_ADDR alone is not enough: the embedded testing.yaml wins over the
environment (config.go:691-697), so the suites would still use localhost:56379.model_router_<suite>_test_<slug>_test. Find an agent's databases with
datname LIKE '%\_<slug>\_test'.DROP DATABASE … WITH (FORCE)) and remove its
Redis.-p 1. Packages that run in parallel try to
create the same new database and fail with a duplicate key.acceleration/migrations/global and acceleration/migrations/shard, keep
their versions apart (goose_global_version, goose_shard_version), so slots are per set.origin/main.internal/store/repos.go, where the repositories
are wired. Keep both sides..claude/skills/sdk/notes/, and
the root CHANGELOG.md is written only at a release, except one breaking-change line under
# Unreleased. A branch from before that rule that still adds to the end of
.claude/skills/sdk/SKILL.md or other lines to the root CHANGELOG.md moves its note to a file and
drops those changelog lines.git rebase --continue, run git diff --check and grep for
<<<<<<<, ======= and >>>>>>>. Markers were committed twice by agents that skipped this.acceleration/api/openapi.yaml or the generated clients.
Take either side, regenerate them (see acceleration/README.md), and check the result with
.agents/skills/pr-review/scripts/generated.sh <repo root> origin/main.Integration (router) (.github/workflows/integration.yml)
runs each package in its matrix in its own job, on a PR that changes acceleration/** (not
only .md), go.work, go.work.sum or the workflow, once the PR is ready: a draft runs no
CI workflow, and gh pr ready starts it. Do not repeat those packages locally: run the suites
you touched, and read CI for the rest after the PR is marked ready.
imagerouter and dlc (AI-2040), and the Postgres packages
internal/campaign, internal/phone/outcome, internal/searchrouter and
internal/simulation. Run those by hand when you touch them, and list the runs in the PR.main. When it ran, wait for it to pass before you merge.
A check that did not run leaves nothing to wait for. A check skipping on a draft is not a
pass: it did not run.gh pr ready. Both events share one
concurrency group, so a draft run created after the ready run would cancel it.Authors may write in parallel. Reviews and merges run one PR at a time.
origin/main, not
the PR head alone. Two PRs built cleanly on their own and failed to compile together.git range-diff <old base>..<old head> origin/main..<new head> and checks its own findings.
A new finding in code the delta did not touch blocks the merge only if it is a Blocker.= commits plus commits
that change docs or tests. When Go code changed, the same reviewer checks the delta.Integration (router) check and run by hand
the suites it leaves out. The reviewer does not repeat either.MOmorluto/rea485k7,690 new stars in the last 7 days
MOmorluto/rea485k7,690 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
MAmattpocock/skills336k4,217 new stars in the last 7 days
Block dangerous git commands like push and reset --hard before they execute.
MAmattpocock/skills336k4,217 new stars in the last 7 days