18 KiB
phase, plan, subsystem, tags, requires, provides, affects, actuals, plan_head_before, plan_head_after, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, coverage, duration, completed, status
| phase | plan | subsystem | tags | requires | provides | affects | actuals | plan_head_before | plan_head_after | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | coverage | duration | completed | status | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11.2-ready-to-share-summercms-io-website-and-newsletter-plugin | 03 | testing |
|
|
|
|
|
2229ca3c60 |
a2f2d1e5c7 |
|
|
|
|
|
13min | 2026-10-01 | complete |
Phase 11.2 Plan 03: Unit test coverage and the phase gate Summary
Table-driven fstest tests pin every static serving and route rule of the site plugin (98.2% coverage). Every site_url/site_label branch and the D-40 helpers are tested, and one fail-closed scripts/check-phase11.2.sh --all proves the phase across the four repositories.
Performance
- Duration: 13 min
- Started: 2026-10-01T14:25:51Z
- Completed: 2026-10-01T14:39:19Z
- Tasks: 3 (tracer + 2 auto)
- Files modified: 11 (4 in summercms.go plus VALIDATION.md, 3 in the plugin, 1 in the app, 1 in the site, plus 2 gitlinks)
Accomplishments
- Site plugin (98.2% statement coverage, from fixtures only).
static_test.gocovers content types, cache rules, ETag/304, HEAD, Range, dot-segment and traversal 404s, docs 301s, redirect Locations, a tree with no 404 page and the load errors.routes_test.gocovers the surf assembly, fail-closed boot, coexistence with the admin patterns, the plugin's identity and init registration, and the embedded tree.TestPageLinksandTestResolvecover the link helpers.
- Framework (docsite coverage 94.2%).
TestCheckSiteURLhas 21 cases (5 accepted, 16 rejected).TestSiteLabelandTestSiteURLPrecedence(12 cases) cover labels and option-over-yaml precedence.TestParseSitegains rows for blank and two-line labels.TestSiteLinknow checks the escaped label, the section page, the 404 page and the exact unset header bytes.TestDocsSiteFlagsInHelpchecks both commands' help, anddocs:build --site-labelwithout a URL now has an error test.
- App and site.
TestLoadTerminal,TestTerminalScriptandTestTerminalEnvrun ungated.- One scroll-spy case was added for sections scrolled past. The other listed TS edge cases were already covered by the 11.2-01 tests.
- Gate.
scripts/check-phase11.2.shhas the stages--framework,--plugin,--app,--site,--built,--smoke,--deploy,--terminal [--verbatim],--fulland--all. Unknown modes exit 2.--allpassed end to end. - VALIDATION.md is validated, with one row per task across the three plans and the cutover checks kept as manual rows.
Task Commits
| Task | Commit | Repo | Message |
|---|---|---|---|
| 1 (tracer) | 549adaf |
sm-summercmsio-plugin | test: cover every static serving rule and the plugin routes |
| 1 (tracer) | e7d9a2e |
sm-summercmsio-app | test: bump the site plugin to its static and route tests (gitlink) |
| 1 (tracer) | 18fe100 |
summercms.go | test(11.2): add the phase gate with the plugin stage |
| 2 | c3ddd5c |
vue-summercmsio-app | test: cover terminal and scroll-spy edge cases |
| 2 | 8c718a8 |
sm-summercmsio-app | test: cover the terminal check helpers |
| 2 | f34c335 |
sm-summercmsio-app | test: bump the site to its scroll-spy edge case (gitlink) |
| 2 | f5f9387 |
summercms.go | test(11.2): cover site_url and site_label and gate the framework, app and site stages |
| 3 | 29adc23 |
summercms.go | test(11.2): complete the phase gate |
| 3 | a2f2d1e |
summercms.go | docs(11.2): validate the phase verification map |
Nothing was pushed. No commit has a co-author trailer. No v0.1.0 tag was created.
Verification Evidence
Task 1 (tracer gate). The run is interactive in end-of-phase mode and the tracer's verify is automated-only, so the verify was re-run and passed:
go vetis clean.- The plan's verify regex gives 16 top-level PASS lines.
TestStatic.*|TestRoutes.*|TestPlugin.*gives 47--- PASSlines, subtests included.scripts/check-phase11.2.sh --pluginpasses: 17 named tests and 58 passing tests, subtests included.- Coverage is 98.2%.
bash -nis clean, and--bogusexits 2.- A gate copy with a renamed test refuses with "named tests did not pass (missing, renamed or filtered out)".
Task 1 mutation check (siteImmutable).
- Setup: in a scratch copy of the plugin (
GOWORK=off),siteImmutablewas changed toreturn truefor_nuxt/. - Result:
TestStaticSitefailed on/_nuxt/builds/latest.jsonand/_nuxt/builds/meta/x.jsonwithCache-Control = "public, max-age=31536000, immutable", want "no-cache".
Task 2.
go vet ./...is clean.- Eight top-level PASS lines from the plan's verify regex.
TestCheckSiteURLprints 21--- PASS: TestCheckSiteURL/lines.- The app helpers give three PASS lines and no SKIP.
--framework,--appand--sitepass. The site stage had 30 tests:# pass 30,# fail 0,# skipped 0.
Task 2 mutation check (checkSiteURL).
- Setup: in a
git archive HEADexport of summercms.go with the newload_test.go, the//rejection incheckSiteURLwas removed. - Result:
TestCheckSiteURL/protocol-relativefailed withcheckSiteURL("//acme.example") = <nil>, want errSiteURL.
Task 3. scripts/check-phase11.2.sh --all exited 0. It printed all nine phase11.2 <stage> passed lines and phase11.2 all passed, with zero refuse:, FAIL, --- FAIL or --- SKIP lines. Stage by stage:
- built: a dev build, because summercms.go has no v0.1.0 tag. The three build-dependent tests passed.
- smoke:
smoke: okon postgres:15. - deploy:
check-deploy: ok. - terminal: used the clone override (this checkout) and passed.
- full:
go vet ./...andgo test ./... -count=1ran with the Docker database suites.
Release branch of --built.
- Setup:
SUMMERCMS_FRAMEWORK=<scratchpad>/fw-release, the 11.2-02 scratch clone that carries a local v0.1.0 tag. - Result:
built: v0.1.0 found …, release build, thenbuild: bin/summercms-io (release v0.1.0) readyandphase11.2 built passed.
Plan verification.
- All four repositories have an empty
git status --porcelain. summercms.go still has the user's untrackedSummerCMS landing page.zip, which predates this plan. - Plugin coverage is 98.2% (≥ 90.0%). Docsite coverage is 94.2% (≥ 85.0%).
Files Created/Modified
summercms.go
scripts/check-phase11.2.sh: the phase gate, with stages and ago test -jsondetector modelled oncheck-phase11.1.sh.internal/docsite/load_test.go:TestCheckSiteURL,TestSiteLabel,TestSiteURLPrecedenceand newTestParseSiterows.internal/docsite/theme_test.go:TestSiteLinkcovers escaping, the section page, the 404 page and the exact unset bytes.cmd/summer/docs_test.go:TestDocsSiteFlagsInHelp, and the label-without-URL case inTestDocsBuildSiteFlags.11.2-VALIDATION.md: validated.
sm-summercmsio-plugin
static_test.goandroutes_test.goare new.links_test.gogainsTestPageLinksandTestResolve. The build-gated tests are unchanged.
sm-summercmsio-app
terminal_check_test.gogains the three ungated helper tests. The two gitlink bumps are in the commit table.
vue-summercmsio-app
tests/scrollSpy.test.tsgains the negative-tops case.
Decisions Made
See key-decisions in the frontmatter. In short:
--builtfollows the same framework checkout asbuild.sh.- The coexistence test takes the plugin's real patterns from surf's route table.
- The tests pin the shipped
terminalScriptoverride form (git clone <override> summercms) and the shippedpageLinkscontract (duplicates kept).
Deviations from Plan
Interpretation notes (no production change)
1. terminalScript override form
- Plan text: "the first command becomes
git clone /tmp/fw". - What was tested: the shipped behaviour from the 11.2-02 Rule 1 fix,
git clone /tmp/fw summercms. The plan says to test the shipped name and behaviour.
2. pageLinks duplicates
- Plan text: "including duplicates removed and fragment-only links kept". This is ambiguous.
- What was tested: the shipped function keeps duplicates in document order, and
TestLandingLinksdedupes. The test pins that, along with kept fragment links, decoded entities and the appended og:image.
3. Two plugin statements are not covered
plugin.go:48andstatic.go:89are thefs.Suberror returns.fs.Subfails only for an invalid directory name, and the names here are the constants"public","site"and"docs", so the branches cannot be reached.- Coverage is 98.2% without them.
4. Extra tests beyond the plan's list
TestResolveinlinks_test.gocovers the redirect follower and theSUMMERCMS_SITE_DIRoverride.- The gate requires it too.
5. Extra commits in sm-summercmsio-app
- The gitlink bumps (
e7d9a2e,f34c335) are separate commits from the app's own test commit. - The sequential executor instructions require committing the updated gitlink whenever a submodule changes.
Total deviations: none needed a production fix. The new tests exposed no defect, so no production code changed in any repository. There are 5 interpretation or scope notes. Impact on plan: none. All acceptance criteria pass.
Issues Encountered
- Scratch-copy mutation setup. The first run needed
GOFLAGS=-mod=mod GOPROXY=off, because the scratch module'sgo.sumlacked entries that the app'sgo.work.sumnormally provides. No network was used. env -uand bash functions.env -ucannot call a bash function, so the gate unsets variables in subshells.named_testscleans up its own log.
Known Stubs
None.
Threat Flags
None. This plan adds tests and a local gate script only. The T-11.2-15 mitigation (the detector refuses a skip, a fail, a missing test or zero tests, and --bogus exits 2) and the T-11.2-16 mitigation (the gate sets SUMMERCMS_REQUIRE_BUILD=1 and SUMMERCMS_TERMINAL_CHECK=1 itself and requires PASS) are in place.
User Setup Required
None for this plan. These cutover items are unchanged from 11.2-02:
- Push the three site repositories.
- Make
golem15/summercmspublic (D-38). - Create and push v0.1.0 (D-42).
- Run
TestExternalLinks,scripts/check-phase11.2.sh --terminal --verbatim, and--built, which will report a release build. - Deploy on rome.
Next Phase Readiness
- Phase 11.2 has all three plans complete, and the gate is green. It is ready for
/gsd-verify-work, where the manual rows are visual UAT and the cutover checks. - Phase 11.3 can reuse
TestRoutesCoexistWithAdminPatternswhen it activates the admin beside the site.
Self-Check: PASSED
- Files exist:
scripts/check-phase11.2.sh,internal/docsite/load_test.go,internal/docsite/theme_test.goandcmd/summer/docs_test.go; the plugin'sstatic_test.go,routes_test.goandlinks_test.go; the app'sterminal_check_test.go; the site'stests/scrollSpy.test.ts; and11.2-VALIDATION.md. - Commits were found in each repository:
- summercms.go:
18fe100,f5f9387,29adc23,a2f2d1e - app:
e7d9a2e,8c718a8,f34c335 - plugin:
549adaf - site:
c3ddd5c
- summercms.go:
- The summercms.go commit count was measured:
git rev-list --count 2229ca3..HEAD= 4. git tag -l v0.1.0in summercms.go prints nothing.
Phase: 11.2-ready-to-share-summercms-io-website-and-newsletter-plugin Completed: 2026-10-01