179 lines
17 KiB
Markdown
179 lines
17 KiB
Markdown
---
|
||
runScope: 'epic-level'
|
||
runKey: 'epic-8'
|
||
workflowStatus: 'completed'
|
||
workflowType: 'testarch-test-design'
|
||
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: ''
|
||
lastSaved: '2026-09-13'
|
||
auditedRevision: '083974c27f3a21a15807dd248bb6bc4fe04a5cd8'
|
||
inputDocuments:
|
||
- '_bmad-output/planning-artifacts/epics.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-output/test-artifacts/test-design-architecture.md'
|
||
- '_bmad-output/test-artifacts/test-design-qa.md'
|
||
---
|
||
|
||
# Test Design: Epic 8 — Доказанный production-релиз
|
||
|
||
**Date:** 2026-09-13
|
||
**Author:** Bsodfather / BMad TEA
|
||
**Status:** Updated planning baseline; qualification not evaluated.
|
||
|
||
## Executive Summary
|
||
|
||
Scope: FR-46–FR-54, 10 stories, system scenario families CP-28..34. This plan refines the current system design; it neither changes approved product scope nor marks stories complete.
|
||
|
||
3 inherent risks, 3 high (score ≥6). Coverage seeds: 16 P0 and 4 P1 independently assertable scenarios. Counts describe the two seeds per story below, not implemented tests, coverage percentages or the eventual parameterized case count. Every source AC remains mandatory.
|
||
|
||
## Existing Coverage and Evidence
|
||
|
||
Source inventory at main `083974c`: `docs/capability-inventory.json`; `docs/capability-baseline/results.json`; `scripts/collect-capability-baseline.py`; `scripts/validate-capability-run.py`; `tests/unit/`; `.gitea/workflows/{ci,release}.yml`; `scripts/scan-images.sh`; `docs/manual-regression-checklist.md`.
|
||
|
||
Existing inventory/collector and CI scans are foundations, not full signed RC evidence. Historical baseline2026.08.24.1 uses revision767428, not current main. Chromium-only current suite is not Firefox/WebKit×RU/EN qualification. No measured coverage report,72h/30day accepted run or3PITR restores was produced by this planning task.
|
||
|
||
Source presence ≠ execution ≠ requirement coverage ≠ qualification. No product test, deployment or load execution was performed for this plan. Reuse source tests only after matching their oracle to the current AC and recording a run on the candidate under test.
|
||
|
||
## Not in Scope
|
||
|
||
| Item | Reason | Mitigation |
|
||
|---|---|---|
|
||
| Unrelated future-epic implementation and whole-product refactoring | This is Epic 8 test planning | Keep explicit prerequisites below; do not invent additional story acceptance |
|
||
| SSO/RBAC enterprise features, non-REST adapters, HA/rolling deployment | Outside approved Community scope | Preserve Community boundary checks |
|
||
| Declaring current production readiness from source inventory | No bound qualification run | Require real evidence before gate |
|
||
|
||
## Risk Assessment
|
||
|
||
Score = probability × impact on a 1–3 scale. Score ≥6 needs verified mitigation; 9 is an unresolved critical release risk, not a command to implement every mitigation immediately. Categories: SEC security, DATA integrity, OPS operations, PERF performance, BUS user behavior, TECH architecture/testing.
|
||
|
||
| Risk ID | Category | Failure | P | I | Score | System risk | Mitigation / accountable role / deadline |
|
||
|---|---|---|---:|---:|---:|---|---|
|
||
| E8-R1 | OPS | Mixed/stale/forged evidence produces PUBLIC_READY | 3 | 3 | 9 | R-013 | Offline signed verifier with negative fixture per gate input; Release, 8.1/8.10 |
|
||
| E8-R2 | OPS | Leaks/recovery failures appear only after sustained traffic | 2 | 3 | 6 | R-015 | 72h + 30 calendar days fixed RC; SRE, 8.6/8.9 |
|
||
| E8-R3 | SEC | Incomplete matrix/security/manual pass hides unsafe claims | 2 | 3 | 6 | R-014 | Full qualified cells + zero mandatory skips; QA/Security, 8.3/8.4/8.7 |
|
||
|
||
Medium risks: shared R-012 (4), deterministic test isolation; QA owns continuous monitoring. No additional low risk is invented just to fill a template. Residual risk is unmeasured until evidence exists.
|
||
|
||
## NFR Planning
|
||
|
||
Inherit every PRD/system quantitative gate: full P0 and mandatory P1/manual pass, zero mandatory flakes and Critical/High; 3performance runs;72h then30calendar days≥1M eligible events on exact RC, no acceleration/stitching. Reference dataset2kOperations/200Agents/500keys/1Mhistory; UI≤2sp95. MCP stable window and exact tool/browser/image/scanner versions freeze at execution, not invented now.
|
||
|
||
| Category | Scenario linkage | Planned validation / evidence |
|
||
|---|---|---|
|
||
| Security/privacy | SEC risks and B scenarios below | Scope/abuse/canary tests, bounded sanitized logs and network/scan report |
|
||
| Reliability/data integrity | DATA/OPS risks and fault scenarios | Real authority/state assertions, fault schedule and reconciled counters/digests |
|
||
| Performance/scalability | Numeric epic obligations above | Calibrated raw latency/resource samples, achieved load and immutable config/topology fingerprint |
|
||
| Maintainability/compatibility | Every changed component | Existing `just verify`/UI gates as applicable, schema/contract diffs and traceable regression reports |
|
||
|
||
Unknowns: exact execution hardware and fresh qualification artifacts are not available from this audit. Where the owning story requires a new tolerance, limit or version selection, freeze it in its approved contract before writing a numeric assertion; never replace the PRD threshold with a guessed easier value. Full NFR verdict belongs to `bmad-testarch-nfr` after execution.
|
||
|
||
## Entry Criteria
|
||
|
||
- Approved owning story/spec and prerequisites are available in the same worktree.
|
||
- ATDD loads the actual ACs from `epics.md` / selected spec and the system QA design.
|
||
- Existing tests and baseline failures are inspected before adding tests; no duplicate test suite solely for new IDs.
|
||
- Content-addressed valid and one-fault-per-input signed manifests with disposable test trust root; immutable RC environment with calibrated load/fault schedule; actual fresh-user/manual reviewers; sanitized raw reports and logs plus independent timestamps. External qualification owners must return accepted, candidate-bound evidence for manual, soak, documentation and burn-in handoffs; a requested or planned handoff is not completion. Synthetic verifier fixtures never count as production qualification.
|
||
- Missing fixture, service or approval is reported as blocked/not-run, not silently skipped.
|
||
|
||
## Test Coverage Plan
|
||
|
||
P0/P1/P2/P3 indicate priority, **not execution timing**. Each table row has two separate scenario seeds: `<Story>-<Level>-A` and `...-B`. Split a seed when independent assertions require different fixtures. Reuse an existing equivalent test rather than duplicating it; ATDD records exact test name/path and AC mapping.
|
||
|
||
The AC-count column inventories all `Given` groups under that source story, not a claim that two tests exhaust those groups. ATDD must map each group (story + ordinal + quoted acceptance text) to existing test, new test, or explicit not-run prerequisite before implementation. The approved spec controls finer-grained cases.
|
||
|
||
### P0 — Critical
|
||
|
||
Security, irreversible data integrity and false acceptance have no safe user workaround.
|
||
|
||
| Story / scenario IDs | Requirements | AC groups | Primary level | Risk | A: expected behavior | B: rejection / fault |
|
||
|---|---|---:|---|---|---|---|
|
||
| 8.1 / 8.1-UNIT-A,B | FR-52 | 7 | UNIT | E8-R1 | Offline verifier binds one RC/source/image/config/workload to signed complete evidence and current trust state | Unknown/revoked key, forged/stale/missing/conflicting digest/time/status and trust rollback reject |
|
||
| 8.2 / 8.2-INT-A,B | FR-46 | 6 | INT | E8-R1/E8-R3 | Every supported capability maps to mandatory CI/manual evidence; exact command/version/seed/duration retained | Absent services, skipped/flaky/retried tests or deferred stable capability cannot normalize to pass |
|
||
| 8.4 / 8.4-SYS-A,B | FR-48 | 6 | SYS | E8-R3 | Pinned MCP revisions×≥3clients,≥50OpenAPI corpus and PG16/Valkey8/PG-only/browser matrix qualify | Missing/failed/stale cells block claims; experimental never substitutes stable and unsupported constructs never disappear |
|
||
| 8.5 / 8.5-SYS-A,B | FR-49 | 6 | SYS | E8-R2 | Three consecutive calibrated runs on fixed RC/dataset prove exact performance envelope | Generator saturation/config drift/telemetry gaps invalidate run; >10% regression needs recorded disposition |
|
||
| 8.6 / 8.6-SYS-A,B | FR-49 | 6 | SYS | E8-R2 | Continuous72h prescribed mix with fault/recovery schedule shows bounded growth and consistent accounting, then external qualification accepts the candidate-bound run evidence | Partition/DB/cache/telemetry/disk faults obey safety contracts; integrity interruption cannot stitch partial durations; a planned or unaccepted handoff is not done |
|
||
| 8.7 / 8.7-SYS-A,B | FR-50 | 6 | SYS | E8-R3 | Threat→control→test evidence and fresh pinned source/dependency/image/secret/license scans cover final surface | SSRF/bombs/scope/fencing/load-plan and full-output canaries reject abuse; no unresolved Critical/High |
|
||
| 8.9 / 8.9-SYS-A,B | FR-49, FR-53 | 7 | SYS | E8-R1/E8-R2 | Same RC completes30calendar days and≥1M eligible events; external qualification accepts the evidence and honest readiness page binds accepted results | Digest/environment integrity change resets window; a planned restart is not continuity evidence; probes excluded; loss/hidden issues or an unaccepted handoff block publication |
|
||
| 8.10 / 8.10-UNIT-A,B | FR-54 | 7 | UNIT | E8-R1 | Complete signed fixtures yield PUBLIC_READY only for matching immutable manifest/bundle/readiness digests | Each missing/stale/tampered/failing mandatory input blocks; FR54 cannot prove itself; no mandatory waiver path |
|
||
|
||
### P1 — High
|
||
|
||
Core user journeys and complex integrations; limited workaround, not relaxed acceptance.
|
||
|
||
| Story / scenario IDs | Requirements | AC groups | Primary level | Risk | A: expected behavior | B: rejection / fault |
|
||
|---|---|---:|---|---|---|---|
|
||
| 8.3 / 8.3-MANUAL-A,B | FR-47 | 6 | MANUAL | E8-R3 | Named external qualification reviewer completes all versioned RU/EN core and recovery flows against same RC and returns accepted evidence | Validation/error/permission/confirmation/retry states checked; a planned/rejected/missing handoff is not done; defect fix invalidates affected evidence and creates new RC |
|
||
| 8.8 / 8.8-MANUAL-A,B | FR-51 | 6 | MANUAL | E8-R3 | Fresh external qualification user follows only shipped online/offline docs to MCP call, trace and backup/restore and returns accepted evidence | Broken commands/config/links or unavailable external dashboard must not hide recovery/runbook instructions; a planned/rejected/missing handoff is not done |
|
||
|
||
### P2 / P3
|
||
|
||
No additional mandatory scope. Optional focused exploratory/cosmetic variants may be recorded later with owner and justification; they do not become an endless implementation/review queue.
|
||
|
||
Levels: UNIT pure contract/model; INT real filesystem/database/runtime boundary; API actual handler/protocol; E2E critical browser journey; SYS isolated full-stack qualification; MANUAL named human protocol. Use unit cases for algorithms, real PG for transaction/fencing, wire fixtures for protocol, browser only for user-visible interaction. Intentional defense-in-depth checks different failure surfaces, not identical duplicated assertions.
|
||
|
||
## Execution Strategy
|
||
|
||
Run all functional tests in PRs when they fit the target 15-minute feedback window; defer only expensive infrastructure/duration, not inconvenient failures. Current Playwright is Chromium, one worker: parallelization is a future isolation-dependent optimization, not a current claim.
|
||
|
||
- **PR:** changed functional/negative regressions and boundary suites; applicable Rust/tooling/config and UI gates.
|
||
- **Nightly:** bounded fault/contention, repeated isolation and resource trend tests after the required seams exist.
|
||
- **Weekly:** calibrated production-size performance, fresh-host/offline/recovery and manual qualification as applicable.
|
||
- **Epic / RC acceptance:** every mandatory AC and quantitative obligation must have exact-candidate evidence, even if its normal execution tier is weekly. Epic 8 owns the immutable long-duration release windows.
|
||
|
||
Nightly/weekly scheduling is a proposed execution model; the current Gitea pipeline has PR/push and release jobs, not those schedules. This planning task does not create them. `just verify` does not replace Playwright, deployment/image or qualification jobs.
|
||
|
||
## Resource Estimates
|
||
|
||
Incremental QA test/evidence effort with working production seams and reusable fixtures, excluding feature implementation, provisioning lead time and unaccelerated duration. Low-confidence planning ranges, not token budgets or compulsory numbers of new tests; reassess at each story ATDD after deduplication.
|
||
|
||
| Priority | Estimated effort |
|
||
|---|---|
|
||
| P0 | 48–96 hours |
|
||
| P1 | 24–48 hours |
|
||
| Optional P2 | 0–8 hours |
|
||
| Optional P3 | 0–4 hours |
|
||
| Total envelope | 72–156 hours, approximately 2–5 contributor-weeks |
|
||
|
||
The 72-hour soak and subsequent 30 calendar days of burn-in are additional elapsed time and cannot be compressed into the effort estimate.
|
||
|
||
## Exit Criteria and Quality Gates
|
||
|
||
- P0 pass 100%; P1 ≥95% is an interim development signal only, **100% of mandatory P1 and manual ACs must pass for acceptance**.
|
||
- Every owning-story AC has test/protocol plus bound execution evidence; no mandatory skipped/flaky/blocked/not-run item becomes pass.
|
||
- No unresolved Critical/High defect; high-risk mitigation verified on the owning scenario before release. Mandatory Habr conditions have no waiver.
|
||
- Coverage targets remain system planning goals (80% workspace /90% new critical code where measured); **no coverage report currently proves them**. Scenario counts do not substitute for coverage instrumentation.
|
||
- NFR evidence names revision, config/topology, tool/data versions, command, seed, timestamps, raw sanitized output digest and result.
|
||
- Story completion follows its spec, not all remaining epic/system gaps; no automatic reopening of done stories.
|
||
|
||
## Mitigation Plans
|
||
|
||
Each high-risk owner in the matrix: (1) implement/reuse the production-safe seam; (2) run its A/B and detailed AC cases with controlled failures; (3) bind the output to the candidate; (4) re-evaluate residual risk. Status is planned or source-partial, never verified solely by this document. Required completion time is the owning story/epic milestone in the risk table. No generic follow-up review loop is created.
|
||
|
||
## Assumptions and Dependencies
|
||
|
||
Epics1–7 functionality and component evidence →8.1RC/evidence contract →8.2/8.3/8.4 quality→8.5performance→8.6soak→8.9burn-in→8.10publication; security/docs qualify same RC before gate. 8.3/8.6/8.8/8.9 require an explicit external-qualification handoff with accepted candidate-bound evidence. A blocking defect requires new RC and applicable resets. A planned product restart is operational maintenance; it does not establish qualification continuity, and an integrity-changing restart resets the 8.9 burn-in window.
|
||
|
||
Accountable roles are responsibilities, not claims of staffed teams. Reference hardware, operator credentials and manual reviewers must be assigned before relevant qualification. Use disposable fixtures while waiting; lack of resources blocks the affected evidence, not permission to mutate a live deployment.
|
||
|
||
## Interworking and Regression
|
||
|
||
Affected components and reusable suites are named in Existing Coverage. Preserve existing REST→MCP, auth/credential/approval, config/migration, correlation and Community-boundary behavior whenever those shared contracts change. Frontend failures need actual browser regression; registry races need real-PG assertions, not UI mocks.
|
||
|
||
## ATDD Handoff
|
||
|
||
For the selected not-yet-implemented story only, load this plan and the exact approved spec; freeze its finite AC-to-test checklist before implementation. Prefer existing Rust/PG/Playwright patterns, add only uncovered acceptance scenarios and reproduce RED for missing behavior without artificial failure. Existing correct behavior may already be GREEN: record it honestly. Resume matching incomplete ATDD, reuse completed matching checklists and update only changed ACs. Do not invoke whole-epic automation on each review.
|
||
|
||
Automatic pre-implementation ATDD requires the project build-auto handoff override; the stock bmad-loop0.11.1 TEA ATDD injection is post-dev and is not that sequence. Loop configuration is separate from completion of this plan. The design workflow itself does not run ATDD or product implementation.
|
||
|
||
## References and Validation
|
||
|
||
- Epic/AC source: `_bmad-output/planning-artifacts/epics.md`, Epic 8.
|
||
- System contract: [architecture](test-design-architecture.md), [QA inventory and execution](test-design-qa.md).
|
||
- Normative PRD and architecture spine: frontmatter inputDocuments.
|
||
- TEA knowledge: risk-governance, probability-impact, test-levels-framework, test-priorities-matrix, nfr-criteria.
|
||
- Utility integration: Playwright/Pact flags are true but packages absent. No imports, framework migration or Pact service are generated. Browser CLI unavailable; source-based design only.
|
||
- Validation: story IDs/requirements/AC counts, risk arithmetic/linkage and document paths checked; no final test/NFR PASS issued. Approval is planning-level user direction, not fabricated reviewer signatures.
|