Commit Graph

1250 Commits

Author SHA1 Message Date
f70a0a59d6 fix(14.2): WR-08 gate self-test: dev-stack refuses the request log off
Planted env files through dev-stack.sh exec: unset SUMMER_HTTP__ACCESS_LOG
and SUMMER_STORAGE__UPLOADS__SERVE default to true; false or 0 is refused.
2026-10-12 11:28:22 +02:00
1fb3fb9ac1 fix(14.2): WR-08 go.log scan fails closed without request records
With SUMMER_HTTP__ACCESS_LOG off the Go log has no http request records,
and the 5xx scan passed on an empty signal. scan_go_log now also refuses
unless the part of go.log written during this --e2e run (after the offset
taken once the stack is up) has an http request record. Self-test cases:
no records, an empty log, records only before the offset.
2026-10-12 11:27:44 +02:00
3159bc109b fix(14.2): WR-07 gate restarts a stale stack and requires fresh
--e2e reused any running stack, so Playwright and the go.log scan could
exercise a binary built before the commits under review. A running stack
that dev-stack.sh fresh refuses is now stopped and started again (and left
running), and fresh must pass after up --detach. The self-test plants an
app and framework tree: a newer source or a missing stamp must be
refused, docs, planning files and tests ignored.
2026-10-12 11:27:12 +02:00
bb5c2d32fa fix(14.2): WR-06 gate checks the seed secret stays private
The self-test feeds a planted token line through dev-stack.sh redact-seed
and refuses when the secret survives; --e2e refuses unless
tmp/dev-stack/seed.out has mode 600.
2026-10-12 11:25:42 +02:00
8b835f328f fix(14.2): WR-05 gate requires TestDevSeedRefusesForeignRows 2026-10-12 11:24:03 +02:00
01d2548ab3 fix(14.2): WR-04 validate storage.uploads.public_path_prefix at boot
The prefix was only trimmed. Without a leading slash ServeMux read its first
segment as a host pattern, so every upload silently answered 404, and a CDN
URL panicked in ServeMux and surfaced as a misleading route conflict. With
storage.uploads.serve on, BuildRouter now refuses a prefix that is not an
absolute URL path (scheme, host, query, fragment, whitespace, wildcard
braces, empty, . or .. segments, or a bare /) with an error naming the key.
2026-10-12 11:21:38 +02:00
41a03b9987 fix(14.2): WR-03 uploads route sandboxes files and downloads non-images
The route answered with the blob's stored Content-Type, which attach.Store
sniffs from the bytes, so a public text upload starting with <html> was
served as text/html on the application origin; nosniff does not help when
the declared type is already HTML. Every response now carries a sandboxing
Content-Security-Policy, and a successful response whose type is not a
raster image (JPEG, PNG, GIF, WebP, AVIF) gets Content-Disposition:
attachment, on GET and HEAD. Covers stay inline.
2026-10-12 11:20:43 +02:00
c30145ed25 fix(14.2): WR-02 499 only for a 5xx caused by the client going away
Every 5xx became 499 once the request context was cancelled, so a panic or
a real database error on a request the browser had abandoned passed the
phase gate's 5xx scan. Now a 5xx is logged as 499 only when the client had
already gone when the status was written and the handler did not panic;
recoverJSON and recoverBare mark the access log entry. Every record of an
abandoned request carries client_gone=true. The gate self-test plants a
5xx with client_gone=true and must refuse it.
2026-10-12 11:19:12 +02:00
fbcfaaf05f fix(14.2): WR-01 access log never records the URL path
An unmatched request logged its path. A token route reached with another
method (405) or with a trailing slash (404) is answered by ServeMux before
any route handler records the pattern, so the share or invitation token in
the path reached the log. The record now carries method, pattern, status
and duration only.
2026-10-12 11:17:51 +02:00
18a4ceabd2 docs(14.2): record code review disposition 2026-10-12 00:18:52 +02:00
6258663724 docs(14.2): add code review report 2026-10-12 00:18:37 +02:00
8c6db0a522 docs(14.2-04): complete unit tests and phase gate plan 2026-10-12 00:07:47 +02:00
78d72418cb test(14.2-04): check-phase14.2.sh docs, parity, contracts, guard and e2e stages
- --go: vet and test ./... in summercms.go, the fonoteka.go root module and
  the fonoteka plugin module, then the named console, plugin and surf tests
  through the skip-intolerant detector
- --parity requires the 175/175 TestParityCorpus summary
- --contracts blocks on the phase's Nuxt contract test and reports the
  whole suite (missing-catalog.test.mjs fails on HEAD before this phase)
- --guard plants guard-*.conf env files (:8422, unset internal origin,
  mismatched origins, plytarium.com, a fake PHP answer, another backend's
  marker) and requires a refusal for each, plus a SummerCMS control case
- --e2e brings the stack up when it is down, runs the Go-gate specs through
  e2e-verdict, the D-15 specs report-only, and scans go.log for a search
  engine failure or a 5xx record
- --self-test plants Playwright reports, Go logs and TAP summaries
2026-10-11 23:49:10 +02:00
2c5c0583f2 test(14.2-04): uploads mount and access log unit tests; the uploads route owns its prefix
- TestUploadsMount: key off registers nothing; on, a public blob is served
  with its content type and nosniff, HEAD has no body, private, missing,
  partition and encoded traversal paths 404, an unpublished bucket or
  database 404s, a custom prefix is honoured
- mountUploads refuses a plugin route at or under the prefix, so
  BuildRouter fails instead of only an identical pattern failing at
  Assemble (README and storage docs updated)
- TestAccessLog: pattern and status for 200, handler 404 and recovered
  panic, path only for unmatched requests, locale-prefixed requests keep
  the pattern, integer duration_ms, no query, header or Authorization
  value, ResponseController flush still works
2026-10-11 23:23:38 +02:00
46eee17143 test(14.2-04): check-phase14.2.sh runs the seed refusal through the skip-intolerant detector
- --self-test plants detector cases for every exit code and checks the modes
- --go runs the named console tests with go -C on the fonoteka.go workspace
2026-10-11 23:09:51 +02:00
dbdf15da76 docs(14.2-03): complete vue-fonoteka-app on Go backend plan 2026-10-11 23:06:04 +02:00
a2d19360d2 docs(14.2-03): PHP cross-check and re-verification recorded in UAT 2026-10-11 23:04:28 +02:00
b9de0610d7 docs(14.2-03): record the manual session, its findings and fixes in UAT 2026-10-11 20:34:55 +02:00
4660f95e5c fix(14.2-03): access log records a cancelled request's 5xx as 499
A client that goes away mid-request cancels the context; a handler then
fails on context.Canceled and writes a 500 nobody receives. The request
log now records it as 499 (client closed request) so a grep for 5xx shows
real server errors only.
2026-10-11 20:27:56 +02:00
66dbd5a64a docs(14.2-03): UAT record with the deferred PHP cross-check 2026-10-11 19:46:44 +02:00
48286b67b3 docs(17): create phase plan 2026-10-11 19:28:15 +02:00
05442174b6 docs(14.2-02): complete local stack start script plan 2026-10-11 19:08:45 +02:00
5c75b316a7 docs(17): UI design contract 2026-10-11 18:23:09 +02:00
3156baaf38 docs(phase-17): add validation strategy 2026-10-11 18:01:12 +02:00
ea8408e9e9 docs(17): research phase domain 2026-10-11 18:00:21 +02:00
2158db790c docs(14.2-01): record plan 01 progress in state and roadmap 2026-10-11 17:48:43 +02:00
d0eeb4d291 docs(14.2-01): complete Go-side local stack glue plan 2026-10-11 17:48:18 +02:00
2d68eab3c0 feat(14.2-01): opt-in http.access_log request log in surf
- one Info record "http request" per request with method, matched route
  pattern, status and duration_ms; path without the query only when no
  route matched
- the matched route records its pattern through a request-scoped entry,
  so locale prefix rewrites do not hide it
- logs through the published *slog.Logger or slog.Default; off by default
- surf README, logging and configuration docs describe the key
2026-10-11 17:42:51 +02:00
ad1fa5abfa docs(14.2-01): todo for sm-user-plugin commands that need a published database 2026-10-11 17:41:29 +02:00
0b6d757b40 feat(14.2-01): opt-in storage.uploads.serve route for public uploads
- surf mounts GET {storage.uploads.public_path_prefix}/{path...} on
  attach.StaticHandlerPublic when storage.uploads.serve is true
- bucket and database resolved per request; X-Content-Type-Options: nosniff
- surf README, storage and configuration docs describe the key
2026-10-11 17:36:54 +02:00
3408742fb0 test(10): persist human verification items as UAT 2026-10-11 17:13:01 +02:00
f31ea9387f docs(10): re-verify after go-stage fixes, phase 10 human_needed 2026-10-11 17:12:55 +02:00
77ca4b0b93 fix(scripts): skip the opt-in TestBootstrapEndToEnd in the check-phase10 go stage 2026-10-11 16:35:33 +02:00
fc7cfaf51c docs(10): re-verify after quick-261011-mag, hygiene closed, gaps_found on --all go stage 2026-10-11 16:29:35 +02:00
6c7434243e docs(quick-261011-mag): fix check-phase10.sh hygiene gaps from 10-VERIFICATION.md 2026-10-11 16:14:20 +02:00
1541cd4167 test(admin): import the untested SPA modules directly for check-phase10 hygiene
- mlLocale: type predicates, localeRecord, the ML_LOCALE_CHANGE broadcast
- MLField: locale switch, whole-map emit, broadcast follow, content-locale
- FileCaptionModal: prefill, save via FileRoutes.update, 422 stays, danger toast
- ApiTokensPanel and ApiTokenCreateDialog mounted directly next to the app tests
2026-10-11 16:13:19 +02:00
42b5cf887f fix(scripts): allow the files.ts upload XHR in check-phase10 hygiene
- network rule exempts only the line-anchored upload XHR in admin/src/api/files.ts
- api-listing rule exempts only the exact path admin/src/api/files.ts
- self-test plants an XHR elsewhere and an extra admin/src/api file
2026-10-11 16:08:19 +02:00
d2fa195a91 docs(10): re-verify stale phase 10 report, gaps_found on check-phase10 hygiene gate 2026-10-11 15:54:52 +02:00
07e579a264 docs(09): re-verify after quick-261011-kzi, phase 09 passed 2026-10-11 15:40:54 +02:00
be82bccfc3 docs(quick-261011-kzi): fix Phase 09 gaps (fonoteka route inventory, per-guard token throttle) 2026-10-11 15:21:03 +02:00
b45af8ebbf fix(cabana): scope the token last_used_at throttle to the guard instance
- The process-global debounce map was keyed by token ID, so a stamp from one test database suppressed a later write in another and turned TestBackendTokenPostgres red depending on order
- Each compositeGuard now owns a stampThrottle; the backend guard and the ResolveBackend guard of one activation share it, so a single-app binary still writes last_used_at at most once a minute per token
- TestTokenLastUsedThrottlePerGuard pins the per-guard isolation
2026-10-11 15:19:55 +02:00
21fdcfcba6 docs(09): re-verify stale phase 09 report, gaps_found on fonoteka route inventory 2026-10-11 15:03:11 +02:00
a3b502bfb9 docs: record -short test fix in STATE 2026-10-11 14:43:52 +02:00
c85cb64b6e docs: CLAUDE.md -short runs without Docker again 2026-10-11 14:43:40 +02:00
7ef2e4f6cb test: honour -short in Docker-backed TestMain and cabana list-service fixture
TestMain scanned os.Args for a literal -test.short, but go test passes
-test.short=true, so beachcomber, conga, lagoon and lighthouse started a
Postgres container even under -short. Parse the flags and use
testing.Short() instead; skip cabana's newListService fixture under -short
like adminGorm already does.
2026-10-11 14:43:40 +02:00
73af414793 docs: correct the Docker note for go test -short in CLAUDE.md v0.1.22 2026-10-11 14:35:56 +02:00
73074ee257 fix(admin): keep plugin rail and section panel sticky so Settings stays at the viewport bottom 2026-10-11 14:34:24 +02:00
ee6fc7a235 docs(quick-261011-joh): record passing Docker-backed test re-run 2026-10-11 14:31:46 +02:00
290713cce3 docs(quick-261011-joh): sieve generic collection helpers module 2026-10-11 14:28:16 +02:00
a0bf8ece05 feat(sieve): add the remaining collection helpers and docs mentions
- Add TryMap, Filter, Reduce, KeyBy, GroupBy, Uniq, UniqBy, Partition
  and Find, plus the Set type built with SetOf (Has, Add, Slice).
- Add unit tests at 100% statement coverage and a runnable example for
  every function and Set method.
- Complete the module README: contracts, use cases, Pluck rationale,
  standard-library pointers and the full API reference.
- docs/architecture/introduction.md: add a Utilities row for sieve.
- docs/setup/coming-from-wintercms.md: map Laravel collection methods
  to sieve and narrow the not-provided row to the fluent collection
  object.
2026-10-11 14:27:13 +02:00