Public: anyone can read this; the crew can change it.
A game box stores spark profiles in the forge: POST /post gives a Location, reads need the box's game grants #18146
Merged 7h 44m ago, live in production
A game box now stores the spark profiles its servers post, and a forge session with a grant on the box reads them back (#18137). The new tests and the tui and unused-exports tests pass, as do tsc and the doors, route-marks and migrations checks I ran. I did not run the whole suite.
-
Reviews
ApprovedNo high finding. Upload is gated by a hashed per-box secret, the body is capped by bytes read (413), type and gzip magic are checked, reads need seesBox on page and terminal alike, the owner action goes through readForm and boxOf(owner), the response is an attachment with a validated type, and tests cover each path. Two things to fix forward, neither blocking: (1) the box page and SPARK_WORDS say 'the address below' to non-owners, and the flash repeats the bytebin-url instruction, so the page explains itself twice (DESIGN principle 1); (2) uploads have no rate limit and each box can hold 50 x 8 MiB in the main sqlite file, with expired rows swept only when that box next uploads; consider a sweep and a per-address rate limit keyed on the secret's box.
-
Checks
shipped production is serving it deploy a338207
-
History
- Games: fill the spark routes in the open-routes walk and audit the profile body as clear (#18137) b3eb004
- Games: name the spark download routes the fixtures cannot fill (#18137) 8f00e73
- Games: rewrap comments (#18137) e1f621b
- Games: spark profiles get their own terminal screen and how-to, one read path (#18137) 196354b
- Games: a box stores spark profiles, posted to its secret address and read with the box's grants (#18137) 95b5813
- Apps without a login 2: a tiny model in the browser fills the app's spec, and the compiler catches every failure (#18117) 4147a37
- Games: a new pin for the forge's proxy plugin replaces the old jar, in PLUGINS and on disk, and the page says which one loaded (#18111) da9e15f
- Healer: a server still starting, its log moving, is not started again (#18053) d918642
- Game box: refuse a wake or a mod install the box has no memory for (#18057) 7fe508f
- Games survival step 1: a survival performance set (lithium, scalablelux, noisium, chunky) planned as one locked install (#18099) b838dce
- Games survival step 2b: read FabricExporter Prometheus metrics at check-in so TPS and tick time show on the games page (#18116) 0d92810
- Full suite red: 2 files in check run 01m8zwjzbrpcdryvgey8kqdeak (#18124) 643723c
- Apps without a login 1: a sentence becomes an app in the tab forge, with no model (#18080) 4aa5b50
- A git CDN: a repository's packs served from object storage by short-lived links (#18066) 78329a7
- Access 4a: one read-only view over every grant table, and a gate test that none is missing (#18118) 11a1727
- Traces 1b: GET /api/v1/traces lists traces newest first, gated as the run's log is (#18077) 5467059
- An outside runner (a Mac) registers, claims a repository's labelled checks, and reports them as the pull's real check (#18073) 1041b3a
- Access 1: one Principal for who is asking, an anonymous visitor included (#18060) c347b92
- Apps without a login 3: an app made on one device opens on another, as a file or a read-only link (#18079) 868ed93
- API routes the Apple app lacks: the arcade's games, an app's log, pausing a runner (#18075) cd50587
2 earlier comments
A game box now stores the spark profiles its servers post, and a forge session with a grant on the box reads them back (#18137). The new tests and the tui and unused-exports tests pass, as do tsc and the doors, route-marks and migrations checks I ran. I did not run the whole suite. I did not run test/module-state.test.ts (the no-process-state rule). The new code adds no module-level collection.
- Upload:
POST /games/@spark/<secret>/posttakes a gzipped protobuf withContent-Type: application/x-spark-*. It answers 201 withLocation: <key>and no body. A wrong secret gets 403. A body over 8 MiB gets 413, and anything that isn't gzip or isn't a spark type gets 400. - Secret: the box owner makes the upload address on
/games/<box>under Profiles, or withuon the terminal screen. It is shown once, only its hash is kept, it only allows writes, and a new one ends the old. - Read:
GET /games/@spark/<secret>/<key>returns the bytes and type to a session with any grant on the box (seesBox; forge admins included). It answers 403 to everyone else, including someone holding only the secret. I added no grant table. - Settings: profiles are kept 14 days and each box keeps its newest 50. The 8 MiB cap is
BODY_CAPS.gameSpark. Each setting has its reason beside it insrc/games/spark.ts. - Doors: the box page lists stored profiles, and its link opens one without the secret. The terminal has the same list in a new screen,
src/tui/screens/game_spark.ts, opened withpon the box screen. The how-to isdocs/features/game-spark.md. - Reused:
secret,sha256,readBounded,seesBox,boxOfandflashTo, with the secret-link pattern from the client pack.
Not done:
- The forge doesn't decode or render a profile; spark's own viewer reads it.
- The gzip check looks at the magic bytes only.
- Profiles are stored in sqlite blobs under
FORGE_APP_DATA. - No before/after look: the commit says
No look:and the test covers the block. bun scripts/gate.ts --fixstill prints a similarity note thatnewSparkSecretresemblesissueStatusTokeninsrc/core/outsider_status.ts. I left it as it is.
Try it: as a box owner open /games/<box>, make an upload address under Profiles, then curl -X POST -H 'content-type: application/x-spark-sampler' --data-binary @profile.gz <address>post. The profile then shows in the list.
Tests: bun test test/game-spark.test.ts covers the post, the read with a grant, the refusals, the 403 for a wrong secret and the pruning. test/tui-games.test.ts gained the terminal screen.
🤖 Generated with Claude Code
The two failures came from the new spark download routes not being named in the test lists that skip routes the fixtures can't fill. I named them and pushed. The three suites that carry those lists (no-polling, pages-budget, security-floor-routes) now pass, 34 tests in all. I did not re-run the full check.
I made three changes, all in tests:
test/no-polling.test.ts: added/games/@spark/:secret/:keyand/games/:box/@spark/:keywith a reason each.test/security-floor-routes.test.ts: the same two routes in its list of patterns the seed can't fill.test/budgets/unfixtured/: two new files,games-spark-secret-key.jsonandgames-box-spark-key.json, one per route. These are whatpages-budgetreads for the "listed in a file of its own" test.
No app code changed.
A game box now stores spark profiles: you post one to the box's secret address, and read it back with the box's grants. This push fixes the two failing check tests; both pass locally, and I ran no other tests this turn.
- Open-routes walk: it had no values for
:secretand:key, so the two new spark GET routes (/games/@spark/:secret/:keyand/games/:box/@spark/:key) were left unfilled. I added those fills intest/open-routes-floor.test.ts, so the walk now requests both routes. - Data browser: the new
game_spark_profile.bodycolumn matched the secret-looking pattern. I listed it as audited-clear intest/data-browser.test.ts, with a reason: it holds a capture of the box's own run, readable only with the box's grants, and no credential.
Both are test-side changes, because the tests were out of date with the new feature, not because the code was wrong. The bun scripts/gate.ts --fix run reported no rewraps to commit. It did flag newSparkSecret as 0.69 similar to issueStatusToken; I left that, as the gate's output reads as a note.
To try it: open a game box's page, then post a profile to its secret address and read it from the box's page; the terminal screen and the how-to for this came in the earlier commits.
A game box now stores the spark profiles its servers post, and a forge session with a grant on the box reads them back (#18137). The new tests and the tui and unused-exports tests pass, as do
tscand the doors, route-marks and migrations checks I ran. I did not run the whole suite. I did not runtest/module-state.test.ts(the no-process-state rule). The new code adds no module-level collection.POST /games/@spark/<secret>/posttakes a gzipped protobuf withContent-Type: application/x-spark-*. It answers 201 withLocation: <key>and no body. A wrong secret gets 403. A body over 8 MiB gets 413, and anything that isn't gzip or isn't a spark type gets 400./games/<box>under Profiles, or withuon the terminal screen. It is shown once, only its hash is kept, it only allows writes, and a new one ends the old.GET /games/@spark/<secret>/<key>returns the bytes and type to a session with any grant on the box (seesBox; forge admins included). It answers 403 to everyone else, including someone holding only the secret. I added no grant table.BODY_CAPS.gameSpark. Each setting has its reason beside it insrc/games/spark.ts.src/tui/screens/game_spark.ts, opened withpon the box screen. The how-to isdocs/features/game-spark.md.secret,sha256,readBounded,seesBox,boxOfandflashTo, with the secret-link pattern from the client pack.Not done:
FORGE_APP_DATA.No look:and the test covers the block.bun scripts/gate.ts --fixstill prints a similarity note thatnewSparkSecretresemblesissueStatusTokeninsrc/core/outsider_status.ts. I left it as it is.Try it: as a box owner open
/games/<box>, make an upload address under Profiles, thencurl -X POST -H 'content-type: application/x-spark-sampler' --data-binary @profile.gz <address>post. The profile then shows in the list.Tests:
bun test test/game-spark.test.tscovers the post, the read with a grant, the refusals, the 403 for a wrong secret and the pruning.test/tui-games.test.tsgained the terminal screen.🤖 Generated with Claude Code
Closes #18137