CI was failing intermittently on AuthBDD scenarios due to test state pollution. ADR-0025 (per-scenario schema isolation) is fully implemented but opt-in via BDD_SCHEMA_ISOLATION=true. CI didn't set this flag.
Workflow #606 → FAIL on the SAME commit, AuthBDD/* scenarios
Different scenarios fail in each run = classic shared-state issue.
Fix
Single line added to .gitea/workflows/ci-cd.yaml: export BDD_SCHEMA_ISOLATION=true before the run-bdd-tests.sh invocation.
This activates the SetupScenarioSchema() / TeardownScenarioSchema() hooks already implemented in pkg/bdd/suite.go.
Out of scope
Making BDD_SCHEMA_ISOLATION the production default (separate decision)
Fixing other AuthBDD test fragilities not caused by state pollution
Test plan
Local BDD tests pass with and without the flag (this is just an env var change)
CI passes consistently after this PR (the validation)
Diagnosed during the 2026-05-03 autonomous trainer session.
## Summary
CI was failing intermittently on AuthBDD scenarios due to test state pollution. ADR-0025 (per-scenario schema isolation) is fully implemented but opt-in via `BDD_SCHEMA_ISOLATION=true`. CI didn't set this flag.
## Evidence of flakiness
- Workflow #605 → PASS on commit `0abc383`
- Workflow #606 → FAIL on the SAME commit, AuthBDD/* scenarios
Different scenarios fail in each run = classic shared-state issue.
## Fix
Single line added to `.gitea/workflows/ci-cd.yaml`:
`export BDD_SCHEMA_ISOLATION=true` before the `run-bdd-tests.sh` invocation.
This activates the `SetupScenarioSchema()` / `TeardownScenarioSchema()` hooks already implemented in `pkg/bdd/suite.go`.
## Out of scope
- Making BDD_SCHEMA_ISOLATION the production default (separate decision)
- Fixing other AuthBDD test fragilities not caused by state pollution
## Test plan
- [x] Local BDD tests pass with and without the flag (this is just an env var change)
- [ ] CI passes consistently after this PR (the validation)
Diagnosed during the 2026-05-03 autonomous trainer session.
ADR-0025 introduces per-scenario schema isolation via the BDD_SCHEMA_ISOLATION env
var. CI was running without this flag, causing scenarios to share the public
schema and pollute each other's state.
Observed flakiness: identical code passes in workflow run #605 and fails in #606
on TestAuthBDD/User_completes_password_reset, JWT_token_validation, etc.
Per ADR-0025 audit (PR #24): schema-per-scenario infrastructure is fully
implemented but disabled by default (opt-in). Enabling it in CI should resolve
the flakiness without code changes.
Diagnosed during the autonomous trainer day (2026-05-03) after observing #605
PASS / #606 FAIL on the same SHA.
🤖 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
CI was failing intermittently on AuthBDD scenarios due to test state pollution. ADR-0025 (per-scenario schema isolation) is fully implemented but opt-in via
BDD_SCHEMA_ISOLATION=true. CI didn't set this flag.Evidence of flakiness
0abc383Different scenarios fail in each run = classic shared-state issue.
Fix
Single line added to
.gitea/workflows/ci-cd.yaml:export BDD_SCHEMA_ISOLATION=truebefore therun-bdd-tests.shinvocation.This activates the
SetupScenarioSchema()/TeardownScenarioSchema()hooks already implemented inpkg/bdd/suite.go.Out of scope
Test plan
Diagnosed during the 2026-05-03 autonomous trainer session.