54 lines
4.9 KiB
Markdown
54 lines
4.9 KiB
Markdown
---
|
||
runScope: 'epic-level'
|
||
runKey: 'epic-4'
|
||
workflowStatus: 'completed'
|
||
totalSteps: 5
|
||
stepsCompleted: ['step-01-detect-mode', 'step-02-load-context', 'step-03-risk-and-testability', 'step-04-coverage-plan', 'step-05-generate-output']
|
||
lastStep: 'step-05-generate-output'
|
||
nextStep: ''
|
||
inputDocuments:
|
||
- '_bmad-output/planning-artifacts/epics.md'
|
||
- '_bmad-output/test-artifacts/test-design-architecture.md'
|
||
- '_bmad-output/test-artifacts/test-design-qa.md'
|
||
- '_bmad-output/planning-artifacts/prds/prd-crank-2026-08-03/prd.md'
|
||
- '_bmad-output/planning-artifacts/architecture/architecture-crank-2026-08-03/ARCHITECTURE-SPINE.md'
|
||
- '_bmad/tea/config.yaml'
|
||
lastSaved: '2026-09-13'
|
||
---
|
||
|
||
# Epic 4 test design progress
|
||
|
||
Output: test-design-epic-4.md. Completed 2026-09-13. Story/requirement/AC-count coverage, source references, risk scores and format validated. Template adapted to existing-project inventory: counts are scenario seeds, estimates are provisional QA deltas, no synthetic code-coverage or execution claim. Native loop ATDD is post-dev; pre-implementation customization is a separate pending approval, not executed by this design run.
|
||
|
||
## Coverage decisions
|
||
|
||
10 story families, two independently assertable scenario seeds per family (A positive contract; B rejection/fault). Former 4.5 splits into input (4.5) and reconciliation (4.6); former Admin UI splits into basic Task UI (4.8) and input/reconciliation UI (4.9). All owning-story Given/When/Then groups remain required ATDD input; these are not a claim of exhaustive implemented test cases.
|
||
|
||
Scope: FR-21–FR-26; system families CP-12..15. Lowest effective level assigned per family. P0 security/data integrity with no workaround; P1 user/core flow. No speculative mandatory P2/P3 additions.
|
||
|
||
Source reuse: `crates/crank-runtime/tests/{stages,product_metrics}.rs`, `crates/crank-runtime/tests/integration/{idempotency,confirmation,valkey}.rs`, `crates/crank-test-support/src/lib.rs` supply synchronous safety and real-PG fixture patterns.
|
||
|
||
Gaps: No durable Task/worker/admission lifecycle tests found in main. tokio::task usage is not MCP Tasks coverage. All story-specific Task acceptance scenarios are planned. Existing synchronous idempotency and approval tests must remain regression coverage, not be rewritten to make unsafe Task behavior pass.
|
||
|
||
NFR: 128 concurrent sync/background executions, up to 10,000 queued; start and steady queue wait p95 ≤5 s within service rate, oldest age ≤30 s; 10k backlog drains ≤60 minutes after overload ends. Shutdown ≤30 s and eligible lease recovery ≤60 s. Fencing protects Crank state, not exactly-once external side effects.
|
||
|
||
Fixtures: Real PG independent worker connections; controllable clock/barriers and crash checkpoints before/after commit, claim, dispatch, side effect and terminal commit; counted upstream with and without verified idempotency; Valkey-off fixture; separate measured capacity host.
|
||
|
||
Execution: PR functional tests, nightly bounded expensive/fault work, weekly calibrated qualifications; scheduled tiers are planned, not configured. Mandatory story ACs still must pass before acceptance, regardless of tier. 72h/30day release windows only in Epic8. QA effort assumption with prerequisite implementation ready: P0 64–128h; P1 20–40h; optional P2 0–8h/P3 0–4h; total 84–180h (~3–5 contributor-weeks). Not a backlog of compulsory new tests; refine against existing-test reuse during ATDD.
|
||
|
||
|
||
## Risks and NFR planning
|
||
|
||
| Risk | Category | Failure | P | I | Score | System risk | Mitigation / owner / deadline |
|
||
|---|---|---|---:|---:|---:|---|---|
|
||
| E4-R1 | DATA | Stale lease or retry duplicates an external side effect | 3 | 3 | 9 | R-003 | Fencing + side-effect counters + unknown outcomes; Task owner, 4.3–4.6 |
|
||
| E4-R2 | PERF | Admission/queue exhaustion starves control plane | 3 | 3 | 9 | R-006 | Limits/fairness/recovery under load; Performance, 4.10 |
|
||
| E4-R3 | SEC | Cross-scope Task control or resume bypasses consent | 2 | 3 | 6 | R-004 | Owner-bound cancel/input/reconciliation; Security, 4.5–4.9 |
|
||
|
||
Scores describe inherent risk, not observed failures or a release verdict. Security/reliability/performance thresholds inherit the system design and owning story ACs; missing environment/measurement evidence remains explicit, never inferred PASS.
|
||
|
||
|
||
Context: Rust/PostgreSQL + browser JavaScript fullstack. Existing test source inventory at main 083974c; f8ee7c9 candidate is separate. Browser CLI absent; no live exploration, no fabricated evidence. Playwright/Pact utility flags are intentions only: packages absent; no library migration or Pact scaffolding in this planning scope. Required risk, probability/impact, test levels/priorities and NFR knowledge loaded; concrete source reuse and gaps appear in the epic plan.
|
||
|
||
Explicit batch request, independent epic scope. Requirements and acceptance criteria: planning-artifacts/epics.md, Epic 4. System designs already updated; no product implementation or test execution authorized by this planning run.
|