Tests, fixtures and the e2e seed found the seeded groups by display name,
which an admin can edit and this PR just changed. A unique system_key
column (viewer/editor), added and backfilled by 0137, identifies them
instead, and get_system_group() replaces the name lookups.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The e2e seed resolves the viewer via get_default_group instead of a list
of fallback names. The migration drops the id pre-select, and the tests
load the revision once and call upgrade/downgrade directly.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Master already chains 0135 and 0136 onto 0134, so the rename becomes
0137 revising 0136_deleted_assets to keep a single alembic head. Also
dedupe the migration filename in tests, rename tests that still said
legacy, and drop em-dashes and a long docstring.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A workflow-level CHANNEL replaces the scattered event-name checks and
the build-only CACHE_SCOPE. The image and tag lists, repeated in all
four metadata steps, move to workflow env, and the index annotation
level is set once on the merge job.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
metadata-action renders `{{version}}` in custom labels and annotations
as empty, overriding its own correct version label, so those entries
are removed and the shared title/description/licenses live in one
OCI_METADATA env. The scheduled run is limited to rommapp/romm, and
the compose note says `latest` won't start after a nightly migration.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A cron run replaces the per-push build, so the tag is renamed from
`edge` to `nightly` (and `nightly-slim`), using metadata-action's
`type=schedule`. The version string becomes `nightly-<short sha>`.
The concurrency guard is dropped since scheduled runs can't overlap.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Address Greptile review: the e2e seed could pick an admin-created "Viewer"
group, the migration docstring recounted history, and the conflict test
compared a description with itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xdb9FnfhEqP6ectkSZ2T3F
Every install showed "Viewer (legacy)" and "Editor (legacy)" as the built-in
groups, which reads as deprecated. 0092 already shipped in 5.3.0, so a new
revision renames the untouched system rows and drops the "pre-upgrade"
framing from their descriptions. It skips a group whose target name an admin
already took, and keeps a description the admin edited.
Fixes#4678
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xdb9FnfhEqP6ectkSZ2T3F
- The multi-platform index now carries the OCI annotations (version,
title, description, licenses, plus metadata-action's revision, source
and created). Labels only live in each platform's image config, so
GHCR showed no description for the package.
- Labels drop the literal quotes metadata-action kept in their values,
and the licence is the SPDX id AGPL-3.0-only. The description has one
home in the workflow env.
- Both builds attach an SBOM attestation alongside the default
provenance.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01817LYuBpFBV5Pi6VEcKfFZ
Every push to master builds and pushes rommapp/romm:edge (plus
edge-slim, edge-<sha> and edge-<sha>-slim) to Docker Hub and GHCR,
reusing the release build, merge and scan jobs. Release tagging is
unchanged: the semver rules emit nothing on a push and the edge rules
nothing on a release.
- Concurrency cancels a superseded edge build so an older commit
cannot land on the tag last.
- Edge reads the release layer cache but writes its own scope, so
master layers never seed a release image.
- The baked version is edge-<short sha>, which keeps version-keyed
caches (ROM filter values) fresh between edge builds and makes bug
reports identifiable. The v2 version display links it to the commit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01817LYuBpFBV5Pi6VEcKfFZ
- Set limit-severities-for-sarif, since trivy-action otherwise unsets the
severity filter for SARIF output and every severity was reported.
- Key the code scanning category by image ref, so a dispatched scan of an
older tag can't replace the analysis of latest.
- Validate and compact caller-provided JSON before writing it to outputs.
- Correct the build.yml comment: the weekly run rescans latest only.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
aquasecurity's IP allow list rejects GitHub API calls from hosted
runners, so pinact 403s verifying the trivy-action tag comment. A
.pinact.yaml rule skips verification for aquasecurity actions only once
they are pinned to a full SHA, so an unpinned ref is still flagged.
zizmor (enabled on master) wants the $/ self-repository syntax for the
reusable workflow call, but actionlint 1.7.12 rejects it, so the finding
is suppressed inline for now.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep `typecheck` to vue-tsc and move the tsconfig.node.json pass to
`typecheck:scripts`, run as a separate CI step so a failure names the
pass that broke. Drop the JSON-invalid comments from tsconfig.node.json.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Nothing looked at the image we ship. The lockfile scanners in Trunk cover
Python and npm dependencies, but the Alpine base, nginx, valkey and the
runtimes copied in from the emulator stage reach users unexamined.
Adds a reusable Trivy scan of a published tag, called from the release
build for both variants and run weekly against latest, since most
vulnerabilities in an image are disclosed after it was built. Results go
to the job summary always, and to code scanning when the run sits on a
branch (the API rejects the tag ref a release run carries).
Report-only on purpose: a CVE published the day after a build must not
fail a release.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Socket has been scanning this repo's pull requests for supply chain
risk, under their free open source plan, so it belongs in Supported By.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds zizmor to Trunk, which audits GitHub Actions workflows, and clears
the 19 findings it reports:
- Every actions/checkout now sets persist-credentials: false, so the
token stops being written into .git/config where any later step (or
an uploaded artifact) could read it.
- Service ports and the release version move from run-block template
expansions into env vars, keeping expansion out of the shell.
- Frontend Checks drops read-all for the contents: read it actually
needs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Release builds import a persistent registry cache, and an `apk upgrade` off a
fixed base digest has no changing input, so the layer would be reused from a
previous release and reship its package set.
`no-cache-filters` forces both upgrade stages to run on every release. The
Python-side upgrade moves into its own `python-runtime` stage so that busting
it does not also rebuild the venv and the sigil bindings.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`read-all` grants the token read on every scope, not just the one a job
needs, so replace it with `contents: read`. The job-level `checks: write` and
`pull-requests: write` in typecheck, pytest and migrations were writes no
step makes; trunk-check keeps `checks: write` for its annotations, and
update-hltb-api-url moves its write scopes down to the job that opens the PR.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The shallow fetch left origin/<base> without a merge base against the
PR head whenever the base branch had moved on, so the check died with
"no merge base" before it could evaluate the diff or the bypass label.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XXrMndq8eYexafm6nhajLo
The workflow triggers on `pull_request: types: [labeled]`, so adding any
label starts a run. `prepare`, `build` and `merge` are each gated on the
`build-preview` label and are skipped without it, but `report` was gated
only on the event type, so it ran and read `needs.merge.result` of
`skipped` as a failure. Every PR that received any other label got a
false "Preview build failed" sticky comment.
Claude-Session: https://claude.ai/code/session_01YBBbdsDv9BiYJnKwcCGE6A
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Docs and the marketing site are released by hand now, so the
trigger-docs-and-web job no longer has a job to do. Removing it also
retires the last use of the DOCS_PAT secret, which can be revoked.
The workflow name loses its "and Trigger Docs/Website" half, since
building and pushing the image is all it does.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
packaging was imported but never declared, so the guard rode on whatever
pytest and gunicorn happened to pull in and a dependency update could have
broken collection. Since required-version has to be an exact pin, comparing
the strings is enough and needs nothing beyond the standard library.
pytest only triggered on backend, pyproject, the lock and the Python
version, so a change to either Dockerfile pin skipped the guard entirely.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HDXxq3vAxJVGhm1pQuK8V7
The uv version lived only in the Dockerfile, while CI let setup-uv install
whatever was latest, so the image and CI could build against different
versions. Declaring required-version gives both a single source: setup-uv
resolves from it with no workflow input, and the image build's uv sync
refuses to run when its pinned UV_VERSION falls outside it.
CI also synced without --frozen, so it was free to re-resolve rather than
consume the committed lock the way the image does. A lock the image build
could not use would have passed CI.
The build-time check only runs on a real image build, which is label-gated
rather than part of every CI run, so a test asserts the two agree.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HDXxq3vAxJVGhm1pQuK8V7
Recorded against demo.romm.app: home, the NES library, a game page,
its achievements, and a game running in the browser.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>