05.1 · Asset file service on trogdor: intermediates, preview, cross-game library #14

Closed
opened 2026-07-23 22:33:28 -04:00 by cmoriarty · 3 comments
Owner

Planning ticket (from agentic-game-dev experience, raised 2026-07-23 during 05 implementation): assets generated on trogdor need sharing / transferring / serving / searching / preview beyond what git-is-truth provides.

Already covered — do not rebuild: shipped per-game assets are committed to the game's Forgejo repo. Forgejo provides raw-URL serving, browse/preview, per-repo search, clone/pull transfer. That stays the source of truth.

Actual gaps:

  1. Intermediates — generation candidates, raw i2v clips pre-sheet-assembly, 1024px pre-downscale originals. Discarded today; asset critics (deferred in this milestone) and humans need them to compare before a winner is committed.
  2. Binary history bloat — every regenerated music track is ~6MB of git history forever. Intermediates and rejects must not touch git; they need a lifecycle home (auto-expire by day/game).
  3. Cross-game library — "every firefly sprite ever generated" spans repos. Later: similarity search via embeddings in the stack's pgvector (the reborn find_similar_assets from the agentic-game-dev audit — separate ticket when a consumer exists).
  4. Human preview/upload — thumbnails, in-browser audio audition, drop-in of handmade assets.

Proposed shape: one lightweight file service on trogdor over /mnt/output (already exists), its own Portainer stack (multiple consumers — trog, agentic-game-dev, humans — so infra, not trog compose, per the common-mcps boundary rule). Conductor's comfy_item.py gains one step: land intermediates in /mnt/output/<game>/<day>/ before committing winners to the repo.

Candidates (open source, single container):

  • copyparty — single binary; thumbnails, in-browser audio player, search, upload, WebDAV. Most capability per gram. Lead candidate.
  • filebrowser — already runs elsewhere in the homelab (familiar); fewer preview niceties.

Decide when picking up: auth model (LAN-open vs accounts), retention policy for intermediates, whether the studio (tickets 07–09) reads previews from here or only from Forgejo, and whether WebDAV mount replaces ad-hoc scp.

Non-goals: replacing git as asset truth; S3/MinIO-grade object storage (overkill until something needs presigned URLs).

Planning ticket (from agentic-game-dev experience, raised 2026-07-23 during 05 implementation): assets generated on trogdor need sharing / transferring / serving / searching / preview beyond what git-is-truth provides. **Already covered — do not rebuild:** shipped per-game assets are committed to the game's Forgejo repo. Forgejo provides raw-URL serving, browse/preview, per-repo search, clone/pull transfer. That stays the source of truth. **Actual gaps:** 1. **Intermediates** — generation candidates, raw i2v clips pre-sheet-assembly, 1024px pre-downscale originals. Discarded today; asset critics (deferred in this milestone) and humans need them to compare before a winner is committed. 2. **Binary history bloat** — every regenerated music track is ~6MB of git history forever. Intermediates and rejects must not touch git; they need a lifecycle home (auto-expire by day/game). 3. **Cross-game library** — "every firefly sprite ever generated" spans repos. Later: similarity search via embeddings in the stack's pgvector (the reborn `find_similar_assets` from the agentic-game-dev audit — separate ticket when a consumer exists). 4. **Human preview/upload** — thumbnails, in-browser audio audition, drop-in of handmade assets. **Proposed shape:** one lightweight file service on trogdor over `/mnt/output` (already exists), its own Portainer stack (multiple consumers — trog, agentic-game-dev, humans — so infra, not trog compose, per the common-mcps boundary rule). Conductor's comfy_item.py gains one step: land intermediates in `/mnt/output/<game>/<day>/` before committing winners to the repo. **Candidates (open source, single container):** - [copyparty](https://github.com/9001/copyparty) — single binary; thumbnails, in-browser audio player, search, upload, WebDAV. Most capability per gram. **Lead candidate.** - [filebrowser](https://github.com/filebrowser/filebrowser) — already runs elsewhere in the homelab (familiar); fewer preview niceties. **Decide when picking up:** auth model (LAN-open vs accounts), retention policy for intermediates, whether the studio (tickets 07–09) reads previews from here or only from Forgejo, and whether WebDAV mount replaces ad-hoc scp. **Non-goals:** replacing git as asset truth; S3/MinIO-grade object storage (overkill until something needs presigned URLs).
Author
Owner

First concrete customer landed (2026-07-24): every drain now commits an interactive assets/review.html into the game repo (scripts/asset-review.py, conductor hook) — animated sprite sheets via CSS steps(), audio players, pixel-true upscales, spec briefs as context.

But Forgejo raw serves HTML as text/plain by design (XSS protection), so the committed page is not browsable from Forgejo itself — clicking raw shows source. Verified locally: the page renders perfectly when served with a real content-type.

This makes the file service the delivery mechanism for asset reviews, which sharpens this ticket's requirements: serve game-repo checkouts (or mirror assets/ trees) with correct mime types, so http://<host>/<game>/review.html just works. copyparty does this out of the box.

**First concrete customer landed (2026-07-24):** every drain now commits an interactive `assets/review.html` into the game repo (`scripts/asset-review.py`, conductor hook) — animated sprite sheets via CSS steps(), audio players, pixel-true upscales, spec briefs as context. **But Forgejo raw serves HTML as `text/plain` by design** (XSS protection), so the committed page is not browsable from Forgejo itself — clicking raw shows source. Verified locally: the page renders perfectly when served with a real content-type. This makes the file service the delivery mechanism for asset reviews, which sharpens this ticket's requirements: serve game-repo checkouts (or mirror `assets/` trees) with correct mime types, so `http://<host>/<game>/review.html` just works. copyparty does this out of the box.
Author
Owner

Implemented and live-validated

Stack: trogdor-files (copyparty/ac, Portainer git stack 95, LAN-only anonymous, http://trogdor:3923). Shares: /games (repo mirrors), /intermediates (14-day auto-expire), /drop (uploads), /output (legacy tree, agentic-game-dev outputs browsable again), /models (RAID, read-only).

Producers wired (trog side):

  • conductor mirrors each drained game repo post-drain (clone/pull over ssh) and logs the review URL
  • comfy_item saves raw animate clips to intermediates before sheet assembly — the source material the 05.2 critics will judge; git never sees it

Live validation (fresh bench drain, 8/8):

  • http://trogdor:3923/games/asset-bench/assets/review.html serves as real text/html and renders — the original Forgejo text/plain gap is closed; review pages are now permanent bookmarkable URLs
  • knight-walk-142538.mp4 (318KB raw motion clip) landed in /intermediates/asset-bench/
  • models share browses read-only

Integrations beyond the original scope, no extra work needed:

  • ticket 04 playtest (#6): the mirrored game checkout IS the served game the headless browser needs — point Playwright at http://trogdor:3923/games/<game>/index.html
  • ticket 10 / the README thesis: same URL shape is "the link you send to friends" once games ship an entry point
  • README gained a deploy-from-scratch section covering the now-three-stack topology

Deliberately not done: cross-game similarity search (pgvector embeddings — needs a consumer first, noted in the original ticket) and any auth (LAN-only by design; revisit if this ever faces a network with strangers).

## Implemented and live-validated **Stack:** [trogdor-files](https://forgejo.underthere.xyz/cmoriarty/trogdor-files) (copyparty/ac, Portainer git stack 95, LAN-only anonymous, `http://trogdor:3923`). Shares: `/games` (repo mirrors), `/intermediates` (**14-day auto-expire**), `/drop` (uploads), `/output` (legacy tree, agentic-game-dev outputs browsable again), `/models` (RAID, read-only). **Producers wired (trog side):** - conductor mirrors each drained game repo post-drain (clone/pull over ssh) and logs the review URL - comfy_item saves raw animate clips to intermediates before sheet assembly — the source material the 05.2 critics will judge; git never sees it **Live validation (fresh bench drain, 8/8):** - `http://trogdor:3923/games/asset-bench/assets/review.html` serves as real `text/html` and renders — the original Forgejo text/plain gap is closed; review pages are now permanent bookmarkable URLs - `knight-walk-142538.mp4` (318KB raw motion clip) landed in `/intermediates/asset-bench/` - models share browses read-only **Integrations beyond the original scope, no extra work needed:** - **ticket 04 playtest (#6):** the mirrored game checkout IS the served game the headless browser needs — point Playwright at `http://trogdor:3923/games/<game>/index.html` - **ticket 10 / the README thesis:** same URL shape is "the link you send to friends" once games ship an entry point - README gained a deploy-from-scratch section covering the now-three-stack topology **Deliberately not done:** cross-game similarity search (pgvector embeddings — needs a consumer first, noted in the original ticket) and any auth (LAN-only by design; revisit if this ever faces a network with strangers).
Author
Owner

Closing — the file service is infrastructure now

Shipped as its own repo + git stack (trogdor-files, stack 95, copyparty at http://trogdor:3923), wired into the conductor (post-drain repo mirrors + raw-clip intermediates), live-validated end to end on a bench drain: review pages render with real mime types, intermediates land and auto-expire, the RAID browses.

What this ticket turned out to really be: the delivery layer for everything the pipeline produces — review pages today; playtest's served-game target (#6) and the "URL you send to friends" (#11) tomorrow, both riding the exact same /games/<game>/ mirror with zero additional work. The intermediates share is #15's evidence locker, already filling.

Standing state: deployed image verified current, CI green, bench artifacts cleaned (bench recreates with make asset-bench any time), topology documented in the README's deploy-from-scratch section.

Deferred with triggers: pgvector similarity search (needs a consumer), auth (needs a network with strangers).

## Closing — the file service is infrastructure now Shipped as its own repo + git stack ([trogdor-files](https://forgejo.underthere.xyz/cmoriarty/trogdor-files), stack 95, copyparty at `http://trogdor:3923`), wired into the conductor (post-drain repo mirrors + raw-clip intermediates), live-validated end to end on a bench drain: review pages render with real mime types, intermediates land and auto-expire, the RAID browses. **What this ticket turned out to really be:** the delivery layer for everything the pipeline produces — review pages today; playtest's served-game target (#6) and the "URL you send to friends" (#11) tomorrow, both riding the exact same `/games/<game>/` mirror with zero additional work. The intermediates share is #15's evidence locker, already filling. **Standing state:** deployed image verified current, CI green, bench artifacts cleaned (bench recreates with `make asset-bench` any time), topology documented in the README's deploy-from-scratch section. **Deferred with triggers:** pgvector similarity search (needs a consumer), auth (needs a network with strangers).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cmoriarty/trog#14
No description provided.