draft: @game-ci/screen-capture plugin (structural skeleton, GPU-required) - #130
draft: @game-ci/screen-capture plugin (structural skeleton, GPU-required)#130frostebite wants to merge 2 commits into
Conversation
Structural skeleton for a GPU-required screen-capture/visual-regression plugin. Not wired into core's default load list; capture is not yet a core command. QA evidence, distinct from marketing-asset screenshots. See plugins/screen-capture/README.md.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI's bun install --frozen-lockfile was failing on this branch since the lockfile never reflected the new plugins/<name> workspace member.
|
Superseded by #142, which lands this skeleton verbatim. Consolidated rather than merged individually: every one of these PRs touches |
…eline, provisioning, service directory, anti-cheat) (#144) * feat(orchestrator): build-lifecycle capabilities (symbols, visual baseline, provisioning, service directory, anti-cheat) Implements five capabilities that were drafted as standalone @game-ci/* plugin skeletons (#128, #130, #132, #133, #136) as real orchestrator features instead. A plugin exists to add user-facing command surface - a new verb, engine, or deploy target (steam-deploy, runtime-test-framework, the engine plugins). None of these five are that. They are things that happen *to* a build or a running job, which is what orchestrator already does: it owns providers/ (where a job runs) plus services/ for cache, hooks, output, preflight, reliability, secrets and sync. Two of them overlapped existing orchestrator surface outright - anti-cheat registered options and no command at all (that is middleware-service), and screen-capture duplicated the built-in `images` output type. What landed: symbol-collector.ts + `symbols` output type - finds dSYM bundles, PDB, Breakpad, DWARF and IL2CPP maps under a build. Sits beside the existing coverage/logs/metrics built-ins because symbols must be captured at build time or they are gone: once the machine is torn down, every future crash report from that build is unsymbolicatable. A .dSYM is reported as one bundle entry rather than descended into, since the symbolicator needs the bundle structure intact. Uploading is left to the existing ArtifactUploadHandler - no vendor-specific upload path here. visual-baseline.ts + `visual-baseline` output type - digest-based comparison of this run's captures against the accepted reference set. Deliberately NOT perceptual diffing: a byte hash answers "did this change at all" exactly, with no image codec, and pretending it were a threshold diff would be worse than not offering one. An empty baseline reports as unverified rather than as a pass, so the check cannot go vacuous after an accidental baseline deletion. dedicated-server-provisioner.ts - docker-compose, systemd unit and ufw rules from a typed config. Pure functions; nothing is written or executed, so a generator bug cannot mutate a real host. Port protocol is always explicit (a UDP game port published as TCP yields a server that starts cleanly and is unreachable), the unit is ordered after docker.service so a reboot does not race the daemon, and it does not run as root by default. service-directory.ts - registry for exposed job endpoints, with the disclosure rules as the actual content. An ephemeral tunnel URL is an unauthenticated entry point into a machine holding source and credentials, and CI logs are often public, so visibility is explicit per service and formatForLog redacts the whole private URL - a random subdomain IS the secret, so partial masking would still leak it. Does not start tunnels; a caller registers whatever URL it resolved. anti-cheat-middleware.ts - preset over the existing Middleware type, running at post-build (before default-priority packaging, or an unprotected binary ships) with allowFailure forced false. The SDKs are NDA-gated so the command is caller-supplied rather than guessed; credentials go through OrchestratorSecret instead of being interpolated into a shell string. All five are exported from the package entry point. Tests: 50 new, passing under BOTH vitest and bun - they avoid vi.mock(module, fn), which is what makes the 244 pre-existing orchestrator failures fail under bun's runner, so this adds none of them. tsc --noEmit is clean and oxfmt has been applied. * test: update built-in output-type counts for symbols/visual-baseline The registry tests assert the number of built-in types, so adding `symbols` and `visual-baseline` broke them: 8 -> 10 built-in, and 9 -> 11 for the built-in-plus-one-custom case. Also adds both new names to the it.each parity list, so they get the same defined/name/builtIn coverage every other built-in type has rather than only being counted. Caught by CI, not locally: I had run only the new test files. Full `vitest run` now passes except two failures that reproduce identically on a clean main (an rclone step test, and cli-integration timing out under parallel load) - both pre-existing and unrelated.
…139) (#142) * draft: consolidate the remaining 14 plugin skeletons Lands the structural skeletons from #125-#128 and #130-#139 in one commit. They were opened as 15 separate PRs, but every one of them touches bun.lock (each adds its own plugins/* workspace member), so merging the first - #124, gamemaker - immediately conflicted all 14 others. Merging them one at a time would mean 14 more rounds of regenerate-lockfile / push / re-run CI, each invalidating the next. Consolidating regenerates the lockfile exactly once instead. Content is taken verbatim from each PR's branch; only bun.lock is regenerated. Every plugin is the same shape as the already-merged gamemaker one: - a real, correctly-typed GameCIPlugin (name, version, and either an engineDetector or a commands entry) - domain logic that throws "not implemented yet (draft plugin)" and points at plugins/<name>/README.md, rather than guessing an invocation shape that hasn't been verified against the real tool - NOT added to cli.ts's loadPlugins() default list, so none of this is reachable unless explicitly requested via --plugin @game-ci/<name> Engines: rpg-maker, renpy. Deploy targets: itch-deploy, steam-workshop, github-release-deploy. Commands/options: crash-symbol-upload, screen-capture, live-show, dedicated-server-provisioning, anti-cheat, pseudo-localization, save-data-compat, dev-tunnel, code-signing. Several of the command-based drafts still need their command name registered in core's CliCommands before they can be invoked at all, even once implemented - each README says so explicitly. Verified: `bun install --frozen-lockfile` passes (the gate that was failing on all of these branches), and the suite shows 244 failures before and after - the pre-existing orchestrator-plugin vitest-under-bun failures, unchanged. * chore: drop a snapshot file accidentally included in the previous commit plugins/unity/.../versioning.test.ts.snap was picked up by a broad `git add plugins/` after running the suite locally. Running these vitest snapshots under bun's test runner appends a second entry under a differently-formatted key, so the file was modified as a side effect of testing, not by any real change - and committing it broke the "Unity engine core tests" job. Restored to main's version. * draft: drop the five plugins that belong in orchestrator, not here crash-symbol-upload, anti-cheat, screen-capture, dedicated-server-provisioning and dev-tunnel are being implemented as real orchestrator capabilities instead of standalone plugin skeletons. They are lifecycle/infrastructure concerns, which is orchestrator's domain, not new user-facing command surface (which is what a plugin is for - see steam-deploy, runtime-test-framework, and the engine plugins): - crash-symbol-upload is an output type plus an upload, and orchestrator already owns output-type-registry (whose built-ins include coverage/logs/metrics/test-results) and artifact-upload-handler. "symbols" is a sibling of those. - anti-cheat registered options and NO command at all - it hooks into an existing build, which is exactly services/hooks/middleware-service. - screen-capture overlaps an existing built-in output type: images ("Screenshots, render captures, atlas previews"). - dedicated-server-provisioning is provisioning, which is what orchestrator's providers already do. - dev-tunnel exposes a running job, adjacent to hot-runner/providers. Lockfile regenerated for the reduced workspace set; `bun install --frozen-lockfile` still passes.
Structural skeleton for a screen-capture & visual-regression plugin: baseline-vs-current frame diffing for QA evidence, deliberately distinct in purpose from marketing-asset screenshot generation. Not functional yet, and
captureis not yet registered as a core CLI command. Requires a GPU-capable runner, unlike most of the other drafts.See
plugins/screen-capture/README.mdfor what's real vs. TODO.