Files
tapir/docs/use-cases/connect_account.feature
T
mathiasandClaude Opus 4.8 a884e7e9c5
CI / Lint / Test / Vet (push) Successful in 12s
CI / Build & Import (push) Successful in 10s
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>
2026-06-08 22:59:25 +02:00

49 lines
1.9 KiB
Gherkin

Feature: Connect and manage video accounts
As a user
I want to connect my YouTube or Vimeo account and have my subscriptions tracked
So that Tapir watches the channels I already follow
Scenario: Connect a YouTube account
Given I have no connected video accounts
When I connect my YouTube account
Then the connection is stored with status "active"
And my refresh token is stored only as a secret reference
And my subscriptions are synced
@pending
# Vimeo connect is not built yet (provider label exists; no connect flow or test).
Scenario: Connect a Vimeo account
Given I have no connected video accounts
When I connect my Vimeo account
Then the connection is stored with status "active"
And my subscriptions are synced
Scenario: Tokens are never stored in the clear
When I connect any video account
Then no OAuth token value is stored in the database
And only an opaque secret reference is stored
Scenario: Revoking a connection stops watching but keeps history
Given I have a connected YouTube account with summaries
When I revoke the connection
Then the connection status becomes "revoked"
And no new videos are watched for that connection
And my existing summaries remain readable
@pending
# Per-provider BYO credential config is not built as a web flow yet (the summarizer
# supports a fallback endpoint, but there is no user-facing BYO setup + its test).
Scenario Outline: BYO AI credential is optional and per-provider
When I configure a BYO provider "<provider>"
Then the credential is stored only as a secret reference
And it is used only as the fallback when local AI fails
Examples:
| provider |
| anthropic |
| openai |
| gemini |
# Stage 1 (Future B): connecting a new user's account requires no code change.
# Isolation: a user can only ever see and manage their own connections.