Conversation
counterState and dbStatus each become one statement (the database size is memoised for a minute), the REST guard hands back the event it resolved instead of handlers looking it up again, the finished-runner count only runs when it can change the capability set, the course-map window preview shares the tile render gate, and controlCompletionStatus loads only the requested course's runners and their cards. Co-authored-by: Cursor <cursoragent@cursor.com>
Four full stacks on a 4 vCPU runner ran every shard at half speed and pushed 5 s expect budgets over; the shard count now follows the core count. The runner create/edit/delete test derives its name and card from the retry index so a slow first attempt cannot turn into a duplicate-card dialog on retry, and the two long course-editor tests declare themselves slow instead of racing the 30 s test timeout. Co-authored-by: Cursor <cursoragent@cursor.com>
ellmkay
merged commit Sep 24, 2026
5c3a910
into
fix/map-tile-cold-render-performance
4 checks passed
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #28 (base branch); GitHub retargets to
mainwhen that merges.Summary
Commit 1 — performance sweep (
docs/perf-polling-and-auth-round-trips.md). Follow-up to the Cloud Run log review: the recurring slow endpoints were all polls or per-request plumbing.competition.counterState(every 5 s/tab): 9 sequential queries → 1 statement with scalar subselects.competition.dbStatus(every 3 s/tab, public): 3 queries → 1;pg_database_size()memoised 60 s (ttl-memo.ts).assertRestAccessnow returns the resolvedEventRefso handlers stop looking the slug up twice;countFinishedRunnersonly runs when it can change the capability set (finishedCountMatters— date already past or grants already cover the completion caps ⇒ skip). Semantics unchanged./api/maps/:nameId/window.pngrasterises under the sharedrenderGate()with the same 503/Retry-Afterbehaviour as tiles, so layout previews can't stack on top ofMAP_RENDER_CONCURRENCYtile renders.course.controlCompletionStatus(every 15 s) loads only the requested course's runners and the cards they carry; one regex per control.online-input-config.spec.tsthat was flaking under load.Commit 2 — CI E2E failures. Every
mainrun since #26 has failed the E2E job (blockingpublish). All failures were timeouts: four full stacks on a 4 vCPU runner ran each shard at half speed (6–10 min vs 3–5 locally).scripts/e2e-sharded.mjs: default shard count is nowmin(4, floor(cores/2))— 4 on a dev box, 2 on a GitHub runner.E2E_SHARDSstill overrides.phase2.spec.tscreate/edit/delete: names and card number derive fromtestInfo.retry, so a slow first attempt no longer leaves a runner that makes every retry hit the duplicate-card dialog (the one deterministic failure in all three runs); list waits raised to 15 s.test.slow().docs/e2e-sharding.mdandAGENTS.mdupdated.Test plan
pnpm build,pnpm test(612 api / 867 web / 292 shared)finishedCountMatterstable,ttl-memo,counterStatekeys +oClubsemantics,control-completionsuite — which also passes against the previous implementation)CI=1 E2E_SHARDS=2(runner-shaped): 275 passed, 0 flakyoxygen-api/oxygen-webrebuilt and startedMade with Cursor