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.
This commit is contained in:
Kalle
2026-07-19 14:30:35 +03:00
parent a8f8dd9a43
commit e0c2f88250
6 changed files with 14 additions and 12 deletions

View File

@@ -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({

View File

@@ -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()],
});

View File

@@ -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<IngestVodMatchInput> = {},

View File

@@ -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",

View File

@@ -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/**/*",

Binary file not shown.