Repository navigation
v0.2.1
Skill and documentation release. No behaviour change in the CLI itself.
Why this exists
Running a Rails test suite against a branch can destroy the real data the
branch was created to provide. One agent lost a branch's data to
db:schema:load; another came within one command of deleting ~18,500 rows and
stopped only because it checked first. The pgrun-branching skill said nothing
about any of it, so every agent had to rediscover it the hard way.
What the skill now warns about
fixtures :alltruncates every fixture table before the first test runs.
Branch roles are superusers, so foreign keys do not even slow it down.maintain_test_schema!purges and reloads the schema when
schema_migrationslooks stale. This is what destroys a branch outright.
Setconfig.active_record.maintain_test_schema = falsefor the run.- Parallel testing creates extra databases on the branch instance.
parallelize(workers: :number_of_processors)makes<db>-0,<db>-1, … and
loadsschema.rbinto each. UsePARALLEL_WORKERS=1.
None of that is a pgrun defect. It is Rails behaving normally against a
database that happens to hold real rows. The skill now says so, tells the agent
to surface the trade-off rather than decide alone, and states plainly that an
empty schema_migrations means a faulty branch to replace, never something to
repair by loading the schema.
Also
branch url prints DATABASE_URL=<url>, not a bare URL. The skill now shows
how to capture just the value, and points at pgrun branch exec as the better
path where it fits.
Existing installs: re-run pgrun skill install to pick up the new skill.