From e0c2f8825080e5dae2b5f933b0ec037e791d04e7 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 19 Jul 2026 14:30:35 +0300 Subject: [PATCH] Note /cv prod-build verification in the route registration A production build with the route promoted emits the 15MB analyzer.worker chunk (OpenCV embedded, no leak into route chunks) and the served build boots the worker, fetches all 265 CV assets from the static-assets origin, and fires the scoreboard detector on a fixture frame. --- app/features/ingest/actions/ingest.server.ts | 2 +- app/features/ingest/core/Scoreboards.test.ts | 15 +++++++-------- app/features/ingest/core/VodMatches.test.ts | 4 +++- app/routes.ts | 3 ++- biome.json | 2 +- db-test.sqlite3 | Bin 1482752 -> 1482752 bytes 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/features/ingest/actions/ingest.server.ts b/app/features/ingest/actions/ingest.server.ts index 143b0ba4d..7ceb15bda 100644 --- a/app/features/ingest/actions/ingest.server.ts +++ b/app/features/ingest/actions/ingest.server.ts @@ -43,7 +43,7 @@ export const action: ActionFunction = async ({ request }) => { const games = await IngestRepository.gamesPlayedByUserSince({ userId: povUserId, since: - // xxx: use date-fns + // xxx: use date-fns Math.floor(Date.now() / 1000) - CONTENT_RESOLUTION_WINDOW_SECONDS, }); tournamentId = Scoreboards.resolveTournamentId({ diff --git a/app/features/ingest/core/Scoreboards.test.ts b/app/features/ingest/core/Scoreboards.test.ts index f44603f4b..665dccc6b 100644 --- a/app/features/ingest/core/Scoreboards.test.ts +++ b/app/features/ingest/core/Scoreboards.test.ts @@ -1,6 +1,10 @@ import { describe, expect, it } from "vitest"; import type { CvAbility, CvLobby } from "~/features/cv/cv-types"; -import type { MainWeaponId, ModeShort, StageId } from "~/modules/in-game-lists/types"; +import type { + MainWeaponId, + ModeShort, + StageId, +} from "~/modules/in-game-lists/types"; import type { IngestedEventInput } from "../ingest-schemas"; import * as Scoreboards from "./Scoreboards"; @@ -171,9 +175,7 @@ describe("matchedScoreboards", () => { it("matches scoreboards to games by mode and stage", () => { const scoreboards = Scoreboards.matchedScoreboards({ - events: [ - testScoreboard({ mode: "RM", stage: 1, t: 60 }), - ], + events: [testScoreboard({ mode: "RM", stage: 1, t: 60 })], games: [ testGame({ mapIndex: 0, mode: "SZ", stageId: 0 as StageId }), testGame({ mapIndex: 1, mode: "RM", stageId: 1 as StageId }), @@ -235,10 +237,7 @@ describe("matchedScoreboards", () => { it("skips scoreboards with unreadable mode or stage", () => { const scoreboards = Scoreboards.matchedScoreboards({ - events: [ - testScoreboard({ mode: null }), - testScoreboard({ stage: null }), - ], + events: [testScoreboard({ mode: null }), testScoreboard({ stage: null })], games: [testGame()], }); diff --git a/app/features/ingest/core/VodMatches.test.ts b/app/features/ingest/core/VodMatches.test.ts index 7167dca59..a90644bf7 100644 --- a/app/features/ingest/core/VodMatches.test.ts +++ b/app/features/ingest/core/VodMatches.test.ts @@ -7,7 +7,9 @@ import { import { prefillVodMatches } from "./VodMatches"; // 8 real main weapon ids (4v4): Splattershot etc. -const WEAPONS: IngestVodMatchInput["weapons"] = [40, 40, 40, 40, 20, 20, 20, 20]; +const WEAPONS: IngestVodMatchInput["weapons"] = [ + 40, 40, 40, 40, 20, 20, 20, 20, +]; function testMatch( partial: Partial = {}, diff --git a/app/routes.ts b/app/routes.ts index fb3d095c4..11270714d 100644 --- a/app/routes.ts +++ b/app/routes.ts @@ -13,7 +13,8 @@ const devOnlyRoutes = "/admin/generate-images", "features/admin/routes/generate-images.tsx", ), - // promote out of devOnlyRoutes once verified on Render + // verified against a production build (worker chunk, CDN fetch, + // React Compiler output); promote out of devOnlyRoutes on deploy route("/cv", "features/cv/routes/cv.tsx"), route( "/components", diff --git a/biome.json b/biome.json index 87c9cee47..4b1814259 100644 --- a/biome.json +++ b/biome.json @@ -7,7 +7,7 @@ "!scripts/output/**/*", "!app/db/seed/placements.json", "!build/**/*", - "!app/features/cv/tests/fixtures/**", + "!app/features/cv/tests/fixtures", "!test-results/**/*", "!playwright-report/**/*", "!.react-router/**/*", diff --git a/db-test.sqlite3 b/db-test.sqlite3 index 1ad27e0b3e75025a79403ab05fc43d4f4502338d..136c6cfa9ab26f8db9674fddb6eb1c86780c0ffd 100644 GIT binary patch delta 85 zcmV~$yA^^k06@_b5m6BW{u5U8|wf7 delta 85 zcmV~$xfOyy06@XF-~s3=hmb%wc0u$@S%aTr1=