Public: anyone can read this; the crew can change it.
A spark finding on the games page links to the slow tick it came from #18241
Its check is red, 2h 24m ago
check failed: gate: rule "the diff is the change": test/tui-games.test.ts:458 only rewraps a comment this pull did not write; restore the lines, and keep the diff to the change (`bun scripts/gate.ts --fix` rewraps…
A slow spark finding now shows on the box page and links to the slow tick it came from. The new test file and the existing spark view tests pass, and tsc and design-lint are clean. I did not run the full suite; the forge runs it on the push.
-
Reviews
No review yet.
-
Checks
stopped failed before it answered deploy 66afd29
Check failed: check failed: gate: rule "the diff is the change": test/tui-games.test.ts:458 o…Check of 66afd29checked against main at a338207fast tier: red in 17s
Website spec: 26 findings (report only)
- /admin/telemetry http://127.0.0.1:36351/admin/telemetry answered 404 — https://specification.website/
- /board http://127.0.0.1:36351/board answered 303 — https://specification.website/
- /cockpit http://127.0.0.1:36351/cockpit answered 303 — https://specification.website/
- /notes http://127.0.0.1:36351/notes answered 303 — https://specification.website/
- /review http://127.0.0.1:36351/review answered 303 — https://specification.website/
- /system http://127.0.0.1:36351/system answered 303 — https://specification.website/
- /admin/limits http://127.0.0.1:36351/admin/limits answered 404 — https://specification.website/
- /maintenance http://127.0.0.1:36351/maintenance answered 303 — https://specification.website/
- /talk http://127.0.0.1:36351/talk answered 303 — https://specification.website/
- /flow http://127.0.0.1:36351/flow answered 303 — https://specification.website/
- /resilience http://127.0.0.1:36351/resilience answered 303 — https://specification.website/
- /boards?help http://127.0.0.1:36351/boards?help answered 303 — https://specification.website/
- /settings/crew http://127.0.0.1:36351/settings/crew answered 303 — https://specification.website/
- /settings/crew?help http://127.0.0.1:36351/settings/crew?help answered 303 — https://specification.website/
- /settings/captain http://127.0.0.1:36351/settings/captain answered 303 — https://specification.website/
- /settings/security/controls http://127.0.0.1:36351/settings/security/controls answered 303 — https://specification.website/
- /settings/grants http://127.0.0.1:36351/settings/grants answered 303 — https://specification.website/
- /preview-admin/sample expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/drop http://127.0.0.1:36351/preview-admin/sample/drop answered 303 — https://specification.website/
- /preview-admin/sample/data-move http://127.0.0.1:36351/preview-admin/sample/data-move answered 303 — https://specification.website/
- /preview-admin/sample/cut-over http://127.0.0.1:36351/preview-admin/sample/cut-over answered 303 — https://specification.website/
- /preview-admin/sample/next?pick expected exactly one <h1>, found 2 — headings
- /preview-admin/sample/bets expected exactly one <h1>, found 2 — headings
- /advisories http://127.0.0.1:36351/advisories answered 303 — https://specification.website/
- /looks/missing http://127.0.0.1:36351/looks/missing answered 404 — https://specification.website/
- /looks/failed http://127.0.0.1:36351/looks/failed answered 500 — https://specification.website/
-
History
- No look: the box page needs a stored sampler profile and a game box, and no page in app.looks seeds either, so there is no nearest look to name; the tests render both pages (#18213) 66afd29
- Merge main into the spark finding pull: the slowest-ticks rows are main's summary rows, now carrying the tick anchor 158eedb
- Looks: /games/net 9b92b21
- The games page shows a profile natively: flame graph, slowest ticks, per-mod time, linked findings (#18178) 1df6f9e
- Direction: key the spark finding's decode cache by the app's database, not the process (#18213) a940374
- An app made in the tab forge can be published as a read-only link on the forge, with no login (#18219) 7a7184b
8 earlier comments
A slow spark finding now shows on the box page and links to the slow tick it came from. The new test file and the existing spark view tests pass, and tsc and design-lint are clean. I did not run the full suite; the forge runs it on the push.
What changed
- The finding: no finding derived from a spark profile existed, so I added one in
src/games/spark_finding.ts. For a box's newest sampler profile, if the slowest tick is over 50 ms (the budget at 20 TPS), it says so. For example: "Tick time reached 62.5 ms at its slowest (budget 50 ms, window 3, 18.5 TPS); most time attributed to <mod>, 40%." It carries the profile's key and the tick window. - The box page: the line sits in the Profiles block of
/games/<box>and links to/games/<box>/spark/<key>#tick-<window>. Thegames.tsedit is one rendering line plus its import. - The profile page: each slowest-ticks row now has
id="tick-<window>", so the link lands on it. The edit is ingames_spark_ticks.ts. - Key validation: the key comes from the box's own stored profiles, never from the request, so another box's profile is never linked.
- Unchanged cases: a box with no sampler profile, or none over budget, shows no line.
- Terminal: the Profiles screen (
pon the box screen) shows the same sentence with the profile key and row.docs/features/game-spark.mdhas a new section. - Decoding cost: each profile is decoded once per process and cached (up to 64), so the box page doesn't re-decode a profile on every render.
Tests: test/games-spark-finding.test.ts checks the following:
- A 62.5 ms window becomes a finding carrying the key and window.
- The box page's href and the profile page's
<tr id="tick-3">use the same anchor. - A 40 ms profile gives no finding.
- Another box never links a profile it doesn't hold.
I didn't run the tests without the change, but the link and anchor tests can't pass without it.
Chose not to do
- The 50 ms threshold is fixed, not configurable.
- Only the newest profile is considered, and at most one finding per box.
- The finding doesn't join the per-service findings list. Spark profiles belong to the box, so it sits with the Profiles block.
- GC and memory are still not shown.
Gate: the gate printed two "one implementation?" similarity notes about test helpers (varint, keep) copied from other tests. I did not dedupe them.
To try: store a slow sampler profile on a box, open /games/<box>, and follow the "Tick time reached…" line under Profiles. It opens /games/<box>/spark/<key>#tick-<window> on the matching row.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block, above the list of stored profiles", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks table on the profile page", "expect": "URL ends #tick-<window> and the browser scrolls to that window's row"},
{"go": "/games/<box> for a box whose profiles are all within budget, or that has none", "look": "Profiles block", "expect": "No tick line; the list is as before"}
]<!-- look-pages daa02bb498a5 --> Look pages for daa02bb, from the gate:
look pages (none): this pull changes src/web/pages/games.ts, src/web/pages/games_spark_ticks.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
A slow spark finding now shows on the box page and links to the slow tick it came from. That link is the first push's change; this push only fixes the failing module-state test. That test refused the module-level Map I used to cache decoded profiles. The cache is now a WeakMap keyed by the app's database, so no state is shared across the process. I reran module-state and games-spark-finding, and both pass along with tsc. I did not rerun the full suite; the forge runs it on this push.
What changed
- Finding:
src/games/spark_finding.tsis new. When a box's newest sampler profile has a slowest tick over 50 ms (the budget at 20 TPS), it says so, for example "Tick time reached 62.5 ms at its slowest (budget 50 ms, window 3, 18.5 TPS)…". The finding carries the profile's key and the tick window. - Box page: the line sits in the Profiles block of
/games/<box>and links to/games/<box>/spark/<key>#tick-<window>. Thegames.tsedit is one rendering line plus its import. - Profile page: each slowest-ticks row now has
id="tick-<window>"(games_spark_ticks.ts), so the link lands on it. - Key validation: the key is read from the box's own stored profiles, never from the request, so another box's profile is never linked.
- Unchanged cases: a box with no sampler profile, or none over budget, shows no line.
- Terminal: the Profiles screen shows the same sentence with the profile key and row.
docs/features/game-spark.mdhas a new section. - Tests:
test/games-spark-finding.test.tschecks that a 62.5 ms window becomes a finding, and that the box page's href and the profile page's<tr id="tick-3">use the same anchor. It also checks that a 40 ms profile gives no finding, and that another box's profile is never linked.
Not done
- The 50 ms threshold is fixed.
- Only the newest profile is considered, and there is at most one finding per box.
- The finding is not in the per-service findings list, because profiles belong to the box.
- GC and memory are still not shown.
The gate prints two "one implementation?" notes on test helpers (varint, keep) copied from other tests. I did not dedupe them.
To try: store a slow sampler profile on a box, open /games/<box>, and follow the "Tick time reached…" line under Profiles. It opens the profile page with the matching row targeted at #tick-<window>.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block, above the list of stored profiles", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks table on the profile page", "expect": "URL ends #tick-<window> and the browser scrolls to that window's row"},
{"go": "/games/<box> for a box whose profiles are all within budget, or that has none", "look": "Profiles block", "expect": "No tick line; the list is as before"}
]I pushed a commit with a Looks: /games/net line, which names the page the gate could not trace. The commit also carries "Direction: … (#18213)" and has no code changes. I haven't seen the gate's verdict on it yet.
The Looks: path is /games/net, which is the box page the finding link appears on. I don't know whether the gate accepts that path or wants another form.
The earlier module-state failure was already fixed in the previous push (the decode cache is a WeakMap keyed by the app's database). The games.ts change is still one rendering line plus its import.
The pull's change itself:
- Box page: a box whose newest sampler profile has a slowest tick over 50 ms gets a line in its Profiles block: "Tick time reached N ms at its slowest…". It links to
/games/<box>/spark/<key>#tick-<window>. - Profile page: each slowest-ticks row has the matching
id="tick-<window>", so the link lands on it. - Key validation: the key is read only from the box's own stored profiles, never from the request.
- Unchanged cases: a box with no profile, or none over budget, shows no line.
- Terminal: the Profiles screen shows the same sentence with the profile key and row.
- Not done: the 50 ms threshold is fixed, and only the newest profile gets a finding.
To try: store a slow sampler profile on a box, open /games/<box>, and follow the "Tick time reached…" line under Profiles.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block, above the list of stored profiles", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks table on the profile page", "expect": "URL ends #tick-<window> and the browser scrolls to that window's row"},
{"go": "/games/<box> for a box whose profiles are all within budget, or that has none", "look": "Profiles block", "expect": "No tick line; the list is as before"}
]I merged main into the branch and pushed; the merge touched three files and I resolved two conflicts. I ran tsc and the spark, tui-games and module-state tests (42 pass); I did not run the full suite. The earlier gate verdict was green, but I haven't seen the check's result on the merged push.
Conflicts resolved
games_spark_ticks.ts:maindeleted this file when #18178 moved the slowest-ticks table intosummarySectionsinsrc/games/spark_view.ts. I took the deletion and put the row anchor intosummarySectionsinstead.docs/features/game-spark.md: I keptmain's paragraph and my new "A finding links to its slow tick" section.
What the merge changed in my code
- Anchor on the rows: the slowest-ticks rows now carry
id="tick-<window>", so a finding's link still lands on its row. - Row titles: the rows are titled with the profile's real window number ("Window 3"), where
mainhad used their rank ("Window 1"). That matches the window the finding names. No test or doc depended on the rank title. tickAnchormoved: it now lives inspark_view.ts, to avoid an import cycle withspark_finding.ts.- Test: the anchor test now looks for
<li id="tick-3">rather than a table row.
Open gate notes
- Looks line: the gate says
Looks: /games/netis not a page listed inapp.looksinforge.json. I haven't found which path it wants, so it is probably still unresolved. - Duplicate helpers: the gate flags my test's
varintas a copy oftest/helpers/spark_fixture.ts#varint(it was another test'svarintbefore the merge). I did not switch to the shared one.
The feature is as before: a box whose newest sampler profile has a tick over 50 ms gets a "Tick time reached…" line in its Profiles block. It links to /games/<box>/spark/<key>#tick-<window>. The key comes only from the box's own profiles, and the terminal's Profiles screen shows the same sentence.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks section of the profile page", "expect": "URL ends #tick-<window>; the row titled 'Window <window>' is the one scrolled to"},
{"go": "/games/<box> for a box with no profile or none over budget", "look": "Profiles block", "expect": "No tick line"}
]<!-- look-pages 158eedb91829 --> Look pages for 158eedb, from the gate:
look pages (none): "Looks: /games/net" is not a page of app.looks in forge.json; this pull changes src/web/pages/games.ts, src/web/pages/games_spark_view.ts but the forge could not trace the route of /, /admin/telemetry, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I pushed one commit with a No look: line, which answers the look-pages note. The commit changes no code. The check has not yet reported on it.
I used No look: instead of naming a page. /games/<box> isn't in app.looks in forge.json, and none of the listed pages seeds a game box with a stored sampler profile, so there is no nearest page to name. The commit says that the tests render both pages.
The pull itself
- Finding and link: a box whose newest sampler profile has a slowest tick over 50 ms gets a "Tick time reached N ms at its slowest…" line in its Profiles block on
/games/<box>. The line links to/games/<box>/spark/<key>#tick-<window>. - Anchor: the matching row in the profile page's Slowest ticks section has
id="tick-<window>", so the link lands on it. - Validation: the key comes only from the box's own stored profiles, never from the request.
- Unchanged case: a box with no profile, or none over budget, shows no line.
- Terminal: the Profiles screen shows the same sentence with the profile key and row.
- Tests:
test/games-spark-finding.test.tscovers the finding, its href, the matching anchor on the profile page, the within-budget case, and that another box's profile is never linked. - Not done: the 50 ms threshold is fixed, only the newest profile gets a finding, and there is at most one finding per box.
- Open gate note: the gate still flags my test's
varintas a copy of the one intest/helpers/spark_fixture.ts. I did not switch to the shared one.
To try: store a slow sampler profile on a box, open /games/<box>, and follow the "Tick time reached…" line under Profiles.
[
{"go": "/games/<box> (a box with a sampler profile whose slowest tick is over 50 ms)", "look": "Profiles block", "expect": "A link reading 'Tick time reached N ms at its slowest…'"},
{"go": "Follow that link", "look": "Slowest ticks section of the profile page", "expect": "URL ends #tick-<window>; the row titled 'Window <window>' is the one scrolled to"},
{"go": "/games/<box> for a box with no profile or none over budget", "look": "Profiles block", "expect": "No tick line"}
]API Error: 402 This request requires more credits, or fewer max_tokens. You requested up to 128000 tokens, but can only afford 4000. To increase, visit https://openrouter.ai/workspaces/default/keys/b36b4d5ca03526e2ce9b015c94d62cc19d23669897752807e5fe44ac6efc00fd and adjust the key's monthly limit
A slow spark finding now shows on the box page and links to the slow tick it came from. The new test file and the existing spark view tests pass, and
tscanddesign-lintare clean. I did not run the full suite; the forge runs it on the push.What changed
src/games/spark_finding.ts. For a box's newest sampler profile, if the slowest tick is over 50 ms (the budget at 20 TPS), it says so. For example: "Tick time reached 62.5 ms at its slowest (budget 50 ms, window 3, 18.5 TPS); most time attributed to <mod>, 40%." It carries the profile's key and the tick window./games/<box>and links to/games/<box>/spark/<key>#tick-<window>. Thegames.tsedit is one rendering line plus its import.id="tick-<window>", so the link lands on it. The edit is ingames_spark_ticks.ts.pon the box screen) shows the same sentence with the profile key and row.docs/features/game-spark.mdhas a new section.Tests:
test/games-spark-finding.test.tschecks the following:<tr id="tick-3">use the same anchor.I didn't run the tests without the change, but the link and anchor tests can't pass without it.
Chose not to do
Gate: the gate printed two "one implementation?" similarity notes about test helpers (
varint,keep) copied from other tests. I did not dedupe them.To try: store a slow sampler profile on a box, open
/games/<box>, and follow the "Tick time reached…" line under Profiles. It opens/games/<box>/spark/<key>#tick-<window>on the matching row.Closes #18213