20 KiB
phase, plan, subsystem, tags, requires, provides, affects, actuals, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, coverage, duration, completed, status, plan_head_before, plan_head_after, fonoteka_plan_head_before, fonoteka_plan_head_after, user_plugin_head_before, user_plugin_head_after
| phase | plan | subsystem | tags | requires | provides | affects | actuals | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | coverage | duration | completed | status | plan_head_before | plan_head_after | fonoteka_plan_head_before | fonoteka_plan_head_after | user_plugin_head_before | user_plugin_head_after | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 13-p-ytarium-api-wishlist-notifications-csv-credentials-public | 06 | testing |
|
|
|
|
|
|
|
|
|
|
|
70min | 2026-10-03 | complete | 5d0ce7f5bb |
931c02db31 |
3c8b7cd25ac996921a745fa7e98e3a81414c7072 | 40c575e72703c7e7fb4684e1477ce73496586e54 | d80d7990f6f8b743c4df2f0fa9538d9e2acf780e | 8a658903edb1b4957cde073fe82a475b978384bb |
Phase 13 Plan 06: Unit tests, fuzz, threats, gate and sign-off Summary
Phase 13 is now closed by evidence:
- Route table: a test pins all 58 routes to routes.php through the real router.
- Fuzz: the request fuzz covers all 70 write routes with every server-owned key.
- Threats: 27 subtests pin each application threat, and 31 removal checks prove each protection is load-bearing.
- Coverage: every Phase 13 package in both repos and the user plugin is at or above the floor.
- Gate:
scripts/check-phase13.shfails closed, and its--alland--removalmodes both pass. - Fixes: the review found one silent failure in the CSV export (now logged) and one stale route inventory (now updated).
Performance
- Duration: 70 min
- Started: 2026-10-03T08:32:57Z
- Completed: 2026-10-03T09:43:22Z
- Tasks: 3 of 3
- Files modified: 59. In fonoteka.go: 10 test and source files, 29 fuzz seeds and the submodule pointer. In the user plugin: 1 test file. In summercms.go: 5 test and script files and 5 planning docs (this summary included), plus the STATE and ROADMAP updates.
Accomplishments
- Task 1: route table.
TestRouteTablePhase13boots the assembled router and checks the following against routes.php:- groups: 58 routes, each on its group (JWT, personal token, onboarding, invitation inspection, public share), with its routes.php line;
- scopes: exactly one
inv.scopeper token route; - throttles: the inline throttles on share regenerate, CSV store, onboarding, inspection and the two resolves, and the public buckets on the four albums routes;
- constraints: 24 numeric parameters refuse
abcand1xat the router and reach the handler with12, and 10{token}parameters are unconstrained; - absent routes: the four Phase 14 routes answer the router's 404;
- overlap pairs: they dispatch to the real handlers, with the 404 and the sorted 405
Allow.
- Task 2: fuzz and threats.
- Fuzz:
FuzzWriteEndpointsgained 29 Phase 13 specs keyed by full route key, a Phase 13 world (shared wishlist, reservation, subscriptions, notification, credentials, CSV imports in mapping and preview), snapshots of nine more tables and the Phase 13 server-owned keys. The onboarding bootstrap fuzzes on its own database with every user soft-deleted. Each request gets its own client address. 29 synthetic seed files were committed. A 60 s fuzzing session found nothing. - Threats:
TestPhase13Threatscovers T-13-01..10, 12..21, 23, 27..31 and 33. For example, T-13-18 holds the advisory lock, lets a bootstrap wait on it, inserts a user and requires 409 with nothing written.
- Fuzz:
- Task 3: coverage, gate and sign-off.
- summercms.go tests: surf edges (a transitive family, HEAD and Allow, a family across plugins, refused shapes, constraint fall-through), conga refusal messages and delayed workerless dispatch, lagoon
prohibitedunder wildcards, dotted paths and bail, and tide quoted, RFC 5987 and multi-date names. - fonoteka tests:
TestPhase13EmptyBodiescovers 29 routes × 2 body kinds, each with PHP's status;TestPhase13Boundariescovers CSV bytes and rows,per_page, Discogs token length, the bell cap and pubfail;TestPhase13HandlersFailClosedrenames 13 tables in turn;- the classes, csv, api and middleware unit tests;
TestRegisterUserExportsin sm-user-plugin.
- Gate:
scripts/check-phase13.shfollows check-phase12's structure and adds the corpus coverage-line parser, a function-floor check forregistration.go, therootappremoval kind and a signal-safe restore. It also unsetsFORCE_COLORitself. - Docs: 13-SECURITY-REVIEW.md and 13-VALIDATION.md are written, and API-03..API-07 are complete.
- summercms.go tests: surf edges (a transitive family, HEAD and Allow, a family across plugins, refused shapes, constraint fall-through), conga refusal messages and delayed workerless dispatch, lagoon
Task Commits
fonoteka.go (master, not pushed):
- Pre-task: Phase 9 admin route inventory -
549840d(test) - Task 1: route table -
23cc540(test) - Task 2: fuzz and threats -
4190a4a(test) - Task 3: CSV export logging fix -
4dec779(fix) - Task 3: application coverage tests -
f25e09d(test) - Task 3: sm-user-plugin pointer bump -
e121295(chore) - Task 3: T-13-01 lockout through the albums routes -
40c575e(test)
sm-user-plugin (master, not pushed):
- Task 3: registration export tests -
8a65890(test)
summercms.go (master):
- Task 3: framework edge tests -
4ed45c1(test) - Task 3: constraint fall-through test -
22a5ebd(test) - Task 3: the gate -
12b961b(test) - Task 3: the gate's named surf test -
ad79b3c(test) - Task 3: security review, validation, requirements -
931c02d(docs)
Decisions Made
See key-decisions above.
Deviations from Plan
Auto-fixed Issues
1. [Rule 1 - Bug] The CSV export dropped a failure after its headers were sent
- Found during: Task 3 (TestPhase13HandlersFailClosed)
- Issue: With the albums table unreachable,
GET export/csvanswered 200 with the BOM and the header row only, and logged nothing. Laravel reports an exception thrown inside a streamed response. - Fix:
CsvExportlogs the error with the user id. The status cannot change after the headers, as in PHP. - Files modified: controllers/api/csv_export_controller.go
- Commit: 4dec779
2. [Rule 3 - Blocking] TestPhase09SecurityRoutes failed on an outdated route inventory
- Found during: pre-task (the
--allgate runs the plugin package) - Issue: The 19 cabana relation child, pivot and file routes added by Phase 12.2 were missing from the expected set. All 19 carry the backend guard, so this is not a security gap.
- Fix: The expected set lists them.
- Commit: 549840d
3. [Rule 1 - Test] The first T-13-01 subtest passed with the pubfail check removed
- Found during: Task 3 (
--removal, RC-08 survived) - Issue: The resolve route's inline
throttle:10,1answered the eleventh request with 429 on its own. - Fix: The failures now go through the albums routes, whose buckets are wide.
- Commit: 40c575e
4. [Rule 1 - Test] The surf constraint-skip mutation was not observable
- Found during: Task 3 (
--removal, RC-01 survived) - Issue: Each member's handler is wrapped with its own constraints, and the routes.php pairs differ in literals.
- Fix:
TestOverlapConstraintFallsThroughcovers a family where an earlier member matches the literals but not its constraint. The application checks mutate the literal match through the newrootappremoval kind. - Commits:
22a5ebd,12b961b,ad79b3c
5. [Rule 3 - Test isolation] Queued River jobs broke TestAlbumBroadcastSmoke
- Found during: Task 3 (full plugin run)
- Issue: The threat and empty-body worlds left hundreds of publication jobs on the shared database, and the broadcast smoke test's worker drained them.
- Fix: Both tests run on databases of their own (
dedicatedHarness, which now takestesting.TB). - Commit: f25e09d
6. [Rule 3 - Test harness] The process-wide job dispatcher
- Found during: Task 2
- Issue:
phase12RouteTableboots an app without a database. When it booted last, every digest dispatch failed with "conga: database is not published". - Fix: FuzzWriteEndpoints and TestPhase13Threats boot the app whose writes dispatch jobs last. The underlying design is logged in deferred-items.md.
- Commit: 4190a4a
7. [Structure] Plan wording versus the code
- Test locations:
TestPhase13EmptyBodiesandTestPhase13Boundariesare inplugins/golem15/fonoteka/phase13_controllers_test.go, because they need the plugin harness;controllers/api/phase13_controllers_test.goholdsTestCsvMappingInput.
- Pubfail removal: the handlers call
PubfailCounter.Begin, so "TooMany always false" is two removal rows:- RC-08 removes the check in
Begin; - RC-09 removes the check in
TooMany, whichTestPubfailCounterpins.
- RC-08 removes the check in
- Extra removal rows: they cover every high threat (T-13-04, 06, 09, 13, 19) and the gate's own threats (T-13-34, 35, 36, SC).
Total deviations: 7: 1 production bug, 1 stale test inventory, 2 tests strengthened after a survived removal, 2 harness or isolation fixes, 1 structural note. Impact: no response contract changed; the only production change adds a log line.
Issues Encountered
/tmpon this host is a nearly full tmpfs:go test ./...failed to link with "disk quota exceeded". The suites and the gate ran withTMPDIR/GOTMPDIRon the home disk (logged in deferred-items.md).FORCE_COLORwas unset for every run; the gate now unsets it itself.- No PHP server was started in this plan.
Known Stubs
None.
Threat Flags
None. This plan added no endpoint, auth path or schema. T-13-34, T-13-35 and T-13-36 are mitigated and removal-proven (RC-29 to RC-31). T-13-SC holds: no dependency was added.
User Setup Required
None. To run the gate on a host with a small /tmp, set TMPDIR and GOTMPDIR to a larger disk.
Next Phase Readiness
- Phase 13 is ready for
/gsd-verify-work 13:scripts/check-phase13.sh --self-test && scripts/check-phase13.sh --alland--removalare green. - Phase 14 inherits the following from this plan:
- the absent-route assertions in
TestRouteTablePhase13(phase14Absent), which must be moved into a Phase 14 table when those routes are mounted; EXPECTED_PORTED/EXPECTED_PENDINGin the gate;- the deferred items: the process-wide job dispatcher, the int4
pathIDgap on the older routes, andcleanSession.
- the absent-route assertions in
- The sm-user-plugin commit
8a65890is local to the submodule; push it withssuwhen the user asks.
Self-Check: PASSED
- Created files exist: routes_table_phase13_test.go, phase13_security_test.go, phase13_controllers_test.go, classes/phase13_classes_test.go, classes/csv/csv_edges_test.go, controllers/api/phase13_controllers_test.go, user/registration_test.go, surf/overlap_edges_test.go, scripts/check-phase13.sh, 13-SECURITY-REVIEW.md; 29 new seed files (70 in total).
- Commits exist: fonoteka.go 549840d, 23cc540, 4190a4a, 4dec779, f25e09d, e121295, 40c575e; sm-user-plugin 8a65890; summercms.go
4ed45c1,22a5ebd,12b961b,ad79b3c,931c02d. - Plan verification:
scripts/check-phase13.sh --self-test,--alland--removalexited 0.- Both repos'
go vetandgo testare green inside the gate's--gostage. - TestDocsTree and
docs:build --checkare green.
- Acceptance greps:
- TestRouteTablePhase13 has 58 table entries, and the absent list has 6 matches.
- There are 27
t.Run("T-13-subtests. - The fuzz file has 29 Phase 13 write keys, and there are 70 seed files (41 + 29).
EXPECTED_PORTED=157appears once,nyquist_compliant: trueonce and⬜ pending0 times.- Every T-13 id of the plans appears in the review.
- 5
API-0[3-7] | Phase 13 | Completerows.