19 KiB
runScope, runKey, workflowStatus, workflowType, totalSteps, stepsCompleted, lastStep, nextStep, lastSaved, auditedRevision, inputDocuments
| runScope | runKey | workflowStatus | workflowType | totalSteps | stepsCompleted | lastStep | nextStep | lastSaved | auditedRevision | inputDocuments | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| epic-level | epic-3 | completed | testarch-test-design | 5 |
|
step-05-generate-output | 2026-09-13 | 083974c27f |
|
Test Design: Epic 3 — Полноценный современный MCP-каталог
Date: 2026-09-13
Author: Bsodfather / BMad TEA
Status: Updated planning baseline; qualification not evaluated.
Executive Summary
Scope: FR-13–FR-20, 20 stories, system scenario families CP-08..11. This plan reflects the approved numbering revision; it neither changes product scope nor marks stories complete.
3 inherent risks, 3 high (score ≥6). Coverage seeds: 26 P0 and 14 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: crates/crank-community-mcp/tests/unit/{manifest,session,tool_error}.rs; apps/mcp-server/tests/integration/{transport_protocol,catalog_access,tool_search,execution_stages}.rs; apps/ui/tests/e2e/onboarding.spec.js.
Existing tests cover baseline Tools, transport, catalog and runtime only. Resources/Prompts/modern adapter matrix are planned; no feature-level tests were found in main. Do not confuse MCP client-library behavior with implementation evidence. Tasks cells are completed by Story 4.7; 3.20 must mark them pending rather than falsely PASS.
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 3 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 |
| Product-wide 72-hour soak / 30-day burn-in | Owned by Epic 8 | Component fault/performance obligations in this epic remain required |
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 |
|---|---|---|---|---|---|---|---|
| E3-R1 | BUS | Advertised capabilities or version behavior disagree | 2 | 3 | 6 | R-009 | Revision/client matrix and wire errors; MCP owner, 3.20 |
| E3-R2 | SEC | Resource/Prompt scope or REST expansion leaks data | 3 | 3 | 9 | R-004 | Negative authorization + SSRF + redaction; Security, 3.8/3.11/3.16 |
| E3-R3 | DATA | Mutable catalog or stale cursor serves wrong published version | 2 | 3 | 6 | R-009 | Snapshot/revoke races; Registry/MCP, publication stories |
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
Discovery p95 ≤150 ms on 2,000 Operations/200 Agents; zero unauthorized metadata/content reads. Pin stable/N-1/N-2 and ≥3 clients at feature freeze. The 2026-07-28 wire shapes named in epics.md are planning inputs, not a newly verified claim about latest MCP; verify official specifications/digests before adapter ATDD, preserving legacy deprecation gate.
| 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.
- Wire fixtures per protocol era; scope-separated Agent catalogs; text/JSON/binary hostile resources; exact-version graphs; capture upstream; clock/cancellation barriers; browser keyboard and RU/EN fixtures.
- 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. The approved splits preserve source ACs: 3.4 owns former 3.4 groups 1–4 and part of 7; 3.5 owns 5, 6 and the remaining signal part of 7. Former Prompt groups distribute as 3.12 (1–3 plus Draft/preview portions), 3.13 (4–5 plus publish/binding portions), 3.14 (6–8 plus list/get portion) and 3.15 (9 plus portability UI portion). Former 3.13 groups distribute as 3.17 (1 plus completion portions), 3.18 (2 plus logging portions), and 3.19 (3–4 plus Resource/Prompt-signal portions). 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 |
|---|---|---|---|---|---|---|
| 3.1 / 3.1-API-A,B | FR-13 | 14 | API | E3-R1 | Separate stateless server/discover and legacy initialize/session adapters according to pinned requirements | Malformed/mixed-era identity, disabled extension and unsupported revision never silently route to another adapter |
| 3.3 / 3.3-API-A,B | FR-14 | 7 | API | E3-R1/E3-R2 | tools/call validates exact schema and returns revision-correct structured outcomes | Invalid input/auth/approval failures perform no dispatch; upstream outcomes remain honest |
| 3.6 / 3.6-INT-A,B | FR-15, FR-16 | 8 | INT | E3-R2 | Typed text/JSON/binary Resource Draft stores verified immutable content reference | Oversize/corrupt content and unsafe HTML/SVG preview cannot execute or leak |
| 3.7 / 3.7-INT-A,B | FR-15, FR-16 | 6 | INT | E3-R3 | Publishing and Agent binding pin Resource Version/catalog revision | Concurrent edit/archive/publish and stale Agent revision cannot mutate a published snapshot |
| 3.8 / 3.8-API-A,B | FR-15, FR-16 | 5 | API | E3-R2/E3-R3 | resources/list/read returns bound content with correct MIME/binary shape | Authorization precedes content read; foreign/revoked/unpublished versions and stale cursor denied |
| 3.10 / 3.10-UNIT-A,B | FR-16 | 6 | UNIT | E3-R2 | REST-backed template binds exact read-only Published Operation and typed URI variables | Write/approval-dependent operation, host/path injection and invalid cache scope rejected |
| 3.11 / 3.11-INT-A,B | FR-16 | 11 | INT | E3-R2/E3-R3 | Resource read uses shared runtime/auth/cache/REST adapter and correct content conversion | Traversal/SSRF/credential revocation or dependency change fails safely without cross-scope cache reuse |
| 3.12 / 3.12-API-A,B | FR-17 | 5 | API | E3-R2/E3-R3 | Prompt Draft and preview preserve typed parameters and fixed role boundaries before publication | Invalid args, unsafe preview and foreign Draft access produce no partial render or leaked output |
| 3.13 / 3.13-INT-A,B | FR-17 | 4 | INT | E3-R2/E3-R3 | Prompt publication and Agent binding pin an immutable typed revision | Concurrent edit/archive/publish and stale Agent revision cannot mutate a published prompt |
| 3.14 / 3.14-API-A,B | FR-17 | 4 | API | E3-R2/E3-R3 | prompts/list and prompts/get expose only exact bound Published revisions | Foreign/archive/revocation, bad arguments and stale cursor cannot reveal or partially render content |
| 3.16 / 3.16-INT-A,B | FR-18 | 10 | INT | E3-R2/E3-R3 | Prompt composition pins Resource graph and propagates sensitivity | Cycles, delimiter/role injection and dynamic resource failure cannot yield leaked/partial output |
| 3.20 / 3.20-INT-A,B | FR-20 | 9 | INT | E3-R1 | Executable matrix maps each stable capability to exact adapter and ≥3 representative clients | Deferred stable cell/missing evidence blocks claim; experimental cells isolated and disabled path preserved |
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 |
|---|---|---|---|---|---|---|
| 3.2 / 3.2-API-A,B | FR-14 | 5 | API | E3-R1/E3-R3 | tools/list exposes only exact bound Published versions with opaque pagination | Stale/foreign/tampered cursor and revoked binding do not reveal metadata or wrong revision |
| 3.4 / 3.4-API-A,B | FR-14 | 5 | API | E3-R1 | Monotonic bounded progress and cancel lifecycle preserve certainty across dispatch boundaries | Cancel-before/after-dispatch races preserve certainty; abusive tokens denied |
| 3.5 / 3.5-API-A,B | FR-14 | 3 | API | E3-R1 | Negotiated Tool catalog-change signal has authoritative refresh after loss | Unnegotiated notifications and malformed/rate-abusive tokens are denied |
| 3.9 / 3.9-E2E-A,B | FR-15 | 3 | E2E | E3-R2/E3-R3 | Resource import/export creates new owned Draft and verifies digest | Malformed/oversized/foreign artifact or stale UI action rejected; keyboard/RU/EN and inert preview verified |
| 3.15 / 3.15-E2E-A,B | FR-17 | 3 | E2E | E3-R2/E3-R3 | Prompt portability/import-export UI creates an owned Draft without changing a Published revision | Malformed/foreign import or stale UI action is rejected; keyboard/RU/EN and inert preview verified |
| 3.17 / 3.17-API-A,B | FR-19 | 3 | API | E3-R1/E3-R2 | Completion returns bounded authorized suggestions for Prompt arguments and Resource template parameters under the negotiated capability | Suggestions enforce scope and malformed tokens/rate bounds fail safely |
| 3.18 / 3.18-API-A,B | FR-19 | 3 | API | E3-R1/E3-R2 | Logging follows the negotiated capability with redacted structured entries | Sensitive fields and malformed tokens/rate bounds cannot leak or alter logs |
| 3.19 / 3.19-API-A,B | FR-19 | 3 | API | E3-R1/E3-R2 | Resource/Prompt change signals follow negotiated capability with polling recovery | Unauthorized, malformed or unnegotiated signals cannot change client-visible catalog state |
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 | 60–120 hours |
| P1 | 32–64 hours |
| Optional P2 | 0–12 hours |
| Optional P3 | 0–4 hours |
| Total envelope | 92–200 hours, approximately 3–6 contributor-weeks |
If a measurement environment is missing, report the prerequisite; do not run large workloads opportunistically inside a story session.
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
Epic 1 foundation; 3.1 adapter registration before capability stories. 3.7 publication before static reads/templates/prompts; 3.11 + 3.13 before composition. 3.20 matrix extends in 4.7 rather than fabricating Tasks support.
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 3. - System contract: architecture, QA inventory and execution.
- 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.