Codifies the manual live-E2E curl flows into a CI regression net.
What
New functional-e2e CI job (.gitea/workflows/docker-build.yml): builds SPA + solution (Release), ensures ffmpeg, boots dotnet ErsatzTV.dll via scripts/e2e-local.sh (now ETV_BUILD_CONFIG-parameterized), runs the harness, traps-kills the instance.
New scripts/e2e-functional.sh: the assertions — runs identically locally and in CI.
Contracts asserted (curl-only, deterministic — no seeded media / ffmpeg-transcode / browser)
Legacy->SPA redirects: representative sweep 302->/app/* + the /api,/artwork never-redirect exemption.
Library-scan status contract: unknown-lib 404, empty-lib queue 202, scan-status 200.
If-Match/412: rerun-collections GET-ETag -> stale 412 / current 200 / malformed 400.
Design decisions
Boot from source, not the built image — the image is only built on main/v*, so a PR must build its own code. Reuses e2e-local.sh so the harness is the same by hand and in CI.
Advisory — separate job, not a buildneeds:, not a required check, so a flake can't block the unit-test gate; promote once proven (migrations-job rollout precedent). SQLite default -> no DB service.
Deferred to #299 follow-ups (need scanner+seeded media or a browser to be non-racy): the 409 "already-scanning" re-trigger, playout-build lock 409, Playwright UI-interactive flows.
Verification
Harness 30/30 green against a real Release-built instance locally (both Debug and Release build configs).
Probing the live instance caught a real discrepancy vs a static read: /artwork/* returns 400, not 404 — assertions match observed behavior.
No .cs or /api/* surface change (format / api-docs CI jobs skip). Pure CI + scripts + docs.
Generated with Claude Code (Opus 4.8)
Fixes #299 (first cut).
Codifies the manual live-E2E curl flows into a CI regression net.
## What
- **New `functional-e2e` CI job** (`.gitea/workflows/docker-build.yml`): builds SPA + solution (Release), ensures ffmpeg, boots `dotnet ErsatzTV.dll` via `scripts/e2e-local.sh` (now `ETV_BUILD_CONFIG`-parameterized), runs the harness, traps-kills the instance.
- **New `scripts/e2e-functional.sh`**: the assertions — runs identically locally and in CI.
## Contracts asserted (curl-only, deterministic — no seeded media / ffmpeg-transcode / browser)
- **Legacy->SPA redirects**: representative sweep 302->`/app/*` + the `/api`,`/artwork` never-redirect exemption.
- **Auth/CSRF/security-stamp**: setup-claim 200 / re-claim 409, read-gate 401->200, session-mutation 403-without-`X-CSRF`, login 401/200, logout 403/204, post-logout stamp-revocation 401.
- **Library-scan status contract**: unknown-lib 404, empty-lib queue 202, `scan-status` 200.
- **If-Match/412**: `rerun-collections` GET-ETag -> stale 412 / current 200 / malformed 400.
## Design decisions
- **Boot from source, not the built image** — the image is only built on main/`v*`, so a PR must build its own code. Reuses `e2e-local.sh` so the harness is the same by hand and in CI.
- **Advisory** — separate job, not a `build` `needs:`, not a required check, so a flake can't block the unit-test gate; promote once proven (migrations-job rollout precedent). SQLite default -> no DB service.
- **Deferred to #299 follow-ups** (need scanner+seeded media or a browser to be non-racy): the 409 "already-scanning" re-trigger, playout-build lock 409, Playwright UI-interactive flows.
## Verification
- Harness **30/30 green** against a real Release-built instance locally (both Debug and Release build configs).
- Probing the live instance caught a real discrepancy vs a static read: `/artwork/*` returns **400**, not 404 — assertions match observed behavior.
## Docs (same PR)
- `docs/ci-cd.md` — new job subsection.
- `docs/e2e-local.md` — harness usage + `ETV_BUILD_CONFIG`.
- `docs/decisions.md` — append-only entry.
No `.cs` or `/api/*` surface change (format / api-docs CI jobs skip). Pure CI + scripts + docs.
Generated with Claude Code (Opus 4.8)
Cold-context adversarial review (review-only, independent) complete. Traced every one of the 30 assertions back to the real controllers/DTOs and stress-tested the failure modes; the headline question — can any assertion pass vacuously — is no (connection failure yields curl 000 which never equals an expected 2xx/4xx; redirect checks require positive 302 + exact Location evidence). Confirmed the FD/PID/trap launch wiring cannot hang the command-substitution, the if:/ETV_BUILD_CONFIG=Release CI wiring is correct, and the docs are accurate + decisions.md is insertion-only.
No Critical/High/Medium findings. Two Low config-drift observations (create bodies omit required mediaKind/paths — works today, would fail loudly if validation tightens; advisory-status hinges on branch-protection config outside this diff) and three nits (defensive ffmpeg apt install, double-curl per redirect, uncleaned mktemp temps) — all non-blocking, no code change needed.
Cold-context adversarial review (review-only, independent) complete. Traced every one of the 30 assertions back to the real controllers/DTOs and stress-tested the failure modes; the headline question — can any assertion pass vacuously — is **no** (connection failure yields curl `000` which never equals an expected 2xx/4xx; redirect checks require positive `302 + exact Location` evidence). Confirmed the FD/PID/`trap` launch wiring cannot hang the command-substitution, the `if:`/`ETV_BUILD_CONFIG=Release` CI wiring is correct, and the docs are accurate + `decisions.md` is insertion-only.
No Critical/High/Medium findings. Two Low config-drift observations (create bodies omit `required` mediaKind/paths — works today, would fail *loudly* if validation tightens; advisory-status hinges on branch-protection config outside this diff) and three nits (defensive ffmpeg apt install, double-curl per redirect, uncleaned mktemp temps) — all non-blocking, no code change needed.
Review-verdict: MERGEABLE @ a0e47b5425c8bdb29b80bfc5f74a20e4d0758719
Rebased onto origin/main (main advanced with the #247 shell/routing merge). The rebase's only conflict was a pure append in docs/decisions.md (both PRs added a dated entry) — resolved by keeping both entries in date order, TOC append-only intact. The 5 reviewed non-docs files (docker-build.yml, both scripts, ci-cd.md, e2e-local.md) are byte-identical to the reviewed commit (git diff a0e47b54 HEAD -- <those files> is empty); decisions.md only gained #247's coexisting entry + a blank-line separator. No change to reviewed substance.
Rebased onto origin/main (main advanced with the #247 shell/routing merge). The rebase's only conflict was a pure append in `docs/decisions.md` (both PRs added a dated entry) — resolved by keeping both entries in date order, TOC append-only intact. The 5 reviewed non-docs files (`docker-build.yml`, both scripts, `ci-cd.md`, `e2e-local.md`) are **byte-identical** to the reviewed commit (`git diff a0e47b54 HEAD -- <those files>` is empty); `decisions.md` only gained #247's coexisting entry + a blank-line separator. No change to reviewed substance.
Re-attesting at the new head:
Review-verdict: MERGEABLE @ 0d7803079c61235abfd891aac0ebcb7f406c449f
timothy
merged commit 0d7803079c into main2026-07-16 14:00:06 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #299 (first cut).
Codifies the manual live-E2E curl flows into a CI regression net.
What
functional-e2eCI job (.gitea/workflows/docker-build.yml): builds SPA + solution (Release), ensures ffmpeg, bootsdotnet ErsatzTV.dllviascripts/e2e-local.sh(nowETV_BUILD_CONFIG-parameterized), runs the harness, traps-kills the instance.scripts/e2e-functional.sh: the assertions — runs identically locally and in CI.Contracts asserted (curl-only, deterministic — no seeded media / ffmpeg-transcode / browser)
/app/*+ the/api,/artworknever-redirect exemption.X-CSRF, login 401/200, logout 403/204, post-logout stamp-revocation 401.scan-status200.rerun-collectionsGET-ETag -> stale 412 / current 200 / malformed 400.Design decisions
v*, so a PR must build its own code. Reusese2e-local.shso the harness is the same by hand and in CI.buildneeds:, not a required check, so a flake can't block the unit-test gate; promote once proven (migrations-job rollout precedent). SQLite default -> no DB service.Verification
/artwork/*returns 400, not 404 — assertions match observed behavior.Docs (same PR)
docs/ci-cd.md— new job subsection.docs/e2e-local.md— harness usage +ETV_BUILD_CONFIG.docs/decisions.md— append-only entry.No
.csor/api/*surface change (format / api-docs CI jobs skip). Pure CI + scripts + docs.Generated with Claude Code (Opus 4.8)
Cold-context adversarial review (review-only, independent) complete. Traced every one of the 30 assertions back to the real controllers/DTOs and stress-tested the failure modes; the headline question — can any assertion pass vacuously — is no (connection failure yields curl
000which never equals an expected 2xx/4xx; redirect checks require positive302 + exact Locationevidence). Confirmed the FD/PID/traplaunch wiring cannot hang the command-substitution, theif:/ETV_BUILD_CONFIG=ReleaseCI wiring is correct, and the docs are accurate +decisions.mdis insertion-only.No Critical/High/Medium findings. Two Low config-drift observations (create bodies omit
requiredmediaKind/paths — works today, would fail loudly if validation tightens; advisory-status hinges on branch-protection config outside this diff) and three nits (defensive ffmpeg apt install, double-curl per redirect, uncleaned mktemp temps) — all non-blocking, no code change needed.Review-verdict: MERGEABLE @ a0e47b5425c8bdb29b80bfc5f74a20e4d0758719
a0e47b5425todd0c9ddd51dd0c9ddd51to0d7803079cRebased onto origin/main (main advanced with the #247 shell/routing merge). The rebase's only conflict was a pure append in
docs/decisions.md(both PRs added a dated entry) — resolved by keeping both entries in date order, TOC append-only intact. The 5 reviewed non-docs files (docker-build.yml, both scripts,ci-cd.md,e2e-local.md) are byte-identical to the reviewed commit (git diff a0e47b54 HEAD -- <those files>is empty);decisions.mdonly gained #247's coexisting entry + a blank-line separator. No change to reviewed substance.Re-attesting at the new head:
Review-verdict: MERGEABLE @
0d7803079c