8.7 KiB
8.7 KiB
phase, slug, status, nyquist_compliant, wave_0_complete, created
| phase | slug | status | nyquist_compliant | wave_0_complete | created |
|---|---|---|---|---|---|
| 19.7 | generic-mcp-module | draft | true | true | 2026-10-21 |
Phase 19.7 — Validation Strategy
Per-phase validation contract for feedback sampling during execution. Source:
19.7-RESEARCH.md§ Validation Architecture.
Test Infrastructure
| Property | Value |
|---|---|
| Framework | Go testing + testcontainers-go (Postgres) + miniredis + go-sdk client; vitest for the admin SPA seam |
| Config file | none (Go); admin/vitest.config.* for the SPA |
| Quick run command | go test -short ./modules/pier ./modules/surf ./modules/bouncer ./modules/cabana ./modules/wristband ./modules/pact |
| Full suite command | go vet ./... && go test ./... (framework) + go test ./... in each touched plugin + npm --prefix admin run test + scripts/check-phase19.7.sh |
| Estimated runtime | ~120 seconds (quick ~20 s) |
Sampling Rate
- After every task commit: quick run command for the touched module(s)
- After every plan wave: framework
go vet ./... && go test ./...plus the touched plugin suites - Before
/msd-verify-work:bash scripts/check-phase19.7.sh --allgreen on a Docker host (every stage PASS, no NOT RUN docker) - Max feedback latency: 120 seconds
Per-Task Verification Map
Filled in by the planner per task; the behaviour → test map is:
| Ref | Behavior | Test Type | Automated Command | File Exists | Status |
|---|---|---|---|---|---|
| SC-1/D-30/D-33 | disabled → nothing mounted; enabled without the tag → boot error; tagged → /mcp stream routes and PRM documents; collision names the owner |
unit | go test -short ./modules/surf -run '^TestPierMount$' and go test -short -tags summercms_mcp ./modules/surf -run '^TestPierMount$' |
✅ modules/surf/pier_mount_test.go |
✅ green |
| SC-1 | SSE stream flushes through the streaming route kind; throttle, CORS profile and access-log pattern kept; buffered Flush a no-op | unit | go test -short ./modules/surf -run '^TestStreamingRoute$' |
✅ modules/surf/streaming_test.go |
✅ green |
| SC-2/D-10..D-12/D-14 | binding/duplicate/name boot errors; prefixing; annotations by method | unit | go test -short ./modules/pier -run '^TestCatalog$' |
✅ modules/pier/catalog_test.go |
✅ green |
| D-11/D-13 | arg split, omitted fields absent, no outer credentials, isError with the route body, {"data":…}, size cap, call timeout |
unit | go test -short ./modules/pier -run '^TestDispatch$' |
✅ modules/pier/dispatch_test.go |
✅ green |
| D-15/D-16/D-22 | non-token routes refused; requirement union; method-aware provider; admin token scope per method | unit | go test -short ./modules/pier -run '^TestGuardRules$'; go test -short ./modules/cabana -run '^TestScopeLimitForMethods$' |
✅ modules/pier/guard_rules_test.go, modules/cabana/scope_limit_for_test.go |
✅ green |
| D-17 | marker honoured in-process only; not forgeable from HTTP; frontend marker refused by the backend guard and ResolveBackend |
unit + Postgres | go test -short ./modules/bouncer ./modules/cabana -run '^TestDispatchMarker$'; Postgres part go test ./modules/cabana -run '^TestDispatchMarker$'; gate stage marker |
✅ modules/bouncer/dispatch_test.go, modules/cabana/dispatch_marker_test.go |
✅ green |
| SC-3/D-20/D-23 | per-principal tools/list; read grant hides write tools; no subject, no tool; unlisted call never reaches the route; union of guards | integration | go test -short ./modules/pier -run '^TestToolsList$' |
✅ modules/pier/tools_list_test.go |
✅ green |
| D-25 | session binding, DELETE, cross-instance rehydration, TTL, per-binding cap (Redis and memory) | integration | go test -short ./modules/pier -run '^TestSessions$' |
✅ modules/pier/sessions_test.go |
✅ green |
| D-26/D-27 | pub/sub list_changed; link change and cache bypass; revocation and deletion end sessions and evict stateless servers | integration | go test -short ./modules/pier -run '^TestFanOut$' |
✅ modules/pier/fanout_test.go |
✅ green |
| D-09 | plugin frontend permission codes in editors; duplicates dropped; saved codes granted | Postgres | user plugin GOWORK=off go test . -run '^TestFrontendPermissionCatalog$' |
✅ plugins/golem15/user/frontend_permission_catalog_test.go |
✅ green |
| D-03..D-08 | link proof, one-shot, fresh sign-in at the second, 1:1, admin set, events, per-request lookup | Postgres | user plugin GOWORK=off go test . -run '^TestBackendLink$' |
✅ plugins/golem15/user/backend_link_test.go |
✅ green |
| D-15/D-35 | user guard: parser refusals, deleted user, expired token, dispatch credential against user.scope |
Postgres | user plugin GOWORK=off go test . -run '^TestUserMCPGuard$' |
✅ plugins/golem15/user/mcp_guard_test.go |
✅ green |
| D-04 | account contribution seam; Applies and permission filtering; 409; interactive only; transaction; existing payloads unchanged | unit + Postgres + vitest | go test -short ./modules/cabana -run '^TestAccountContributions$' (Postgres part without -short); npm --prefix admin run test; gate check account.go unchanged since 51d088a |
✅ modules/cabana/account_contributions_test.go, admin/tests/account/AccountContributions.test.ts |
✅ green |
| D-34 | prompted record actions: localized prompt, trim and cap, refusals, empty Value for a plain action | unit + Postgres + vitest | go test -short ./modules/cabana -run '^TestRecordActionPrompt$'; go test ./modules/cabana -run '^TestRecordActionPromptRun$'; npm --prefix admin run test |
✅ modules/cabana/record_action_prompt_test.go, admin/tests/form/RecordActionsPrompt.test.ts |
✅ green |
| D-21 | backend scope and consent line |
unit + Postgres | go test -short ./modules/wristband -run '^TestMCPScopes$'; oauthserver plugin go test . -run '^TestMCPConsent$' |
✅ modules/wristband/mcp_scopes_test.go, sm-oauthserver-plugin/mcp_consent_test.go |
✅ green |
| SC-4 | oas_at_ verifier refuses OIDC/revoked/expired/foreign/inactive-client/deleted-user tokens; conditional stamp |
Postgres | oauthserver plugin go test . -run '^TestMCPTokenVerifier$' |
✅ sm-oauthserver-plugin/mcp_verifier_test.go |
✅ green |
| D-15/D-16 | Journal tools compile through pier; input keys are the routes' keys; prompt | unit | blog plugin go test -short . -run '^TestJournalMCP$' |
✅ sm-journal-plugin/mcp_test.go |
✅ green |
| SC-4/D-08/D-18/D-20/D-26 | end-to-end in sm-demo-app incl. unlink list_changed, read grant, revoked grant, personal tokens off | e2e | cd ../sm-demo-app && go test -tags summercms_mcp . -run '^TestMCPEndToEnd$' |
✅ sm-demo-app/mcp_e2e_test.go |
✅ green |
| D-31 | plugins additive against their pre-phase commits; consumers build and pass at bumped pins | build | bash scripts/check-phase19.7.sh --plugins and --consumers |
✅ scripts/check-phase19.7.sh |
✅ green |
Status legend: ✅ green · ❌ red · ⚠️ flaky. Every row is green as of the plan 05 gate run.
Wave 0 Requirements
scripts/check-phase19.7.sh— phase gate (pattern:scripts/check-phase19.4.sh)- pier test helpers: fake guard provider, fake verifier, two-instance harness on one miniredis, SDK client with a bearer-injecting
http.Client(modules/pier/helpers_test.go) - user-plugin Postgres fixtures for links and frontend permission rows (the admin harness,
startLink/confirmLink, the seeded permission rows) - additive-API checks for sm-user-plugin, sm-journal-plugin, sm-oauthserver-plugin (gate stage
plugins)
Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|---|---|---|---|
| Real MCP client (Claude) connects once via OAuth and sees both tool sets | SC-4 | external client and browser consent | Add the demo's /mcp URL to a client, sign in, link an admin, request backend, call a Journal tool |
go-sdk legitimacy check before go get |
D-24 | supply-chain human check | Confirm module path, version and maintainers in the decision note |
Validation Sign-Off
- All tasks have
<automated>verify or Wave 0 dependencies - Sampling continuity: no 3 consecutive tasks without automated verify
- Wave 0 covers all MISSING references
- No watch-mode flags
- Feedback latency < 120s for the quick run (the full gate with Docker takes several minutes)
- Nyquist compliance recorded in the frontmatter
Approval: plan 19.7-05 (the gate passes in full)