@ttt-productions/q-core 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/business.js +2 -2
- package/dist/constants/business.js.map +1 -1
- package/dist/constants/media.js +1 -1
- package/dist/constants/media.js.map +1 -1
- package/dist/constants/sports.js +1 -1
- package/dist/constants/sports.js.map +1 -1
- package/dist/constants/telemetry.js +3 -3
- package/dist/constants/telemetry.js.map +1 -1
- package/dist/doc-schemas/admin-notifications.js +3 -3
- package/dist/doc-schemas/admin-notifications.js.map +1 -1
- package/dist/doc-schemas/aggregate-stats.js +3 -3
- package/dist/doc-schemas/aggregate-stats.js.map +1 -1
- package/dist/doc-schemas/atoms.d.ts +1 -1
- package/dist/doc-schemas/atoms.js +3 -3
- package/dist/doc-schemas/atoms.js.map +1 -1
- package/dist/doc-schemas/audit-event.js +2 -2
- package/dist/doc-schemas/audit-event.js.map +1 -1
- package/dist/doc-schemas/firestore-primitives.js +1 -1
- package/dist/doc-schemas/firestore-primitives.js.map +1 -1
- package/dist/doc-schemas/game-location.js +2 -2
- package/dist/doc-schemas/game-location.js.map +1 -1
- package/dist/doc-schemas/game-stat-history.js +1 -1
- package/dist/doc-schemas/game-stat-history.js.map +1 -1
- package/dist/doc-schemas/game-stats.js +6 -6
- package/dist/doc-schemas/game-stats.js.map +1 -1
- package/dist/doc-schemas/league-team.js +4 -4
- package/dist/doc-schemas/league-team.js.map +1 -1
- package/dist/doc-schemas/membership-roster-sync.js +2 -2
- package/dist/doc-schemas/membership-roster-sync.js.map +1 -1
- package/dist/doc-schemas/pending-media.d.ts +6 -6
- package/dist/doc-schemas/publicUser.js +1 -1
- package/dist/doc-schemas/publicUser.js.map +1 -1
- package/dist/doc-schemas/registration-start.js +1 -1
- package/dist/doc-schemas/registration-start.js.map +1 -1
- package/dist/doc-schemas/registry.d.ts +3 -3
- package/dist/doc-schemas/sport-game.js +4 -4
- package/dist/doc-schemas/sport-game.js.map +1 -1
- package/dist/doc-schemas/sport-league.js +1 -1
- package/dist/doc-schemas/sport-league.js.map +1 -1
- package/dist/doc-schemas/stats-operation.js +2 -2
- package/dist/doc-schemas/stats-operation.js.map +1 -1
- package/dist/doc-schemas/status-reconcile-queue.js +1 -1
- package/dist/doc-schemas/status-reconcile-queue.js.map +1 -1
- package/dist/doc-schemas/sweep-state.js +2 -2
- package/dist/doc-schemas/sweep-state.js.map +1 -1
- package/dist/doc-schemas/team-membership.js +1 -1
- package/dist/doc-schemas/team-membership.js.map +1 -1
- package/dist/doc-schemas/user-profile.js +1 -1
- package/dist/doc-schemas/user-profile.js.map +1 -1
- package/dist/doc-schemas/waiver-template.js +1 -1
- package/dist/doc-schemas/waiver-template.js.map +1 -1
- package/dist/doc-schemas/waivers-and-hardware.js +3 -3
- package/dist/doc-schemas/waivers-and-hardware.js.map +1 -1
- package/dist/domain-events/domain-events.js +2 -2
- package/dist/domain-events/domain-events.js.map +1 -1
- package/dist/ids/award-grant-ids.js +1 -1
- package/dist/ids/award-grant-ids.js.map +1 -1
- package/dist/ids/compound-ids.js +1 -1
- package/dist/ids/compound-ids.js.map +1 -1
- package/dist/ids/minted-ids.js +1 -1
- package/dist/ids/minted-ids.js.map +1 -1
- package/dist/ids/notification-ids.js +1 -1
- package/dist/ids/notification-ids.js.map +1 -1
- package/dist/ids/stat-event-ids.d.ts +1 -1
- package/dist/ids/stat-event-ids.js +2 -2
- package/dist/ids/stat-event-ids.js.map +1 -1
- package/dist/ids/stats-operation-ids.js +1 -1
- package/dist/ids/stats-operation-ids.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/input-formats/input-formats.js +1 -1
- package/dist/input-formats/input-formats.js.map +1 -1
- package/dist/media/file-origins.js +1 -1
- package/dist/media/file-origins.js.map +1 -1
- package/dist/media/picture-url.js +1 -1
- package/dist/media/picture-url.js.map +1 -1
- package/dist/migration-console/action-ids.js +1 -1
- package/dist/migration-console/action-ids.js.map +1 -1
- package/dist/migration-console/manifest.js +1 -1
- package/dist/migration-console/manifest.js.map +1 -1
- package/dist/notifications/admin-notification-config.js +1 -1
- package/dist/notifications/admin-notification-config.js.map +1 -1
- package/dist/notifications/occurrences.js +1 -1
- package/dist/notifications/occurrences.js.map +1 -1
- package/dist/paths/collections.js +3 -3
- package/dist/paths/collections.js.map +1 -1
- package/dist/paths/picture-owner-paths.js +1 -1
- package/dist/paths/picture-owner-paths.js.map +1 -1
- package/dist/paths/storage-paths.d.ts +1 -1
- package/dist/paths/storage-paths.js +1 -1
- package/dist/paths/storage-paths.js.map +1 -1
- package/dist/paths/utils.d.ts +1 -1
- package/dist/paths/utils.js +1 -1
- package/dist/paths/utils.js.map +1 -1
- package/dist/schemas/admin-notifications.js +1 -1
- package/dist/schemas/admin-notifications.js.map +1 -1
- package/dist/schemas/app-config.js +1 -1
- package/dist/schemas/app-config.js.map +1 -1
- package/dist/schemas/awards.js +1 -1
- package/dist/schemas/awards.js.map +1 -1
- package/dist/schemas/dead-letters.js +2 -2
- package/dist/schemas/dead-letters.js.map +1 -1
- package/dist/schemas/leagues.js +1 -1
- package/dist/schemas/leagues.js.map +1 -1
- package/dist/schemas/migration-console.js +1 -1
- package/dist/schemas/migration-console.js.map +1 -1
- package/dist/schemas/pictures.js +1 -1
- package/dist/schemas/pictures.js.map +1 -1
- package/dist/schemas/schedules.js +2 -2
- package/dist/schemas/schedules.js.map +1 -1
- package/dist/schemas/scoring.js +1 -1
- package/dist/schemas/scoring.js.map +1 -1
- package/dist/schemas/signed-waivers.js +1 -1
- package/dist/schemas/signed-waivers.js.map +1 -1
- package/dist/schemas/stats.js +6 -6
- package/dist/schemas/stats.js.map +1 -1
- package/dist/schemas/team-joining.js +3 -3
- package/dist/schemas/team-joining.js.map +1 -1
- package/dist/schemas/teams.js +7 -7
- package/dist/schemas/teams.js.map +1 -1
- package/dist/schemas/users.js +3 -3
- package/dist/schemas/users.js.map +1 -1
- package/dist/sports/basketball-scoring.js +4 -4
- package/dist/sports/basketball-scoring.js.map +1 -1
- package/dist/sports/bulk-entry.js +1 -1
- package/dist/sports/bulk-entry.js.map +1 -1
- package/dist/sports/contribution.d.ts +5 -5
- package/dist/sports/contribution.d.ts.map +1 -1
- package/dist/sports/contribution.js +4 -4
- package/dist/sports/contribution.js.map +1 -1
- package/dist/sports/curling-scoring.js +2 -2
- package/dist/sports/curling-scoring.js.map +1 -1
- package/dist/sports/football-scoring.js +2 -2
- package/dist/sports/football-scoring.js.map +1 -1
- package/dist/sports/index.js +1 -1
- package/dist/sports/index.js.map +1 -1
- package/dist/sports/ledger-continuity.js +1 -1
- package/dist/sports/ledger-continuity.js.map +1 -1
- package/dist/sports/registry.js +2 -2
- package/dist/sports/registry.js.map +1 -1
- package/dist/sports/replay.js +1 -1
- package/dist/sports/replay.js.map +1 -1
- package/dist/sports/rollup-check.js +1 -1
- package/dist/sports/rollup-check.js.map +1 -1
- package/dist/sports/score-mirror.js +1 -1
- package/dist/sports/score-mirror.js.map +1 -1
- package/dist/sports/scoring-display.d.ts +1 -1
- package/dist/sports/scoring-display.js +2 -2
- package/dist/sports/scoring-display.js.map +1 -1
- package/dist/sports/scoring.d.ts +5 -5
- package/dist/sports/scoring.d.ts.map +1 -1
- package/dist/sports/scoring.js +2 -2
- package/dist/sports/scoring.js.map +1 -1
- package/dist/sports/sport-adapter.d.ts +3 -3
- package/dist/sports/sport-adapter.d.ts.map +1 -1
- package/dist/sports/sport-adapter.js +2 -2
- package/dist/sports/sport-adapter.js.map +1 -1
- package/dist/sports/store-driver.d.ts +1 -1
- package/dist/sports/store-driver.d.ts.map +1 -1
- package/dist/sports/store-driver.js +2 -2
- package/dist/sports/store-driver.js.map +1 -1
- package/dist/types/audit.js +4 -4
- package/dist/types/audit.js.map +1 -1
- package/dist/types/claims.js +1 -1
- package/dist/types/claims.js.map +1 -1
- package/dist/types/picture-owners.js +1 -1
- package/dist/types/picture-owners.js.map +1 -1
- package/dist/types/schedules.js +1 -1
- package/dist/types/schedules.js.map +1 -1
- package/dist/types/sports.js +2 -2
- package/dist/types/sports.js.map +1 -1
- package/dist/types/stats.js +5 -5
- package/dist/types/stats.js.map +1 -1
- package/dist/types/unions.js +2 -2
- package/dist/types/unions.js.map +1 -1
- package/dist/types/uploads.js +1 -1
- package/dist/types/uploads.js.map +1 -1
- package/dist/upload-variables/picture-upload-variables.d.ts +2 -2
- package/dist/upload-variables/sign-hardware-contract-variables.d.ts +1 -1
- package/dist/upload-variables/sign-hardware-contract-variables.js +1 -1
- package/dist/upload-variables/sign-hardware-contract-variables.js.map +1 -1
- package/dist/upload-variables/sign-waiver-variables.d.ts +1 -1
- package/dist/upload-variables/sign-waiver-variables.js +1 -1
- package/dist/upload-variables/sign-waiver-variables.js.map +1 -1
- package/dist/utils/account-status.d.ts +1 -2
- package/dist/utils/account-status.d.ts.map +1 -1
- package/dist/utils/account-status.js +1 -1
- package/dist/utils/account-status.js.map +1 -1
- package/dist/utils/app-routes.js +1 -1
- package/dist/utils/app-routes.js.map +1 -1
- package/dist/utils/league-join-warning.js +1 -1
- package/dist/utils/league-join-warning.js.map +1 -1
- package/dist/utils/league-joining.js +1 -1
- package/dist/utils/league-joining.js.map +1 -1
- package/dist/utils/league-mode.js +1 -1
- package/dist/utils/league-mode.js.map +1 -1
- package/dist/utils/team-creation.js +1 -1
- package/dist/utils/team-creation.js.map +1 -1
- package/dist/utils/team-member-actions.js +1 -1
- package/dist/utils/team-member-actions.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/migration-console/manifest.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,8FAA8F;AAC9F,mGAAmG;AACnG,mCAAmC;AACnC,EAAE;AACF,sBAAsB;AACtB,+FAA+F;AAC/F,mGAAmG;AACnG,6FAA6F;AAC7F,gGAAgG;AAChG,6EAA6E;AAC7E,kGAAkG;AAClG,yFAAyF;AACzF,kGAAkG;AAClG,+DAA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IAAI,KAAK,IAAI,CAC1E,CAAC;AACJ,CAAC","sourcesContent":["// The 2.0 cutover manifest: every step of the coordinated migration, in the order the operator runs\n// them, with what each step needs first. The console's callables enforce it — an action whose\n// dependencies are not satisfied refuses to run — and its screen renders it, so both read this one\n// declaration (ARCH-101, ENG-002).\n//\n// Four kinds of step:\n// executable a console action with its own admin callable: admin-asserted, audited,\n// idempotent, resumable by its operation id, and re-runnable after a partial\n// failure. A write action offers a dry run; a verification only reads.\n// productControl a product callable the operator runs from its own screen (the Fix stats\n// actions and the stats check). The console never runs\n// a second copy of it; it records the run, checking the run's own evidence.\n// operatorCheckpoint external work the app cannot do safely — an export, a credential\n// revocation, a manual re-upload. Recorded with the operator's evidence; it\n// never claims the console performed it.\n// cutoverMarker the console's own record that the product now owns every destination.\n//\n// `dependsOn` is enforced: each id must be satisfied — an executable action's last real run reached\n// its end (a verification's also passed), and a recorded step recorded — before the step runs.\n// `orderedAfter` is display order only: a sequence that is ordering, not a gate.\n\nimport { MIGRATION_ACTION_IDS as A } from './action-ids.js';\nimport type { MigrationActionId } from './action-ids.js';\nimport type { RegisteredCollectionPath } from '../doc-schemas/registry.js';\n\nexport const MIGRATION_STEP_KIND_KEYS = [\n 'executable',\n 'productControl',\n 'operatorCheckpoint',\n 'cutoverMarker',\n] as const;\nexport type MigrationStepKind = (typeof MIGRATION_STEP_KIND_KEYS)[number];\n\n/** What an executable action's pages return: documents written, or records compared. */\nexport const MIGRATION_RESULT_KIND_KEYS = ['write', 'verification'] as const;\nexport type MigrationResultKind = (typeof MIGRATION_RESULT_KIND_KEYS)[number];\n\n/** Where a product control's completion is proven from. */\nexport const MIGRATION_CONTROL_EVIDENCE_KEYS = [\n // The control's `statsOperations` document: a real run, complete, over the whole scope, that\n // left no game out.\n 'statsOperation',\n // The validation's report: complete, over everything, with no finding.\n 'statsValidationReport',\n] as const;\nexport type MigrationControlEvidence = (typeof MIGRATION_CONTROL_EVIDENCE_KEYS)[number];\n\n/** The step folder under the migration plan that owns a step's correctness. */\nexport const MIGRATION_OWNING_STEP_KEYS = [\n 'auth',\n 'q-core',\n 'stat-data-model',\n 'high-risk-callables',\n 'uploads-and-media',\n 'query-and-invalidation',\n 'secret-management',\n 'migration-console',\n] as const;\nexport type MigrationOwningStep = (typeof MIGRATION_OWNING_STEP_KEYS)[number];\n\ninterface MigrationStepBase {\n readonly id: MigrationActionId;\n readonly title: string;\n /** What the step changes or proves, in a sentence or two the operator reads before running it. */\n readonly summary: string;\n readonly owningStep: MigrationOwningStep;\n readonly dependsOn: readonly MigrationActionId[];\n readonly orderedAfter: readonly MigrationActionId[];\n}\n\nexport interface ExecutableMigrationStep extends MigrationStepBase {\n readonly kind: 'executable';\n /** The callable that runs one page of it. */\n readonly callable: string;\n readonly resultKind: MigrationResultKind;\n /** Whether it removes V1 data or revokes access — run only once its gates have passed. */\n readonly destructive: boolean;\n /** False for an action that is one bounded call, never paged. */\n readonly paged: boolean;\n /** The page size the console proposes; each core refuses a page larger than it can commit. */\n readonly defaultPageSize: number;\n /** A verification that informs the rehearsal and gates nothing. */\n readonly informational: boolean;\n /** Why replaying a page, or the whole action, cannot duplicate an effect. */\n readonly idempotency: string;\n /** The deterministic order it pages in, and what its resume key names. */\n readonly resumeKey: string;\n /** The safe response after a partial run. */\n readonly recovery: string;\n}\n\nexport interface ProductControlMigrationStep extends MigrationStepBase {\n readonly kind: 'productControl';\n /** The product callable the operator runs. */\n readonly callable: string;\n /** Where in the product the operator runs it, and with what scope. */\n readonly instructions: string;\n readonly evidence: MigrationControlEvidence;\n /** The documents it rebuilds, as `COLLECTION_SCHEMAS` templates: a destination no copy writes. */\n readonly destinations: readonly RegisteredCollectionPath[];\n}\n\nexport interface OperatorCheckpointMigrationStep extends MigrationStepBase {\n readonly kind: 'operatorCheckpoint';\n readonly instructions: string;\n /** What the operator records as proof before the next step unlocks. */\n readonly evidence: string;\n /** The point past which the external action cannot be undone, or null when none exists. */\n readonly noReturnBoundary: string | null;\n}\n\nexport interface CutoverMarkerMigrationStep extends MigrationStepBase {\n readonly kind: 'cutoverMarker';\n readonly callable: string;\n readonly noReturnBoundary: string;\n}\n\nexport type MigrationStep =\n | ExecutableMigrationStep\n | ProductControlMigrationStep\n | OperatorCheckpointMigrationStep\n | CutoverMarkerMigrationStep;\n\n/** The callable that records a product control's run, checking its evidence. */\nexport const RECORD_MIGRATION_CONTROL_RUN_CALLABLE = 'adminRecordMigrationControlRun';\n/** The callable that records an operator checkpoint with its evidence. */\nexport const RECORD_MIGRATION_CHECKPOINT_CALLABLE = 'adminRecordMigrationCheckpoint';\n/** The callable that records the cutover. */\nexport const RECORD_MIGRATION_CUTOVER_CALLABLE = 'adminRecordMigrationCutover';\n/** The callable that reads the console: the cutover marker, the lock, and every step's state. */\nexport const GET_MIGRATION_CONSOLE_CALLABLE = 'adminGetMigrationConsole';\n\n/** The console's callable name for an executable action: `admin` + its verb and its object. */\nexport function migrationActionCallableName(id: MigrationActionId): string {\n const [verb = '', object = ''] = id.split('.');\n const capitalize = (word: string) => word.charAt(0).toUpperCase() + word.slice(1);\n return `admin${capitalize(verb)}${capitalize(object)}`;\n}\n\nconst COPY_IDEMPOTENCY =\n 'Deterministic destination ids written whole, so a re-run rewrites the same documents with the same content.';\nconst VERIFY_IDEMPOTENCY = 'Reads only; a re-run compares again.';\nconst DELETE_IDEMPOTENCY =\n 'Deletes by id; a document already gone is skipped, so a re-run removes only what is left.';\nconst BY_DOCUMENT_ID =\n 'Source documents in document-id order; the resume key is the last id consumed.';\nconst SINGLE_DOCUMENT = 'One source document; it is never paged.';\nconst COPY_RECOVERY = 'Fix the transform and run the copy again; it refuses a live destination.';\nconst VERIFY_RECOVERY =\n 'Repair what it reports, through its copy or its resolution, and verify again.';\nconst DELETE_RECOVERY =\n 'Forward repair only: the retained V1 Firestore export holds what was deleted.';\n\ninterface ExecutableOptions {\n title: string;\n summary: string;\n owningStep: MigrationOwningStep;\n dependsOn?: readonly MigrationActionId[];\n orderedAfter?: readonly MigrationActionId[];\n resumeKey?: string;\n defaultPageSize?: number;\n}\n\nfunction copyStep(id: MigrationActionId, options: ExecutableOptions): ExecutableMigrationStep {\n return {\n kind: 'executable',\n id,\n callable: migrationActionCallableName(id),\n resultKind: 'write',\n destructive: false,\n paged: true,\n defaultPageSize: options.defaultPageSize ?? 100,\n informational: false,\n idempotency: COPY_IDEMPOTENCY,\n resumeKey: options.resumeKey ?? BY_DOCUMENT_ID,\n recovery: COPY_RECOVERY,\n title: options.title,\n summary: options.summary,\n owningStep: options.owningStep,\n dependsOn: options.dependsOn ?? [A.checkpointV1FirestoreExport],\n orderedAfter: options.orderedAfter ?? [],\n };\n}\n\nfunction verifyStep(\n id: MigrationActionId,\n options: ExecutableOptions & { informational?: boolean },\n): ExecutableMigrationStep {\n return {\n kind: 'executable',\n id,\n callable: migrationActionCallableName(id),\n resultKind: 'verification',\n destructive: false,\n paged: true,\n defaultPageSize: options.defaultPageSize ?? 100,\n informational: options.informational ?? false,\n idempotency: VERIFY_IDEMPOTENCY,\n resumeKey: options.resumeKey ?? BY_DOCUMENT_ID,\n recovery: VERIFY_RECOVERY,\n title: options.title,\n summary: options.summary,\n owningStep: options.owningStep,\n dependsOn: options.dependsOn ?? [],\n orderedAfter: options.orderedAfter ?? [],\n };\n}\n\nfunction deleteStep(id: MigrationActionId, options: ExecutableOptions): ExecutableMigrationStep {\n return {\n kind: 'executable',\n id,\n callable: migrationActionCallableName(id),\n resultKind: 'write',\n destructive: true,\n paged: true,\n defaultPageSize: options.defaultPageSize ?? 100,\n informational: false,\n idempotency: DELETE_IDEMPOTENCY,\n resumeKey: options.resumeKey ?? BY_DOCUMENT_ID,\n recovery: DELETE_RECOVERY,\n title: options.title,\n summary: options.summary,\n owningStep: options.owningStep,\n dependsOn: options.dependsOn ?? [],\n orderedAfter: options.orderedAfter ?? [],\n };\n}\n\n/** The copies whose verifications must pass before the rebuild reads the games they copied. */\nconst SOURCE_VERIFICATIONS_FOR_REBUILD = [\n A.verifySportLeagues,\n A.verifyLeagueTeams,\n A.verifyTeamMemberships,\n A.verifyGameRosterPlayers,\n A.verifySportGames,\n A.verifyGameStats,\n] as const satisfies readonly MigrationActionId[];\n\n/**\n * Every copy's verification. Each must pass before the cutover is recorded: a failed or skipped\n * record keeps the migration from being declared complete.\n */\nconst COPY_VERIFICATIONS = [\n A.verifyAdminList,\n A.verifyAppConfig,\n A.verifyLandingPageConfig,\n A.verifyStatsBeacon,\n A.verifyWaiverTemplates,\n A.verifyGameLocations,\n A.verifyUserProfiles,\n A.verifyHistoricalStats,\n A.verifyReservedDisplayNames,\n A.verifyPublicUsers,\n A.verifyAwardDefinitions,\n A.verifySportLeagues,\n A.verifyLeagueTeams,\n A.verifyTeamMemberships,\n A.verifyTeamInvitations,\n A.verifyTeamJoinRequests,\n A.verifyLeagueFreeAgents,\n A.verifySignedWaivers,\n A.verifyHardwareLoanContracts,\n A.verifySportGames,\n A.verifyGameStats,\n A.verifyGameRosterPlayers,\n A.verifyV1Pictures,\n] as const satisfies readonly MigrationActionId[];\n\nexport const MIGRATION_CUTOVER_MANIFEST: readonly MigrationStep[] = [\n // ── Before anything is read ────────────────────────────────────────────────────────────────────\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointV1FirestoreExport,\n title: 'Keep a managed export of the V1 database',\n summary:\n 'The managed Firestore export is the record of V1 and the only recovery after a delete.',\n owningStep: 'migration-console',\n dependsOn: [],\n orderedAfter: [],\n instructions:\n 'In production, with V1 stopped, take a managed Firestore export of the whole database to a Cloud Storage bucket and keep it. In a rehearsal, name the production export the dev copy was imported from.',\n evidence: 'The export operation name and the bucket path it wrote to.',\n noReturnBoundary: null,\n },\n\n // ── Global roles ───────────────────────────────────────────────────────────────────────────────\n copyStep(A.copyAdminList, {\n title: 'Copy the admin and referee rosters',\n summary:\n 'The `landing/admin` role maps become `_systemData/adminList`, the roster every role check reads.',\n owningStep: 'auth',\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyAdminList, {\n title: 'Verify the rosters',\n summary: 'Every V1 admin and referee is on the copied roster, and nobody else is.',\n owningStep: 'auth',\n dependsOn: [A.copyAdminList],\n resumeKey: SINGLE_DOCUMENT,\n }),\n\n // ── App configuration ──────────────────────────────────────────────────────────────────────────\n copyStep(A.copyAppConfig, {\n title: 'Copy the app configuration',\n summary:\n 'The version and the banner from `landing/base` become `_appConfig/app`, its switches at their open defaults.',\n owningStep: 'q-core',\n resumeKey: SINGLE_DOCUMENT,\n }),\n copyStep(A.copyLandingPageConfig, {\n title: 'Copy the landing page copy',\n summary:\n 'The hero title and the about text become `_appConfig/landingPage`; its picture arrives with the picture carry.',\n owningStep: 'q-core',\n resumeKey: SINGLE_DOCUMENT,\n }),\n copyStep(A.copyStatsBeacon, {\n title: 'Copy the stats beacon',\n summary:\n 'The last stats change V1 announced becomes `_appConfig/statsBeacon`, or nothing when V1 never fired one.',\n owningStep: 'query-and-invalidation',\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyAppConfig, {\n title: 'Verify the app configuration',\n summary:\n 'The version and the banner match V1 before the cutover, and the document satisfies its schema after it.',\n owningStep: 'q-core',\n dependsOn: [A.copyAppConfig],\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyLandingPageConfig, {\n title: 'Verify the landing page copy',\n summary: 'The landing copy matches V1 before the cutover, and satisfies its schema after it.',\n owningStep: 'q-core',\n dependsOn: [A.copyLandingPageConfig],\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyStatsBeacon, {\n title: 'Verify the stats beacon',\n summary: 'A beacon at least as recent as V1’s exists, or V1 never fired one.',\n owningStep: 'query-and-invalidation',\n dependsOn: [A.copyStatsBeacon],\n resumeKey: SINGLE_DOCUMENT,\n }),\n\n // ── Setup's catalogs ───────────────────────────────────────────────────────────────────────────\n copyStep(A.copyWaiverTemplates, {\n title: 'Copy the waiver templates',\n summary: 'Each template under its id, its wording as version 1.',\n owningStep: 'high-risk-callables',\n }),\n verifyStep(A.verifyWaiverTemplates, {\n title: 'Verify the waiver templates',\n summary: 'Every V1 template copied with its first version.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyWaiverTemplates],\n }),\n copyStep(A.copyGameLocations, {\n title: 'Copy the game locations',\n summary:\n 'Each venue on `landing/admin` becomes a `gameLocations` document under its id; its picture arrives with the picture carry.',\n owningStep: 'q-core',\n resumeKey: 'The venues in array order; the resume key is the last venue id.',\n }),\n verifyStep(A.verifyGameLocations, {\n title: 'Verify the game locations',\n summary: 'Every V1 venue copied and equal.',\n owningStep: 'q-core',\n dependsOn: [A.copyGameLocations],\n resumeKey: 'The venues in array order; the resume key is the last venue id.',\n }),\n\n // ── Accounts and identity ──────────────────────────────────────────────────────────────────────\n copyStep(A.copyUserProfiles, {\n title: 'Copy the profiles',\n summary:\n 'Each `users` document becomes its profile and its owner-only private document, every account active.',\n owningStep: 'auth',\n }),\n verifyStep(A.verifyUserProfiles, {\n title: 'Verify the profiles',\n summary: 'Every V1 profile copied with its private document.',\n owningStep: 'auth',\n dependsOn: [A.copyUserProfiles],\n }),\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointAbandonedRegistrationSweepEnabled,\n title: 'Enable the abandoned-registration sweep',\n summary:\n 'The scheduled sweep that deletes a sign-in account still holding no profile after its grace window does nothing until this is recorded, and stops again whenever the profile verification is run anew.',\n owningStep: 'auth',\n dependsOn: [A.verifyUserProfiles],\n orderedAfter: [],\n instructions:\n 'Once the profile verification has passed, confirm every account that should keep its sign-in holds a copied profile, then record this step to let the scheduled sweep delete the sign-in accounts that hold none past their grace window.',\n evidence:\n 'The passing profile verification this step follows, and the count of profiles it checked.',\n noReturnBoundary: 'The sweep’s first deletion of a sign-in account that holds no profile.',\n },\n copyStep(A.copyHistoricalStats, {\n title: 'Copy the historical baselines',\n summary: 'Each pre-Q-Sports career total becomes its sport’s `historicalStats` document.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyUserProfiles],\n }),\n verifyStep(A.verifyHistoricalStats, {\n title: 'Verify the historical baselines',\n summary: 'Every V1 baseline copied and equal; a database with none is declared empty.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyHistoricalStats],\n }),\n copyStep(A.deriveReservedDisplayNames, {\n title: 'Reserve the display names',\n summary:\n 'One reservation per copied profile; two names that collide are reported for an admin rename.',\n owningStep: 'auth',\n dependsOn: [A.copyUserProfiles],\n }),\n verifyStep(A.verifyReservedDisplayNames, {\n title: 'Verify the display-name reservations',\n summary: 'Every profile holds the reservation of its name.',\n owningStep: 'auth',\n dependsOn: [A.deriveReservedDisplayNames],\n }),\n copyStep(A.migratePublicUsers, {\n title: 'Migrate the public identities in place',\n summary:\n 'Each `publicUsers` document is rewritten where it sits: epoch timestamps, the recomputed lowercase name, the ghost flag.',\n owningStep: 'q-core',\n }),\n verifyStep(A.verifyPublicUsers, {\n title: 'Verify the public identities',\n summary:\n 'Each document holds its own uid, ghost flag, and lowercase name, and shows the featured badges its profile holds.',\n owningStep: 'q-core',\n dependsOn: [A.migratePublicUsers, A.copyUserProfiles],\n }),\n copyStep(A.copyAwardDefinitions, {\n title: 'Copy the award catalog',\n summary:\n 'Each award on `landing/admin` becomes an `awardDefinitions` document with its holder count; its badge arrives with the picture carry.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copyUserProfiles],\n resumeKey: 'The awards in array order; the resume key is the last award id.',\n }),\n verifyStep(A.verifyAwardDefinitions, {\n title: 'Verify the award catalog',\n summary:\n 'Every award copied, every holder count equal to the profiles holding it, every grant, profile award pick, and shown badge naming an award that exists.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copyAwardDefinitions, A.migratePublicUsers],\n resumeKey: SINGLE_DOCUMENT,\n }),\n\n // ── Leagues and teams ──────────────────────────────────────────────────────────────────────────\n copyStep(A.copySportLeagues, {\n title: 'Copy the leagues',\n summary:\n 'Each league under its id — closed leagues included; its pictures arrive with the picture carry.',\n owningStep: 'q-core',\n }),\n verifyStep(A.verifySportLeagues, {\n title: 'Verify the leagues',\n summary: 'Every V1 league copied and equal, every waiver template it names existing.',\n owningStep: 'q-core',\n dependsOn: [A.copySportLeagues, A.copyWaiverTemplates],\n }),\n copyStep(A.copyLeagueTeams, {\n title: 'Copy the teams',\n summary: 'Each team under its id, its season lines in its sport’s shape.',\n owningStep: 'q-core',\n }),\n verifyStep(A.verifyLeagueTeams, {\n title: 'Verify the teams',\n summary:\n 'Every V1 team copied; the season lines are held to their schema, since the rebuild replaces them.',\n owningStep: 'q-core',\n dependsOn: [A.copyLeagueTeams],\n }),\n copyStep(A.copyTeamMemberships, {\n title: 'Copy the memberships',\n summary:\n 'Each membership under its compound id, `member` becoming `player`; one whose team was not copied into its league is left behind and reported.',\n owningStep: 'q-core',\n dependsOn: [A.copyLeagueTeams],\n }),\n verifyStep(A.verifyTeamMemberships, {\n title: 'Verify the memberships',\n summary:\n 'Every V1 membership copied, or absent because its team is gone; a team with two captains and a ghost on two memberships are reported.',\n owningStep: 'q-core',\n dependsOn: [A.copyTeamMemberships],\n }),\n copyStep(A.copyTeamInvitations, {\n title: 'Copy the invitations',\n summary:\n 'Each invitation by id; a pending one whose invitee is already on the team is written approved, and a pending one whose team was not copied into its league is left behind and reported.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyLeagueTeams, A.copyTeamMemberships],\n }),\n verifyStep(A.verifyTeamInvitations, {\n title: 'Verify the invitations',\n summary:\n 'Every V1 invitation copied as the transform makes it, or absent because its team is gone.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyTeamInvitations],\n }),\n copyStep(A.copyTeamJoinRequests, {\n title: 'Copy the join requests',\n summary:\n 'Each request by id; a pending one whose requester is already on the team is written approved, and a pending one whose team was not copied into its league is left behind and reported.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyLeagueTeams, A.copyTeamMemberships],\n }),\n verifyStep(A.verifyTeamJoinRequests, {\n title: 'Verify the join requests',\n summary:\n 'Every V1 request copied as the transform makes it, or absent because its team is gone.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyTeamJoinRequests],\n }),\n copyStep(A.copyLeagueFreeAgents, {\n title: 'Copy the free-agent signups',\n summary:\n 'Each signup under its built id; a signup whose player already joined a team in the league is left behind and reported.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyTeamMemberships],\n }),\n verifyStep(A.verifyLeagueFreeAgents, {\n title: 'Verify the free-agent signups',\n summary: 'Every V1 signup copied, or absent because joining left it behind.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyLeagueFreeAgents],\n }),\n\n // ── Signed waivers and hardware contracts ──────────────────────────────────────────────────────\n copyStep(A.copySignedWaivers, {\n title: 'Copy the signed waivers',\n summary:\n 'Every signed waiver, a ghost’s included, under its id; its signature file stays where it is.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copyWaiverTemplates],\n }),\n verifyStep(A.verifySignedWaivers, {\n title: 'Verify the signed waivers',\n summary: 'Every V1 record copied and equal, each template it names existing.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copySignedWaivers],\n }),\n copyStep(A.copyHardwareLoanContracts, {\n title: 'Copy the hardware loan contracts',\n summary:\n 'Each contract from both V1 collections under its id; its signature file stays where it is.',\n owningStep: 'high-risk-callables',\n resumeKey:\n 'The V1 collections in turn, each by document id; the resume key is `{collection}/{id}`.',\n }),\n verifyStep(A.verifyHardwareLoanContracts, {\n title: 'Verify the hardware loan contracts',\n summary: 'Every V1 contract copied and equal.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyHardwareLoanContracts],\n resumeKey:\n 'The V1 collections in turn, each by document id; the resume key is `{collection}/{id}`.',\n }),\n verifyStep(A.verifySignatureFilesResolvable, {\n title: 'Verify the signature files resolve',\n summary:\n 'Each kept signature file is in this project’s bucket and exists. A rehearsal reports every file as another environment’s, which is expected.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.verifySignedWaivers, A.verifyHardwareLoanContracts],\n resumeKey: 'The signed waivers by id, then the contracts; the resume key is the record path.',\n }),\n\n // ── Games ──────────────────────────────────────────────────────────────────────────────────────\n copyStep(A.copyGameRosterPlayers, {\n title: 'Copy the game rosters',\n summary:\n 'One entry per team per person in each game, from each V1 roster document’s own team and user.',\n owningStep: 'high-risk-callables',\n resumeKey: 'The V1 games by document id; the resume key is the last game id.',\n defaultPageSize: 50,\n }),\n {\n kind: 'executable',\n id: A.resolveUnrosteredStatLine,\n callable: migrationActionCallableName(A.resolveUnrosteredStatLine),\n resultKind: 'write',\n destructive: false,\n paged: false,\n defaultPageSize: 1,\n informational: false,\n idempotency: 'A second resolution of the same line is acknowledged and writes nothing.',\n resumeKey: 'One game, one line; it is never paged.',\n recovery: 'Resolve the line again with the right team, then copy the game again.',\n title: 'Resolve a stat line no roster places',\n summary:\n 'For a line the game copy stops on, the admin names its team: the missing roster entry is written with its reason, and the game copied again.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyGameRosterPlayers],\n orderedAfter: [],\n },\n copyStep(A.copySportGames, {\n title: 'Copy the games',\n summary:\n 'Each V1 game with its stats: the event documents, the rollup, the participation lists by roster entry, and a completed game’s finalized record.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyGameRosterPlayers],\n orderedAfter: [A.resolveUnrosteredStatLine],\n resumeKey:\n 'The V1 games by document id; a game’s documents commit before its id becomes the resume key.',\n defaultPageSize: 20,\n }),\n verifyStep(A.verifySportGames, {\n title: 'Verify the game schedules',\n summary: 'Every V1 game’s schedule fields as the copy converts them.',\n owningStep: 'q-core',\n dependsOn: [A.copySportGames],\n }),\n verifyStep(A.verifyGameStats, {\n title: 'Verify the game stats',\n summary:\n 'Per game: the events replay to the rollup and to V1’s recorded lines, the finalized record matches, and every line and list names a roster entry.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copySportGames],\n defaultPageSize: 20,\n }),\n {\n kind: 'executable',\n id: A.reconcileOpenGameRosters,\n callable: migrationActionCallableName(A.reconcileOpenGameRosters),\n resultKind: 'write',\n destructive: false,\n paged: true,\n defaultPageSize: 20,\n informational: false,\n idempotency:\n 'Each open game is reconciled through the roster core against the copied memberships; a reconciled game changes nothing on a re-run.',\n resumeKey: 'The open games by document id; the resume key is the last game id.',\n recovery:\n 'Run it again: a game held by another operation is reported and reconciled on the next run.',\n title: 'Reconcile the open games’ rosters',\n summary:\n 'Each game open at the cutover: stale stat-free entries removed, missing members added.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyTeamMemberships, A.verifyGameStats],\n orderedAfter: [],\n },\n verifyStep(A.verifyGameRosterPlayers, {\n title: 'Verify the game rosters',\n summary: 'Every V1 roster entry copied; before the cutover, no open game keeps a stale entry.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyGameRosterPlayers, A.reconcileOpenGameRosters],\n resumeKey: 'The V1 games by document id; the resume key is the last game id.',\n }),\n\n // ── Pictures ───────────────────────────────────────────────────────────────────────────────────\n copyStep(A.carryV1Pictures, {\n title: 'Carry the V1 pictures onto the pipeline',\n summary:\n 'Each league, landing, venue, and award image is staged and accepted through the upload pipeline, which processes and publishes it. A rehearsal reports every source unavailable.',\n owningStep: 'uploads-and-media',\n dependsOn: [\n A.copySportLeagues,\n A.copyLandingPageConfig,\n A.copyGameLocations,\n A.copyAwardDefinitions,\n ],\n resumeKey: 'By owner kind, then owner id; the resume key is `{ownerKind}:{ownerId}`.',\n }),\n verifyStep(A.verifyV1Pictures, {\n title: 'Verify the carried pictures',\n summary:\n 'Every V1 reference attached with its three sizes, or reported for a reason no re-run changes; nothing still pending. A source in another bucket, or a page it could examine none of, fails it unless the run acknowledges unexamined sources, as a rehearsal does.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.carryV1Pictures],\n resumeKey: 'By owner kind, then owner id; the resume key is `{ownerKind}:{ownerId}`.',\n }),\n\n // ── The ghost names V1 left behind ─────────────────────────────────────────────────────────────\n {\n kind: 'executable',\n id: A.cleanupOrphanGhostPublicUsers,\n callable: migrationActionCallableName(A.cleanupOrphanGhostPublicUsers),\n resultKind: 'write',\n destructive: true,\n paged: true,\n defaultPageSize: 100,\n informational: false,\n idempotency:\n 'A ghost document is deleted only when nothing references it; a re-run finds nothing further.',\n resumeKey: BY_DOCUMENT_ID,\n recovery: DELETE_RECOVERY,\n title: 'Remove the ghost names nothing references',\n summary:\n 'Each ghost `publicUsers` document no membership, roster entry, or unvoided stat event names, reported by disposition first. No signed waiver is touched.',\n owningStep: 'high-risk-callables',\n dependsOn: [\n A.verifyPublicUsers,\n A.verifyTeamMemberships,\n A.verifyGameRosterPlayers,\n A.verifyGameStats,\n ],\n orderedAfter: [],\n },\n\n // ── The derived statistics ─────────────────────────────────────────────────────────────────────\n {\n kind: 'productControl',\n id: A.rebuildLeagueStats,\n title: 'Rebuild every league’s stats',\n summary:\n 'Every team’s season line and per-membership rows, closed leagues included, rebuilt from the copied games.',\n owningStep: 'stat-data-model',\n dependsOn: SOURCE_VERIFICATIONS_FOR_REBUILD,\n orderedAfter: [],\n callable: 'recalculateAllLeagueStats',\n destinations: ['leagueTeams/{teamId}'],\n instructions:\n 'Run “Rebuild every league” from Stats › Fix stats as a real run, not a dry run, and let it reach the end.',\n evidence: 'statsOperation',\n },\n {\n kind: 'productControl',\n id: A.rebuildLifetimeStats,\n title: 'Rebuild every user’s lifetime stats',\n summary:\n 'Every account’s lifetime lines rebuilt from the copied games and historical baselines.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildLeagueStats, A.verifyUserProfiles, A.verifyHistoricalStats],\n orderedAfter: [],\n callable: 'recalculateAllUserStats',\n destinations: ['userProfiles/{userId}'],\n instructions:\n 'Run “Rebuild every user” from Stats › Fix stats as a real run, and let it reach the end.',\n evidence: 'statsOperation',\n },\n {\n kind: 'productControl',\n id: A.rebuildSportHallOfFame,\n title: 'Rebuild the hall of fame',\n summary:\n 'The hall of fame of every sport that keeps one, rebuilt from the copied games and baselines.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildLifetimeStats],\n orderedAfter: [],\n callable: 'recalculateHallOfFame',\n destinations: ['sportHallOfFame/{sportKey}'],\n instructions:\n 'Run the hall-of-fame rebuild from Stats › Fix stats once for each sport that keeps a hall of fame, as real runs, and record every run.',\n evidence: 'statsOperation',\n },\n {\n kind: 'productControl',\n id: A.validateStats,\n title: 'Validate the stats',\n summary: 'Check stats over everything; it must report no finding.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildSportHallOfFame],\n orderedAfter: [],\n callable: 'runStatsValidation',\n destinations: ['statsValidationReports/{reportId}'],\n instructions: 'Run “Check stats” over everything from Stats › Fix stats and let it finish.',\n evidence: 'statsValidationReport',\n },\n verifyStep(A.verifyLeaguePlayerStats, {\n title: 'Compare the league player totals with V1',\n summary:\n 'Lists each player whose V1 league total differs from the sum of their rebuilt rows in that league. It informs the rehearsal and gates nothing.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildLeagueStats],\n informational: true,\n }),\n verifyStep(A.verifySportHallOfFame, {\n title: 'Verify the rebuilt hall of fame',\n summary:\n 'Every V1 hall of fame of a sport that keeps one has its rebuilt document, which satisfies its schema and holds an entry for every V1 player with a non-zero total.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildSportHallOfFame],\n }),\n\n // ── The cutover ────────────────────────────────────────────────────────────────────────────────\n {\n kind: 'cutoverMarker',\n id: A.recordCutoverLive,\n callable: RECORD_MIGRATION_CUTOVER_CALLABLE,\n title: 'Record the cutover',\n summary:\n 'From here on the product owns every destination: no copy runs again, and each verification holds what the product edits to its schema only.',\n owningStep: 'migration-console',\n dependsOn: [...COPY_VERIFICATIONS, A.validateStats],\n orderedAfter: [A.verifySportHallOfFame, A.verifySignatureFilesResolvable],\n noReturnBoundary:\n 'Recording the cutover. It is never undone: every copy refuses a live destination after it.',\n },\n\n // ── Cleanup: each delete gated on the verifications its core asserts ───────────────────────────\n deleteStep(A.deleteV1AdminRoles, {\n title: 'Remove the V1 role maps',\n summary:\n 'The `isAdmin` and `referees` fields on `landing/admin`; the document goes with its last carried row.',\n owningStep: 'auth',\n dependsOn: [A.verifyAdminList],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1LandingBase, {\n title: 'Delete `landing/base`',\n summary:\n 'The V1 configuration document, once its three documents and its picture are verified.',\n owningStep: 'q-core',\n dependsOn: [\n A.verifyAppConfig,\n A.verifyLandingPageConfig,\n A.verifyStatsBeacon,\n A.verifyV1Pictures,\n ],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1Waivers, {\n title: 'Delete the V1 waiver templates',\n summary: 'The `waivers` collection.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyWaiverTemplates],\n }),\n deleteStep(A.deleteV1GameLocations, {\n title: 'Remove the V1 venues',\n summary:\n 'The `locations` field on `landing/admin`; the document goes with its last carried row.',\n owningStep: 'q-core',\n dependsOn: [A.verifyGameLocations, A.verifyV1Pictures],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1AwardCatalog, {\n title: 'Remove the V1 award catalog',\n summary: 'The `awards` field on `landing/admin`; the document goes with its last carried row.',\n owningStep: 'uploads-and-media',\n dependsOn: [\n A.verifyAwardDefinitions,\n A.verifyUserProfiles,\n A.verifyPublicUsers,\n A.verifyV1Pictures,\n ],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1Users, {\n title: 'Delete the V1 user documents',\n summary: 'Each `users` document with its historical baselines.',\n owningStep: 'auth',\n dependsOn: [A.verifyUserProfiles, A.verifyHistoricalStats, A.verifyReservedDisplayNames],\n }),\n deleteStep(A.deleteV1TeamInvites, {\n title: 'Delete the V1 invitations',\n summary: 'The `teamInvites` collection.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyTeamInvitations],\n }),\n deleteStep(A.deleteV1JoinRequests, {\n title: 'Delete the V1 join requests',\n summary: 'The `joinRequests` collection.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyTeamJoinRequests],\n }),\n deleteStep(A.deleteV1FreeAgentSignups, {\n title: 'Delete the V1 free-agent signups',\n summary: 'The `freeAgentSignups` collection, left-behind signups included.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyLeagueFreeAgents],\n }),\n deleteStep(A.deleteV1TeamMembers, {\n title: 'Delete the V1 memberships',\n summary: 'The `teamMembers` collection.',\n owningStep: 'q-core',\n dependsOn: [A.verifyTeamMemberships],\n }),\n deleteStep(A.deleteV1Teams, {\n title: 'Delete the V1 teams',\n summary: 'The `teams` collection; a team still holding a subcollection is reported and kept.',\n owningStep: 'q-core',\n dependsOn: [A.verifyLeagueTeams],\n }),\n {\n kind: 'executable',\n id: A.revokeV1SignatureDownloadTokens,\n callable: migrationActionCallableName(A.revokeV1SignatureDownloadTokens),\n resultKind: 'write',\n destructive: true,\n paged: true,\n defaultPageSize: 100,\n informational: false,\n idempotency:\n 'Removes a kept file’s download token; a file holding none is skipped. No file is moved or deleted.',\n resumeKey: 'The signed waivers by id, then the contracts; the resume key is the record path.',\n recovery: 'Run it again; a file whose token went is skipped.',\n title: 'Revoke the V1 signature download links',\n summary:\n 'Each kept signature file loses the download token V1’s stored links carry, so those links stop resolving.',\n owningStep: 'uploads-and-media',\n dependsOn: [\n A.verifySignedWaivers,\n A.verifyHardwareLoanContracts,\n A.verifySignatureFilesResolvable,\n ],\n orderedAfter: [],\n },\n deleteStep(A.deleteV1WaiverSignatures, {\n title: 'Delete the V1 signed-waiver records',\n summary: 'The `waiverSignatures` records; the files stay, named by the copied records.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.verifySignedWaivers],\n }),\n deleteStep(A.deleteV1HardwareContracts, {\n title: 'Delete the V1 hardware contracts',\n summary:\n 'Both V1 contract collections; the signature files stay, named by the copied contracts.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyHardwareLoanContracts],\n resumeKey:\n 'The V1 collections in turn, each by document id; the resume key is `{collection}/{id}`.',\n }),\n deleteStep(A.deleteV1GameRosters, {\n title: 'Delete the V1 game rosters',\n summary: 'Each V1 game’s `roster` subcollection — never the game document.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyGameRosterPlayers, A.validateStats],\n resumeKey: 'The V1 games by document id; the resume key is the last game id.',\n defaultPageSize: 50,\n }),\n deleteStep(A.deleteV1LeagueGames, {\n title: 'Delete the V1 games',\n summary: 'The `leagueGames` documents; a game still holding its roster is reported and kept.',\n owningStep: 'stat-data-model',\n dependsOn: [\n A.verifySportGames,\n A.verifyGameStats,\n A.verifyGameRosterPlayers,\n A.validateStats,\n A.deleteV1GameRosters,\n ],\n }),\n deleteStep(A.deleteV1LeagueChats, {\n title: 'Delete the V1 league chats',\n summary:\n 'The parked chat documents under each V1 league and its team paths. Any other document found under a league is reported and kept.',\n owningStep: 'migration-console',\n dependsOn: [A.checkpointV1FirestoreExport],\n resumeKey:\n 'The V1 leagues by document id; the resume key is the last league id, or `{leagueId}/unfinished` while a league holds more chats than one page deletes.',\n defaultPageSize: 50,\n }),\n deleteStep(A.deleteV1Leagues, {\n title: 'Delete the V1 leagues',\n summary:\n 'The `leagues` collection; a league still holding a subcollection is reported and kept.',\n owningStep: 'q-core',\n dependsOn: [A.verifySportLeagues, A.verifyV1Pictures],\n orderedAfter: [A.verifyLeaguePlayerStats, A.deleteV1LeagueChats],\n }),\n deleteStep(A.deleteV1HallOfFame, {\n title: 'Delete the V1 hall of fame',\n summary:\n 'The `hallOfFame` collection, once every sport that keeps a hall of fame has its rebuilt document.',\n owningStep: 'stat-data-model',\n dependsOn: [A.verifySportHallOfFame],\n }),\n deleteStep(A.deleteV1ValidationReports, {\n title: 'Delete the V1 validation reports',\n summary:\n 'The `validationReports` collection. Nothing is copied: each report describes V1 aggregates at a past moment.',\n owningStep: 'stat-data-model',\n dependsOn: [A.checkpointV1FirestoreExport],\n orderedAfter: [A.validateStats],\n }),\n deleteStep(A.deleteV1AdminStats, {\n title: 'Delete the V1 dashboard counts',\n summary:\n 'The `adminStats` collection. Nothing is copied: the dashboard counts are counted live.',\n owningStep: 'q-core',\n dependsOn: [A.checkpointV1FirestoreExport],\n }),\n verifyStep(A.verifyV1CommerceDiscardable, {\n title: 'Check the V1 store holds no purchase',\n summary:\n 'Fails on an order that is not cancelled, a completed checkout, or a product holding inventory — any would be a real purchase, and goes to the owner.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.checkpointV1FirestoreExport],\n resumeKey: 'The six store collections in turn, each by document id.',\n }),\n deleteStep(A.deleteV1Commerce, {\n title: 'Delete the V1 store and payments',\n summary: 'The six store collections, nothing copied.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyV1CommerceDiscardable],\n resumeKey: 'The six store collections in turn, each by document id.',\n }),\n\n // ── After the cutover ──────────────────────────────────────────────────────────────────────────\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointUnattachedPicturesReuploaded,\n title: 'Re-upload the pictures the carry could not attach',\n summary: 'Any V1 image still unattached in production goes back on through its own control.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.verifyV1Pictures, A.recordCutoverLive],\n orderedAfter: [],\n instructions:\n 'For each source the picture verification reported, re-upload the image through its control — Reupload badge for an award, the picture managers for a league, the landing page, or a venue. In a rehearsal, record that this is production-only.',\n evidence: 'Each re-uploaded owner, or that the verification reported none.',\n noReturnBoundary: null,\n },\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointPaymentCredentialsRetired,\n title: 'Retire the payment-service credentials',\n summary:\n 'V2 binds no payment-service credential, so once it is live the three V1 binds are live credentials with no reader.',\n owningStep: 'secret-management',\n dependsOn: [A.recordCutoverLive],\n orderedAfter: [],\n instructions:\n 'Production only, once V2 is live there: revoke the payment service’s secret key and disable its webhook endpoint in its dashboard, then destroy the three secrets V1 binds for it — its secret key, its webhook secret, and APP_URL — in Secret Manager in both Firebase projects. In a rehearsal, record that this is production-only.',\n evidence:\n 'The payment dashboard showing the key revoked and the endpoint disabled, and `gcloud secrets list` in each project showing none of the three.',\n noReturnBoundary: 'The secret key revocation.',\n },\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointServiceAccountKeyRevoked,\n title: 'Revoke the obsolete production service-account key',\n summary:\n 'No script reads the local production key once the export script runs on the signed-in CLI credentials; revoking it makes every copy of it worthless.',\n owningStep: 'secret-management',\n dependsOn: [A.checkpointV1FirestoreExport],\n orderedAfter: [A.recordCutoverLive],\n instructions:\n 'Run the export script on Application Default Credentials against the production project named explicitly, then revoke the q-sports-prod service-account key in the Google Cloud console and delete serviceAccount.json from the machine. No replacement key is minted. In a rehearsal, record that this is production-only.',\n evidence: 'The export run on ADC, and the console showing the key revoked.',\n noReturnBoundary: 'The key revocation.',\n },\n];\n\n/** Every step by its id. */\nexport const MIGRATION_STEP_BY_ID: ReadonlyMap<MigrationActionId, MigrationStep> = new Map(\n MIGRATION_CUTOVER_MANIFEST.map((step) => [step.id, step]),\n);\n\n/** The steps of one kind, in cutover order. */\nexport function migrationStepsOfKind<K extends MigrationStepKind>(\n kind: K,\n): Extract<MigrationStep, { kind: K }>[] {\n return MIGRATION_CUTOVER_MANIFEST.filter(\n (step): step is Extract<MigrationStep, { kind: K }> => step.kind === kind,\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../src/migration-console/manifest.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,8FAA8F;AAC9F,mGAAmG;AACnG,qDAAqD;AACrD,EAAE;AACF,sBAAsB;AACtB,+FAA+F;AAC/F,mGAAmG;AACnG,6FAA6F;AAC7F,gGAAgG;AAChG,6EAA6E;AAC7E,kGAAkG;AAClG,yFAAyF;AACzF,kGAAkG;AAClG,+DAA+D;AAC/D,8FAA8F;AAC9F,EAAE;AACF,oGAAoG;AACpG,+FAA+F;AAC/F,iFAAiF;AAEjF,OAAO,EAAE,oBAAoB,IAAI,CAAC,EAAE,MAAM,iBAAiB,CAAC;AAI5D,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,YAAY;IACZ,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;CACP,CAAC;AAGX,wFAAwF;AACxF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,cAAc,CAAU,CAAC;AAG7E,2DAA2D;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AAoH;QACtH,UAAU,EAAE,mBAAmB;QAC/B,SAAS,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC;QAChC,YAAY,EAAE,EAAE;QAChB,YAAY,EACV,yUAAyU;QAC3U,QAAQ,EACN,+IAA+I;QACjJ,gBAAgB,EAAE,4BAA4B;KAC/C;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,EAAE,EAAE,CAAC,CAAC,kCAAkC;QACxC,KAAK,EAAE,oDAAoD;QAC3D,OAAO,EACL,sJAAsJ;QACxJ,UAAU,EAAE,mBAAmB;QAC/B,SAAS,EAAE,CAAC,CAAC,CAAC,2BAA2B,CAAC;QAC1C,YAAY,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC;QACnC,YAAY,EACV,6TAA6T;QAC/T,QAAQ,EAAE,iEAAiE;QAC3E,gBAAgB,EAAE,qBAAqB;KACxC;CACF,CAAC;AAEF,4BAA4B;AAC5B,MAAM,CAAC,MAAM,oBAAoB,GAAkD,IAAI,GAAG,CACxF,0BAA0B,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CAC1D,CAAC;AAEF,+CAA+C;AAC/C,MAAM,UAAU,oBAAoB,CAClC,IAAO;IAEP,OAAO,0BAA0B,CAAC,MAAM,CACtC,CAAC,IAAI,EAA+C,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAC1E,CAAC;AACJ,CAAC","sourcesContent":["// The 2.0 cutover manifest: every step of the coordinated migration, in the order the operator runs\n// them, with what each step needs first. The console's callables enforce it — an action whose\n// dependencies are not satisfied refuses to run — and its screen renders it, so both read this one\n// declaration (RULE-STD-ARCH-101, RULE-STD-ENG-002).\n//\n// Four kinds of step:\n// executable a console action with its own admin callable: admin-asserted, audited,\n// idempotent, resumable by its operation id, and re-runnable after a partial\n// failure. A write action offers a dry run; a verification only reads.\n// productControl a product callable the operator runs from its own screen (the Fix stats\n// actions and the stats check). The console never runs\n// a second copy of it; it records the run, checking the run's own evidence.\n// operatorCheckpoint external work the app cannot do safely — an export, a credential\n// revocation, a manual re-upload. Recorded with the operator's evidence; it\n// never claims the console performed it.\n// cutoverMarker the console's own record that the product now owns every destination.\n//\n// `dependsOn` is enforced: each id must be satisfied — an executable action's last real run reached\n// its end (a verification's also passed), and a recorded step recorded — before the step runs.\n// `orderedAfter` is display order only: a sequence that is ordering, not a gate.\n\nimport { MIGRATION_ACTION_IDS as A } from './action-ids.js';\nimport type { MigrationActionId } from './action-ids.js';\nimport type { RegisteredCollectionPath } from '../doc-schemas/registry.js';\n\nexport const MIGRATION_STEP_KIND_KEYS = [\n 'executable',\n 'productControl',\n 'operatorCheckpoint',\n 'cutoverMarker',\n] as const;\nexport type MigrationStepKind = (typeof MIGRATION_STEP_KIND_KEYS)[number];\n\n/** What an executable action's pages return: documents written, or records compared. */\nexport const MIGRATION_RESULT_KIND_KEYS = ['write', 'verification'] as const;\nexport type MigrationResultKind = (typeof MIGRATION_RESULT_KIND_KEYS)[number];\n\n/** Where a product control's completion is proven from. */\nexport const MIGRATION_CONTROL_EVIDENCE_KEYS = [\n // The control's `statsOperations` document: a real run, complete, over the whole scope, that\n // left no game out.\n 'statsOperation',\n // The validation's report: complete, over everything, with no finding.\n 'statsValidationReport',\n] as const;\nexport type MigrationControlEvidence = (typeof MIGRATION_CONTROL_EVIDENCE_KEYS)[number];\n\n/** The step folder under the migration plan that owns a step's correctness. */\nexport const MIGRATION_OWNING_STEP_KEYS = [\n 'auth',\n 'q-core',\n 'stat-data-model',\n 'high-risk-callables',\n 'uploads-and-media',\n 'query-and-invalidation',\n 'secret-management',\n 'migration-console',\n] as const;\nexport type MigrationOwningStep = (typeof MIGRATION_OWNING_STEP_KEYS)[number];\n\ninterface MigrationStepBase {\n readonly id: MigrationActionId;\n readonly title: string;\n /** What the step changes or proves, in a sentence or two the operator reads before running it. */\n readonly summary: string;\n readonly owningStep: MigrationOwningStep;\n readonly dependsOn: readonly MigrationActionId[];\n readonly orderedAfter: readonly MigrationActionId[];\n}\n\nexport interface ExecutableMigrationStep extends MigrationStepBase {\n readonly kind: 'executable';\n /** The callable that runs one page of it. */\n readonly callable: string;\n readonly resultKind: MigrationResultKind;\n /** Whether it removes V1 data or revokes access — run only once its gates have passed. */\n readonly destructive: boolean;\n /** False for an action that is one bounded call, never paged. */\n readonly paged: boolean;\n /** The page size the console proposes; each core refuses a page larger than it can commit. */\n readonly defaultPageSize: number;\n /** A verification that informs the rehearsal and gates nothing. */\n readonly informational: boolean;\n /** Why replaying a page, or the whole action, cannot duplicate an effect. */\n readonly idempotency: string;\n /** The deterministic order it pages in, and what its resume key names. */\n readonly resumeKey: string;\n /** The safe response after a partial run. */\n readonly recovery: string;\n}\n\nexport interface ProductControlMigrationStep extends MigrationStepBase {\n readonly kind: 'productControl';\n /** The product callable the operator runs. */\n readonly callable: string;\n /** Where in the product the operator runs it, and with what scope. */\n readonly instructions: string;\n readonly evidence: MigrationControlEvidence;\n /** The documents it rebuilds, as `COLLECTION_SCHEMAS` templates: a destination no copy writes. */\n readonly destinations: readonly RegisteredCollectionPath[];\n}\n\nexport interface OperatorCheckpointMigrationStep extends MigrationStepBase {\n readonly kind: 'operatorCheckpoint';\n readonly instructions: string;\n /** What the operator records as proof before the next step unlocks. */\n readonly evidence: string;\n /** The point past which the external action cannot be undone, or null when none exists. */\n readonly noReturnBoundary: string | null;\n}\n\nexport interface CutoverMarkerMigrationStep extends MigrationStepBase {\n readonly kind: 'cutoverMarker';\n readonly callable: string;\n readonly noReturnBoundary: string;\n}\n\nexport type MigrationStep =\n | ExecutableMigrationStep\n | ProductControlMigrationStep\n | OperatorCheckpointMigrationStep\n | CutoverMarkerMigrationStep;\n\n/** The callable that records a product control's run, checking its evidence. */\nexport const RECORD_MIGRATION_CONTROL_RUN_CALLABLE = 'adminRecordMigrationControlRun';\n/** The callable that records an operator checkpoint with its evidence. */\nexport const RECORD_MIGRATION_CHECKPOINT_CALLABLE = 'adminRecordMigrationCheckpoint';\n/** The callable that records the cutover. */\nexport const RECORD_MIGRATION_CUTOVER_CALLABLE = 'adminRecordMigrationCutover';\n/** The callable that reads the console: the cutover marker, the lock, and every step's state. */\nexport const GET_MIGRATION_CONSOLE_CALLABLE = 'adminGetMigrationConsole';\n\n/** The console's callable name for an executable action: `admin` + its verb and its object. */\nexport function migrationActionCallableName(id: MigrationActionId): string {\n const [verb = '', object = ''] = id.split('.');\n const capitalize = (word: string) => word.charAt(0).toUpperCase() + word.slice(1);\n return `admin${capitalize(verb)}${capitalize(object)}`;\n}\n\nconst COPY_IDEMPOTENCY =\n 'Deterministic destination ids written whole, so a re-run rewrites the same documents with the same content.';\nconst VERIFY_IDEMPOTENCY = 'Reads only; a re-run compares again.';\nconst DELETE_IDEMPOTENCY =\n 'Deletes by id; a document already gone is skipped, so a re-run removes only what is left.';\nconst BY_DOCUMENT_ID =\n 'Source documents in document-id order; the resume key is the last id consumed.';\nconst SINGLE_DOCUMENT = 'One source document; it is never paged.';\nconst COPY_RECOVERY = 'Fix the transform and run the copy again; it refuses a live destination.';\nconst VERIFY_RECOVERY =\n 'Repair what it reports, through its copy or its resolution, and verify again.';\nconst DELETE_RECOVERY =\n 'Forward repair only: the retained V1 Firestore export holds what was deleted.';\n\ninterface ExecutableOptions {\n title: string;\n summary: string;\n owningStep: MigrationOwningStep;\n dependsOn?: readonly MigrationActionId[];\n orderedAfter?: readonly MigrationActionId[];\n resumeKey?: string;\n defaultPageSize?: number;\n}\n\nfunction copyStep(id: MigrationActionId, options: ExecutableOptions): ExecutableMigrationStep {\n return {\n kind: 'executable',\n id,\n callable: migrationActionCallableName(id),\n resultKind: 'write',\n destructive: false,\n paged: true,\n defaultPageSize: options.defaultPageSize ?? 100,\n informational: false,\n idempotency: COPY_IDEMPOTENCY,\n resumeKey: options.resumeKey ?? BY_DOCUMENT_ID,\n recovery: COPY_RECOVERY,\n title: options.title,\n summary: options.summary,\n owningStep: options.owningStep,\n dependsOn: options.dependsOn ?? [A.checkpointV1FirestoreExport],\n orderedAfter: options.orderedAfter ?? [],\n };\n}\n\nfunction verifyStep(\n id: MigrationActionId,\n options: ExecutableOptions & { informational?: boolean },\n): ExecutableMigrationStep {\n return {\n kind: 'executable',\n id,\n callable: migrationActionCallableName(id),\n resultKind: 'verification',\n destructive: false,\n paged: true,\n defaultPageSize: options.defaultPageSize ?? 100,\n informational: options.informational ?? false,\n idempotency: VERIFY_IDEMPOTENCY,\n resumeKey: options.resumeKey ?? BY_DOCUMENT_ID,\n recovery: VERIFY_RECOVERY,\n title: options.title,\n summary: options.summary,\n owningStep: options.owningStep,\n dependsOn: options.dependsOn ?? [],\n orderedAfter: options.orderedAfter ?? [],\n };\n}\n\nfunction deleteStep(id: MigrationActionId, options: ExecutableOptions): ExecutableMigrationStep {\n return {\n kind: 'executable',\n id,\n callable: migrationActionCallableName(id),\n resultKind: 'write',\n destructive: true,\n paged: true,\n defaultPageSize: options.defaultPageSize ?? 100,\n informational: false,\n idempotency: DELETE_IDEMPOTENCY,\n resumeKey: options.resumeKey ?? BY_DOCUMENT_ID,\n recovery: DELETE_RECOVERY,\n title: options.title,\n summary: options.summary,\n owningStep: options.owningStep,\n dependsOn: options.dependsOn ?? [],\n orderedAfter: options.orderedAfter ?? [],\n };\n}\n\n/** The copies whose verifications must pass before the rebuild reads the games they copied. */\nconst SOURCE_VERIFICATIONS_FOR_REBUILD = [\n A.verifySportLeagues,\n A.verifyLeagueTeams,\n A.verifyTeamMemberships,\n A.verifyGameRosterPlayers,\n A.verifySportGames,\n A.verifyGameStats,\n] as const satisfies readonly MigrationActionId[];\n\n/**\n * Every copy's verification. Each must pass before the cutover is recorded: a failed or skipped\n * record keeps the migration from being declared complete.\n */\nconst COPY_VERIFICATIONS = [\n A.verifyAdminList,\n A.verifyAppConfig,\n A.verifyLandingPageConfig,\n A.verifyStatsBeacon,\n A.verifyWaiverTemplates,\n A.verifyGameLocations,\n A.verifyUserProfiles,\n A.verifyHistoricalStats,\n A.verifyReservedDisplayNames,\n A.verifyPublicUsers,\n A.verifyAwardDefinitions,\n A.verifySportLeagues,\n A.verifyLeagueTeams,\n A.verifyTeamMemberships,\n A.verifyTeamInvitations,\n A.verifyTeamJoinRequests,\n A.verifyLeagueFreeAgents,\n A.verifySignedWaivers,\n A.verifyHardwareLoanContracts,\n A.verifySportGames,\n A.verifyGameStats,\n A.verifyGameRosterPlayers,\n A.verifyV1Pictures,\n] as const satisfies readonly MigrationActionId[];\n\nexport const MIGRATION_CUTOVER_MANIFEST: readonly MigrationStep[] = [\n // ── Before anything is read ────────────────────────────────────────────────────────────────────\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointV1FirestoreExport,\n title: 'Keep a managed export of the V1 database',\n summary:\n 'The managed Firestore export is the record of V1 and the only recovery after a delete.',\n owningStep: 'migration-console',\n dependsOn: [],\n orderedAfter: [],\n instructions:\n 'In production, with V1 stopped, take a managed Firestore export of the whole database to a Cloud Storage bucket and keep it. In a rehearsal, name the production export the dev copy was imported from.',\n evidence: 'The export operation name and the bucket path it wrote to.',\n noReturnBoundary: null,\n },\n\n // ── Global roles ───────────────────────────────────────────────────────────────────────────────\n copyStep(A.copyAdminList, {\n title: 'Copy the admin and referee rosters',\n summary:\n 'The `landing/admin` role maps become `_systemData/adminList`, the roster every role check reads.',\n owningStep: 'auth',\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyAdminList, {\n title: 'Verify the rosters',\n summary: 'Every V1 admin and referee is on the copied roster, and nobody else is.',\n owningStep: 'auth',\n dependsOn: [A.copyAdminList],\n resumeKey: SINGLE_DOCUMENT,\n }),\n\n // ── App configuration ──────────────────────────────────────────────────────────────────────────\n copyStep(A.copyAppConfig, {\n title: 'Copy the app configuration',\n summary:\n 'The version and the banner from `landing/base` become `_appConfig/app`, its switches at their open defaults.',\n owningStep: 'q-core',\n resumeKey: SINGLE_DOCUMENT,\n }),\n copyStep(A.copyLandingPageConfig, {\n title: 'Copy the landing page copy',\n summary:\n 'The hero title and the about text become `_appConfig/landingPage`; its picture arrives with the picture carry.',\n owningStep: 'q-core',\n resumeKey: SINGLE_DOCUMENT,\n }),\n copyStep(A.copyStatsBeacon, {\n title: 'Copy the stats beacon',\n summary:\n 'The last stats change V1 announced becomes `_appConfig/statsBeacon`, or nothing when V1 never fired one.',\n owningStep: 'query-and-invalidation',\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyAppConfig, {\n title: 'Verify the app configuration',\n summary:\n 'The version and the banner match V1 before the cutover, and the document satisfies its schema after it.',\n owningStep: 'q-core',\n dependsOn: [A.copyAppConfig],\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyLandingPageConfig, {\n title: 'Verify the landing page copy',\n summary: 'The landing copy matches V1 before the cutover, and satisfies its schema after it.',\n owningStep: 'q-core',\n dependsOn: [A.copyLandingPageConfig],\n resumeKey: SINGLE_DOCUMENT,\n }),\n verifyStep(A.verifyStatsBeacon, {\n title: 'Verify the stats beacon',\n summary: 'A beacon at least as recent as V1’s exists, or V1 never fired one.',\n owningStep: 'query-and-invalidation',\n dependsOn: [A.copyStatsBeacon],\n resumeKey: SINGLE_DOCUMENT,\n }),\n\n // ── Setup's catalogs ───────────────────────────────────────────────────────────────────────────\n copyStep(A.copyWaiverTemplates, {\n title: 'Copy the waiver templates',\n summary: 'Each template under its id, its wording as version 1.',\n owningStep: 'high-risk-callables',\n }),\n verifyStep(A.verifyWaiverTemplates, {\n title: 'Verify the waiver templates',\n summary: 'Every V1 template copied with its first version.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyWaiverTemplates],\n }),\n copyStep(A.copyGameLocations, {\n title: 'Copy the game locations',\n summary:\n 'Each venue on `landing/admin` becomes a `gameLocations` document under its id; its picture arrives with the picture carry.',\n owningStep: 'q-core',\n resumeKey: 'The venues in array order; the resume key is the last venue id.',\n }),\n verifyStep(A.verifyGameLocations, {\n title: 'Verify the game locations',\n summary: 'Every V1 venue copied and equal.',\n owningStep: 'q-core',\n dependsOn: [A.copyGameLocations],\n resumeKey: 'The venues in array order; the resume key is the last venue id.',\n }),\n\n // ── Accounts and identity ──────────────────────────────────────────────────────────────────────\n copyStep(A.copyUserProfiles, {\n title: 'Copy the profiles',\n summary:\n 'Each `users` document becomes its profile and its owner-only private document, every account active.',\n owningStep: 'auth',\n }),\n verifyStep(A.verifyUserProfiles, {\n title: 'Verify the profiles',\n summary: 'Every V1 profile copied with its private document.',\n owningStep: 'auth',\n dependsOn: [A.copyUserProfiles],\n }),\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointAbandonedRegistrationSweepEnabled,\n title: 'Enable the abandoned-registration sweep',\n summary:\n 'The scheduled sweep that deletes a sign-in account still holding no profile after its grace window does nothing until this is recorded, and stops again whenever the profile verification is run anew.',\n owningStep: 'auth',\n dependsOn: [A.verifyUserProfiles],\n orderedAfter: [],\n instructions:\n 'Once the profile verification has passed, confirm every account that should keep its sign-in holds a copied profile, then record this step to let the scheduled sweep delete the sign-in accounts that hold none past their grace window.',\n evidence:\n 'The passing profile verification this step follows, and the count of profiles it checked.',\n noReturnBoundary: 'The sweep’s first deletion of a sign-in account that holds no profile.',\n },\n copyStep(A.copyHistoricalStats, {\n title: 'Copy the historical baselines',\n summary: 'Each pre-Q-Sports career total becomes its sport’s `historicalStats` document.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyUserProfiles],\n }),\n verifyStep(A.verifyHistoricalStats, {\n title: 'Verify the historical baselines',\n summary: 'Every V1 baseline copied and equal; a database with none is declared empty.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyHistoricalStats],\n }),\n copyStep(A.deriveReservedDisplayNames, {\n title: 'Reserve the display names',\n summary:\n 'One reservation per copied profile; two names that collide are reported for an admin rename.',\n owningStep: 'auth',\n dependsOn: [A.copyUserProfiles],\n }),\n verifyStep(A.verifyReservedDisplayNames, {\n title: 'Verify the display-name reservations',\n summary: 'Every profile holds the reservation of its name.',\n owningStep: 'auth',\n dependsOn: [A.deriveReservedDisplayNames],\n }),\n copyStep(A.migratePublicUsers, {\n title: 'Migrate the public identities in place',\n summary:\n 'Each `publicUsers` document is rewritten where it sits: epoch timestamps, the recomputed lowercase name, the ghost flag.',\n owningStep: 'q-core',\n }),\n verifyStep(A.verifyPublicUsers, {\n title: 'Verify the public identities',\n summary:\n 'Each document holds its own uid, ghost flag, and lowercase name, and shows the featured badges its profile holds.',\n owningStep: 'q-core',\n dependsOn: [A.migratePublicUsers, A.copyUserProfiles],\n }),\n copyStep(A.copyAwardDefinitions, {\n title: 'Copy the award catalog',\n summary:\n 'Each award on `landing/admin` becomes an `awardDefinitions` document with its holder count; its badge arrives with the picture carry.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copyUserProfiles],\n resumeKey: 'The awards in array order; the resume key is the last award id.',\n }),\n verifyStep(A.verifyAwardDefinitions, {\n title: 'Verify the award catalog',\n summary:\n 'Every award copied, every holder count equal to the profiles holding it, every grant, profile award pick, and shown badge naming an award that exists.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copyAwardDefinitions, A.migratePublicUsers],\n resumeKey: SINGLE_DOCUMENT,\n }),\n\n // ── Leagues and teams ──────────────────────────────────────────────────────────────────────────\n copyStep(A.copySportLeagues, {\n title: 'Copy the leagues',\n summary:\n 'Each league under its id — closed leagues included; its pictures arrive with the picture carry.',\n owningStep: 'q-core',\n }),\n verifyStep(A.verifySportLeagues, {\n title: 'Verify the leagues',\n summary: 'Every V1 league copied and equal, every waiver template it names existing.',\n owningStep: 'q-core',\n dependsOn: [A.copySportLeagues, A.copyWaiverTemplates],\n }),\n copyStep(A.copyLeagueTeams, {\n title: 'Copy the teams',\n summary: 'Each team under its id, its season lines in its sport’s shape.',\n owningStep: 'q-core',\n }),\n verifyStep(A.verifyLeagueTeams, {\n title: 'Verify the teams',\n summary:\n 'Every V1 team copied; the season lines are held to their schema, since the rebuild replaces them.',\n owningStep: 'q-core',\n dependsOn: [A.copyLeagueTeams],\n }),\n copyStep(A.copyTeamMemberships, {\n title: 'Copy the memberships',\n summary:\n 'Each membership under its compound id, `member` becoming `player`; one whose team was not copied into its league is left behind and reported.',\n owningStep: 'q-core',\n dependsOn: [A.copyLeagueTeams],\n }),\n verifyStep(A.verifyTeamMemberships, {\n title: 'Verify the memberships',\n summary:\n 'Every V1 membership copied, or absent because its team is gone; a team with two captains and a ghost on two memberships are reported.',\n owningStep: 'q-core',\n dependsOn: [A.copyTeamMemberships],\n }),\n copyStep(A.copyTeamInvitations, {\n title: 'Copy the invitations',\n summary:\n 'Each invitation by id; a pending one whose invitee is already on the team is written approved, and a pending one whose team was not copied into its league is left behind and reported.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyLeagueTeams, A.copyTeamMemberships],\n }),\n verifyStep(A.verifyTeamInvitations, {\n title: 'Verify the invitations',\n summary:\n 'Every V1 invitation copied as the transform makes it, or absent because its team is gone.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyTeamInvitations],\n }),\n copyStep(A.copyTeamJoinRequests, {\n title: 'Copy the join requests',\n summary:\n 'Each request by id; a pending one whose requester is already on the team is written approved, and a pending one whose team was not copied into its league is left behind and reported.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyLeagueTeams, A.copyTeamMemberships],\n }),\n verifyStep(A.verifyTeamJoinRequests, {\n title: 'Verify the join requests',\n summary:\n 'Every V1 request copied as the transform makes it, or absent because its team is gone.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyTeamJoinRequests],\n }),\n copyStep(A.copyLeagueFreeAgents, {\n title: 'Copy the free-agent signups',\n summary:\n 'Each signup under its built id; a signup whose player already joined a team in the league is left behind and reported.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyTeamMemberships],\n }),\n verifyStep(A.verifyLeagueFreeAgents, {\n title: 'Verify the free-agent signups',\n summary: 'Every V1 signup copied, or absent because joining left it behind.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyLeagueFreeAgents],\n }),\n\n // ── Signed waivers and hardware contracts ──────────────────────────────────────────────────────\n copyStep(A.copySignedWaivers, {\n title: 'Copy the signed waivers',\n summary:\n 'Every signed waiver, a ghost’s included, under its id; its signature file stays where it is.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copyWaiverTemplates],\n }),\n verifyStep(A.verifySignedWaivers, {\n title: 'Verify the signed waivers',\n summary: 'Every V1 record copied and equal, each template it names existing.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.copySignedWaivers],\n }),\n copyStep(A.copyHardwareLoanContracts, {\n title: 'Copy the hardware loan contracts',\n summary:\n 'Each contract from both V1 collections under its id; its signature file stays where it is.',\n owningStep: 'high-risk-callables',\n resumeKey:\n 'The V1 collections in turn, each by document id; the resume key is `{collection}/{id}`.',\n }),\n verifyStep(A.verifyHardwareLoanContracts, {\n title: 'Verify the hardware loan contracts',\n summary: 'Every V1 contract copied and equal.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyHardwareLoanContracts],\n resumeKey:\n 'The V1 collections in turn, each by document id; the resume key is `{collection}/{id}`.',\n }),\n verifyStep(A.verifySignatureFilesResolvable, {\n title: 'Verify the signature files resolve',\n summary:\n 'Each kept signature file is in this project’s bucket and exists. A rehearsal reports every file as another environment’s, which is expected.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.verifySignedWaivers, A.verifyHardwareLoanContracts],\n resumeKey: 'The signed waivers by id, then the contracts; the resume key is the record path.',\n }),\n\n // ── Games ──────────────────────────────────────────────────────────────────────────────────────\n copyStep(A.copyGameRosterPlayers, {\n title: 'Copy the game rosters',\n summary:\n 'One entry per team per person in each game, from each V1 roster document’s own team and user.',\n owningStep: 'high-risk-callables',\n resumeKey: 'The V1 games by document id; the resume key is the last game id.',\n defaultPageSize: 50,\n }),\n {\n kind: 'executable',\n id: A.resolveUnrosteredStatLine,\n callable: migrationActionCallableName(A.resolveUnrosteredStatLine),\n resultKind: 'write',\n destructive: false,\n paged: false,\n defaultPageSize: 1,\n informational: false,\n idempotency: 'A second resolution of the same line is acknowledged and writes nothing.',\n resumeKey: 'One game, one line; it is never paged.',\n recovery: 'Resolve the line again with the right team, then copy the game again.',\n title: 'Resolve a stat line no roster places',\n summary:\n 'For a line the game copy stops on, the admin names its team: the missing roster entry is written with its reason, and the game copied again.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyGameRosterPlayers],\n orderedAfter: [],\n },\n copyStep(A.copySportGames, {\n title: 'Copy the games',\n summary:\n 'Each V1 game with its stats: the event documents, the rollup, the participation lists by roster entry, and a completed game’s finalized record.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copyGameRosterPlayers],\n orderedAfter: [A.resolveUnrosteredStatLine],\n resumeKey:\n 'The V1 games by document id; a game’s documents commit before its id becomes the resume key.',\n defaultPageSize: 20,\n }),\n verifyStep(A.verifySportGames, {\n title: 'Verify the game schedules',\n summary: 'Every V1 game’s schedule fields as the copy converts them.',\n owningStep: 'q-core',\n dependsOn: [A.copySportGames],\n }),\n verifyStep(A.verifyGameStats, {\n title: 'Verify the game stats',\n summary:\n 'Per game: the events replay to the rollup and to V1’s recorded lines, the finalized record matches, and every line and list names a roster entry.',\n owningStep: 'stat-data-model',\n dependsOn: [A.copySportGames],\n defaultPageSize: 20,\n }),\n {\n kind: 'executable',\n id: A.reconcileOpenGameRosters,\n callable: migrationActionCallableName(A.reconcileOpenGameRosters),\n resultKind: 'write',\n destructive: false,\n paged: true,\n defaultPageSize: 20,\n informational: false,\n idempotency:\n 'Each open game is reconciled through the roster core against the copied memberships; a reconciled game changes nothing on a re-run.',\n resumeKey: 'The open games by document id; the resume key is the last game id.',\n recovery:\n 'Run it again: a game held by another operation is reported and reconciled on the next run.',\n title: 'Reconcile the open games’ rosters',\n summary:\n 'Each game open at the cutover: stale stat-free entries removed, missing members added.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyTeamMemberships, A.verifyGameStats],\n orderedAfter: [],\n },\n verifyStep(A.verifyGameRosterPlayers, {\n title: 'Verify the game rosters',\n summary: 'Every V1 roster entry copied; before the cutover, no open game keeps a stale entry.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.copyGameRosterPlayers, A.reconcileOpenGameRosters],\n resumeKey: 'The V1 games by document id; the resume key is the last game id.',\n }),\n\n // ── Pictures ───────────────────────────────────────────────────────────────────────────────────\n copyStep(A.carryV1Pictures, {\n title: 'Carry the V1 pictures onto the pipeline',\n summary:\n 'Each league, landing, venue, and award image is staged and accepted through the upload pipeline, which processes and publishes it. A rehearsal reports every source unavailable.',\n owningStep: 'uploads-and-media',\n dependsOn: [\n A.copySportLeagues,\n A.copyLandingPageConfig,\n A.copyGameLocations,\n A.copyAwardDefinitions,\n ],\n resumeKey: 'By owner kind, then owner id; the resume key is `{ownerKind}:{ownerId}`.',\n }),\n verifyStep(A.verifyV1Pictures, {\n title: 'Verify the carried pictures',\n summary:\n 'Every V1 reference attached with its three sizes, or reported for a reason no re-run changes; nothing still pending. A source in another bucket, or a page it could examine none of, fails it unless the run acknowledges unexamined sources, as a rehearsal does.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.carryV1Pictures],\n resumeKey: 'By owner kind, then owner id; the resume key is `{ownerKind}:{ownerId}`.',\n }),\n\n // ── The ghost names V1 left behind ─────────────────────────────────────────────────────────────\n {\n kind: 'executable',\n id: A.cleanupOrphanGhostPublicUsers,\n callable: migrationActionCallableName(A.cleanupOrphanGhostPublicUsers),\n resultKind: 'write',\n destructive: true,\n paged: true,\n defaultPageSize: 100,\n informational: false,\n idempotency:\n 'A ghost document is deleted only when nothing references it; a re-run finds nothing further.',\n resumeKey: BY_DOCUMENT_ID,\n recovery: DELETE_RECOVERY,\n title: 'Remove the ghost names nothing references',\n summary:\n 'Each ghost `publicUsers` document no membership, roster entry, or unvoided stat event names, reported by disposition first. No signed waiver is touched.',\n owningStep: 'high-risk-callables',\n dependsOn: [\n A.verifyPublicUsers,\n A.verifyTeamMemberships,\n A.verifyGameRosterPlayers,\n A.verifyGameStats,\n ],\n orderedAfter: [],\n },\n\n // ── The derived statistics ─────────────────────────────────────────────────────────────────────\n {\n kind: 'productControl',\n id: A.rebuildLeagueStats,\n title: 'Rebuild every league’s stats',\n summary:\n 'Every team’s season line and per-membership rows, closed leagues included, rebuilt from the copied games.',\n owningStep: 'stat-data-model',\n dependsOn: SOURCE_VERIFICATIONS_FOR_REBUILD,\n orderedAfter: [],\n callable: 'recalculateAllLeagueStats',\n destinations: ['leagueTeams/{teamId}'],\n instructions:\n 'Run “Rebuild every league” from Stats › Fix stats as a real run, not a dry run, and let it reach the end.',\n evidence: 'statsOperation',\n },\n {\n kind: 'productControl',\n id: A.rebuildLifetimeStats,\n title: 'Rebuild every user’s lifetime stats',\n summary:\n 'Every account’s lifetime lines rebuilt from the copied games and historical baselines.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildLeagueStats, A.verifyUserProfiles, A.verifyHistoricalStats],\n orderedAfter: [],\n callable: 'recalculateAllUserStats',\n destinations: ['userProfiles/{userId}'],\n instructions:\n 'Run “Rebuild every user” from Stats › Fix stats as a real run, and let it reach the end.',\n evidence: 'statsOperation',\n },\n {\n kind: 'productControl',\n id: A.rebuildSportHallOfFame,\n title: 'Rebuild the hall of fame',\n summary:\n 'The hall of fame of every sport that keeps one, rebuilt from the copied games and baselines.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildLifetimeStats],\n orderedAfter: [],\n callable: 'recalculateHallOfFame',\n destinations: ['sportHallOfFame/{sportKey}'],\n instructions:\n 'Run the hall-of-fame rebuild from Stats › Fix stats once for each sport that keeps a hall of fame, as real runs, and record every run.',\n evidence: 'statsOperation',\n },\n {\n kind: 'productControl',\n id: A.validateStats,\n title: 'Validate the stats',\n summary: 'Check stats over everything; it must report no finding.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildSportHallOfFame],\n orderedAfter: [],\n callable: 'runStatsValidation',\n destinations: ['statsValidationReports/{reportId}'],\n instructions: 'Run “Check stats” over everything from Stats › Fix stats and let it finish.',\n evidence: 'statsValidationReport',\n },\n verifyStep(A.verifyLeaguePlayerStats, {\n title: 'Compare the league player totals with V1',\n summary:\n 'Lists each player whose V1 league total differs from the sum of their rebuilt rows in that league. It informs the rehearsal and gates nothing.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildLeagueStats],\n informational: true,\n }),\n verifyStep(A.verifySportHallOfFame, {\n title: 'Verify the rebuilt hall of fame',\n summary:\n 'Every V1 hall of fame of a sport that keeps one has its rebuilt document, which satisfies its schema and holds an entry for every V1 player with a non-zero total.',\n owningStep: 'stat-data-model',\n dependsOn: [A.rebuildSportHallOfFame],\n }),\n\n // ── The cutover ────────────────────────────────────────────────────────────────────────────────\n {\n kind: 'cutoverMarker',\n id: A.recordCutoverLive,\n callable: RECORD_MIGRATION_CUTOVER_CALLABLE,\n title: 'Record the cutover',\n summary:\n 'From here on the product owns every destination: no copy runs again, and each verification holds what the product edits to its schema only.',\n owningStep: 'migration-console',\n dependsOn: [...COPY_VERIFICATIONS, A.validateStats],\n orderedAfter: [A.verifySportHallOfFame, A.verifySignatureFilesResolvable],\n noReturnBoundary:\n 'Recording the cutover. It is never undone: every copy refuses a live destination after it.',\n },\n\n // ── Cleanup: each delete gated on the verifications its core asserts ───────────────────────────\n deleteStep(A.deleteV1AdminRoles, {\n title: 'Remove the V1 role maps',\n summary:\n 'The `isAdmin` and `referees` fields on `landing/admin`; the document goes with its last carried row.',\n owningStep: 'auth',\n dependsOn: [A.verifyAdminList],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1LandingBase, {\n title: 'Delete `landing/base`',\n summary:\n 'The V1 configuration document, once its three documents and its picture are verified.',\n owningStep: 'q-core',\n dependsOn: [\n A.verifyAppConfig,\n A.verifyLandingPageConfig,\n A.verifyStatsBeacon,\n A.verifyV1Pictures,\n ],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1Waivers, {\n title: 'Delete the V1 waiver templates',\n summary: 'The `waivers` collection.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyWaiverTemplates],\n }),\n deleteStep(A.deleteV1GameLocations, {\n title: 'Remove the V1 venues',\n summary:\n 'The `locations` field on `landing/admin`; the document goes with its last carried row.',\n owningStep: 'q-core',\n dependsOn: [A.verifyGameLocations, A.verifyV1Pictures],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1AwardCatalog, {\n title: 'Remove the V1 award catalog',\n summary: 'The `awards` field on `landing/admin`; the document goes with its last carried row.',\n owningStep: 'uploads-and-media',\n dependsOn: [\n A.verifyAwardDefinitions,\n A.verifyUserProfiles,\n A.verifyPublicUsers,\n A.verifyV1Pictures,\n ],\n resumeKey: SINGLE_DOCUMENT,\n }),\n deleteStep(A.deleteV1Users, {\n title: 'Delete the V1 user documents',\n summary: 'Each `users` document with its historical baselines.',\n owningStep: 'auth',\n dependsOn: [A.verifyUserProfiles, A.verifyHistoricalStats, A.verifyReservedDisplayNames],\n }),\n deleteStep(A.deleteV1TeamInvites, {\n title: 'Delete the V1 invitations',\n summary: 'The `teamInvites` collection.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyTeamInvitations],\n }),\n deleteStep(A.deleteV1JoinRequests, {\n title: 'Delete the V1 join requests',\n summary: 'The `joinRequests` collection.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyTeamJoinRequests],\n }),\n deleteStep(A.deleteV1FreeAgentSignups, {\n title: 'Delete the V1 free-agent signups',\n summary: 'The `freeAgentSignups` collection, left-behind signups included.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyLeagueFreeAgents],\n }),\n deleteStep(A.deleteV1TeamMembers, {\n title: 'Delete the V1 memberships',\n summary: 'The `teamMembers` collection.',\n owningStep: 'q-core',\n dependsOn: [A.verifyTeamMemberships],\n }),\n deleteStep(A.deleteV1Teams, {\n title: 'Delete the V1 teams',\n summary: 'The `teams` collection; a team still holding a subcollection is reported and kept.',\n owningStep: 'q-core',\n dependsOn: [A.verifyLeagueTeams],\n }),\n {\n kind: 'executable',\n id: A.revokeV1SignatureDownloadTokens,\n callable: migrationActionCallableName(A.revokeV1SignatureDownloadTokens),\n resultKind: 'write',\n destructive: true,\n paged: true,\n defaultPageSize: 100,\n informational: false,\n idempotency:\n 'Removes a kept file’s download token; a file holding none is skipped. No file is moved or deleted.',\n resumeKey: 'The signed waivers by id, then the contracts; the resume key is the record path.',\n recovery: 'Run it again; a file whose token went is skipped.',\n title: 'Revoke the V1 signature download links',\n summary:\n 'Each kept signature file loses the download token V1’s stored links carry, so those links stop resolving.',\n owningStep: 'uploads-and-media',\n dependsOn: [\n A.verifySignedWaivers,\n A.verifyHardwareLoanContracts,\n A.verifySignatureFilesResolvable,\n ],\n orderedAfter: [],\n },\n deleteStep(A.deleteV1WaiverSignatures, {\n title: 'Delete the V1 signed-waiver records',\n summary: 'The `waiverSignatures` records; the files stay, named by the copied records.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.verifySignedWaivers],\n }),\n deleteStep(A.deleteV1HardwareContracts, {\n title: 'Delete the V1 hardware contracts',\n summary:\n 'Both V1 contract collections; the signature files stay, named by the copied contracts.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyHardwareLoanContracts],\n resumeKey:\n 'The V1 collections in turn, each by document id; the resume key is `{collection}/{id}`.',\n }),\n deleteStep(A.deleteV1GameRosters, {\n title: 'Delete the V1 game rosters',\n summary: 'Each V1 game’s `roster` subcollection — never the game document.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyGameRosterPlayers, A.validateStats],\n resumeKey: 'The V1 games by document id; the resume key is the last game id.',\n defaultPageSize: 50,\n }),\n deleteStep(A.deleteV1LeagueGames, {\n title: 'Delete the V1 games',\n summary: 'The `leagueGames` documents; a game still holding its roster is reported and kept.',\n owningStep: 'stat-data-model',\n dependsOn: [\n A.verifySportGames,\n A.verifyGameStats,\n A.verifyGameRosterPlayers,\n A.validateStats,\n A.deleteV1GameRosters,\n ],\n }),\n deleteStep(A.deleteV1LeagueChats, {\n title: 'Delete the V1 league chats',\n summary:\n 'The parked chat documents under each V1 league and its team paths. Any other document found under a league is reported and kept.',\n owningStep: 'migration-console',\n dependsOn: [A.checkpointV1FirestoreExport],\n resumeKey:\n 'The V1 leagues by document id; the resume key is the last league id, or `{leagueId}/unfinished` while a league holds more chats than one page deletes.',\n defaultPageSize: 50,\n }),\n deleteStep(A.deleteV1Leagues, {\n title: 'Delete the V1 leagues',\n summary:\n 'The `leagues` collection; a league still holding a subcollection is reported and kept.',\n owningStep: 'q-core',\n dependsOn: [A.verifySportLeagues, A.verifyV1Pictures],\n orderedAfter: [A.verifyLeaguePlayerStats, A.deleteV1LeagueChats],\n }),\n deleteStep(A.deleteV1HallOfFame, {\n title: 'Delete the V1 hall of fame',\n summary:\n 'The `hallOfFame` collection, once every sport that keeps a hall of fame has its rebuilt document.',\n owningStep: 'stat-data-model',\n dependsOn: [A.verifySportHallOfFame],\n }),\n deleteStep(A.deleteV1ValidationReports, {\n title: 'Delete the V1 validation reports',\n summary:\n 'The `validationReports` collection. Nothing is copied: each report describes V1 aggregates at a past moment.',\n owningStep: 'stat-data-model',\n dependsOn: [A.checkpointV1FirestoreExport],\n orderedAfter: [A.validateStats],\n }),\n deleteStep(A.deleteV1AdminStats, {\n title: 'Delete the V1 dashboard counts',\n summary:\n 'The `adminStats` collection. Nothing is copied: the dashboard counts are counted live.',\n owningStep: 'q-core',\n dependsOn: [A.checkpointV1FirestoreExport],\n }),\n verifyStep(A.verifyV1CommerceDiscardable, {\n title: 'Check the V1 store holds no purchase',\n summary:\n 'Fails on an order that is not cancelled, a completed checkout, or a product holding inventory — any would be a real purchase, and goes to the owner.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.checkpointV1FirestoreExport],\n resumeKey: 'The six store collections in turn, each by document id.',\n }),\n deleteStep(A.deleteV1Commerce, {\n title: 'Delete the V1 store and payments',\n summary: 'The six store collections, nothing copied.',\n owningStep: 'high-risk-callables',\n dependsOn: [A.verifyV1CommerceDiscardable],\n resumeKey: 'The six store collections in turn, each by document id.',\n }),\n\n // ── After the cutover ──────────────────────────────────────────────────────────────────────────\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointUnattachedPicturesReuploaded,\n title: 'Re-upload the pictures the carry could not attach',\n summary: 'Any V1 image still unattached in production goes back on through its own control.',\n owningStep: 'uploads-and-media',\n dependsOn: [A.verifyV1Pictures, A.recordCutoverLive],\n orderedAfter: [],\n instructions:\n 'For each source the picture verification reported, re-upload the image through its control — Reupload badge for an award, the picture managers for a league, the landing page, or a venue. In a rehearsal, record that this is production-only.',\n evidence: 'Each re-uploaded owner, or that the verification reported none.',\n noReturnBoundary: null,\n },\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointPaymentCredentialsRetired,\n title: 'Retire the payment-service credentials',\n summary:\n 'V2 binds no payment-service credential, so once it is live the three V1 binds are live credentials with no reader.',\n owningStep: 'secret-management',\n dependsOn: [A.recordCutoverLive],\n orderedAfter: [],\n instructions:\n 'Production only, once V2 is live there: revoke the payment service’s secret key and disable its webhook endpoint in its dashboard, then destroy the three secrets V1 binds for it — its secret key, its webhook secret, and APP_URL — in Secret Manager in both Firebase projects. In a rehearsal, record that this is production-only.',\n evidence:\n 'The payment dashboard showing the key revoked and the endpoint disabled, and `gcloud secrets list` in each project showing none of the three.',\n noReturnBoundary: 'The secret key revocation.',\n },\n {\n kind: 'operatorCheckpoint',\n id: A.checkpointServiceAccountKeyRevoked,\n title: 'Revoke the obsolete production service-account key',\n summary:\n 'No script reads the local production key once the export script runs on the signed-in CLI credentials; revoking it makes every copy of it worthless.',\n owningStep: 'secret-management',\n dependsOn: [A.checkpointV1FirestoreExport],\n orderedAfter: [A.recordCutoverLive],\n instructions:\n 'Run the export script on Application Default Credentials against the production project named explicitly, then revoke the q-sports-prod service-account key in the Google Cloud console and delete serviceAccount.json from the machine. No replacement key is minted. In a rehearsal, record that this is production-only.',\n evidence: 'The export run on ADC, and the console showing the key revoked.',\n noReturnBoundary: 'The key revocation.',\n },\n];\n\n/** Every step by its id. */\nexport const MIGRATION_STEP_BY_ID: ReadonlyMap<MigrationActionId, MigrationStep> = new Map(\n MIGRATION_CUTOVER_MANIFEST.map((step) => [step.id, step]),\n);\n\n/** The steps of one kind, in cutover order. */\nexport function migrationStepsOfKind<K extends MigrationStepKind>(\n kind: K,\n): Extract<MigrationStep, { kind: K }>[] {\n return MIGRATION_CUTOVER_MANIFEST.filter(\n (step): step is Extract<MigrationStep, { kind: K }> => step.kind === kind,\n );\n}\n"]}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// icon, the link, and the key its cards aggregate on.
|
|
5
5
|
//
|
|
6
6
|
// The Functions side adds the one field this module cannot carry: `timestampFromMillis`, which needs
|
|
7
|
-
// the Admin SDK (ARCH-202).
|
|
7
|
+
// the Admin SDK (RULE-STD-ARCH-202).
|
|
8
8
|
import { ADMIN_NOTIFICATION_METADATA_SCHEMAS } from '../doc-schemas/admin-notifications.js';
|
|
9
9
|
import { COLLECTION_REFS } from '../paths/collection-refs.js';
|
|
10
10
|
import { toPath } from '../paths/utils.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-notification-config.js","sourceRoot":"","sources":["../../src/notifications/admin-notification-config.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,oGAAoG;AACpG,oGAAoG;AACpG,sDAAsD;AACtD,EAAE;AACF,qGAAqG;AACrG,
|
|
1
|
+
{"version":3,"file":"admin-notification-config.js","sourceRoot":"","sources":["../../src/notifications/admin-notification-config.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,oGAAoG;AACpG,oGAAoG;AACpG,sDAAsD;AACtD,EAAE;AACF,qGAAqG;AACrG,qCAAqC;AAMrC,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EACL,2BAA2B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ards, and the admin area that lists them. notification-core supplies the mechanism and takes\n// Q-Sports' policy here — the shared category, where its documents live, and per type the copy, the\n// icon, the link, and the key its cards aggregate on.\n//\n// The Functions side adds the one field this module cannot carry: `timestampFromMillis`, which needs\n// the Admin SDK (RULE-STD-ARCH-202).\n\nimport type {\n NotificationSystemConfig,\n NotificationTypeConfig,\n} from '@ttt-productions/notification-core';\nimport { ADMIN_NOTIFICATION_METADATA_SCHEMAS } from '../doc-schemas/admin-notifications.js';\nimport type { AdminNotificationMetadataByType } from '../doc-schemas/admin-notifications.js';\nimport { COLLECTION_REFS } from '../paths/collection-refs.js';\nimport { toPath } from '../paths/utils.js';\nimport { buildLeagueFreeAgentId } from '../ids/compound-ids.js';\nimport {\n ADMIN_NOTIFICATION_CATEGORY,\n ADMIN_NOTIFICATION_TYPE_KEYS,\n} from '../types/notifications.js';\nimport type { AdminNotificationType } from '../types/notifications.js';\nimport {\n LEAGUE_FREE_AGENTS_SECTION,\n adminLeagueHref,\n leagueTeamHref,\n} from '../utils/app-routes.js';\n\nexport interface AdminNotificationDefinition<T extends AdminNotificationType> {\n /**\n * The key its cards aggregate on: an occurrence whose key matches an active card lights that card\n * again and counts on it, and any other occurrence opens a new card.\n */\n aggregationKey: (metadata: AdminNotificationMetadataByType[T]) => string;\n /**\n * `realtime`: the owning callable materializes the card right after its commit, and the worker is\n * the fallback. `queued`: the worker alone materializes it.\n */\n delivery: NotificationTypeConfig['delivery'];\n title: string;\n /** The emoji its cards show beside their title. */\n icon: string;\n message: (count: number) => string;\n /** Where the card's link goes. */\n targetPath: (metadata: AdminNotificationMetadataByType[T]) => string;\n /** The highest count a card of this type shows. */\n countCap?: number;\n}\n\nexport const ADMIN_NOTIFICATION_DEFINITIONS: {\n [T in AdminNotificationType]: AdminNotificationDefinition<T>;\n} = {\n leagueTeamCreated: {\n // One card per team, so each card links to its own team page.\n aggregationKey: ({ teamId }) => teamId,\n delivery: 'realtime',\n title: 'New team',\n icon: '👥',\n message: () => 'A new team joined a league.',\n targetPath: ({ leagueId, teamId }) => leagueTeamHref(leagueId, teamId),\n countCap: 1,\n },\n leagueFreeAgentSignedUp: {\n // One card per player per league: another player's signup is a card of its own, and the same\n // player signing up again lights their card again. Every card links to the league's free agents.\n aggregationKey: ({ leagueId, userId }) => buildLeagueFreeAgentId(leagueId, userId),\n delivery: 'realtime',\n title: 'Free agent signup',\n icon: '🙋',\n message: (count) =>\n count === 1\n ? 'A player signed up as a free agent.'\n : `A player signed up as a free agent ${count} times.`,\n targetPath: ({ leagueId }) => adminLeagueHref(leagueId, LEAGUE_FREE_AGENTS_SECTION),\n },\n};\n\n// The package hands every pattern the stored metadata untyped. It is parsed against the type's own\n// schema, so a row whose metadata is not its type's fails to materialize — and is retried, then\n// dead-lettered — rather than lighting a card with a broken link.\nfunction typeConfig<T extends AdminNotificationType>(type: T): NotificationTypeConfig {\n const definition = ADMIN_NOTIFICATION_DEFINITIONS[type];\n const read = (metadata: Record<string, unknown>) =>\n ADMIN_NOTIFICATION_METADATA_SCHEMAS[type].parse(metadata) as AdminNotificationMetadataByType[T];\n return {\n category: ADMIN_NOTIFICATION_CATEGORY,\n delivery: definition.delivery,\n dedupKeyPattern: (metadata) => definition.aggregationKey(read(metadata)),\n titlePattern: () => definition.title,\n icon: definition.icon,\n messagePattern: (_metadata, count) => definition.message(count),\n defaultTargetPath: (metadata) => definition.targetPath(read(metadata)),\n ...(definition.countCap === undefined ? {} : { countCap: definition.countCap }),\n };\n}\n\nexport const NOTIFICATION_SYSTEM_CONFIG: NotificationSystemConfig = {\n categories: {\n [ADMIN_NOTIFICATION_CATEGORY]: {\n activePath: toPath(COLLECTION_REFS.activeAdminNotifications()),\n historyPath: () => toPath(COLLECTION_REFS.adminNotificationHistory()),\n audienceType: 'shared',\n },\n },\n types: Object.fromEntries(ADMIN_NOTIFICATION_TYPE_KEYS.map((type) => [type, typeConfig(type)])),\n deliveriesCollectionPath: toPath(COLLECTION_REFS.notificationDeliveries()),\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// One builder per notification type, taking the committed action's own record. The occurrence it
|
|
2
2
|
// returns is what the owning callable writes to the delivery ledger in the action's transaction
|
|
3
|
-
// (BACKEND-306): its id is derived from the action, never minted, so a retried write is the same
|
|
3
|
+
// (RULE-STD-BACKEND-306): its id is derived from the action, never minted, so a retried write is the same
|
|
4
4
|
// occurrence; and its aggregation key is declared apart from that id, so a later action of the
|
|
5
5
|
// same kind is never mistaken for a retry of an earlier one.
|
|
6
6
|
import { buildLeagueFreeAgentSignedUpEventId } from '../ids/notification-ids.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"occurrences.js","sourceRoot":"","sources":["../../src/notifications/occurrences.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,gGAAgG;AAChG,
|
|
1
|
+
{"version":3,"file":"occurrences.js","sourceRoot":"","sources":["../../src/notifications/occurrences.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,gGAAgG;AAChG,0GAA0G;AAC1G,+FAA+F;AAC/F,6DAA6D;AAK7D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AAEjF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAchF,gGAAgG;AAChG,MAAM,UAAU,6BAA6B,CAC3C,MAAc,EACd,IAAoE;IAEpE,MAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACrD,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,MAAM;QACf,cAAc,EAAE,8BAA8B,CAAC,iBAAiB,CAAC,cAAc,CAAC,QAAQ,CAAC;QACzF,WAAW,EAAE,IAAI,CAAC,eAAe;QACjC,QAAQ;QACR,UAAU,EAAE,IAAI,CAAC,SAAS;KAC3B,CAAC;AACJ,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,mCAAmC,CACjD,MAAuB;IAEvB,MAAM,QAAQ,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IACtE,OAAO;QACL,IAAI,EAAE,yBAAyB;QAC/B,OAAO,EAAE,mCAAmC,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC;QAC9F,cAAc,EAAE,8BAA8B,CAAC,uBAAuB,CAAC,cAAc,CAAC,QAAQ,CAAC;QAC/F,WAAW,EAAE,MAAM,CAAC,MAAM;QAC1B,QAAQ;QACR,UAAU,EAAE,MAAM,CAAC,SAAS;KAC7B,CAAC;AACJ,CAAC","sourcesContent":["// One builder per notification type, taking the committed action's own record. The occurrence it\n// returns is what the owning callable writes to the delivery ledger in the action's transaction\n// (RULE-STD-BACKEND-306): its id is derived from the action, never minted, so a retried write is the same\n// occurrence; and its aggregation key is declared apart from that id, so a later action of the\n// same kind is never mistaken for a retry of an earlier one.\n\nimport type { AdminNotificationMetadataByType } from '../doc-schemas/admin-notifications.js';\nimport type { LeagueTeam } from '../doc-schemas/league-team.js';\nimport type { LeagueFreeAgent } from '../doc-schemas/team-membership.js';\nimport { buildLeagueFreeAgentSignedUpEventId } from '../ids/notification-ids.js';\nimport type { AdminNotificationType } from '../types/notifications.js';\nimport { ADMIN_NOTIFICATION_DEFINITIONS } from './admin-notification-config.js';\n\nexport interface AdminNotificationOccurrence<\n T extends AdminNotificationType = AdminNotificationType,\n> {\n type: T;\n eventId: string;\n aggregationKey: string;\n /** The account whose action this records. */\n actorUserId: string;\n metadata: AdminNotificationMetadataByType[T];\n occurredAt: number;\n}\n\n/** A team joined a league. A team is created once, so the team's id identifies its creation. */\nexport function leagueTeamCreatedNotification(\n teamId: string,\n team: Pick<LeagueTeam, 'leagueId' | 'createdByUserId' | 'createdAt'>,\n): AdminNotificationOccurrence<'leagueTeamCreated'> {\n const metadata = { leagueId: team.leagueId, teamId };\n return {\n type: 'leagueTeamCreated',\n eventId: teamId,\n aggregationKey: ADMIN_NOTIFICATION_DEFINITIONS.leagueTeamCreated.aggregationKey(metadata),\n actorUserId: team.createdByUserId,\n metadata,\n occurredAt: team.createdAt,\n };\n}\n\n/** A player signed up as a free agent in a league. */\nexport function leagueFreeAgentSignedUpNotification(\n signup: LeagueFreeAgent,\n): AdminNotificationOccurrence<'leagueFreeAgentSignedUp'> {\n const metadata = { leagueId: signup.leagueId, userId: signup.userId };\n return {\n type: 'leagueFreeAgentSignedUp',\n eventId: buildLeagueFreeAgentSignedUpEventId(signup.leagueId, signup.userId, signup.createdAt),\n aggregationKey: ADMIN_NOTIFICATION_DEFINITIONS.leagueFreeAgentSignedUp.aggregationKey(metadata),\n actorUserId: signup.userId,\n metadata,\n occurredAt: signup.createdAt,\n };\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Every collection value is compound camelCase — it says what the documents are, never a single
|
|
4
4
|
// bare word (guarded by __tests__/collections.test.ts). The three underscore buckets hold fixed-ID
|
|
5
5
|
// system documents and are placed by who reads them; every one of them is callable-only for writes
|
|
6
|
-
// (BACKEND-108). An admin-only document is server-only, read by an admin through a callable:
|
|
6
|
+
// (RULE-STD-BACKEND-108). An admin-only document is server-only, read by an admin through a callable:
|
|
7
7
|
// _appConfig public read
|
|
8
8
|
// _systemData signed-in read
|
|
9
9
|
// _serverData no client access
|
|
@@ -26,7 +26,7 @@ export const COLLECTIONS = {
|
|
|
26
26
|
SPORT_LEAGUES: 'sportLeagues',
|
|
27
27
|
LEAGUE_TEAMS: 'leagueTeams',
|
|
28
28
|
// One admin-only document per team, id = the team id: how the league reaches the team. The team
|
|
29
|
-
// itself is publicly readable, so no contact detail lives on it (BACKEND-105); a league's contacts
|
|
29
|
+
// itself is publicly readable, so no contact detail lives on it (RULE-STD-BACKEND-105); a league's contacts
|
|
30
30
|
// are one query on `leagueId`.
|
|
31
31
|
LEAGUE_TEAM_CONTACTS: 'leagueTeamContacts',
|
|
32
32
|
TEAM_MEMBERSHIPS: 'teamMemberships',
|
|
@@ -85,7 +85,7 @@ export const USER_PROFILE_SUBCOLLECTIONS = {
|
|
|
85
85
|
// One document per sport key: pre-Q-Sports career totals folded into lifetime recalculation.
|
|
86
86
|
HISTORICAL_STATS: 'historicalStats',
|
|
87
87
|
// One owner-only document, id = the userId: email and contact details. The profile itself is
|
|
88
|
-
// publicly readable, so nothing personal lives on it (BACKEND-105).
|
|
88
|
+
// publicly readable, so nothing personal lives on it (RULE-STD-BACKEND-105).
|
|
89
89
|
PRIVATE_DATA: 'privateData',
|
|
90
90
|
};
|
|
91
91
|
/** Subcollections of `sportGames/{gameId}`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/paths/collections.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,mGAAmG;AACnG,
|
|
1
|
+
{"version":3,"file":"collections.js","sourceRoot":"","sources":["../../src/paths/collections.ts"],"names":[],"mappings":"AAAA,uFAAuF;AACvF,EAAE;AACF,gGAAgG;AAChG,mGAAmG;AACnG,mGAAmG;AACnG,sGAAsG;AACtG,6BAA6B;AAC7B,gCAAgC;AAChC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS;IACT,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,aAAa;IAC3B,2FAA2F;IAC3F,sBAAsB,EAAE,sBAAsB;IAC9C,2FAA2F;IAC3F,qEAAqE;IACrE,sBAAsB,EAAE,sBAAsB;IAC9C,iGAAiG;IACjG,2BAA2B;IAC3B,mBAAmB,EAAE,oBAAoB;IACzC,kGAAkG;IAClG,gBAAgB;IAChB,WAAW,EAAE,YAAY;IAEzB,6BAA6B;IAC7B,aAAa,EAAE,cAAc;IAC7B,YAAY,EAAE,aAAa;IAC3B,gGAAgG;IAChG,4GAA4G;IAC5G,+BAA+B;IAC/B,oBAAoB,EAAE,oB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F,6EAA6E;IAC7E,YAAY,EAAE,aAAa;CACnB,CAAC;AAEX,+CAA+C;AAC/C,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,6FAA6F;IAC7F,mBAAmB,EAAE,mBAAmB;IACxC,wEAAwE;IACxE,gBAAgB,EAAE,gBAAgB;IAClC,8EAA8E;IAC9E,iBAAiB,EAAE,iBAAiB;CAC5B,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,4FAA4F;IAC5F,wBAAwB,EAAE,wBAAwB;CAC1C,CAAC;AAEX,sDAAsD;AACtD,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,qGAAqG;IACrG,wBAAwB,EAAE,uBAAuB;CACzC,CAAC;AAEX,kDAAkD;AAClD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,2BAA2B;IAC3B,gGAAgG;IAChG,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,aAAa;IAC3B,mEAAmE;IACnE,YAAY,EAAE,aAAa;IAE3B,+BAA+B;IAC/B,6FAA6F;IAC7F,UAAU,EAAE,WAAW;IAEvB,iCAAiC;IACjC,gGAAgG;IAChG,QAAQ;IACR,iBAAiB,EAAE,kBAAkB;IACrC,0FAA0F;IAC1F,sBAAsB,EAAE,sBAAsB;IAC9C,oGAAoG;IACpG,YAAY;IACZ,wBAAwB,EAAE,wBAAwB;CAC1C,CAAC","sourcesContent":["// Firestore collection, subcollection, and fixed-document name constants for Q-Sports.\n//\n// Every collection value is compound camelCase — it says what the documents are, never a single\n// bare word (guarded by __tests__/collections.test.ts). The three underscore buckets hold fixed-ID\n// system documents and are placed by who reads them; every one of them is callable-only for writes\n// (RULE-STD-BACKEND-108). An admin-only document is server-only, read by an admin through a callable:\n// _appConfig public read\n// _systemData signed-in read\n// _serverData no client access\n\nexport const COLLECTIONS = {\n // People\n USER_PROFILES: 'userProfiles',\n PUBLIC_USERS: 'publicUsers',\n // One document per taken display name, keyed by its normalized form — the uniqueness lock.\n RESERVED_DISPLAY_NAMES: 'reservedDisplayNames',\n // One entry per account owed a post-commit Firebase Auth effect, id = the userId: a status\n // change's sign-in half, or a failed role-claim write. Backend-only.\n STATUS_RECONCILE_QUEUE: 'statusReconcileQueue',\n // One document per login whose registration started, id = the userId: the orphan-login cleanup's\n // work list. Backend-only.\n REGISTRATION_STARTS: 'registrationStarts',\n // One document per scheduled pass that keeps a rolling cursor, id = its `SWEEP_STATE_NAMES` name.\n // Backend-only.\n SWEEP_STATE: 'sweepState',\n\n // Leagues, teams, membership\n SPORT_LEAGUES: 'sportLeagues',\n LEAGUE_TEAMS: 'leagueTeams',\n // One admin-only document per team, id = the team id: how the league reaches the team. The team\n // itself is publicly readable, so no contact detail lives on it (RULE-STD-BACKEND-105); a league's contacts\n // are one query on `leagueId`.\n LEAGUE_TEAM_CONTACTS: 'leagueTeamContacts',\n TEAM_MEMBERSHIPS: 'teamMemberships',\n TEAM_INVITATIONS: 'teamInvitations',\n TEAM_JOIN_REQUESTS: 'teamJoinRequests',\n LEAGUE_FREE_AGENTS: 'leagueFreeAgents',\n // One document per team membership, id = the membership's id: the durable obligation to bring\n // that membership's open game rosters in line with it. Backend-only.\n MEMBERSHIP_ROSTER_SYNCS: 'membershipRosterSyncs',\n\n // Games\n SPORT_GAMES: 'sportGames',\n GAME_LOCATIONS: 'gameLocations',\n\n // Waivers and hardware\n WAIVER_TEMPLATES: 'waiverTemplates',\n SIGNED_WAIVERS: 'signedWaivers',\n HARDWARE_LOAN_CONTRACTS: 'hardwareLoanContracts',\n\n // Awards and derived stats\n AWARD_DEFINITIONS: 'awardDefinitions',\n // One decision on one award for one group — a team, or a whole league — granted or taken back a\n // page of people at a time, id `buildAwardGroupGrantId`. Backend-only.\n AWARD_GROUP_GRANTS: 'awardGroupGrants',\n SPORT_HALL_OF_FAME: 'sportHallOfFame',\n STATS_VALIDATION_REPORTS: 'statsValidationReports',\n // One logical run of a stats action: its status, its resume position, and the hold it places on\n // a game. Admin read; written only by the stats cores.\n STATS_OPERATIONS: 'statsOperations',\n\n // One document per cutover action, id = the action id: where its latest real run stands, its\n // last preview, and what it reported. Admin read; written only by the migration console.\n MIGRATION_ACTION_RUNS: 'migrationActionRuns',\n\n // One document per picture in a league, team, or landing page gallery. Public read; written only\n // by the picture core.\n GALLERY_PICTURES: 'galleryPictures',\n // One accepted picture upload, id = its staging id = the picture id. Read by its uploader and\n // admins; written only by the accept core (the upload callable and the picture carry), the\n // processing trigger, and the maintenance sweep's stale-upload pass; never deleted.\n PENDING_MEDIA: 'pendingMedia',\n // The durable obligation to delete a picture's files, or a deleted owner's whole gallery. No\n // client access; carried out by the media maintenance sweep.\n PICTURE_RETIREMENTS: 'pictureRetirements',\n\n // Append-only record of sensitive actions. No client access; written only by Cloud Functions.\n AUDIT_EVENTS: 'auditEvents',\n\n // Admin notifications, all written only by Cloud Functions. The shared cards every admin reads and\n // their archived history are admin read; the delivery ledger the owning callables write each\n // occurrence into, and each admin's archive-all job, have no client access.\n ACTIVE_ADMIN_NOTIFICATIONS: 'activeAdminNotifications',\n ADMIN_NOTIFICATION_HISTORY: 'adminNotificationHistory',\n NOTIFICATION_DELIVERIES: 'notificationDeliveries',\n NOTIFICATION_ARCHIVE_ALL_JOBS: 'notificationArchiveAllJobs',\n\n // Fixed-ID system document buckets\n APP_CONFIG: '_appConfig',\n SYSTEM_DATA: '_systemData',\n SERVER_DATA: '_serverData',\n} as const;\n\nexport type CollectionName = (typeof COLLECTIONS)[keyof typeof COLLECTIONS];\n\n/** Subcollections of `userProfiles/{userId}`. */\nexport const USER_PROFILE_SUBCOLLECTIONS = {\n // One document per sport key: pre-Q-Sports career totals folded into lifetime recalculation.\n HISTORICAL_STATS: 'historicalStats',\n // One owner-only document, id = the userId: email and contact details. The profile itself is\n // publicly readable, so nothing personal lives on it (RULE-STD-BACKEND-105).\n PRIVATE_DATA: 'privateData',\n} as const;\n\n/** Subcollections of `sportGames/{gameId}`. */\nexport const SPORT_GAME_SUBCOLLECTIONS = {\n // Who participated in the game: one entry per team per person, id `buildGameRosterPlayerId`.\n GAME_ROSTER_PLAYERS: 'gameRosterPlayers',\n // One stat event per document, keyed by the event id minted at the tap.\n GAME_STAT_EVENTS: 'gameStatEvents',\n // A completed game's finalized record, in pages, id `buildStatHistoryPageId`.\n GAME_STAT_HISTORY: 'gameStatHistory',\n} as const;\n\n/** Subcollections of `waiverTemplates/{waiverTemplateId}`. */\nexport const WAIVER_TEMPLATE_SUBCOLLECTIONS = {\n // One immutable document per published wording, id `buildWaiverTemplateVersionId(version)`.\n WAIVER_TEMPLATE_VERSIONS: 'waiverTemplateVersions',\n} as const;\n\n/** Subcollections of `awardGroupGrants/{grantId}`. */\nexport const AWARD_GROUP_GRANT_SUBCOLLECTIONS = {\n // One document per person the grant reached, id = the userId, recorded before their profile changed.\n AWARD_GROUP_GRANT_PEOPLE: 'awardGroupGrantPeople',\n} as const;\n\n/** Static document IDs for fixed-ID documents. */\nexport const SPECIAL_DOCS = {\n // _appConfig — public read\n // The app-wide operational levers: version gate, maintenance mode, registration switch, banner.\n APP_CONFIG: 'app',\n LANDING_PAGE: 'landingPage',\n // Public because signed-out spectators follow it for live updates.\n STATS_BEACON: 'statsBeacon',\n\n // _systemData — signed-in read\n // The admin and referee rosters — source of truth for the `admin` / `referee` custom claims.\n ADMIN_LIST: 'adminList',\n\n // _serverData — no client access\n // The migration console: the cutover marker and the lock that keeps two actions from running at\n // once.\n MIGRATION_CONSOLE: 'migrationConsole',\n // The fence every venue creation writes, so two creations at MAX_GAME_LOCATIONS conflict.\n GAME_LOCATION_REGISTRY: 'gameLocationRegistry',\n // The fence every waiver-template creation writes, so two creations at MAX_OFFERED_WAIVER_TEMPLATES\n // conflict.\n WAIVER_TEMPLATE_REGISTRY: 'waiverTemplateRegistry',\n} as const;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The document each kind of picture owner is (ARCH-104), split by what the picture core writes on
|
|
1
|
+
// The document each kind of picture owner is (RULE-STD-ARCH-104), split by what the picture core writes on
|
|
2
2
|
// it: a gallery owner holds a `pictures` summary, and a slot owner holds one picture in its slot
|
|
3
3
|
// field. A writer indexes the map for the owners it writes, so its target is only those documents;
|
|
4
4
|
// the full map, composed from both, serves the reads that take any owner.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"picture-owner-paths.js","sourceRoot":"","sources":["../../src/paths/picture-owner-paths.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"picture-owner-paths.js","sourceRoot":"","sources":["../../src/paths/picture-owner-paths.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,iGAAiG;AACjG,mGAAmG;AACnG,0EAA0E;AAS1E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,WAAW,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;IAClF,UAAU,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;IAChF,kEAAkE;IAClE,WAAW,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,iBAAiB,EAAE,EAAE;CAC8B,CAAC;AAEnG,iGAAiG;AACjG,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY,EAAE;QACZ,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC;QAClE,SAAS,EAAE,WAAwC;KACpD;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,CAAC,OAAe,EAAE,EAAE,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,CAAC;QACrE,SAAS,EAAE,gBAAgD;KAC5D;CAIF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,GAAG,mBAAmB;IACtB,GAAG,mBAAmB;CAC0E,CAAC;AAEnG;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAsB,EAAE,OAAe;IACtE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,IAAI,KAAK,aAAa,IAAI,OAAO,KAAK,YAAY,CAAC,YAAY,CAAC;AACzE,CAAC","sourcesContent":["// The document each kind of picture owner is (RULE-STD-ARCH-104), split by what the picture core writes on\n// it: a gallery owner holds a `pictures` summary, and a slot owner holds one picture in its slot\n// field. A writer indexes the map for the owners it writes, so its target is only those documents;\n// the full map, composed from both, serves the reads that take any owner.\n\nimport type { AwardDefinition } from '../doc-schemas/catalogs.js';\nimport type { GameLocation } from '../doc-schemas/game-location.js';\nimport type {\n GalleryOwnerKind,\n PictureOwnerKind,\n PictureSlotOwnerKind,\n} from '../types/picture-owners.js';\nimport { SPECIAL_DOCS } from './collections.js';\nimport { PATH_BUILDERS } from './path-builders.js';\n\nexport const GALLERY_OWNER_PATHS = {\n sportLeague: { ownerDoc: (ownerId: string) => PATH_BUILDERS.sportLeague(ownerId) },\n leagueTeam: { ownerDoc: (ownerId: string) => PATH_BUILDERS.leagueTeam(ownerId) },\n // There is one landing page, and its owner id is its document id.\n landingPage: { ownerDoc: () => PATH_BUILDERS.landingPageConfig() },\n} as const satisfies Record<GalleryOwnerKind, { ownerDoc: (ownerId: string) => [string, string] }>;\n\n// Each slot field is a key of its own document's schema, so a renamed field fails to build here.\nexport const PICTURE_SLOT_OWNERS = {\n gameLocation: {\n ownerDoc: (ownerId: string) => PATH_BUILDERS.gameLocation(ownerId),\n slotField: 'pictureId' satisfies keyof GameLocation,\n },\n awardDefinition: {\n ownerDoc: (ownerId: string) => PATH_BUILDERS.awardDefinition(ownerId),\n slotField: 'badgePictureId' satisfies keyof AwardDefinition,\n },\n} as const satisfies Record<\n PictureSlotOwnerKind,\n { ownerDoc: (ownerId: string) => [string, string]; slotField: string }\n>;\n\nexport const PICTURE_OWNER_PATHS = {\n ...GALLERY_OWNER_PATHS,\n ...PICTURE_SLOT_OWNERS,\n} as const satisfies Record<PictureOwnerKind, { ownerDoc: (ownerId: string) => [string, string] }>;\n\n/**\n * Whether an owner id can name an owner of its kind. Every kind but the landing page takes any\n * document id; the landing page is the one document `SPECIAL_DOCS.LANDING_PAGE` names.\n */\nexport function isPictureOwnerId(kind: PictureOwnerKind, ownerId: string): boolean {\n if (ownerId.length === 0) return false;\n return kind !== 'landingPage' || ownerId === SPECIAL_DOCS.LANDING_PAGE;\n}\n"]}
|
|
@@ -19,7 +19,7 @@ export declare function buildPictureObjectPath(pictureId: string, variantKey: Pi
|
|
|
19
19
|
/**
|
|
20
20
|
* Where a client stages one upload: its origin, the uploader's own uid, and the id it minted. The
|
|
21
21
|
* callable that accepts the upload rebuilds this from the AUTHENTICATED uid and refuses anything
|
|
22
|
-
* not exactly equal (MEDIA-002), so a client can only ever name its own staged object.
|
|
22
|
+
* not exactly equal (RULE-STD-MEDIA-002), so a client can only ever name its own staged object.
|
|
23
23
|
*/
|
|
24
24
|
export declare function buildStagingUploadPath(fileOrigin: FileOrigin, userId: string, stagingId: string): string;
|
|
25
25
|
export interface StagingUploadPathParts {
|
|
@@ -38,7 +38,7 @@ export function buildPictureObjectPath(pictureId, variantKey) {
|
|
|
38
38
|
/**
|
|
39
39
|
* Where a client stages one upload: its origin, the uploader's own uid, and the id it minted. The
|
|
40
40
|
* callable that accepts the upload rebuilds this from the AUTHENTICATED uid and refuses anything
|
|
41
|
-
* not exactly equal (MEDIA-002), so a client can only ever name its own staged object.
|
|
41
|
+
* not exactly equal (RULE-STD-MEDIA-002), so a client can only ever name its own staged object.
|
|
42
42
|
*/
|
|
43
43
|
export function buildStagingUploadPath(fileOrigin, userId, stagingId) {
|
|
44
44
|
return `${STAGING_UPLOAD_PREFIX}${fileOrigin}/${user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SAAS,EAAE,CAAC;AAC3C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAiB,EAAE,UAA6B;IACrF,OAAO,GAAG,wBAAwB,CAAC,SAAS,CAAC,IAAI,UAAU,EAAE,CAAC;AAChE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAsB,EACtB,MAAc,EACd,SAAiB;IAEjB,OAAO,GAAG,qBAAqB,GAAG,UAAU,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC;AACxE,CAAC;AAQD;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACvC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,GAAG,QAA4C,CAAC;IAC7F,IAAI,MAAM,KAAK,cAAc,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/F,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IACzC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC","sourcesContent":["// Cloud Storage path builders. Storage paths are plain slash strings — no SDK takes segments.\n//\n// The staging path is the one path a client writes. Every other path is derived by the server:\n// picture sizes by the picture processor, and signature files — legal artifacts kept under their\n// subject's prefix, with no client grant at all — by the callable that records the signing.\n\nimport { isFileOrigin } from '../media/file-origins.js';\nimport type { FileOrigin } from '../media/file-origins.js';\nimport { isStagingId } from '../ids/picture-ids.js';\nimport type { PictureVariantKey } from '../types/unions.js';\n\nexport const USER_FILES_PREFIX = 'users/';\nconst SIGNED_WAIVERS_FOLDER = 'waiverSigs';\nconst HARDWARE_SIGNATURES_FOLDER = 'hardwareSigs';\nconst PICTURES_FOLDER = 'pictures';\nconst STAGING_FOLDER = 'uploads';\n\n/** Everything a client uploads lands under this prefix, and nothing else does. */\nexport const STAGING_UPLOAD_PREFIX = `${STAGING_FOLDER}/`;\n\n/** A real user's own waiver signature for one league. */\nexport function buildSignedWaiverPath(userId: string, leagueId: string, fileName: string): string {\n return `${USER_FILES_PREFIX}${userId}/${SIGNED_WAIVERS_FOLDER}/${leagueId}/${fileName}`;\n}\n\n/** A ghost player's waiver signature, captured by a witness for the ghost's team, `teamId`. */\nexport function buildGhostSignedWaiverPath(\n ghostUserId: string,\n leagueId: string,\n teamId: string,\n fileName: string,\n): string {\n return `${USER_FILES_PREFIX}${ghostUserId}/${SIGNED_WAIVERS_FOLDER}/${leagueId}/${teamId}/${fileName}`;\n}\n\n/** A referee's signature on one hardware contract, named for its staging id like every kept signature. */\nexport function buildHardwareSignaturePath(\n userId: string,\n contractId: string,\n fileId: string,\n): string {\n return `${USER_FILES_PREFIX}${userId}/${HARDWARE_SIGNATURES_FOLDER}/${contractId}/${fileId}`;\n}\n\n/** The folder holding every processed size of one picture. */\nexport function buildPictureObjectPrefix(pictureId: string): string {\n return `${PICTURES_FOLDER}/${pictureId}`;\n}\n\n/**\n * One processed size of a picture. Every picture kind shares this prefix, and the key carries no\n * extension: the object's own content type says what it is.\n */\nexport function buildPictureObjectPath(pictureId: string, variantKey: PictureVariantKey): string {\n return `${buildPictureObjectPrefix(pictureId)}/${variantKey}`;\n}\n\n/**\n * Where a client stages one upload: its origin, the uploader's own uid, and the id it minted. The\n * callable that accepts the upload rebuilds this from the AUTHENTICATED uid and refuses anything\n * not exactly equal (MEDIA-002), so a client can only ever name its own staged object.\n */\nexport function buildStagingUploadPath(\n fileOrigin: FileOrigin,\n userId: string,\n stagingId: string,\n): string {\n return `${STAGING_UPLOAD_PREFIX}${fileOrigin}/${userId}/${stagingId}`;\n}\n\nexport interface StagingUploadPathParts {\n fileOrigin: FileOrigin;\n userId: string;\n stagingId: string;\n}\n\n/**\n * The parts of a staging path, or `null` for anything that is not one: another prefix, a wrong\n * segment count, an unknown origin, an empty uid, or a staging id that is not a lowercase UUID.\n */\nexport function parseStagingUploadPath(path: string): StagingUploadPathParts | null {\n const segments = path.split('/');\n if (segments.length !== 4) return null;\n const [folder, fileOrigin, userId, stagingId] = segments as [string, string, string, string];\n if (folder !== STAGING_FOLDER || !isFileOrigin(fileOrigin) || userId.length === 0) return null;\n if (!isStagingId(stagingId)) return null;\n return { fileOrigin, userId, stagingId };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storage-paths.js","sourceRoot":"","sources":["../../src/paths/storage-paths.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,EAAE;AACF,+FAA+F;AAC/F,iGAAiG;AACjG,4FAA4F;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAC3C,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAClD,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,cAAc,GAAG,SAAS,CAAC;AAEjC,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,cAAc,GAAG,CAAC;AAE1D,yDAAyD;AACzD,MAAM,UAAU,qBAAqB,CAAC,MAAc,EAAE,QAAgB,EAAE,QAAgB;IACtF,OAAO,GAAG,iBAAiB,GAAG,MAAM,IAAI,qBAAqB,IAAI,QAAQ,IAAI,QAAQ,EAAE,CAAC;AAC1F,CAAC;AAED,+FAA+F;AAC/F,MAAM,UAAU,0BAA0B,CACxC,WAAmB,EACnB,QAAgB,EAChB,MAAc,EACd,QAAgB;IAEhB,OAAO,GAAG,iBAAiB,GAAG,WAAW,IAAI,qBAAqB,IA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age paths are plain slash strings — no SDK takes segments.\n//\n// The staging path is the one path a client writes. Every other path is derived by the server:\n// picture sizes by the picture processor, and signature files — legal artifacts kept under their\n// subject's prefix, with no client grant at all — by the callable that records the signing.\n\nimport { isFileOrigin } from '../media/file-origins.js';\nimport type { FileOrigin } from '../media/file-origins.js';\nimport { isStagingId } from '../ids/picture-ids.js';\nimport type { PictureVariantKey } from '../types/unions.js';\n\nexport const USER_FILES_PREFIX = 'users/';\nconst SIGNED_WAIVERS_FOLDER = 'waiverSigs';\nconst HARDWARE_SIGNATURES_FOLDER = 'hardwareSigs';\nconst PICTURES_FOLDER = 'pictures';\nconst STAGING_FOLDER = 'uploads';\n\n/** Everything a client uploads lands under this prefix, and nothing else does. */\nexport const STAGING_UPLOAD_PREFIX = `${STAGING_FOLDER}/`;\n\n/** A real user's own waiver signature for one league. */\nexport function buildSignedWaiverPath(userId: string, leagueId: string, fileName: string): string {\n return `${USER_FILES_PREFIX}${userId}/${SIGNED_WAIVERS_FOLDER}/${leagueId}/${fileName}`;\n}\n\n/** A ghost player's waiver signature, captured by a witness for the ghost's team, `teamId`. */\nexport function buildGhostSignedWaiverPath(\n ghostUserId: string,\n leagueId: string,\n teamId: string,\n fileName: string,\n): string {\n return `${USER_FILES_PREFIX}${ghostUserId}/${SIGNED_WAIVERS_FOLDER}/${leagueId}/${teamId}/${fileName}`;\n}\n\n/** A referee's signature on one hardware contract, named for its staging id like every kept signature. */\nexport function buildHardwareSignaturePath(\n userId: string,\n contractId: string,\n fileId: string,\n): string {\n return `${USER_FILES_PREFIX}${userId}/${HARDWARE_SIGNATURES_FOLDER}/${contractId}/${fileId}`;\n}\n\n/** The folder holding every processed size of one picture. */\nexport function buildPictureObjectPrefix(pictureId: string): string {\n return `${PICTURES_FOLDER}/${pictureId}`;\n}\n\n/**\n * One processed size of a picture. Every picture kind shares this prefix, and the key carries no\n * extension: the object's own content type says what it is.\n */\nexport function buildPictureObjectPath(pictureId: string, variantKey: PictureVariantKey): string {\n return `${buildPictureObjectPrefix(pictureId)}/${variantKey}`;\n}\n\n/**\n * Where a client stages one upload: its origin, the uploader's own uid, and the id it minted. The\n * callable that accepts the upload rebuilds this from the AUTHENTICATED uid and refuses anything\n * not exactly equal (RULE-STD-MEDIA-002), so a client can only ever name its own staged object.\n */\nexport function buildStagingUploadPath(\n fileOrigin: FileOrigin,\n userId: string,\n stagingId: string,\n): string {\n return `${STAGING_UPLOAD_PREFIX}${fileOrigin}/${userId}/${stagingId}`;\n}\n\nexport interface StagingUploadPathParts {\n fileOrigin: FileOrigin;\n userId: string;\n stagingId: string;\n}\n\n/**\n * The parts of a staging path, or `null` for anything that is not one: another prefix, a wrong\n * segment count, an unknown origin, an empty uid, or a staging id that is not a lowercase UUID.\n */\nexport function parseStagingUploadPath(path: string): StagingUploadPathParts | null {\n const segments = path.split('/');\n if (segments.length !== 4) return null;\n const [folder, fileOrigin, userId, stagingId] = segments as [string, string, string, string];\n if (folder !== STAGING_FOLDER || !isFileOrigin(fileOrigin) || userId.length === 0) return null;\n if (!isStagingId(stagingId)) return null;\n return { fileOrigin, userId, stagingId };\n}\n"]}
|