test(bdd): add scenario name-coverage gate (no godog)
Close the gap where docs/use-cases/*.feature claimed to be the behavior spec but nothing executed them — so scenarios drifted (the stale "auto summarizes every new video" and "manual is the default" were proof). Decision (per issue #5 BDD-runner fork): no godog — keep .feature as design records, add a cheap name-coverage gate instead. TestScenarioCoverage parses every scenario and asserts each non-@pending one maps to an existing Go test in the scenarioCoverage manifest; it flags unmapped scenarios, missing/renamed tests, and stale entries. It checks the link, not that the test exercises the scenario (the deliberate trade for skipping godog). Also: - Fix the stale ADR-018 drift: "Manual is the default" -> auto is the default for new users; added an explicit default scenario + a plain manual scenario. - Tag 4 documented-but-unbuilt/untested scenarios @pending with reasons (Vimeo connect, BYO config flow, logout->welcome, re-register-after-delete) so they are tracked without a false coverage claim. - CLAUDE.md BDD section now describes the real setup (design records + the gate + @pending convention) instead of claiming an executable spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -60,8 +60,14 @@ These caused real mistakes that were caught and corrected; the corrections are l
|
||||
stores, and sinks are adapters. Adding a video provider or a sink = a new adapter implementing
|
||||
the interface, nothing in the engine changes. This is what keeps "standalone vs homelab" a
|
||||
wiring choice (ADR-003).
|
||||
- **BDD.** The `docs/use-cases/*.feature` files are the behavior spec. New behavior gets a
|
||||
scenario; the use-case core is tested through fake adapters, not live YouTube/brain.
|
||||
- **BDD.** The `docs/use-cases/*.feature` files are the behavior spec (design records — there is
|
||||
no godog runner). New behavior gets a scenario; the use-case core is tested through fake
|
||||
adapters, not live YouTube/brain. A name-coverage gate (`test/acceptance/scenario_coverage_test.go`,
|
||||
`TestScenarioCoverage`) keeps the two from drifting: every non-`@pending` scenario must be
|
||||
mapped to an existing Go test in `scenarioCoverage`. When you add a scenario, either map it to
|
||||
its covering test or tag it `@pending` in the `.feature` with a one-line reason. It checks the
|
||||
*link*, not that the test exercises the scenario — that's the deliberate trade for not running
|
||||
godog (see issue #5 / the BDD-runner decision).
|
||||
|
||||
## Skills (engineering discipline)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user