Gives browser tests more time on the slow CI runner
Real nginx passes all 134 server rule tests in CI. The seven remaining failures were tests cut off at 60 seconds on the Raspberry Pi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
- **Feature Slug**: prerendering
|
||||
- **Project Type**: Brownfield
|
||||
- **Start Date**: 2026-10-31T14:15:01Z
|
||||
- **Current Stage**: CONSTRUCTION - Code Generation (unit 3: hosting-and-targets): steps 1 to 5 done; CP1 waits for a CI run; runner mode being checked before dispatch
|
||||
- **Current Stage**: CONSTRUCTION - Code Generation (unit 3: hosting-and-targets): CP1 closed (run 593); B2 to B5 running
|
||||
- **Branch**: feature/prerendering (from master c4c2f83); commits and pushes allowed for this feature (owner, 2026-10-31); workflow dispatch without deploy allowed; deploy to test after all units (owner, 2026-11-01), after the nginx config is placed
|
||||
- **Worktree**: K:\Development\SlpSoftware\Projects\AndreaSlopFotografie-prerendering
|
||||
|
||||
|
||||
+6
-6
@@ -6,17 +6,17 @@ Status values: OK, BLOCKED, DEVIATION, WITHDRAWN, OPEN.
|
||||
|
||||
| V# | Point | Step | Outcome | Evidence | Status |
|
||||
|---|---|---|---|---|---|
|
||||
| V1 | The generated nginx file loads in a real nginx (`nginx -t`) as an `http`-level include without any other directive from the Pi; `map` before `server` works in `conf.d`. Every directive is checked against the nginx 1.30 documentation (the Pi runs 1.30.6; CI has 1.24) | 3 (documentation), 6 (real nginx) | Documentation part OK; real-nginx part OPEN (no nginx locally; waits for the CI run) | Checked against nginx.org docs on 2026-11-01: map (context http only; exact string beats regex, first regex in file order wins; ~* case-insensitive; no default gives empty), if/return/rewrite (server, location; rewrite permanent = 301, original args appended unless replacement ends in ?), try_files (server, location), error_page (http, server, location; without = keeps the status), internal (location), absolute_redirect (http, server, location; since 1.11.8, default on), autoindex (http, server, location; default off), gzip/gzip_vary/gzip_proxied/gzip_http_version/gzip_comp_level/gzip_min_length/gzip_types (http, server, location; text/html always compressed). The generated file puts map at http level (conf.d include) and all others in server or location. NOT documented by nginx.org: escaping of the rewrite replacement (BR-HST-06 relies on it; settled only by the real nginx test on //evil.example/ and /evil.example/); the safety of if with only return comes from the nginx wiki, not the page. | OPEN |
|
||||
| V2 | Server-level `if ... return 301` and `rewrite ... permanent` responses carry all five headers and `Cache-Control` with real nginx; `absolute_redirect off` gives a relative `Location`; `/` works without an `index` directive | 6, 16 | | | open |
|
||||
| V3 | `/soorten-fotoshoots` (file) and `/soorten-fotoshoots/` (directory) behave as in section 3.1 on nginx and preview; `/assets` and `/assets/` as well | 6, 8, 16 | | | open |
|
||||
| V4 | `/404` and `/404.html` give 404 with the page and the five headers on nginx; `error_page` keeps the status; HEAD works | 6, 16 | | | open |
|
||||
| V5 | A HTTP/1.0 request with `Accept-Encoding: gzip` to the generated block gets `Content-Encoding: gzip` for `.html`, `.js`, `.css`, `.svg`, `.json`, `.xml` (all sizes above 256 bytes) and not for `.woff2`/images | 6, 16 | | | open |
|
||||
| V1 | The generated nginx file loads in a real nginx (`nginx -t`) as an `http`-level include without any other directive from the Pi; `map` before `server` works in `conf.d`. Every directive is checked against the nginx 1.30 documentation (the Pi runs 1.30.6; CI has 1.24) | 3 (documentation), 6 (real nginx) | OK on nginx 1.24.0: the generated file loads (nginx -t in the harness runs before every start) as an http-level include, map before server works; documentation part checked earlier (see below). Not proven: nginx 1.30.6 on the Pi (CI has 1.24.0); the real check is nginx -t plus the curl matrix during the Pi rollout (H2, H3). | Checked against nginx.org docs on 2026-11-01: map (context http only; exact string beats regex, first regex in file order wins; ~* case-insensitive; no default gives empty), if/return/rewrite (server, location; rewrite permanent = 301, original args appended unless replacement ends in ?), try_files (server, location), error_page (http, server, location; without = keeps the status), internal (location), absolute_redirect (http, server, location; since 1.11.8, default on), autoindex (http, server, location; default off), gzip/gzip_vary/gzip_proxied/gzip_http_version/gzip_comp_level/gzip_min_length/gzip_types (http, server, location; text/html always compressed). The generated file puts map at http level (conf.d include) and all others in server or location. NOT documented by nginx.org: escaping of the rewrite replacement (BR-HST-06 relies on it; settled only by the real nginx test on //evil.example/ and /evil.example/); the safety of if with only return comes from the nginx wiki, not the page. | CI run 593 (commit 8cb9185), job lighthouse, step Browsertests, nginx/1.24.0 (Ubuntu) on the Pi runner (container, root); e2e/serverRules.e2e.ts: 134 tests, all passed, none skipped (2088 ms), 67 per mime variant (.js as text/javascript and as application/javascript); the run totals 348 tests with 341 passed and 7 failed, all 7 in images.e2e.ts and reveal.e2e.ts (timeouts, unrelated); the test prints "[serverRules] nginx -v: nginx version: nginx/1.24.0 (Ubuntu)" once per variant. Earlier cycles found and fixed three defects through this proof: workers as www-data could not read the mkdtemp fixture (harness, run 592: 403), map plain keys ignore case so /Over-Mij was not redirected (generator), and /%5Cevil.example/ produced Location /evil.example (generator, BR-HST-06). | OK |
|
||||
| V2 | Server-level `if ... return 301` and `rewrite ... permanent` responses carry all five headers and `Cache-Control` with real nginx; `absolute_redirect off` gives a relative `Location`; `/` works without an `index` directive | 6, 16 | OK: 301 from the server-level if and from rewrite carry all five security headers, X-Robots-Tag and exactly one Cache-Control (raw header count); Location is relative (absolute_redirect off); / works without an index directive. Not proven: nginx 1.30.6 on the Pi (CI has 1.24.0); the real check is nginx -t plus the curl matrix during the Pi rollout (H2, H3). | CI run 593 (commit 8cb9185), job lighthouse, step Browsertests, nginx/1.24.0 (Ubuntu) on the Pi runner (container, root); e2e/serverRules.e2e.ts: 134 tests, all passed, none skipped (2088 ms), 67 per mime variant (.js as text/javascript and as application/javascript); the run totals 348 tests with 341 passed and 7 failed, all 7 in images.e2e.ts and reveal.e2e.ts (timeouts, unrelated); the test prints "[serverRules] nginx -v: nginx version: nginx/1.24.0 (Ubuntu)" once per variant. Earlier cycles found and fixed three defects through this proof: workers as www-data could not read the mkdtemp fixture (harness, run 592: 403), map plain keys ignore case so /Over-Mij was not redirected (generator), and /%5Cevil.example/ produced Location /evil.example (generator, BR-HST-06). | OK |
|
||||
| V3 | `/soorten-fotoshoots` (file) and `/soorten-fotoshoots/` (directory) behave as in section 3.1 on nginx and preview; `/assets` and `/assets/` as well | 6, 8, 16 | OK on nginx: /soorten-fotoshoots serves the file with the directory soorten-fotoshoots/ next to it, /soorten-fotoshoots/ gives one 301, /assets gives 404, /assets/ gives 301 to /assets. Preview-server side still open (Step 8/16). Not proven: nginx 1.30.6 on the Pi (CI has 1.24.0); the real check is nginx -t plus the curl matrix during the Pi rollout (H2, H3). | CI run 593 (commit 8cb9185), job lighthouse, step Browsertests, nginx/1.24.0 (Ubuntu) on the Pi runner (container, root); e2e/serverRules.e2e.ts: 134 tests, all passed, none skipped (2088 ms), 67 per mime variant (.js as text/javascript and as application/javascript); the run totals 348 tests with 341 passed and 7 failed, all 7 in images.e2e.ts and reveal.e2e.ts (timeouts, unrelated); the test prints "[serverRules] nginx -v: nginx version: nginx/1.24.0 (Ubuntu)" once per variant. Earlier cycles found and fixed three defects through this proof: workers as www-data could not read the mkdtemp fixture (harness, run 592: 403), map plain keys ignore case so /Over-Mij was not redirected (generator), and /%5Cevil.example/ produced Location /evil.example (generator, BR-HST-06). | OK (nginx part) |
|
||||
| V4 | `/404` and `/404.html` give 404 with the page and the five headers on nginx; `error_page` keeps the status; HEAD works | 6, 16 | OK: /404 and /404.html give 404 with the page and all headers, a missing asset gives the 404 page with no-cache (not immutable), error_page keeps the status, HEAD works. Not proven: nginx 1.30.6 on the Pi (CI has 1.24.0); the real check is nginx -t plus the curl matrix during the Pi rollout (H2, H3). | CI run 593 (commit 8cb9185), job lighthouse, step Browsertests, nginx/1.24.0 (Ubuntu) on the Pi runner (container, root); e2e/serverRules.e2e.ts: 134 tests, all passed, none skipped (2088 ms), 67 per mime variant (.js as text/javascript and as application/javascript); the run totals 348 tests with 341 passed and 7 failed, all 7 in images.e2e.ts and reveal.e2e.ts (timeouts, unrelated); the test prints "[serverRules] nginx -v: nginx version: nginx/1.24.0 (Ubuntu)" once per variant. Earlier cycles found and fixed three defects through this proof: workers as www-data could not read the mkdtemp fixture (harness, run 592: 403), map plain keys ignore case so /Over-Mij was not redirected (generator), and /%5Cevil.example/ produced Location /evil.example (generator, BR-HST-06). | OK |
|
||||
| V5 | A HTTP/1.0 request with `Accept-Encoding: gzip` to the generated block gets `Content-Encoding: gzip` for `.html`, `.js`, `.css`, `.svg`, `.json`, `.xml` (all sizes above 256 bytes) and not for `.woff2`/images | 6, 16 | OK: HTTP/1.1 and raw HTTP/1.0 requests get gzip for html, js, css, svg, json, xml, txt in both mime variants, none for woff2 and png; Vary: Accept-Encoding present. Not proven: nginx 1.30.6 on the Pi (CI has 1.24.0); the real check is nginx -t plus the curl matrix during the Pi rollout (H2, H3). | CI run 593 (commit 8cb9185), job lighthouse, step Browsertests, nginx/1.24.0 (Ubuntu) on the Pi runner (container, root); e2e/serverRules.e2e.ts: 134 tests, all passed, none skipped (2088 ms), 67 per mime variant (.js as text/javascript and as application/javascript); the run totals 348 tests with 341 passed and 7 failed, all 7 in images.e2e.ts and reveal.e2e.ts (timeouts, unrelated); the test prints "[serverRules] nginx -v: nginx version: nginx/1.24.0 (Ubuntu)" once per variant. Earlier cycles found and fixed three defects through this proof: workers as www-data could not read the mkdtemp fixture (harness, run 592: 403), map plain keys ignore case so /Over-Mij was not redirected (generator), and /%5Cevil.example/ produced Location /evil.example (generator, BR-HST-06). | OK |
|
||||
| V6 | Withdrawn for this unit (IIS needs a host). The checks move to the "Before go-live" list, U1 to U6 | WITHDRAWN (no host) | | | WITHDRAWN |
|
||||
| V7 | `previewServer.ts`: the new `resolveRequest` contract (redirect result, query handling, `--audit-route`); unit 1 tests for BR-SRV-07 are updated (the "interim" rules become final); `pageFiles.ts` stays the single path to file mapping | 7, 8 | | | open |
|
||||
| V8 | The 301 is followed by Chrome with the query string intact for `?pakket=` and `?shoot=` links, and the hydrated page has 1 title (extend the existing "URL die de server niet kent en de router wel" e2e) | 17 | | | open |
|
||||
| V9 | One Lighthouse run of the 404 page on the preview audit route, and (as comparison) `/404.html` with `ignoreStatusCode`; record best-practices for both, then keep the simpler passing option (O2) | 23 (measurement-final.md) | | | open |
|
||||
| V10 | lftp: dry run against a `file:` target proves that pass 1 skips all nested `*.html` and `web.config`, pass 2 uploads them, pass 3 deletes only stale files | 14 | | | open |
|
||||
| V11 | `verify-deployment.sh` fails against a copy of the old nginx config (home page for `/over-mij`) and passes against the new one | 13 | | | open |
|
||||
| V12 | CI: the `lighthouse` job (or a new `server-rules` job) installs nginx, `pnpm e2e` includes `serverRules.e2e.ts`, and the job fails if nginx is missing | 5, 16 | CI step added (lighthouse job): apt-get install nginx lftp, service nginx stop, nginx -v; Browsertests step has CI=true; serverRules.e2e.ts fails with "nginx ontbreekt in CI (BR-HST-24)" when nginx is missing. Gate proven locally with CI=true and no nginx (1 failed, as intended) and without CI (skip line, exit 0). The real CI run is still to come. | e2e/serverRules.e2e.ts; .gitea/workflows/continuous_integration.yaml; CI run pending | OPEN |
|
||||
| V12 | CI: the `lighthouse` job (or a new `server-rules` job) installs nginx, `pnpm e2e` includes `serverRules.e2e.ts`, and the job fails if nginx is missing | 5, 16 | OK: the lighthouse job installs nginx and lftp, Browsertests runs with CI=true, serverRules ran with nginx present. The missing-nginx failure path was proven locally (CI=true without nginx fails with "nginx ontbreekt in CI (BR-HST-24)"). | CI run 593 (commit 8cb9185), job lighthouse, step Browsertests, nginx/1.24.0 (Ubuntu) on the Pi runner (container, root); e2e/serverRules.e2e.ts: 134 tests, all passed, none skipped (2088 ms), 67 per mime variant (.js as text/javascript and as application/javascript); the run totals 348 tests with 341 passed and 7 failed, all 7 in images.e2e.ts and reveal.e2e.ts (timeouts, unrelated); the test prints "[serverRules] nginx -v: nginx version: nginx/1.24.0 (Ubuntu)" once per variant. Earlier cycles found and fixed three defects through this proof: workers as www-data could not read the mkdtemp fixture (harness, run 592: 403), map plain keys ignore case so /Over-Mij was not redirected (generator), and /%5Cevil.example/ produced Location /evil.example (generator, BR-HST-06). The install step in run 593 uses policy-rc.d to keep the package from starting a service. | OK |
|
||||
| V13 | `lighthouserc.cjs`: the exception table is empty on delivery unless an owner decision exists; P-HST-11 passes; `pnpm lighthouse` still starts the preview with `--audit-route` and `Local` appears for `startServerReadyPattern` | 11, 12 | | | open |
|
||||
| V14 | The generated header comment fits the Pi: install path `/etc/nginx/conf.d/andreaslop-test.conf` (included from `nginx.conf:38`), no `sites-enabled`, no global `nginx.conf` change; the file works for a first install and for an update of an existing file | 3 | Header comment rewritten: install path /etc/nginx/conf.d/andreaslop-test.conf, included in http {} from nginx.conf, no sites-enabled, no global nginx.conf change, own gzip block because the Pi has none, works behind an HTTP/1.0 proxy, 444 from 00-default.conf for an unknown host (old WordPress remark removed), server_name and root adaptable, no default_server. The same file serves a first install and an update (it replaces the existing file in place). | Generated deploy/nginx/andreaslop-test.conf (lines 1-12); equals nginxTestConf() (serverConfig.test.ts sync test green) | OK |
|
||||
|
||||
+2
-1
@@ -226,7 +226,7 @@ The riskiest mechanism is the nginx block (a `map`, a server-level `if` and `rew
|
||||
- Record: the exact diff.
|
||||
- Done: one new step "Install nginx and lftp (serverregeltests)" before Browsertests, plus `CI: 'true'` in the env of Browsertests, with Dutch comments. See `git diff .gitea`.
|
||||
|
||||
### Step 6: Checkpoint CP1: the nginx proof [ ] STOP-AND-ASK if no local nginx
|
||||
### Step 6: Checkpoint CP1: the nginx proof [x] STOP-AND-ASK if no local nginx
|
||||
|
||||
- Executor: Haiku.
|
||||
- Implements: BR-HST-24; V1 to V5.
|
||||
@@ -241,6 +241,7 @@ The riskiest mechanism is the nginx block (a `map`, a server-level `if` and `rew
|
||||
3. **Resume rule**: when the main session returns a CI log, read it. If green: record V1 to V5 with the log excerpt and continue at Step 7. If red: fix the generator (Step 3) or harness (Step 4), update the tests only to make them correct (never looser), and return to the main session for another CI cycle; do not start Step 7 until green or until the main session says to continue with CP1 open.
|
||||
- Done when: **CP1**: V1 to V5 recorded OK from a real nginx (local or CI log), or the main session explicitly released the run with CP1 open.
|
||||
- Record: where the proof came from (local binary and version, or CI run link/identifier given by the main session).
|
||||
- CP1 closed by CI run 593 (commit 8cb9185), job lighthouse, step Browsertests: nginx/1.24.0, serverRules.e2e.ts 134 of 134 passed, 67 per mime variant, none skipped. V1 to V5 and V12 are OK in the verification log. Three defects were found and fixed along the way (harness permissions as root, case-insensitive map keys, backslash in Location). Unproven: nginx 1.30.6 on the Pi.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user