Skip to content

Ignore the test database and record the abstention trap - #241

Merged
silverbackdan merged 1 commit into
mainfrom
chore/gitignore-test-db
Sep 21, 2026
Merged

silverbackdan merged 1 commit into
mainfrom
chore/gitignore-test-db

Conversation

@silverbackdan

Copy link
Copy Markdown
Collaborator

Two pieces of housekeeping, neither touching behaviour.

tests/Functional/app/db.sqlite was not ignored

It is created by the test setup this repo documents:

php tests/Functional/app/bin/console -e test doctrine:database:create

So anyone following the README ends up with an untracked binary in their working tree, and a git add -A commits it. It has never been committed, which is luck rather than design — it came close twice today, and both times only because workers were told to stage explicitly.

Abstention has caused four bugs, and they are one rule

Each was recorded separately as its own war story. They are the same mistake:

Consolidated into a Working Principles entry, because the pattern is what generalises, not the four instances:

Abstention is a decision, not a neutral one. Before relying on a voter, state what happens when it abstains and write the scenario that pins it. supports() returning false is abstention, not denial — the most common way to get this wrong is to put a configuration check there.

Two of those four bit this week. Recording it as a rule rather than as history is the point.

🤖 Generated with Claude Code

The sqlite database created by the documented test setup was untracked and
uncovered by .gitignore, so following the setup commands left a binary in
the working tree that a staging sweep would commit.

Abstention has caused four separate access-control bugs, each recorded
separately and each found by accident. They are one rule: what abstention
means is decided by the access-decision strategy, not by the voter, and
a configuration check in supports() is abstention rather than denial.
@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.81%. Comparing base (12d5f2f) to head (8240323).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #241   +/-   ##
=========================================
  Coverage     87.81%   87.81%           
  Complexity     2665     2665           
=========================================
  Files           258      258           
  Lines          7730     7730           
=========================================
  Hits           6788     6788           
  Misses          942      942           
Flag Coverage Δ
behat 68.84% <ø> (ø)
phpunit 35.09% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@silverbackdan
silverbackdan merged commit 20aabaf into main Sep 21, 2026
12 of 13 checks passed
@silverbackdan
silverbackdan deleted the chore/gitignore-test-db branch September 21, 2026 14:06
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