05.4 · Targeted service testing: mock cycle-test, seat CLI, fixture repo #17
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cmoriarty/trog#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Full-cycle validation (brain down, ~30 min) has become the only way to test new pipeline functionality — reserve it as the FINAL regression (user decision, 2026-07-24) and build the intermediate tiers below. Root causes being attacked: the brain's GPU monopoly, items only flowing through queue→conductor, and seat lifecycle being trapped in conductor context (leading to bespoke docker commands).
Testing pyramid after this ticket: pytest → mock cycle-test → seat one-offs → full bench cycle (final regression only).
Tier 1 — mock seat +
make cycle-test(the daily driver)scripts/mock-seat.py: one stub process implementing ComfyUI's contract (/prompt,/history/{id},/view,/upload/image,/system_stats) AND the audio-server contract (/music,/sfx,/health), returning canned PNG / short MP4 / WAV instantlySEAT_MODE=mockmakes_seat.shstart the stub instead of a container (no GPUs, brain untouched)make cycle-test: queue the bench spec into a scratch repo → full conductor cycle against mocks → critics run against the REAL brain (it's up) → review page + mirror → assert queue all-done, verdicts recorded, review served. Target: under ~3 minutesTier 2 —
seatCLI (one-off services as a system feature)scripts/seat.sh up <profile> [--cpu|--take-gpus] / run <profile> '<item-json>' [--repo <scratch>] / down— reuses_seat.sh+ the real profiles verbatim so the test path IS the production path--take-gpus(which brackets brain down/up with the conductor's restore semantics);--cpufor plumbing-grade runs/dropon trogdor-files, never a real gamemake seat-*conveniencesTier 3 — standing fixture repo
trog-games/fixture: permanent, small committed asset set + spec doc — critics, review generation, and mirroring testable in seconds with zero generationNoted, not scoped: brain small-mode (reduced-footprint brain freeing 2 GPUs for a live seat beside it) — only if Tier 2's
--take-gpusbracket proves too slow in practice.All three tiers implemented and green (commits
5d0d5fc,1748eba). The mocks paid for themselves immediately: they exposed two latent production race bugs in the Forgejo commit path that slow real generation had been hiding — details below.What landed:
scripts/mock-seat.py(one stub, both seat contracts, canned PNG/MP4/WAV),SEAT_MODE=mock+SEAT_HOSTindirection in the profiles, conductor leaves the brain alone in mock mode,make cycle-testwith purge/queue/drain/critics/review/mirror + assertions.assetqgrew apurgesubcommand (deployed).scripts/seat.sh up/run/downreusing_seat.sh+ profiles verbatim; GPU policy enforced (refusal message lists--take-gpus/--cpu/--mock); outputs default totrog-games/seat-scratch;SEAT_BASE_PATHlets animate one-offs skip the queue;make seat-up/seat-run/seat-down. This is the lifecycle the studio UI's one-off requests will ride (per the shelf-survey: no off-the-shelf component fits heterogeneous docker seats + brain GPU tenancy — Triton/Ray/KServe all assume dedicated GPUs and their own model formats).trog-games/fixtureseeded with real generated assets (card-back, card-flip sheet, bg-title, card-snap, ambient-theme) + spec;make fixture-review.The two bugs cycle-test caught on its first runs:
contents/rawendpoints resolve via HEAD, which lags fresh commits. Regen passes 404'd on files committed seconds earlier; the animate lane could miss a base sprite the image lane just landed. Every laptop-side read now pins?ref=main.forgejo_commitnow retries whole (fresh sha probe, backoff+jitter).How to test:
For a REAL one-off (brain bracket):
make seat-up PROFILE=audio FLAGS=--take-gpus, run items,make seat-down PROFILE=audiorestores the brain.Full bench (
make asset-bench+make assets-drain) remains the final regression, as scoped. Current state: 56 tests green, lint clean, cycle-test PASSED twice consecutively, brain + aegra healthy.Good catch — that was a real tier-interaction bug, now fixed (commit
0277280, aegra redeployed):What you saw: not intentional. The fixture is supposed to be REAL assets (mocks live only in
trog-games/cycle-test). Chain of events: yourmake fixture-reviewran critics → they failed 3 real assets → critics always requeued first-time failures → my latermake cycle-testruns drained the whole queue with mock seats → mock output overwrote the permanent fixture. The "kaleidoscope" card-flip was the mock's testsrc2 clip assembled into a sheet; the two identical checkerboards were the 287-byte mock PNG.Closures:
critics run --no-requeue— fixture-review judges only, never queues regeneration (the fixture is permanent by definition).cycle-testnow refuses to run if any other game has unfinished queued work (newassetq queuedsubcommand) — a mock drain can never eat real jobs again.Re-test:
make fixture-review→ http://trogdor:3923/games/fixture/assets/review.html now shows the real navy card-back, starfield bg-title, and the gold filigree card-flip sheet animating. 3 of 5 get honest FAIL verdicts from the critics (e.g. the sheet's frames don't really show a flip) — that's the fixture exercising both verdict paths, chips + critique notes included. Queue stays empty afterward (--no-requeueproof). cycle-test still PASSED (67s) with the guard in place.Fixture feedback addressed (commit above, aegra redeployed):
card-shimmer— the sheet genuinely contains no flip, just the ornament shimmering; the entry now claims what the pixels do.critics run --fresh(FRESH=1 make fixture-review) — verdict cache is keyed to the asset commit, so brief/critic edits never re-judged unchanged pixels; fresh skips the cache for exactly these situations.Fresh-judged with truthful briefs: 4 pass, 1 fail (card-shimmer — critic correctly flags the ivory/gold sheet against its navy base sprite). One standing honest fail is deliberate: the fixture exercises both verdict paths, chips + critique notes. Refresh http://trogdor:3923/games/fixture/assets/review.html to see it.
Renamed per feedback:
make fixture-review→make critic-test(df07baa) — it judges the fixture's known assets, so the name now says what it tests. Usage unchanged: plain run = cached plumbing check (~10s),FRESH=1 make critic-test= real re-judgment after critic/brief edits (~3-5 min, baseline 4 pass / 1 fail). Earlier comments referencing fixture-review mean this command.Fixture reshaped per request — final baseline 6 pass / 1 fail, and the one fail is the deliberate sentinel:
orange.pngwith a brief describing an orange → critic FAILs it every time. Proves mismatch detection.--take-gpus, its first real-GPU outing — worked cleanly, brain bracketed and restored both times). Walk cycle passes solidly: that is the pix3lwalk LoRA's home turf.Side benefit: the critics proved sharp — mixed suits on a card face and a mid-animation perspective break are exactly the catches we built them for.
Verify:
make critic-test(~10s cached) → expect7 judged (7 cached), 1 failed, page shows 6 green chips + orange's open FAIL critique: http://trogdor:3923/games/fixture/assets/review.htmlFinal thoughts — 05.4 delivered its pyramid, and it earned its keep immediately.
What stands after this ticket:
make test(~2s) →make critic-test(~10s cached / ~9min fresh, baseline 6 pass + the orange sentinel) →make cycle-test(~60-100s, mocks, brain untouched) → seat one-offs (seat-up/run/down, mock/cpu/take-gpus) → full bench as the final regression. Each tier caught something real during its own build:?ref=mainpins + commit retries--no-requeue,--fresh, truthful-briefs rule) and proved the critics catch real defects (franken card faces, mid-animation perspective breaks)--take-gpusbracket did four clean real-GPU sessions generating the fixture's assetsassetq purge/queued, and cycle-test refuses to mock-drain other games' work.Honest debts this ticket leaves: the make-target surface is now large and stylistically mixed (bash-sourcing-bash, docker-exec'd python, heredocs), the seat CLI's GPU policy lives in shell flags, and one-offs still require knowing which profile owns which kind. That's not polish debt — it's the seam for the next redesign: #21 (06 · intuitive trog command layer) — one python CLI, central orchestrator owning seats/GPU tenancy, make retired to build duties. The plumbing built here (profiles, mock seats, fixture, queue, testing tiers) is what that layer will sit on.
Repo state: all commits pushed through
f2239c7; aegra image live with critics--fresh/--no-requeue+ assetqpurge/queued; brain + aegra healthy; fixture at its documented baseline.