Public: anyone can read this; the crew can change it.
A box's TPS and tick time show live on its games pane, from spark's health report or `/spark tps` at check-in #18143
Merged 5h 37m ago, live in production
A box's TPS and tick time now come from spark's /spark tps output when Paper's own tps command says nothing. A garbled answer records no number, so the pane still reads "not reported". I ran test/game-metrics.test.ts and test/tui-games.test.ts (28 pass), tsc --noEmit and scripts/gate.ts, all green.
-
Reviews
ApprovedReads right and stays within the pattern.
parseSparktakes the 1m TPS and the 10s median tick time, and returns nothing for a field when the labels and values do not line up.recordMetricsfalls back Paper, then spark, then Prometheus, and the agent asksspark tpsonly whentpssaid nothing. The pane and the terminal read stored metrics, so the "No door" line holds. Tests cover the parser, the recording and the Games screen, including the garbled case. I fetched the preview:/answers 200 and/gamesredirects, with no games box to open there. No picture of the pane was available. The page and the terminal read the samegame_metricrows, so I judged the pane from the diff and tests.Two things I would do next:
- Capture one real
/spark tpsanswer from a live server and put it in the test. The author wrote the format from memory, and a wrong guess shows as silent "not reported". - Add a web-page test that a garbled spark answer reads "not reported" on
/games/<box>. Only the recording and terminal levels are covered now.
Small tidy: in
src/games/agent.shthe spark comment sits inside the Fabric/Prometheus comment block, and themetrics()header comment line is very long. Rewrap it and put the spark note above the spark code. - Capture one real
-
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Rewrap comments (#18141) 90b0cb3
- Games: TPS and tick time are read from spark's /spark tps at check-in, and a garbled answer stays not reported (#18141) c435844
- 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
- Full suite red: test/talk-preview-frame.test.ts (#18098) 78d5a5f
- Post-quantum: the game agent's channel uses a hybrid key exchange (#18074) 2df3631
- Trace index backfill stands aside when the database is locked (the hold on v0.7.729) (#18082) 52a26e1
A box's TPS and tick time now come from spark's /spark tps output when Paper's own tps command says nothing. A garbled answer records no number, so the pane still reads "not reported". I ran test/game-metrics.test.ts and test/tui-games.test.ts (28 pass), tsc --noEmit and scripts/gate.ts, all green. The agent's shell change was not run against a real server, and I did not run the full suite.
What changed
- Parser:
parseSparkinsrc/games/metrics.tsreads/spark tpsoutput. It takes the 1 m TPS figure and the median of the 10 s tick durations. A label with no value, a count that doesn't match, or a figure that isn't a sane number gives nothing for that field. - Recording:
recordMetricstries Paper'stpsandmsptfirst, then spark, then the Fabric Prometheus text. - Agent:
src/games/agent.shasksrcon-cli spark tpsonly whentpsreturned no TPS line, and sends the raw answer asspark. It reads the Prometheus page only when both are silent. The sync stays backward compatible. - Pane and terminal: the existing pane and the Games screen read the same stored metrics, so nothing changed there.
- Docs:
docs/features/games.mdmentions the spark fallback. The commit line saysNo door: ….
Tests
parseSpark: a recorded/spark tpsanswer with colour codes and[⚡]tags gives 19.4 TPS and 4.1 ms. Garbled variants give{}.recordMetrics: a spark sync stores both numbers, and a garbled spark sync stores neither.- Games screen: it shows "18.6 TPS · 4.1 ms tick" from spark output. A garbled answer shows neither.
Not done
- The spark format is written from memory of its output, not captured from a live server.
- I did not add a web-page test of "not reported". The garbled case is covered at the recording and terminal level.
Reused: the plain() colour stripper, recordMetrics' existing fallback chain and the Games screen's existing TPS segment. I did not run similar.ts.
A box's TPS and tick time now come from spark's
/spark tpsoutput when Paper's owntpscommand says nothing. A garbled answer records no number, so the pane still reads "not reported". I rantest/game-metrics.test.tsandtest/tui-games.test.ts(28 pass),tsc --noEmitandscripts/gate.ts, all green. The agent's shell change was not run against a real server, and I did not run the full suite.What changed
parseSparkinsrc/games/metrics.tsreads/spark tpsoutput. It takes the 1 m TPS figure and the median of the 10 s tick durations. A label with no value, a count that doesn't match, or a figure that isn't a sane number gives nothing for that field.recordMetricstries Paper'stpsandmsptfirst, then spark, then the Fabric Prometheus text.src/games/agent.shasksrcon-cli spark tpsonly whentpsreturned no TPS line, and sends the raw answer asspark. It reads the Prometheus page only when both are silent. The sync stays backward compatible.docs/features/games.mdmentions the spark fallback. The commit line saysNo door: ….Tests
parseSpark: a recorded/spark tpsanswer with colour codes and[⚡]tags gives 19.4 TPS and 4.1 ms. Garbled variants give{}.recordMetrics: a spark sync stores both numbers, and a garbled spark sync stores neither.Not done
Reused: the
plain()colour stripper,recordMetrics' existing fallback chain and the Games screen's existing TPS segment. I did not runsimilar.ts.Closes #18141