Skip to content

docs: record BRAIN-010 and warn that the Pest gate wipes the dev database - #11

Merged
LuanTrindade95 merged 1 commit into
mainfrom
docs/c3-closing-lessons
Sep 23, 2026
Merged

LuanTrindade95 merged 1 commit into
mainfrom
docs/c3-closing-lessons

Conversation

@LuanTrindade95

Copy link
Copy Markdown
Owner

Closing documentation for C3 (F-008), recording what the task taught about working in this repository.

BRAIN-010 — main moves while a task runs

Several sessions merge into main during a single task, so anything shared across branches is read late and verified states are claimed late:

  • ADR and BRAIN-NNN numbers are read from origin/main immediately before writing, never reserved at the start. The CSP ADR moved from 26 to 29 to 30 during C3 because parallel sessions took those numbers first.
  • A branch is rebased onto origin/main and re-gated before publishing; approval on an earlier base does not carry over on its own.
  • git fetch again before opening and before merging a pull request.
  • Re-read brain//docs/ files on the current base before the closing edit.

Gate set warning: Pest wipes the development database

Feature tests use RefreshDatabase and the suite runs against commandsphere, because backend/phpunit.xml keeps its database overrides commented out and there is no backend/.env.testing. The warning now sits directly under the backend gate commands, where it gets read: run data-dependent gates (E2E above all) before Pest, and reseed afterwards. CI is unaffected — it sets DB_DATABASE=commandsphere_test.

This emptied the development database twice during C3 and blocked the independent E2E measurement on the first attempt. The structural fix is already tracked as the first backlog item in NEXT_ACTIONS.md.

Documentation only; no product code touched.

🤖 Generated with Claude Code

…base

BRAIN-010: several sessions merge into main during a task, so ADR and
BRAIN numbers are read from origin/main at write time, a branch is
rebased and re-gated before publishing, and the state that ships is the
state that was verified.

Warn in the gate set that Pest runs against commandsphere with
RefreshDatabase, so data-dependent gates run before it and the database
is reseeded afterwards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@LuanTrindade95
LuanTrindade95 merged commit 0f07c74 into main Sep 23, 2026
4 checks passed
@LuanTrindade95
LuanTrindade95 deleted the docs/c3-closing-lessons branch September 23, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant