Architect runs: a generated run every week

scripts/weekly-architect.js picks an HQ in a region the last weeks did not have and
designs each brief against the network a reference architect has built so far, so
every brief asks for something new; the game's own checklist and chaos monkey review
judge it, and the whole run is replayed from the file for three stars. The game
fetches architect/weekly/<key>.json when Puzzles opens, checks it field by field and
writes the briefs' text itself. The Sunday job and the release deploy carry it like
the weekly puzzles and scenarios. Later briefs' cities no longer show early.
This commit is contained in:
Frederic Jung 2026-10-30 13:44:04 +01:00
parent 601f7028bd
commit 4e6e8294d2
No known key found for this signature in database
21 changed files with 461 additions and 17 deletions

View file

@ -74,7 +74,7 @@ jobs:
run: |
set -euo pipefail
git fetch --no-tags --depth=1 origin main
for d in site/puzzles/weekly site/scenarios/weekly; do
for d in site/puzzles/weekly site/scenarios/weekly site/architect/weekly; do
if git cat-file -e "FETCH_HEAD:$d" 2>/dev/null; then
rm -rf "$d"
git checkout FETCH_HEAD -- "$d"
@ -92,11 +92,12 @@ jobs:
if [ ! -f scripts/weekly-puzzle.js ]; then echo "This release does not read weekly puzzles yet."; exit 0; fi
node scripts/weekly-puzzle.js --check
if [ -f scripts/weekly-scenario.js ]; then node scripts/weekly-scenario.js --check; fi
if [ -f scripts/weekly-architect.js ]; then node scripts/weekly-architect.js --check; fi
- run: npm test
if: ${{ !inputs.weekly }}
- name: Test the weekly puzzles against this release
if: ${{ inputs.weekly && hashFiles('scripts/weekly-puzzle.js') != '' }}
run: npm test -- tests/weekly-puzzle.test.js tests/puzzles.test.js $(ls tests/weekly-scenario.test.js 2>/dev/null)
run: npm test -- tests/weekly-puzzle.test.js tests/puzzles.test.js $(ls tests/weekly-scenario.test.js tests/weekly-architect.test.js 2>/dev/null)
- name: Build site
run: VERSION="${TAG#v}" REQUIRE_NOTES=1 npm run build
- uses: actions/upload-pages-artifact@v5