Regenerate published weekly puzzles when a release's prices break them

--check now re-solves every week not over yet and, when its budget no longer
verifies, regenerates it deterministically: the same puzzle with a new budget
if that works, else a fresh one for the key. A regenerated file carries rev 2,
3...; the game keeps stars per revision, so only that week's stars reset.
Past weeks are left alone unless the game rejects them. release.yml runs it
before the tests on every deploy, weekly-puzzle.yml before making the new
week; either fails only if a week cannot be regenerated.
This commit is contained in:
Frederic Jung 2026-10-29 10:03:20 +01:00
parent 77ec31d1a0
commit 7cbe0ec09b
No known key found for this signature in database
10 changed files with 135 additions and 23 deletions

View file

@ -45,6 +45,9 @@ jobs:
node-version: 24
cache: npm
- run: npm ci
# Weeks already out that main's prices no longer fit are regenerated first, so the new week's history is current.
- name: Fit the published weeks to main
run: node scripts/weekly-puzzle.js --check
- name: Make the puzzle
run: |
set -euo pipefail