fix(website): recover progress collection and reject broken deployments #258

Merged
HumanBean merged 1 commit from bibiburl/Longshot:fix/website-progress-recovery into main 2026-11-13 18:13:16 +00:00
Member

Why

The live Progress page cannot load data because a website build timed out while collecting Forgejo metadata and still deployed an error-only feed. The next rebuild was blocked by the settings importer rejecting the README's Native HDR wording. This restores website builds and prevents a failed collection from replacing the deployed site.

What changed

  • graphics-settings.ts: accept the current “with HDR set to Native” condition, retaining the badge and the guard requiring a documented condition for hidden menu rows.
  • progress-request.ts / progress-feed.ts: retry each build-time GET up to three attempts on timeouts, temporary connection failures, HTTP 408/429 and 500/502/503/504. Allow 30 seconds per attempt including the JSON body; wait 1 then 2 seconds, respecting longer Retry-After values up to 30 seconds. Logs identify the endpoint, failure and attempt without response bodies or credentials.
  • check-site.ts: validate the complete generated feed using the browser's existing schema, rejecting the error-only fallback and malformed records before deployment. A valid empty feed remains valid.
  • npm run deploy: run publication checks and website tests before Wrangler, matching the existing Website workflow's gate. Local builds can still show the unavailable-data fallback.
  • Regression coverage for current/legacy HDR wording, missing conditions, transient recovery, exhausted attempts, permanent errors, body timeouts and publication rejection. Public-only source validation and safe pagination remain in force.

Flags and settings

None. No new token, permission, secret or runtime option. The public API remains sufficient. No game settings or defaults change.

Measurements

main: fbd4202 (2026-11-13)
this PR: fix/website-progress-recovery @ b124f16
Baseline: main @ fbd4202
Environment: local Linux, Node v22.23.4 and pinned website dependencies. Deterministic game-free checks; no gameplay or performance claim.

Check main @ fbd4202 this PR @ b124f16
Existing graphics-settings tests against current README/menu 7 pass, 7 fail; Native HDR condition rejected All 15 pass, including added regression
Publication check with the deployed error-only JSON in a minimal site fixture Exit 0: incorrectly accepted Exit 1: rejected as not publishable
Final production website build Production failure corroborated below 14 pages, valid feed with 265 records

Reproduce: cd website, npm ci, npm run build, npm run check. For the gate regression, node --test tests/publication.test.ts supplies the error-only response, malformed JSON/records and a valid empty snapshot to the actual publication checker. For the graphics regression, run node tests/graphics-settings.test.ts against each revision. A temporary copy of main's checker accepted the same error-only fixture which this PR rejects.

14 page(s) built in 20.35s
Site check passed: 14 pages, 788 local links and assets, their anchors and edit links.
tests 53
pass 53
fail 0
Progress feed: 265 records, generatedAt 2026-11-13T18:06:36.261Z
main checker: exit 0
PR checker: exit 1, Progress feed is not publishable: Invalid progress feed.

The build duration is one observed run, not a performance comparison. Feed counts change as repository activity changes.

Production evidence:

Testing

Tested: Production static build with live public Forgejo data; 53 website tests across nine files; generated routes, links/assets, anchors and feed schema; deterministic failure/recovery tests; git diff --check. Both the workflow and npm deployment path run npm run check before deployment.

Not tested: Full python -I -B tests/run_all.py, game execution, browser rendering or an actual Cloudflare deployment. No runtime code changes. Website publication awaits maintainer review and merge; local tests cannot prove production network availability.

Needs other testers: None for code review under the requesting user's emergency website-review preference. After merge, confirm the Website workflow succeeds and /progress-feed.json contains a valid snapshot; then check that /progress/ loads it.

Screenshots

No layout changes. This repairs collection and build checks. No screenshots or browser verification claimed; generated data and deterministic regression output provide the evidence above.

Risk and rollback

Transient failures can make builds take longer, with three bounded attempts per request. Persistent failures deliberately stop publication, leaving the existing site in place (which means the currently broken site stays broken until a successful deployment). A legitimate zero-item snapshot is allowed. Reverting this commit restores previous behavior but also restores the broken-feed deployment risk.

Reviewer notes

Review the publication gate and retry classifications first. Credentials are never sent to new destinations; existing pagination checks run before requests, redirects remain disallowed, and private sources are rejected. A stable-release 404 remains a supported no-release state.

This follows the user's existing approval to mark urgent website repairs ready using scoped website validation, without claiming the full runtime suite or screenshots were completed. Unticked template requirements below remain accurate. The paused save-transfer simplification and install-version preview are excluded. No direct deployment or upstream push was performed.

Issues

User-reported live Progress outage; no linked issue.

Checklist

For everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description).
  • Rebased on current main.
  • python -I -B tests/run_all.py run and passing (any failure that also fails on main is named above). Not run; scoped website checks used for this urgent website repair.
  • Tested in the game, or what wasn't is named under Testing.
  • Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests).
  • Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. Deterministic regression evidence above; gameplay timing comparisons do not apply.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

If applicable

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A game-free test added for the fix, failing on main and passing here.
  • Docs updated.
## Why The live Progress page cannot load data because a website build timed out while collecting Forgejo metadata and still deployed an error-only feed. The next rebuild was blocked by the settings importer rejecting the README's Native HDR wording. This restores website builds and prevents a failed collection from replacing the deployed site. ## What changed - `graphics-settings.ts`: accept the current “with HDR set to Native” condition, retaining the badge and the guard requiring a documented condition for hidden menu rows. - `progress-request.ts` / `progress-feed.ts`: retry each build-time GET up to three attempts on timeouts, temporary connection failures, HTTP 408/429 and 500/502/503/504. Allow 30 seconds per attempt including the JSON body; wait 1 then 2 seconds, respecting longer Retry-After values up to 30 seconds. Logs identify the endpoint, failure and attempt without response bodies or credentials. - `check-site.ts`: validate the complete generated feed using the browser's existing schema, rejecting the error-only fallback and malformed records before deployment. A valid empty feed remains valid. - `npm run deploy`: run publication checks and website tests before Wrangler, matching the existing Website workflow's gate. Local builds can still show the unavailable-data fallback. - Regression coverage for current/legacy HDR wording, missing conditions, transient recovery, exhausted attempts, permanent errors, body timeouts and publication rejection. Public-only source validation and safe pagination remain in force. ## Flags and settings None. No new token, permission, secret or runtime option. The public API remains sufficient. No game settings or defaults change. ## Measurements main: fbd4202 (2026-11-13) this PR: fix/website-progress-recovery @ b124f16 Baseline: main @ fbd4202 Environment: local Linux, Node v22.23.4 and pinned website dependencies. Deterministic game-free checks; no gameplay or performance claim. | Check | main @ fbd4202 | this PR @ b124f16 | |---|---|---| | Existing graphics-settings tests against current README/menu | 7 pass, 7 fail; Native HDR condition rejected | All 15 pass, including added regression | | Publication check with the deployed error-only JSON in a minimal site fixture | Exit 0: incorrectly accepted | Exit 1: rejected as not publishable | | Final production website build | Production failure corroborated below | 14 pages, valid feed with 265 records | Reproduce: `cd website`, `npm ci`, `npm run build`, `npm run check`. For the gate regression, `node --test tests/publication.test.ts` supplies the error-only response, malformed JSON/records and a valid empty snapshot to the actual publication checker. For the graphics regression, run `node tests/graphics-settings.test.ts` against each revision. A temporary copy of main's checker accepted the same error-only fixture which this PR rejects. ```text 14 page(s) built in 20.35s Site check passed: 14 pages, 788 local links and assets, their anchors and edit links. tests 53 pass 53 fail 0 Progress feed: 265 records, generatedAt 2026-11-13T18:06:36.261Z main checker: exit 0 PR checker: exit 1, Progress feed is not publishable: Invalid progress feed. ``` The build duration is one observed run, not a performance comparison. Feed counts change as repository activity changes. Production evidence: - [Deployed build 1586](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/1586/jobs/0/attempt/1): progress collection timed out, followed by a successful deployment. - [Subsequent build 1765](https://git.magicbean.dev/MagicBeanDev/Longshot/actions/runs/1765/jobs/0/attempt/1): stopped at the Native HDR condition check. ## Testing **Tested:** Production static build with live public Forgejo data; 53 website tests across nine files; generated routes, links/assets, anchors and feed schema; deterministic failure/recovery tests; `git diff --check`. Both the workflow and npm deployment path run `npm run check` before deployment. **Not tested:** Full `python -I -B tests/run_all.py`, game execution, browser rendering or an actual Cloudflare deployment. No runtime code changes. Website publication awaits maintainer review and merge; local tests cannot prove production network availability. **Needs other testers:** None for code review under the requesting user's emergency website-review preference. After merge, confirm the Website workflow succeeds and `/progress-feed.json` contains a valid snapshot; then check that `/progress/` loads it. ## Screenshots No layout changes. This repairs collection and build checks. No screenshots or browser verification claimed; generated data and deterministic regression output provide the evidence above. ## Risk and rollback Transient failures can make builds take longer, with three bounded attempts per request. Persistent failures deliberately stop publication, leaving the existing site in place (which means the currently broken site stays broken until a successful deployment). A legitimate zero-item snapshot is allowed. Reverting this commit restores previous behavior but also restores the broken-feed deployment risk. ## Reviewer notes Review the publication gate and retry classifications first. Credentials are never sent to new destinations; existing pagination checks run before requests, redirects remain disallowed, and private sources are rejected. A stable-release 404 remains a supported no-release state. This follows the user's existing approval to mark urgent website repairs ready using scoped website validation, without claiming the full runtime suite or screenshots were completed. Unticked template requirements below remain accurate. The paused save-transfer simplification and install-version preview are excluded. No direct deployment or upstream push was performed. ## Issues User-reported live Progress outage; no linked issue. ## Checklist ### For everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`). - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` run and passing (any failure that also fails on `main` is named above). Not run; scoped website checks used for this urgent website repair. - [x] Tested in the game, or what wasn't is named under Testing. - [x] Testing filled in: what was tested, what wasn't, and what needs other testers (with test requests). - [ ] Measured: main and this PR at named commits, on the same PC, scene and settings, at least 2 interleaved runs each, the median reported. Deterministic regression evidence above; gameplay timing comparisons do not apply. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### If applicable - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] Docs updated.
fix(website): recover progress collection and reject broken deployments
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
PR description / Description follows the template (pull_request_target) Failing after 5s
CI / Workflow lint (actionlint) (pull_request) Successful in 6s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
b124f1644c
Recognize the documented Native HDR condition, retry transient Forgejo reads with bounded backoff, and validate the complete public feed before publication. Keep the deployed site in place when collection fails.

Assisted-by: OpenAI Codex
HumanBean deleted branch fix/website-progress-recovery 2026-11-13 18:13:16 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!258
No description provided.