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:
parent
77ec31d1a0
commit
7cbe0ec09b
10 changed files with 135 additions and 23 deletions
|
|
@ -21,6 +21,13 @@ version for a weekly puzzle. To publish or fix one by hand: `node scripts/weekly
|
|||
`gh workflow run release.yml --ref <live tag> -f tag=<live tag> -f weekly=true`). A release includes every weekly
|
||||
file on `main` when it builds.
|
||||
|
||||
**Prices change, weeks follow.** `--check` re-solves every week not over yet with the game it runs; a week whose
|
||||
budget no longer verifies is regenerated deterministically (the same puzzle with a new budget if that works, else a
|
||||
fresh one for the same key) with `rev` + 1, which resets players' stars for that week only. Past weeks are left alone
|
||||
unless the game rejects them. `release.yml` runs it before the tests on every deploy and fails only if a week cannot be
|
||||
regenerated. A change to prices, cables or cities fails `npm test` until you run `node scripts/weekly-puzzle.js --check`
|
||||
and commit the regenerated files with it.
|
||||
|
||||
## Only release when Frederic says so
|
||||
|
||||
Never bump the version on your own. Finished work is committed and pushed with its
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue