Hardens the upload path check and the deploy verification

A remote of . or .. could have made the cleanup pass delete the wrong folder, so
such paths are refused before anything runs. A connection error now ends in the
normal summary instead of aborting the check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 19:31:21 +01:00
co-authored by Claude Opus 5.5
parent afd9923950
commit 6d4d01238a
9 changed files with 215 additions and 15 deletions
@@ -419,14 +419,15 @@ The riskiest mechanism is the nginx block (a `map`, a server-level `if` and `rew
## Part H: Finish (batch B7)
### Step 19: Comments, naming, formatting review [ ]
### Step 19: Comments, naming, formatting review [x]
- Executor: Sonnet.
- Do: read `git diff` of `web/` and check: no comment or test title names a plan step or this plan; comments explain why; the file header of `previewServer.ts`, `serverConfig.ts`, `lighthouserc.cjs` and the generated files state the current truth (no mention of the 200 at `/404.html`, no "SPA fallback"); no leftover scratch code; no `console.log` in the new code except the intended skip line; `pnpm exec prettier --check` on every changed file; every new file has a short header comment saying why it exists.
- Done when: `pnpm lint`, `pnpm format:check`, `pnpm exec tsc --noEmit` clean; the review notes are one line each in the Record.
- Record: findings fixed.
- Done. Review of the unit 3 files (previewServer.ts, canonicalUrls.ts, compressibleTypes.ts, lighthouserc.cjs, serverConfig.ts, the three deploy scripts, nginx conf, web.config, workflow): no comment or test title names a plan step, no SPA or `/404.html`-200 text, no scratch code, `console.log` only in the intended places (ready line, `writeServerConfig`, seed line, test names), every new file has a header. One fix: `src/test/navViewport.ts` named "Step 17" and is now timeless (an unit 2 file). Prettier, eslint and `tsc --noEmit` clean. Defects found in the line-by-line read are listed in the report to the main session, not fixed.
### Step 20: Fit with the Pi install instructions and hand-over notes [ ]
### Step 20: Fit with the Pi install instructions and hand-over notes [x]
- Executor: Sonnet.
- Do: `aidlc-docs/features/prerendering/construction/hosting-and-targets/infrastructure-design/pi-install-instructions.md` was written by the Pi-Main session through the main session. **Do not change it.** `infrastructure-design.md` § 13 links to it from H2, H4 and the rollback text (the main session edited them). Step 20 only verifies that the generated files fit it, and records the result:
@@ -438,13 +439,15 @@ The riskiest mechanism is the nginx block (a `map`, a server-level `if` and `rew
The Pi-Main session requests the `server-ops` draft separately, with the generated text of `web/deploy/nginx/andreaslop-test.conf`; this plan only produces that file. **This plan does not touch the Pi, `server-ops` or the webhost, and does not merge.** Human tasks, listed so nobody mistakes them for plan steps: H2 (the owner places the config as the instructions say, after separate approval, and reloads), H3 (the deploy right after: a manual branch deploy or the merge, with the checks of the instructions and of deployment-architecture.md § 5), the optional proxy check/change H4, the first CI proof of Step 6, and everything about the webhost (Q1 to Q6, U1 to U6). Add one line to `code-summary.md` (Step 24) that references the instructions file.
- Done when: the four points are recorded OK (or DEVIATION with the exact difference) in the verification log under V14; `pi-install-instructions.md` is unchanged by this plan.
- Record: one line.
- Done. All four points hold in the generated text (V14 updated). Findings for the owner are in the report to the main session; `pi-install-instructions.md` is untouched.
### Step 21: Full verification (Code Generation Step 13.5; CP4) [ ]
### Step 21: Full verification (Code Generation Step 13.5; CP4) [x]
- Executor: Haiku.
- Do: from `web/`, in order, each to completion: `pnpm lint`, `pnpm format:check`, `pnpm test`, `pnpm build && pnpm e2e`, `pnpm audit:deps`, `pnpm audit:dev`. Then record SHA-256 of `lighthouserc.cjs` targets file for Step 23: compute the effective target table of Step 11 again and compare it with the baseline from Step 11's Record (must be identical).
- Done when: **CP4**: all green (audit:dev only reports). Counts, seed, durations in the Record. If any fails: STOP, report.
- Record: counts; the targets comparison result.
- Done (CP4). `pnpm lint`, `pnpm format:check`, `tsc --noEmit` clean; `pnpm test` 132 files, 1390 tests passed, seed 743185601, 75.9 s; fresh `pnpm build && pnpm e2e`: 12 files passed, 248 tests passed, 204 skipped (nginx and lftp not installed here; CI covers them), seed 1046879097, 202 s; `pnpm audit:deps` no known vulnerabilities; `pnpm audit:dev` reports 23 (2 low, 10 moderate, 11 high), non-blocking. Targets: `lighthouserc.cjs` SHA-256 `6e146472ed7a...` (mobile) and `lighthouserc.desktop.cjs` `f13d993389ba...` (unchanged from the baseline); the effective per-URL assertions (24 URL entries, mobile and desktop) of the baseline commit 4f32042 and of the current files are identical (0 differences; the 404 URL compared as the 404 page).
---