3 Commits
Author SHA1 Message Date
poli0981andClaude Opus 5.5 df91b42c4f ci(sonar): import test coverage instead of excluding it
The scan job now runs both suites with coverage before scanning:
pytest --cov (pyproject.toml: scripts/ without its tests, relative
paths, coverage.xml) and `npm run test:coverage` (vite.config.ts: v8,
lcov with projectRoot "..", so paths start web/). sonar-project.properties
names both reports and drops sonar.coverage.exclusions.

requirements-test.txt gains pytest-cov 7.1.0 and coverage 7.16.2 with
every file's hash (uv pip compile --universal --generate-hashes
--python-version 3.15; the existing pins are unchanged). web gains
@vitest/coverage-v8 5.0.5, matching vitest; none of its packages has an
install script. Coverage stays off for a plain `npm test`.

The token check is its own job, so the scan steps no longer each repeat
the condition; the workflow grants nothing at the top and the scan job
contents: read. `npm run build:admin` replaces the bare `svelte-kit
sync`: it syncs too, and writes the admin bundle the Worker's tests load.

Locally: 576 vitest tests at 58.35% of lines, 299 pytest tests at 57.7%.
Against main's new-code lines (SonarCloud's isNew), the reports cover
92 of 114 coverable lines, 80.7%: the 80% gate is borderline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 19:34:51 +07:00
poli0981andClaude Opus 5 146f8ad3e8 feat(data): per-shard sha256 in index.json, and last_updated only when data changed
index.json was the client's only freshness signal and it was stamped on every
save. Two failures followed from that:

- A run that changed nothing still produced a new last_updated, so every
  visitor re-downloaded all ~6 MB of shards (the 2026-09-16 "Dead link check"
  commit touched only index.json).
- Nothing tied an index to the shard bytes it describes. index.json is edge-
  cached for 30 s and the shards for 300 s, on top of raw.githubusercontent's
  own CDN, so a client could receive the NEW index with an OLD shard and store
  that pair in IndexedDB under the new stamp, where it stayed until the next
  change.

_save_index() now records the sha256 of each shard's exact bytes and keeps the
previous last_updated when files, counts and hashes are unchanged - leaving
index.json byte-identical, so such a run makes no commit. save_jsonl writes LF
explicitly: on Windows, text mode wrote CRLF, which is not the blob Git stores
or raw.githubusercontent serves, and the hash would have described bytes no
client receives. An index without hashes bumps exactly once.

The pipeline had no tests. scripts/tests/test_index_hash.py pins all of this,
python-tests.yml runs it, and notify-ci-failure now also watches Web CI,
Python Tests, Daily Snapshot and Top Offline, which it silently did not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-17 21:27:06 +07:00
poli0981 138e5186be v3.2.7: coming-soon guard, dead-code cleanup, dev tooling (#84)
Coming-soon games rejected at ingest (health_checker COMING_SOON status). Dead-code cleanup via knip + vulture: 2 unused web files, 11 npm deps, the one-shot dedup_removed_games.py. New knip/vulture/pip-audit dev tooling + docs/THIRD_PARTY.md. Bump 3.2.6 -> 3.2.7 (desktop 1.2.6 -> 1.2.7).
2026-05-22 23:17:10 +07:00