They exist to stand up a disposable instance for the Playwright suite, so
they belong with the workflow that runs them rather than in backend/tools/
next to the library-generation utilities.
Their sys.path bootstrap now points at backend/ explicitly (it relied on
being one level below it), the workflow invokes them from the repo root
instead of backend/, and .github/scripts/** joins the workflow's path
filters so editing a seeder still triggers the suite.
Adds .github/workflows/e2e.yml: MariaDB + Valkey services, migrations, an
offline library scan, the fixture users, the backend, then Playwright --
whose webServer starts the Vite dev server. DEV_PORT (5000) is both what
main.py binds and what Vite's /api proxy targets, so neither side needs
configuring. Report and test-results upload as an artifact on failure.
`tools/seed_e2e_library.py` scans backend/romm_test/library with an empty
metadata_sources list, so CI never reaches out to a provider. It exits
non-zero on an empty library rather than leaving a confusing Playwright
timeout later.
Also fixes the flakiness that a CI-shaped rehearsal exposed. Root cause was
not slowness: the Vite dev server force-reloads the page when it discovers a
new dependency to pre-bundle, wiping the half-filled login form so the submit
never lands. Defences are a passive warm-up pass in global-setup.ts (absorb
the reload before anything depends on the page, then compile the routes under
test) and a retry in login(). Two smaller real bugs fell out of the same
investigation: `button[type="submit"]` matched two elements, because the
collapsed reset-password form has its own, and the warm-up's best-effort
`.catch()` calls inherited a 120s timeout, making setup take 8 minutes.
Verified from a cold Vite cache against a throwaway database and the fixture
library: 15/15 pass, no flakes, 2.7 minutes.
Add check_i18n_sorted.py, which fails when any locale JSON file's keys
are not sorted alphabetically (recursively, so nested objects are
covered). Supports --fix to sort in place. Wire it into the i18n CI
workflow alongside the existing parity check, and sort all existing
locale files.
Generated-By: PostHog Code
Task-Id: 7cbf74de-6bf1-45c0-9c8e-c45f94119edc
Remove the hardcoded (base64-obfuscated) ScreenScraper developer
credentials from the source tree and read them from the
SCREENSCRAPER_DEV_ID / SCREENSCRAPER_DEV_PASSWORD environment variables
instead.
The official images bake the values in at build time from CI secrets via
Docker build args; local builds and source runs read them from the
environment. env.template documents the vars (commented out) so an empty
value never overrides the image's built-in credentials.
Generated-By: PostHog Code
Task-Id: 05a9b58b-4c64-4f75-af3e-d27cc4c5702f
The v1 UI (frontend/src/{views,components,console,layouts}) is frozen and
slated for deletion; new frontend work belongs in frontend/src/v2/. This
workflow fails any PR that touches v1 UI files, with an "allow-v1-changes"
label escape hatch for sanctioned critical bug fixes.
Generated-By: PostHog Code
Task-Id: 55fda8a5-426e-479d-8221-26a8437e57bb
Derive the Docker Hub namespace from DOCKER_NAMESPACE, falling back to
DOCKER_USERNAME and then github.repository_owner, so forks whose GitHub
owner name differs from their writable Docker Hub namespace can push.
GHCR is unaffected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename the comment step to reflect that PR builds only push to GHCR,
add a note explaining the hardcoded registry, and inline the image
string into the updateComment call.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Addresses review feedback: granting ALL PRIVILEGES on *.* is overly broad,
especially against a shared DB instance. A database-level grant on the
`romm\_test%` wildcard pattern still lets the user CREATE the per-worker
databases (romm_test_gw0, ...) needed by pytest-xdist, while confining it to
that namespace — verified that out-of-namespace CREATE DATABASE is denied.
PostgreSQL needs no equivalent change: its CI service user (POSTGRES_USER)
is the container superuser.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add pytest-xdist and run the backend test suite across multiple workers
(`-n 4` in CI). Each worker gets its own database so the autouse
`clear_database` fixture can't wipe rows another worker is mid-test with:
- Rootdir `backend/conftest.py` sets a per-worker `DB_NAME`
(`romm_test_gw0`, ...) before any app module is imported, so each
worker's engine binds to its own database.
- `tests/conftest.py` creates the per-worker database on demand (mariadb/
mysql and postgresql paths) just before migrations run.
- The test user's grant is widened to `*.*` (setup.sql + CI) so it can
`CREATE DATABASE` for the workers.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add Hypothesis to the test dependency group with CI/dev profiles, and
introduce property-based tests for high-value pure functions: crc32_to_hex,
filesystem and LaunchBox filename sanitization, LaunchBox metadata parsers,
and ROM filename tag parsing.
https://claude.ai/code/session_01GCTFmzuhvqNbSAfw3rGxmj
Add Vitest 4 with happy-dom, @vue/test-utils, and a single
test/storybook.test.ts that auto-discovers every story under
src/v2/lib and runs its play() via composeStories — no Playwright,
just composition-based interaction tests. 89 stories now smoke-pass
in CI.
Scripts: lint:fix (auto-fix), lint (now scoped to ./src/v2; v1 is
frozen), lint:all (legacy sweep), test, test:watch, test:ui,
storybook:test.
eslint.config.js gets argsIgnorePattern: "^_" so unused-by-design
parameters can use the underscore convention.
CI: new frontend.yml runs lint, test, build in parallel on
frontend/** changes; typecheck.yml bumped to Node 22 with cached
npm ci. Existing typecheck job preserved for branch protection.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
uv sync installs sqlalchemy[mariadb-connector] regardless of which
database is being tested, so libmariadb-dev must be present on all
runners. The postgres migration job and pytest postgresql matrix were
missing this step.