Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
19c0d93
test(e2e): theme marketplace lifecycle in a new themes bucket
claude Nov 27, 2026
61a2dc5
test(e2e): standalone panel adds a theme source and installs a theme
claude Nov 27, 2026
c70883b
docs(specs): theme marketplace in api and web specs
claude Nov 27, 2026
8575d26
docs(specs): mark spec 043 T055-T057 done
claude Nov 27, 2026
4471991
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
80eecd1
docs: list the themes e2e bucket in AGENTS.md
claude Nov 27, 2026
51965ca
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
8273c3f
test(e2e): close the theme call response body for bodyclose
claude Nov 27, 2026
b85122d
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
448f9c8
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
130748a
ci: count the themes bucket only when its test step ran
claude Nov 27, 2026
816ef26
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
b607e98
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
36ced3f
test(e2e): read theme error ids from problem+json
claude Nov 27, 2026
b74ffcb
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
21103bf
Merge remote-tracking branch 'origin/master' into test/043-theme-e2e
claude Nov 27, 2026
1d99746
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
cf75126
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
5a9e6aa
Merge branch 'feat/043-theme-web' into test/043-theme-e2e
claude Nov 27, 2026
58e7893
Merge remote-tracking branch 'origin/master' into test/043-theme-e2e
claude Nov 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1940,8 +1940,8 @@ jobs:
# wide; the api buckets stay within the login limiter's budget).
# The arm64 job below uses the same steps/settings except for the
# wake-hostport, network-isolation, management-placement,
# backup-preparation, backup-archives, monitoring, recovery and standalone drills, which run once on amd64.
bucket: [operator, api-auth, api-roles, api-rbac, api-agent, api-mods, telemetry, optional-components, restricted-workloads, wake-hostport, network-isolation, management-placement, backup-preparation, backup-archives, monitoring, recovery, standalone, sftp]
# backup-preparation, backup-archives, monitoring, recovery and standalone drills and the sftp and themes buckets, which run once on amd64.
bucket: [operator, api-auth, api-roles, api-rbac, api-agent, api-mods, telemetry, optional-components, restricted-workloads, wake-hostport, network-isolation, management-placement, backup-preparation, backup-archives, monitoring, recovery, standalone, sftp, themes]
arch: [amd64]
include:
- bucket: monitoring
Expand Down Expand Up @@ -2007,8 +2007,8 @@ jobs:
job_timeout: 60 # Boots kind, loads images and installs the chart before the bounded recovery drill.
- bucket: standalone
parallel: 1
test_timeout: 20m # panel-only Helm release, remote registration, kubeconfig swap, restart and removal
job_timeout: 60 # Boots kind, loads images and installs the chart before the standalone panel drill.
test_timeout: 30m # panel-only Helm release, remote registration, kubeconfig swap, restart and removal; then a second panel-only release for theme sources (spec 043)
job_timeout: 75 # Boots kind, loads images and installs the chart before the standalone panel drills.
- bucket: restricted-workloads
parallel: 1
test_timeout: 25m # Includes real projected-token rotation and node capture cleanup.
Expand All @@ -2017,6 +2017,10 @@ jobs:
parallel: 1
test_timeout: 20m # chart enable, SFTP login, 32 MiB round trip, stopped-server and revocation checks
job_timeout: 60 # Boots a kind cluster, installs the chart, runs the bucket's suite.
- bucket: themes
parallel: 1
test_timeout: 20m # theme pushes and cosign signing, source verify, install, update, disable and delete (spec 043)
job_timeout: 60 # Boots a kind cluster, installs the chart, runs the bucket's suite.
env:
CLUSTER: gameplane-e2e
CTX: kind-gameplane-e2e
Expand Down Expand Up @@ -2089,7 +2093,7 @@ jobs:
uses: ./.github/actions/dump-cluster-state
with:
context: ${{ env.CTX }}
namespaces: "${{ matrix.bucket == 'monitoring' && 'gameplane-system,gameplane-games,monitoring' || matrix.bucket == 'standalone' && 'gameplane-system,gameplane-games,e2e-standalone-panel' || 'gameplane-system,gameplane-games' }}"
namespaces: "${{ matrix.bucket == 'monitoring' && 'gameplane-system,gameplane-games,monitoring' || matrix.bucket == 'standalone' && 'gameplane-system,gameplane-games,e2e-standalone-panel,e2e-standalone-themes' || 'gameplane-system,gameplane-games' }}"
include-previous-logs: "true"

e2e-go-arm64:
Expand Down Expand Up @@ -2950,7 +2954,7 @@ jobs:
'go-e2e-unit': (n) => n === 'go (test/e2e)',
'api-postgres': (n) => n === 'api (postgres)',
'e2e-buckets': (n) => n === 'e2e bucket coverage',
'e2e-go': (n) => /^e2e (operator|api-auth|api-roles|api-rbac|api-agent|api-mods|telemetry|optional-components|restricted-workloads|wake-hostport|network-isolation|management-placement|backup-preparation|backup-archives|monitoring|recovery|standalone|sftp) \//.test(n) && n.includes('/ amd64 '),
'e2e-go': (n) => /^e2e (operator|api-auth|api-roles|api-rbac|api-agent|api-mods|telemetry|optional-components|restricted-workloads|wake-hostport|network-isolation|management-placement|backup-preparation|backup-archives|monitoring|recovery|standalone|sftp|themes) \//.test(n) && n.includes('/ amd64 '),
'e2e-go-arm64': (n) => /^e2e (operator|api-auth|api-roles|api-rbac|api-agent|api-mods|telemetry|optional-components|restricted-workloads) \//.test(n) && n.includes('/ arm64 '),
'e2e-multicluster': (n) => n.startsWith('e2e multicluster /') && n.includes('/ amd64 '),
'e2e-multicluster-arm64': (n) => n.startsWith('e2e multicluster /') && n.includes('/ arm64 '),
Expand Down Expand Up @@ -3103,8 +3107,8 @@ jobs:
const bucketSet = new Set();
for (const j of apiJobs) {
const n = j.name || '';
const m = n.match(/^e2e (operator|api-auth|api-roles|api-rbac|api-agent|api-mods|telemetry|optional-components|restricted-workloads|wake-hostport|network-isolation|management-placement|backup-preparation|backup-archives|monitoring|recovery|standalone|sftp) \//);
const executionGated = m && ['wake-hostport', 'recovery', 'standalone'].includes(m[1]);
const m = n.match(/^e2e (operator|api-auth|api-roles|api-rbac|api-agent|api-mods|telemetry|optional-components|restricted-workloads|wake-hostport|network-isolation|management-placement|backup-preparation|backup-archives|monitoring|recovery|standalone|sftp|themes) \//);
const executionGated = m && ['wake-hostport', 'recovery', 'standalone', 'themes'].includes(m[1]);
if (m && !executionGated) bucketSet.add(m[1]);
// Partial selection can complete these legs without running
// their drills. Count completed execution, including failure.
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ After cloning: `git submodule update --init modules` (required for `make dev-up`
- **Build:** `make build` (all Go + web), `make build-go` (13 modules in GO_MODULES, all but test/e2e), `make build-web` (`npm ci && npm run build`), `make images`.
- **Codegen:** `make generate` (deepcopy), `make manifests` (CRD/RBAC YAML, synced to `charts/gameplane/charts/gameplane-crds/crds/` and `charts/gameplane/crd-manifests/`), `make modules-push`, `make tidy`.
- **Dev containers:** `make devcontainers` (regenerate every profile and the `website/` and `modules/` copies after editing `.devcontainer/versions.toml`, `.devcontainer/profiles.toml`, `.devcontainer/devcontainer-lock.json`, `.devcontainer/setup.sh` or a `system-deps.toml`), `make check-devcontainers` (drift check). Profile table: `docs/contributing.md`.
- **Tests (CI only — never run locally, see Rule 8):** `make test`, `make test-integration` (envtest operator+api), `make test-e2e` (~10–20 min), `make test-e2e-bucket BUCKET=(operator|api-auth|api-roles|api-rbac|api-agent|api-mods|ratelimit|bot-fast|bot-heavy|multicluster|upgrade|postgres-availability|postgres-pitr|postgres-ha|telemetry|capture-overhead|optional-components|restricted-workloads|wake-hostport|network-isolation|management-placement|backup-preparation|backup-archives|monitoring|recovery|standalone|sftp)`.
- **Tests (CI only — never run locally, see Rule 8):** `make test`, `make test-integration` (envtest operator+api), `make test-e2e` (~10–20 min), `make test-e2e-bucket BUCKET=(operator|api-auth|api-roles|api-rbac|api-agent|api-mods|ratelimit|bot-fast|bot-heavy|multicluster|upgrade|postgres-availability|postgres-pitr|postgres-ha|telemetry|capture-overhead|optional-components|restricted-workloads|wake-hostport|network-isolation|management-placement|backup-preparation|backup-archives|monitoring|recovery|standalone|sftp|themes)`.
- **E2E conventions:** register new tests in `test/e2e/buckets.sh`; `t.Parallel()` + unique names; guard shared resources (`ociPushMu` for module pushes, `ensureResticRepo(t)` for shared backup repos). Rate limits per cluster: IP burst 10 (5/min), user burst 6 (3/min) — cap an API bucket at ~7 admin logins.
- **Lint:** `make lint` runs `check-doc-versions`, `check-links`, `check-features-sync`, `check-specs`, `check-telemetry-catalog`, `check-i18n`, `check-dev-load-images`, `check-coverage-gaps`, `check-devcontainers`, `test-up-registry`, `lint-go` and `lint-web`.

Expand Down
7 changes: 6 additions & 1 deletion api/specs.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ api/
│ ├── steam/ # Steam Workshop ID resolver: cache + singleflight-deduped upstream lookups
│ ├── scope/ # namespace + cluster resolution from request context
│ ├── telemetry/ # optional anonymous usage metrics collection
│ ├── themes/ # theme marketplace (spec 043): theme sources, indexer, install/update/remove
│ ├── messages/ # localizable error registry (ids, English ICU, status)
│ ├── httperr/ # error -> HTTP status classification (safe message for client, full error logged)
│ └── [test files]
Expand All @@ -83,6 +84,7 @@ api/
- **registry:** provider types (each implements Search, Details, Manifest, Download), Set (versioned provider pool with key fallback)
- **scope:** ResolveNamespace (extract from path or default), ResolveCluster (validate `?cluster=` against registry)
- **httperr:** classify error type to safe HTTP status + message; preserve full error server-side
- **themes:** `Service` for theme sources (create/update/delete/refresh, official source seed), the catalog indexer and its scheduler, and per-user install/update/remove (spec 043; see "Theme marketplace" below)
- **telemetry:** destination resolution (`ResolveDestination`), consent, report collection and preview (`BuildReport`), the scheduled reporter (Ed25519 signing, proof-of-work solving, install-ID rotation on `409 id_claimed`)

## External interface / contracts
Expand Down Expand Up @@ -194,6 +196,9 @@ Both stats and fleet inventory emit `storageCapacitySource` (`node-ephemeral` or
- `/users/me/servers` — GET: own GameServers (owner/collaborator)
- `/users/me/preferences` — GET/PUT: own theme/styling preferences (feature 016)
- `/users/me/preferences/reset` — POST: reset own theme preferences to defaults (feature 016)
- `/users/me/themes`, `/users/me/themes/{id}`, `/users/me/themes/{id}/update` — own installed themes (spec 043, see "Theme marketplace")
- `/themes/catalog`, `/themes/catalog/{id}`, `/themes/catalog/{id}/preview/{light|dark}` — GET: theme catalog, any signed-in user (spec 043)
- `/themes/sources`, `/themes/sources/{name}`, `/themes/sources/{name}/refresh` — theme source admin, `themes:manage` (spec 043)
- `/users/me/language` — PUT: set or clear own language choice (spec 019; see below)
- `/users` — GET, POST: list and create users
- `/users/{id}` — PATCH, DELETE: manage users (admin only). DELETE runs `db.Store.DeleteUser`: one transaction deletes the user's `oidc_links`, `user_preferences`, `sessions`, `api_tokens` and role bindings, revokes the share links the user created (sets `revoked_at`), then deletes the `users` row. It does not rely on FK cascades (off on SQLite). An SSO subject whose user was deleted is provisioned as a new user on its next login
Expand Down Expand Up @@ -663,7 +668,7 @@ Verify from `/api/go.mod`.
- Runtime SQL is written once with `?` placeholders; the Postgres connector rewrites them to `$n` (`db.Rebind`). Timestamps that used SQLite's `datetime('now')` are generated in Go (`db.NowTimestamp()`, same `YYYY-MM-DD HH:MM:SS` UTC text) and bound as parameters; inserted ids come from `RETURNING id` (pgx has no `LastInsertId`)
- Postgres legacy migrations declare the text columns the API sorts or range-compares (`roles.name`, role-binding scope columns, `audit_events.ts`, `sessions.expires_at`, `share_links.created_at`/`expires_at`) `COLLATE "C"` so ordering matches SQLite's byte-wise collation

### Schema (migrations 001-014 detailed here; 015-027 in `migrations/common/`)
### Schema (migrations 001-014 detailed here; 015-028 in `migrations/common/`; 028 is described under "Theme marketplace")

**001_init.sql:**
- `users` — username (unique), email, display_name, pw_hash (argon2id), role (legacy, now via role_bindings), created_at, updated_at
Expand Down
4 changes: 2 additions & 2 deletions hack/ci_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
FORCE_ALL_PREFIXES = (".github/actions/",)
# Mirrors the e2e-go matrix buckets in .github/workflows/ci.yaml.
E2E_BUCKETS = ["operator", "api-auth", "api-roles", "api-rbac", "api-agent", "api-mods",
"telemetry", "optional-components", "restricted-workloads", "wake-hostport", "network-isolation", "management-placement", "backup-preparation", "backup-archives", "monitoring", "recovery", "standalone", "sftp"]
E2E_AMD64_ONLY = {"wake-hostport", "network-isolation", "management-placement", "backup-preparation", "backup-archives", "monitoring", "recovery", "standalone", "sftp"}
"telemetry", "optional-components", "restricted-workloads", "wake-hostport", "network-isolation", "management-placement", "backup-preparation", "backup-archives", "monitoring", "recovery", "standalone", "sftp", "themes"]
E2E_AMD64_ONLY = {"wake-hostport", "network-isolation", "management-placement", "backup-preparation", "backup-archives", "monitoring", "recovery", "standalone", "sftp", "themes"}
SUITES_FILE = "test/e2e/suite-components.json"
# Paths no Go e2e test reads. Their own jobs keep their paths-filter gates.
NO_E2E_FILES = {
Expand Down
15 changes: 15 additions & 0 deletions hack/test_ci_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,21 @@ def test_recovery_inputs_select_the_recovery_drill(self):
self.assertIn("TestPanel_OfflineRecovery",
self.select(path)["e2e-run"].get("recovery", ""))

def test_theme_inputs_select_the_themes_bucket(self):
"""Theme service, handler, shared fetch and package code select the spec 043 e2e tests."""
for path in ("api/internal/themes/indexer.go",
"api/internal/handlers/themes_catalog.go",
"bundlefetch/oci/client.go",
"themepkg/package.go",
"test/e2e/api_themes_e2e_test.go",
"test/e2e/fixtures/theme-oras-push-job.yaml"):
with self.subTest(path=path):
values = self.select(path)
self.assertIn("TestAPI_ThemeMarketplaceLifecycle",
values["e2e-run"].get("themes", ""))
self.assertIn("TestStandalone_ThemeSourceInstall",
values["e2e-run"].get("standalone", ""))

def test_audit_network_isolation_has_a_run_pattern(self):
"""Affected components and the owning test file select the audit bucket."""
for path in ("operator/internal/controller/gameserver_controller.go",
Expand Down
4 changes: 2 additions & 2 deletions specs/043-theme-marketplace/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@

## Phase 8: E2E, docs and changelog (PR-G)

- [ ] T055 New bucket `themes` in `test/e2e/buckets.sh` and `test/e2e/api_themes_e2e_test.go` (`t.Parallel()`, unique names, `ociPushMu` around pushes, ≤ 7 logins): push a signed and an unsigned theme to the Kind registry, add a source, catalog lists both with the unsigned one flagged after enabling verify, user A installs and selects, user B unaffected, update, disable source (installed copy keeps working), remove (fallback to Pink).
- [ ] T056 [P] Standalone case in `test/e2e/standalone_panel_e2e_test.go` (new test function): add a local or OCI theme source and install a theme with no operator (OD-4).
- [X] T055 New bucket `themes` in `test/e2e/buckets.sh` and `test/e2e/api_themes_e2e_test.go` (`t.Parallel()`, unique names, `ociPushMu` around pushes, ≤ 7 logins): push a signed and an unsigned theme to the Kind registry, add a source, catalog lists both with the unsigned one flagged after enabling verify, user A installs and selects, user B unaffected, update, disable source (installed copy keeps working), remove (fallback to Pink). Done: `test/e2e/api_themes_e2e_test.go` (`TestAPI_ThemeMarketplaceLifecycle`, 3 logins), fixtures `test/e2e/fixtures/theme-oras-push{,-v2}-job.yaml` and `theme-cosign-sign{,-v2}-job.yaml`, bucket `themes` in `test/e2e/buckets.sh`, wired in `.github/workflows/ci.yaml` (amd64), `hack/ci_scope.py` and `test/e2e/suite-components.json`.
- [X] T056 [P] Standalone case in `test/e2e/standalone_panel_e2e_test.go` (new test function): add a local or OCI theme source and install a theme with no operator (OD-4). Done in a new file, `test/e2e/standalone_themes_e2e_test.go` (`TestStandalone_ThemeSourceInstall`, bucket `standalone`), because `standalone_panel_e2e_test.go` exists on master; it installs its own panel-only release and uses an OCI source, since the chart has no local theme root setting.
- [X] T057 [P] Update `api/specs.md` (themes service, routes, indexer, tables) and `web/specs.md` (catalog, preview, installed render order, safe mode). Done: `api/specs.md` "Theme marketplace (spec 043)", `web/specs.md` "Theme marketplace (spec 043)".
- [ ] T058 [P] `changelog/unreleased/<PR>-theme-marketplace.md` per `changelog/unreleased/README.md` (feature, new Helm value `themes.officialSource.enabled`, new permission `themes:manage`).
- [ ] T059 Run `quickstart.md` sections 1–6 on a dev cluster and a standalone panel (valgul's manual walk); record results in `specs/043-theme-marketplace/quickstart-results.md`.
Expand Down
Loading