13 KiB
13 KiB
phase, slug, status, nyquist_compliant, wave_0_complete, created
| phase | slug | status | nyquist_compliant | wave_0_complete | created |
|---|---|---|---|---|---|
| 19.3 | framework-transport-and-infrastructure-for-wavepath | draft | false | true | 2026-10-15 |
Phase 19.3 — Validation Strategy
Per-phase validation contract for feedback sampling during execution.
Test Infrastructure
| Property | Value |
|---|---|
| Framework | Go testing (miniredis for fast Redis tests, testcontainers Redis behind -short); node --test in the vue layers |
| Config file | none (go.mod); layers: package.json test script |
| Quick run command | go test -short ./modules/cooler ./modules/surf ./modules/bouncer ./modules/lagoon/... ./internal/build |
| Tagged run | go vet -tags summercms_s3 ./modules/lagoon/... && go test -short -tags summercms_s3 ./modules/lagoon/attach |
| Full suite command | go vet ./... && go test ./... && go test ./cmd/summer -run TestDocsTree && (cd examples/hello && go test ./...) |
| Estimated runtime | ~30 s quick, ~180 s full (Docker) |
Sampling Rate
- After every task commit: quick run command for the touched packages, plus
go vet ./... - After every plan wave: full suite command plus the tagged run
- Before
/msd-verify-work: full suite + tagged run + docs checker green; plugin repos'go test ./...from an app checkout; layerpnpm test - Max feedback latency: 60 seconds (quick run)
Per-Task Verification Map
Filled by plan 05; the plan 06 rows (gap closure, run of 2026-10-15 with PHASE193_REQUIRE_DOCKER=1 --all on a Docker host) follow the SC-4 row. Every row is a stage of scripts/check-phase19.3.sh, which runs the named tests and fails when one is missing, skipped or red (go test -json and TAP detectors). Statuses from the run of 2026-10-15 on a Docker host.
| Req | Behavior | Test Type | Automated Command | File Exists | Status |
|---|---|---|---|---|---|
| SC-1, D-01..D-03 | TokenCookie attributes, Max-Age = refresh window, forget cookie, refresh handler rotates and blacklists the jti, missing cookie 401, LoadCookieConfig errors | unit | bash scripts/check-phase19.3.sh go (BOUNCER_TESTS: TestTokenCookieMaxAgeIsRefreshWindow, TestCookieRefreshHandlerRotatesAndBlacklists, ...) |
✅ modules/bouncer/cookie_test.go |
✅ green |
| SC-1, D-04, D-05 | CORS credentials+* boot error, patterns, wildcard origin entries, Vary: Origin, api↔www credentialed, * unchanged, profiles and their OPTIONS routes |
unit | bash scripts/check-phase19.3.sh go (SURF_TESTS: TestCORSSubdomainCredentialed, TestCORSProfilePreflightRoute, TestCORSOptionsMatchesLaravel, ...) |
✅ modules/surf/cors_profile_test.go |
✅ green |
| SC-2, D-07 | Memory driver methods, TTL, bound, atomic Increment; Remember degrades | unit | bash scripts/check-phase19.3.sh go (COOLER_TESTS: TestMemoryCache, TestMemoryCacheBounded, TestMemoryIncrementConcurrent, TestRememberDegrades) |
✅ modules/cooler/memory_test.go |
✅ green |
| SC-2, D-07 | Redis driver (miniredis, FastForward), Flush only under <prefix>cache: |
unit + docker | bash scripts/check-phase19.3.sh go (TestRedisCache, TestRedisFlushOnlyPrefix); ... docker (TestRedisCacheDocker) |
✅ redis_test.go, docker_test.go |
✅ green |
| SC-2, D-08 | Redis Attempt parity with surf.MemoryStore, never more than max under concurrency, fallback on error, key prefix |
unit + docker | bash scripts/check-phase19.3.sh go (TestRateLimitParity, TestRateLimitConcurrentNeverExceedsMax, TestRateLimitFallbackOnError, TestRateLimitKeyPrefix); ... docker (TestRateLimitParityDocker) |
✅ modules/cooler/ratelimit_test.go |
✅ green |
| SC-2, D-09 | Install config errors, ping warning, FromApp lazy and reused | unit | bash scripts/check-phase19.3.sh go (TestInstallConfigErrors, TestInstallPingWarning, TestInstallReusesFromApp, TestFromAppLazy) |
✅ modules/cooler/install_test.go |
✅ green |
| SC-2, D-09 | BuildRouter uses a published surf.Store, falls back, never dials |
unit | bash scripts/check-phase19.3.sh go (TestBuildRouterStoreFallback, TestBuildRouterUsesPublishedStore, TestBuildRouterNeverDials) |
✅ modules/surf/store_lookup_test.go |
✅ green |
| SC-3, D-12 | s3:// without the tag names summercms_s3; with it opens |
unit (both tag modes) | bash scripts/check-phase19.3.sh go (ATTACH_TESTS, untagged and -tags summercms_s3: TestOpenBucketS3) |
✅ modules/lagoon/attach/s3_test.go |
✅ green |
| SC-3, D-13 | summer.yaml build.tags load, validate, round-trip, reach go build |
unit | bash scripts/check-phase19.3.sh go (BUILD_TESTS: TestManifestBuildTags, TestSaveManifestKeepsBuildTags, TestGoBuildArgs, ...) |
✅ internal/build/manifest_tags_test.go |
✅ green |
| SC-3 | public_url URL building and validation |
unit | bash scripts/check-phase19.3.sh go (TestPublicURLBase, TestPublicURLValidation) |
✅ modules/lagoon/attach/url_test.go |
✅ green |
| D-15 | DiskExtension table; Store regression through Postgres | unit + docker | bash scripts/check-phase19.3.sh go (TestDiskExtensionTable); ... docker (TestStoreDiskExtension) |
✅ diskext_test.go, store_test.go |
✅ green |
| SC-3, D-16, D-17 | /api-docs off by default, pinned 5.33.1 with SRI, ordered compact spec JSON |
unit | bash scripts/check-phase19.3.sh go (TestAPIDocsServesPinnedPage, TestAPIDocsSpecJSONOrder, ...) |
✅ modules/surf/apidocs_test.go |
✅ green |
| SC-3, D-18 | Turnstile open/closed matrix, timeout, form fields, body restored, secret never logged | unit | bash scripts/check-phase19.3.sh go (TestTurnstileVerifyMatrix, TestTurnstileMiddlewareRestoresBody, ...; TestTurnstileFactoryParams in surf) |
✅ modules/bouncer/turnstile_test.go |
✅ green |
| D-10, D-11 | Purger after commit only, failure and slow receiver never fail the save, SiteCacheFromApp, Install validation | unit + docker | bash scripts/check-phase19.3.sh go (TestSiteCachePurgeConfig, TestSiteCachePurgeRequest, TestSiteCacheFromApp, TestInstallSiteCacheValidation); ... docker (TestSiteCacheAfterCommitOnly, TestSiteCacheFailureNeverFails) |
✅ modules/cooler/sitecache_test.go |
✅ green |
| D-11 | cabana reorder hook runs inside the transaction, rolls back on error | docker | bash scripts/check-phase19.3.sh docker (TestReorderHookRunsInTx, TestReorderHookErrorRollsBack, TestReorderWithoutHookUnchanged) |
✅ modules/cabana/reorder_hook_test.go |
✅ green |
| D-10, D-11 | Plugin purge helpers; Journal framework keys win, alias keys deprecated | unit + docker | bash scripts/check-phase19.3.sh plugins (TestPurgeSiteCacheWithoutTx, TestPurgeSiteCacheWithoutPurger, TestSiteCacheFrameworkKeysWin, TestSiteCacheAliasKeysDeprecated, TestSiteCacheNoKeys); ... docker (TestFaqAdminPurgesSiteCache, TestMenuAdminPurgesSiteCache, TestCategoriesAdminPurgesSiteCache, TestPostsAdminPurgesSiteCache, TestCategoriesAdminFrameworkKeysWin) |
✅ three plugins | ✅ green |
| D-11 | Nuxt shared purge route (lib and route handler), shared files byte-identical | unit (node) | bash scripts/check-phase19.3.sh layers (11 sitePurge: names per layer, cmp of the three shared files) |
✅ tests/sitePurge.test.ts in three layers |
✅ green |
| SC-4 | Docs identifiers and links; no consuming application named in framework lines of the phase | docs | bash scripts/check-phase19.3.sh docs |
✅ | ✅ green |
| SC-1, D-05 (CR-01, plan 06) | cors:<profile> headers on every response of the route: guard 401 and 403 (route and group), throttle 429, Turnstile 422 and 503, body limit 413, recovered 500 (JSON and raw); disallowed origin gets Vary: Origin only; handler Vary merged |
unit | bash scripts/check-phase19.3.sh go (SURF_TESTS: TestCORSProfileHeadersOnRefusals, TestCORSProfileVaryKeptWithHandlerVary) |
✅ modules/surf/cors_profile_test.go |
✅ green |
| D-04 (WR-04, plan 06) | Credentialed CORS: wildcard must be the leftmost host label, patterns anchored, no rule matches the probe origins; global and per profile; non-credentialed configs unchanged | unit | bash scripts/check-phase19.3.sh go (SURF_TESTS: TestCORSCredentialedOriginRules, TestCORSAnchoredPatternNoSuffixMatch, rows in TestCORSCredentialsWildcardRefused) |
✅ modules/surf/cors_profile_test.go |
✅ green |
| D-03 (WR-05, plan 06) | Production refuses a Secure that resolves to false, set or inferred from app.url | unit | bash scripts/check-phase19.3.sh go (BOUNCER_TESTS: TestLoadCookieConfigProductionInferredSecure, rows in TestLoadCookieConfigErrors) |
✅ modules/bouncer/cookie_test.go |
✅ green |
| D-03 (WR-09, plan 06) | Zero CookieConfig writes SameSite=Lax and Secure; unset SameSite is Lax |
unit | bash scripts/check-phase19.3.sh go (BOUNCER_TESTS: TestZeroCookieConfigDefaults, TestTokenCookieAttributes) |
✅ modules/bouncer/cookie_test.go |
✅ green |
| D-17 (WR-06, plan 06) | api-docs script-src holds only the per-request nonce; every script tag carries it; SRI unchanged |
unit | bash scripts/check-phase19.3.sh go (SURF_TESTS: TestAPIDocsCSPNoHostSource, TestAPIDocsServesPinnedPage) |
✅ modules/surf/apidocs_test.go |
✅ green |
| D-12 (WR-07, plan 06) | attach.Store refuses a protected upload while public_url is set, before any blob is written |
unit (both tag modes) | bash scripts/check-phase19.3.sh go (ATTACH_TESTS: TestStoreProtectedNeedsPrivateBucket) |
✅ modules/lagoon/attach/url_test.go |
✅ green |
| D-18 (WR-08, plan 06) | One boot warning with the route count when turnstile routes have no secret; none with a secret or without such routes | unit | bash scripts/check-phase19.3.sh go (SURF_TESTS: TestTurnstileEmptySecretWarnsAtBoot) |
✅ modules/surf/cors_profile_test.go |
✅ green |
| D-10 (WR-02, plan 06) | The purge client never follows a redirect; a 3xx is a failed purge, the token never reaches the Location | unit | bash scripts/check-phase19.3.sh go (COOLER_TESTS: TestSiteCachePurgeNoRedirect) |
✅ modules/cooler/sitecache_test.go |
✅ green |
| D-10, D-11 (WR-01, plan 06) | After-commit purges queued, one in flight per purger, later saves coalesced; Wait and Handle.Close drain; a bulk commit sends at most two; plugin admin tests wait for the queue | unit + docker | bash scripts/check-phase19.3.sh go (COOLER_TESTS: TestSiteCachePurgeAsyncCoalesced, TestSiteCachePurgeWaitAndClose); ... docker (TestSiteCacheBulkCommitCoalesced, the FAQ, menu and Journal admin purge suites) |
✅ modules/cooler/sitecache_test.go, three plugins |
✅ green |
| D-11 (WR-03, plan 06) | Shared purge route accepts proxied requests on siteCache.allowProxied, refuses them without it; files byte-identical |
unit (node) | bash scripts/check-phase19.3.sh layers (LAYER_REQUIRE: sitePurge: allowProxied lets a proxied request reach the token check, sitePurge: route accepts a proxied request with allowProxied and the right bearer) |
✅ tests/sitePurge.test.ts in three layers |
✅ green |
Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky
Wave 0 Requirements
modules/cooler/*_test.go: memory, redis (miniredis), Docker suites (per-test containers instead of a TestMain), rate-limit parity table shared withMemoryStoremodules/bouncer/cookie_test.go,turnstile_test.gomodules/surf/cors_profile_test.go,apidocs_test.go, store-lookup testmodules/lagoon/attach/s3_test.go(both tag modes),diskext_test.go, Store regressioninternal/buildmanifest tags + SaveManifest round-tripmodules/cabanareorder hook test- Dependency install:
github.com/alicebob/miniredis/v2@v2.40.0(test-only, after the Task 4 human check: "approved")
Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|---|---|---|---|
| Cookie refresh across real api/www subdomains in a browser | SC-1 | Needs real DNS + TLS | Deploy to staging, log in on www, wait past access TTL, confirm refresh via cookie |
| S3-compatible provider (R2/MinIO/Hetzner) upload | SC-3 | Needs real bucket credentials | Build with summercms_s3, set bucket_url, upload a file, fetch via public_url and proxy |
| Nuxt purge after menu/FAQ save | D-11 | Needs running Nuxt + app | Save a menu entry in admin, confirm the page updates without waiting for SWR TTL |
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 < 60s
nyquist_compliant: trueset in frontmatter
Approval: pending