Node: - web/.node-version (26) is the pin. The five setup-node steps say '26' as a literal, not node-version-file: release-android.yml checks out the tag it rebuilds, and older tags have no such file. - engines.node >=26 (advisory) and @types/node ^26.6.5; TypeScript 6 still type-checks clean with the new types. TypeScript: - TypeScript 7.0 has no JavaScript API, and svelte-check (which refuses `typescript` 7) and `svelte-kit sync` (route $types) need one, so `typescript` stays ^6.0.3 and 7 is the alias "@typescript/native": "npm:typescript@~7.0.2", the layout svelte-check documents. ~7.0 because 7.1 breaks svelte-check's experimental mode. - `check` runs svelte-check --tsgo, on TypeScript 7. `check:admin` stays on 6: --tsgo maps a tsconfig outside the workspace root onto the app's components (seen: false errors in src/routes instead of the admin's). - The four `tsc -p` steps and typecheck:worker call node node_modules/@typescript/native/bin/tsc: both packages declare a `tsc` bin, so node_modules/.bin/tsc could be either. - "DOM.Iterable" leaves the admin tsconfigs (an empty lib since 6.0). - Dependabot ignores the alias (it mishandles npm: aliases) and keeps ignoring `typescript` majors, now with the reason. Checked: type errors planted in a route's script, as a wrong prop on src/lib/ui/Badge.svelte, in a +page.ts and in one file per tsc config were each reported by TypeScript 7 (the admin's by 6), every step exiting 1; --listFilesOnly gives the same programs on 6 and 7; the four tsc checks take 0.5 s instead of 6.0 s. From a clean `npm ci --ignore-scripts` on Node 26.12.1: typecheck, the tests, build, verify-dist (web and tauri), cf:check and knip (report unchanged) pass, with still exactly three packages that have install scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
97 lines
3.8 KiB
YAML
97 lines
3.8 KiB
YAML
name: Check Overrides
|
|
|
|
# Human edits live in data/overrides/<appid>.json and are re-applied by
|
|
# save_main() on every write to data/. A malformed or invalid override is
|
|
# SKIPPED at apply time rather than raised - deliberately, so one bad file
|
|
# cannot abort a two-hour scrape - which means a typo would otherwise fail
|
|
# silently and the edit would simply never take effect. This is the check that
|
|
# makes that silence loud.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'data/overrides/**'
|
|
- 'scripts/core/overrides.py'
|
|
- 'scripts/edit_game.py'
|
|
# The Worker mirrors validate_value() and the file formatting. This
|
|
# workflow did not trigger on it, so "change one, change the other" had
|
|
# no enforcement in either direction.
|
|
- 'web/worker/routes/edit.ts'
|
|
- 'web/worker/lib/override-doc.ts'
|
|
# The blocklist is the same kind of standing human instruction, with the
|
|
# same two writers (/admin and a CLI) that must produce identical bytes.
|
|
- 'data/blocklist.jsonl'
|
|
- 'scripts/core/blocklist.py'
|
|
- 'scripts/delete_game.py'
|
|
- 'web/shared/removal.ts'
|
|
- 'scripts/tests/fixtures/blocklist_golden.jsonl'
|
|
- '.github/workflows/check-overrides.yml'
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'data/overrides/**'
|
|
- 'scripts/core/overrides.py'
|
|
- 'scripts/edit_game.py'
|
|
# The Worker mirrors validate_value() and the file formatting. This
|
|
# workflow did not trigger on it, so "change one, change the other" had
|
|
# no enforcement in either direction.
|
|
- 'web/worker/routes/edit.ts'
|
|
- 'web/worker/lib/override-doc.ts'
|
|
# The blocklist is the same kind of standing human instruction, with the
|
|
# same two writers (/admin and a CLI) that must produce identical bytes.
|
|
- 'data/blocklist.jsonl'
|
|
- 'scripts/core/blocklist.py'
|
|
- 'scripts/delete_game.py'
|
|
- 'web/shared/removal.ts'
|
|
- 'scripts/tests/fixtures/blocklist_golden.jsonl'
|
|
- '.github/workflows/check-overrides.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
# NOT data-write: this reads the dataset and writes nothing, so queueing it
|
|
# behind the long data jobs would delay the feedback for no reason.
|
|
group: check-overrides-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.15'
|
|
- run: |
|
|
pip install --quiet --require-hashes --only-binary :all: -r requirements.txt
|
|
- name: Validate every override
|
|
run: python scripts/edit_game.py --check
|
|
|
|
# The other half of the mirror: assert the Worker reproduces the exact
|
|
# bytes Python writes. Round-trips the real committed override files, so
|
|
# a formatting change on either side fails here.
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '26'
|
|
cache: 'npm'
|
|
cache-dependency-path: web/package-lock.json
|
|
- name: Install web deps
|
|
working-directory: web
|
|
# No lifecycle scripts, as in web-ci.yml (which says why that is safe).
|
|
run: npm ci --ignore-scripts
|
|
- name: Validate the blocklist
|
|
# A line load_blocklist() cannot honour blocks nothing - silently.
|
|
run: python scripts/delete_game.py --check
|
|
# `npm test -- <file>`, never `npx vitest`: npx may fetch a package that
|
|
# is not in the lockfile.
|
|
- name: Assert CLI/Worker override parity
|
|
working-directory: web
|
|
run: npm test -- worker/lib/override-doc.test.ts
|
|
- name: Assert CLI/Worker blocklist parity
|
|
# web-ci only runs for web/**; a Python-only change to the line format
|
|
# must fail somewhere too.
|
|
working-directory: web
|
|
run: npm test -- shared/removal.test.ts
|