diff --git a/.github/ci-filters.json b/.github/ci-filters.json index 98a44f50..a778da2d 100644 --- a/.github/ci-filters.json +++ b/.github/ci-filters.json @@ -53,6 +53,19 @@ "scripts/ci-results.*", "scripts/ci-selection.*" ], + "web-images": [ + "apps/dashboard/**", + "apps/learn/**", + "apps/website/**", + "CHANGELOG.md", + ".railway/**", + ".github/workflows/ci.yml", + ".github/workflows/web-hosting.yml", + ".github/ci-filters.json", + "scripts/test-web-hosting.mjs", + "scripts/ci-results.*", + "scripts/ci-selection.*" + ], "reviewer": [ "tools/pr-reviewer/**", ".github/workflows/ai-review.yml", diff --git a/.github/codeql-filters.json b/.github/codeql-filters.json index f392a966..176bb54f 100644 --- a/.github/codeql-filters.json +++ b/.github/codeql-filters.json @@ -1,9 +1,4 @@ { - "workflow": [ - ".github/workflows/codeql.yml", - ".github/codeql-filters.json", - "scripts/codeql-matrix*.mjs" - ], "actions": [".github/workflows/**", ".github/actions/**"], "javascript": [ "**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts,svelte,astro}", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e22106d9..3e65dbd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: dashboard: ${{ steps.filter.outputs.dashboard }} collection: ${{ steps.filter.outputs.collection }} website: ${{ steps.filter.outputs.website }} + web-images: ${{ steps.filter.outputs.web-images }} learn: ${{ steps.filter.outputs.learn }} reviewer: ${{ steps.filter.outputs.reviewer }} contracts: ${{ steps.filter.outputs.contracts }} @@ -32,6 +33,19 @@ jobs: with: filters: .github/ci-filters.json + codeql: + uses: ./.github/workflows/codeql.yml + permissions: + contents: read + pull-requests: read + packages: read + security-events: write + + web-images: + needs: changes + if: ${{ needs.changes.outputs.web-images == 'true' }} + uses: ./.github/workflows/web-hosting.yml + structure: name: Structure runs-on: ubuntu-latest @@ -586,6 +600,8 @@ jobs: changes, structure, railway-config, + codeql, + web-images, contracts, reviewer, server, diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 053105c7..8f5c6000 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,37 +1,12 @@ name: CodeQL on: - push: - branches: [main] - paths: - - '.github/workflows/**' - - 'apps/**' - - 'packages/**' - - 'scripts/**' - - 'tools/**' - - '.github/actions/**' - - '.github/codeql-filters.json' - - '*' - pull_request: - branches: [main] - paths: - - '.github/workflows/**' - - 'apps/**' - - 'packages/**' - - 'scripts/**' - - 'tools/**' - - '.github/actions/**' - - '.github/codeql-filters.json' - - '*' + workflow_call: workflow_dispatch: permissions: contents: read -concurrency: - group: codeql-${{ github.ref }} - cancel-in-progress: true - jobs: changes: name: Detect CodeQL inputs @@ -169,3 +144,22 @@ jobs: path: ${{ runner.temp }}/codeql-results/*.sarif if-no-files-found: error retention-days: 7 + + result: + name: Require applicable CodeQL analyses + if: ${{ always() }} + needs: [changes, analyze] + runs-on: ubuntu-latest + permissions: {} + env: + DETECTION_RESULT: ${{ needs.changes.result }} + ANALYSIS_SELECTED: ${{ needs.changes.outputs.any }} + ANALYSIS_RESULT: ${{ needs.analyze.result }} + steps: + - name: Check scan outcome + run: | + test "$DETECTION_RESULT" = success + case "$ANALYSIS_SELECTED:$ANALYSIS_RESULT" in + true:success|false:skipped) ;; + *) echo 'An applicable CodeQL analysis did not succeed.' >&2; exit 1 ;; + esac diff --git a/.github/workflows/web-hosting.yml b/.github/workflows/web-hosting.yml index 591a75a7..d9cafc9d 100644 --- a/.github/workflows/web-hosting.yml +++ b/.github/workflows/web-hosting.yml @@ -1,13 +1,6 @@ name: Web hosting images on: - pull_request: - paths: - - 'apps/website/**' - - 'CHANGELOG.md' - - 'apps/learn/**' - - 'apps/dashboard/**' - - '.github/workflows/web-hosting.yml' - - 'scripts/test-web-hosting.mjs' + workflow_call: workflow_dispatch: permissions: contents: read diff --git a/.railway/README.md b/.railway/README.md index c6b40d6c..272ce34c 100644 --- a/.railway/README.md +++ b/.railway/README.md @@ -30,7 +30,7 @@ deployment. Do not put its path in the dashboard's legacy **Config File** field. 2. Verify the declared source connections and roots: `/` for api, worker, website; `/apps/dashboard` for dashboard; `/apps/learn` for learn. For a PR environment, set `RAILWAY_CONFIG_BRANCH` to its existing GitHub branch for every plan/apply. - Production uses `main`; staging retains `offseason/mock-game-charged-up`. + Production and staging use `main`, matching the verified live services. Compare variable names with `env` in the file and add `preserve()` entries for any newly configured variables before applying. Never include secret values. Preserve Dashboard's existing release workflow when deciding source/deploy policy. 3. Confirm the preview has isolated Postgres/Redis and sandbox integration keys. @@ -80,3 +80,59 @@ For finite offseason batches, see [Worker batch rollout](../docs/worker-batch-ro `RAILWAY_WORKER_CRON='0 18 * * *'` is an opt-in local plan/apply input; production defaults to six-hour event-aware windows after the rollout. An explicit empty `RAILWAY_WORKER_CRON` restores continuous mode. Merging this configuration does not enable Cron or PostgreSQL Serverless. + +## Tested-commit deployment gate (LVT-337) + +GitHub requires `Monorepo CI` on `main`. That job requires Railway IaC checks, +app tests, applicable production web image HTTP checks, and the CodeQL result. +CodeQL selects each language by its watch paths. Only a manual CodeQL run +requests the full matrix. A successful selection with zero applicable analyses +passes the aggregate. A failed or cancelled selected analysis fails it. +CI runs on every push to `main`. + +`RAILWAY_WAIT_FOR_CI=true` opts all five GitHub sources in the linked environment +into Railway's [Wait for CI](https://docs.railway.com/deployments/github-autodeploys). +Keep that input in subsequent plans for an environment after enabling it. An +explicit `false` restores the prior setting. Pass the current live Worker mode +to the plan as well. For a continuously running Worker, use +`RAILWAY_WORKER_CRON=''` so the same apply does not switch it to scheduled mode. + +1. Link to an isolated environment with GitHub autodeploy enabled. Generate a + read-only plan and confirm the only intended change is `checkSuites` on app + sources. Review the plan and keep the IDs of the currently healthy deployments. +2. After applying the reviewed test plan, verify a commit with an applicable + failing check does not deploy. Verify a later passing commit does deploy. + Match the GitHub workflow SHA to the Railway deployment SHA and record both. +3. Review the production plan separately. Services with autodeploy disabled + still need their approved promotion path. For manual rollback, identify the + last healthy deployment by ID and verify service health after redeployment. + +Railway evaluates workflow conclusions and can ignore a cancelled workflow when +another workflow passed. Keep the `main` CI workflow free of superseding-run +cancellation. Verify the aggregate outcome and deployed SHA for each promotion. + +The November 20 read-only production audit found the API already had sleeping +enabled. The graph now preserves that setting alongside the Worker's existing +six-hour schedule. The refreshed production plan proposed only the five +`source.checkSuites` updates and reported zero diagnostics. The PR #128 preview +plan also proposes explicitly writing +`WORKER_MODE=continuous` where the Worker previously used its default. Review +that reconciliation independently before using the preview to test Wait for CI. + +## Verified live state (November 12, 2026) + +The Lovat project is `c210dce8-37af-4bf0-b1e0-7e28b30597c6` in **8033 Admin's +Projects**. The connected list-projects inventory omitted it; a direct project ID +lookup and the local Railway CLI both work. See the +[cutover verification record](evidence/2026-11-12/verification.md) and redacted +configuration snapshot. The five application services already belong to the +`lovat-apps` named partial in production and staging. PR #128 inherits matching +settings but has no explicit partial ownership; preview adoption remains open. + +The audit found source/sleeping/preview-limit drift in the authored file. The +updated definitions preserve the observed live settings rather than changing +service availability, cost or staging source on the next apply. Healthcheck +readiness (LVT-339) and release migrations (LVT-338) remain separate proposed +changes. No live settings were applied by +this audit. Secret-value isolation and a restore/rollback exercise still need +independent evidence. diff --git a/.railway/config.test.mjs b/.railway/config.test.mjs index 5365a36e..b973f3b1 100644 --- a/.railway/config.test.mjs +++ b/.railway/config.test.mjs @@ -3,6 +3,29 @@ import { test } from "node:test"; import { createRailwayContext } from "railway/iac"; import config, { partial } from "./railway.ts"; +test("Wait for CI requires an explicit setting when rendering a plan", (t) => { + const previous = process.env.RAILWAY_WAIT_FOR_CI; + t.after(() => { + if (previous === undefined) delete process.env.RAILWAY_WAIT_FOR_CI; + else process.env.RAILWAY_WAIT_FOR_CI = previous; + }); + const context = createRailwayContext({ environment: "production" }); + const sourceSettings = () => + config(context).resources.map((app) => app.source.checkSuites); + + delete process.env.RAILWAY_WAIT_FOR_CI; + assert(sourceSettings().every((enabled) => enabled === false)); + process.env.RAILWAY_WAIT_FOR_CI = "true"; + assert(sourceSettings().every((enabled) => enabled === true)); + process.env.RAILWAY_WAIT_FOR_CI = "false"; + assert(sourceSettings().every((enabled) => enabled === false)); + process.env.RAILWAY_WAIT_FOR_CI = "yes"; + assert.throws( + () => config(context), + /RAILWAY_WAIT_FOR_CI must be true or false/, + ); +}); + for (const environment of ["production", "staging"]) { test(`${environment} retains deployment contracts`, () => { const graph = config( @@ -20,7 +43,10 @@ for (const environment of ["production", "staging"]) { for (const resource of graph.resources) { assert.equal(resource.build.builder, "DOCKERFILE"); assert(resource.build.watchPatterns.includes("/.railway/**")); - assert.notEqual(resource.deploy.sleepApplication, true); + assert.equal( + resource.deploy.sleepApplication, + resource.name === "worker" ? undefined : true, + ); assert.equal( resource.deploy.restartPolicyType ?? "ON_FAILURE", resource.name === "worker" && environment === "production" @@ -29,12 +55,7 @@ for (const environment of ["production", "staging"]) { ); // Keep source connections and credential values during adoption. assert.equal(resource.source.repo, "HighlanderRobotics/lovat"); - assert.equal( - resource.source.branch, - environment === "production" - ? "main" - : "offseason/mock-game-charged-up", - ); + assert.equal(resource.source.branch, "main"); assert(Object.keys(resource.variables).length > 0); for (const [name, value] of Object.entries(resource.variables)) { assert.deepEqual( @@ -108,6 +129,34 @@ test("refuses preview plans without an explicit source branch", () => { } }); +test("preview retains inherited sleeping and API limits without owning databases", (t) => { + const previous = process.env.RAILWAY_CONFIG_BRANCH; + process.env.RAILWAY_CONFIG_BRANCH = + "jackshim415/lvt-334-server-redact-request-analytics-and"; + t.after(() => { + if (previous === undefined) { + delete process.env.RAILWAY_CONFIG_BRANCH; + } else { + process.env.RAILWAY_CONFIG_BRANCH = previous; + } + }); + const graph = config( + createRailwayContext({ environment: "lovat-pr-128", projectName: "lovat" }), + ); + assert.equal(graph.resources.length, 5); + for (const resource of graph.resources) { + assert.equal(resource.source.branch, process.env.RAILWAY_CONFIG_BRANCH); + assert.equal( + resource.deploy.sleepApplication, + resource.name === "worker" ? undefined : true, + ); + } + const api = graph.resources.find((r) => r.name === "api"); + assert.deepEqual(api.deploy.limitOverride, { + containers: { cpu: 2, memoryBytes: 2147483648 }, + }); +}); + test("offseason cron uses a finite batch without a health listener or restarts", () => { const previous = process.env.RAILWAY_WORKER_CRON; process.env.RAILWAY_WORKER_CRON = "0 18 * * *"; diff --git a/.railway/evidence/2026-11-12/live-inventory.json b/.railway/evidence/2026-11-12/live-inventory.json new file mode 100644 index 00000000..7b503c13 --- /dev/null +++ b/.railway/evidence/2026-11-12/live-inventory.json @@ -0,0 +1,1864 @@ +{ + "observedDate": "2026-11-12", + "projectId": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "environments": { + "production": { + "inventory": { + "project": { + "id": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "name": "lovat", + "workspaceName": "8033 Admin's Projects" + }, + "environment": { + "id": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "name": "production", + "isEphemeral": false + }, + "staged": null, + "region": null, + "services": [ + { + "id": "2c361c7e-0936-4777-a3a8-31973b08f9c5", + "name": "website", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "88edfb74-54a0-48fe-a0ff-eadd00a762e6", + "status": "SLEEPING", + "createdAt": "2026-11-13T04:07:25.000Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "99a7baae-d20f-48d1-83a8-f4d0965f26f2", + "name": "worker", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "dff1453c-3fef-4684-bd5b-afd5ed5657be", + "status": "SUCCESS", + "createdAt": "2026-11-10T15:45:45.345Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "7466d74a-228c-43e4-8dfb-28e9d7a5975d", + "name": "dashboard", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "4b556c2e-db29-48ba-b882-0e5587554f50", + "status": "SLEEPING", + "createdAt": "2026-11-13T04:07:24.999Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "356589e7-d546-4eeb-84d8-6dec0fa40863", + "name": "learn", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "4f666324-b7a4-4b6a-b44e-bcc61f8cfa17", + "status": "SLEEPING", + "createdAt": "2026-11-13T04:07:25.008Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "c8bca5d9-eb38-4d3c-9318-40a5b72fe0bd", + "name": "Postgres", + "state": "live", + "source": { + "image": "ghcr.io/railwayapp-templates/postgres-ssl:16", + "repo": null, + "branch": null + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [ + { + "volumeId": "3dfadc08-5ed0-4470-893a-a15f5667fc66", + "volumeName": "ink-volume", + "mountPath": "/var/lib/postgresql/data" + } + ], + "latestDeployment": { + "id": "bc51912a-9629-46ee-821c-00959427e43d", + "status": "SUCCESS", + "createdAt": "2026-11-05T15:07:12.359Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "f2015c97-62cd-4f1b-9144-4c64d13e487b", + "name": "api", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "e7374dcb-6e4f-44a4-b11a-29dc4c8f4234", + "status": "SUCCESS", + "createdAt": "2026-11-13T00:54:07.820Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "a6e778c7-4c13-48ba-81bd-f3db8c9ec0f0", + "name": "Redis", + "state": "live", + "source": { + "image": "redis:8.10.3", + "repo": null, + "branch": null + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [ + { + "volumeId": "1de4c728-4246-43d0-98e6-41a83cd44672", + "volumeName": "redis-volume", + "mountPath": "/data" + } + ], + "latestDeployment": { + "id": "69a85feb-f093-46c2-9332-978be094bb04", + "status": "SUCCESS", + "createdAt": "2026-11-05T15:09:12.796Z", + "url": null + }, + "stagedChangeCount": 0 + } + ], + "volumes": [ + { + "id": "3dfadc08-5ed0-4470-893a-a15f5667fc66", + "name": "ink-volume", + "state": "live", + "region": "us-west2", + "sizeMB": 5000, + "mountedOn": { + "serviceId": "c8bca5d9-eb38-4d3c-9318-40a5b72fe0bd", + "serviceName": "Postgres", + "mountPath": "/var/lib/postgresql/data" + }, + "stagedChangeCount": 0 + }, + { + "id": "1de4c728-4246-43d0-98e6-41a83cd44672", + "name": "redis-volume", + "state": "live", + "region": "us-west2", + "sizeMB": 5000, + "mountedOn": { + "serviceId": "a6e778c7-4c13-48ba-81bd-f3db8c9ec0f0", + "serviceName": "Redis", + "mountPath": "/data" + }, + "stagedChangeCount": 0 + } + ], + "buckets": [ + { + "id": "3cb0fa95-8aa3-4148-a899-488969e2a66f", + "name": "Postgres-PITR", + "state": "live", + "region": "sjc", + "stagedChangeCount": 0 + } + ], + "sharedVariableNames": [] + }, + "services": { + "api": { + "service": { + "id": "f2015c97-62cd-4f1b-9144-4c64d13e487b", + "name": "api", + "state": "live" + }, + "environment": { + "id": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "name": "production" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "lovat-server-production.up.railway.app": {} + }, + "customDomains": { + "api.lovat.app": {} + }, + "privateNetworkEndpoint": "lovat-server" + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/server/**", + "/packages/db/**", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/server/Dockerfile" + }, + "deploy": { + "startCommand": "sh -c 'export DATABASE_URL=\"$DATABASE_PRIVATE_URL\"; npm --prefix ../../packages/db run db:deploy && exec npm start'", + "healthcheckPath": "/status", + "healthcheckTimeout": 1200, + "restartPolicyMaxRetries": 20, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1, + "stackerAssignment": null + } + } + }, + "configFile": "" + }, + "stagedChanges": [], + "variableNames": [ + "AUTH0_DOMAIN", + "BASE_URL", + "DATABASE_PRIVATE_URL", + "DATABASE_URL", + "DIRECT_DATABASE_URL", + "LOVAT_SIGNING_KEY", + "LOVAT_WEBSITE", + "PIT_DISPLAY_KEY", + "PORT", + "POSTHOG_PROJECT_API_KEY", + "REDIS_URL", + "RESEND_KEY", + "SLACK_APP_ID", + "SLACK_CLIENT_ID", + "SLACK_CLIENT_SECRET", + "SLACK_VERIFICATION_KEY", + "SLACK_WEBHOOK", + "TBA_KEY" + ], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "d6a75eb5-6e96-4eef-9219-724c366960bc", + "domain": "lovat-server-production.up.railway.app", + "targetPort": null + } + ], + "customDomains": [ + { + "id": "b9ce5260-9264-463a-9581-0c9370d8f8ef", + "domain": "api.lovat.app", + "targetPort": null + } + ] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "e7374dcb-6e4f-44a4-b11a-29dc4c8f4234", + "status": "SUCCESS", + "createdAt": "2026-11-13T00:54:07.820Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "worker": { + "service": { + "id": "99a7baae-d20f-48d1-83a8-f4d0965f26f2", + "name": "worker", + "state": "live" + }, + "environment": { + "id": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "name": "production" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/", + "checkSuites": false + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/worker/**", + "/packages/db/**", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/worker/Dockerfile" + }, + "deploy": { + "startCommand": "bun index.ts", + "healthcheckPath": "/health", + "healthcheckTimeout": 120, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + }, + "drainingSeconds": 60 + } + }, + "stagedChanges": [], + "variableNames": ["DATABASE_URL", "TBA_KEY", "WORKER_CONCURRENCY"], + "volumes": [], + "domains": { + "serviceDomains": [], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "dff1453c-3fef-4684-bd5b-afd5ed5657be", + "status": "SUCCESS", + "createdAt": "2026-11-10T15:45:45.345Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "dashboard": { + "service": { + "id": "7466d74a-228c-43e4-8dfb-28e9d7a5975d", + "name": "dashboard", + "state": "live" + }, + "environment": { + "id": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "name": "production" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/apps/dashboard" + }, + "networking": { + "serviceDomains": { + "dashboard-production-4f76.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": ["/apps/dashboard/**", "/.railway/**"], + "buildEnvironment": "V3", + "dockerfilePath": "Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "cdn": { + "enabled": true + } + }, + "stagedChanges": [], + "variableNames": ["LOVAT_API_BASE", "LOVAT_WEBSITE_URL", "PORT"], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "5208be5a-3be3-4c3d-9b11-1f8d6da50d14", + "domain": "dashboard-production-4f76.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "4b556c2e-db29-48ba-b882-0e5587554f50", + "status": "SLEEPING", + "createdAt": "2026-11-13T04:07:24.999Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "website": { + "service": { + "id": "2c361c7e-0936-4777-a3a8-31973b08f9c5", + "name": "website", + "state": "live" + }, + "environment": { + "id": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "name": "production" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "website-production-8b64.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/website/**", + "/CHANGELOG.md", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/website/Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "cdn": { + "enabled": true + } + }, + "stagedChanges": [], + "variableNames": [ + "LOVAT_API_BASE", + "LOVAT_SIGNING_KEY", + "ORIGIN", + "PORT", + "PUBLIC_DASHBOARD_URL", + "PUBLIC_LEARN_URL", + "PUBLIC_WEBSITE_URL", + "RECAPTCHA_SECRET_KEY", + "RECAPTCHA_SITE_KEY" + ], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "e83ba00f-5578-4243-aeb0-b6e01dac726e", + "domain": "website-production-8b64.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "88edfb74-54a0-48fe-a0ff-eadd00a762e6", + "status": "SLEEPING", + "createdAt": "2026-11-13T04:07:25.000Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "learn": { + "service": { + "id": "356589e7-d546-4eeb-84d8-6dec0fa40863", + "name": "learn", + "state": "live" + }, + "environment": { + "id": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "name": "production" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/apps/learn" + }, + "networking": { + "serviceDomains": { + "learn-production-3ca4.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": ["/apps/learn/**", "/.railway/**"], + "buildEnvironment": "V3", + "dockerfilePath": "Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "cdn": { + "enabled": true + } + }, + "stagedChanges": [], + "variableNames": ["PORT", "PUBLIC_WEBSITE_URL"], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "c83f6e01-854c-4c09-afa6-4da8869e0e1a", + "domain": "learn-production-3ca4.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "4f666324-b7a4-4b6a-b44e-bcc61f8cfa17", + "status": "SLEEPING", + "createdAt": "2026-11-13T04:07:25.008Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + } + } + }, + "staging": { + "inventory": { + "project": { + "id": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "name": "lovat", + "workspaceName": "8033 Admin's Projects" + }, + "environment": { + "id": "1902828c-65ae-455c-90c8-5a370b7cedab", + "name": "staging", + "isEphemeral": false + }, + "staged": null, + "region": null, + "services": [ + { + "id": "7466d74a-228c-43e4-8dfb-28e9d7a5975d", + "name": "dashboard", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "bea9389e-51c7-4f9b-937e-781d8e2ba770", + "status": "SLEEPING", + "createdAt": "2026-11-13T00:54:59.597Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "a6e778c7-4c13-48ba-81bd-f3db8c9ec0f0", + "name": "Redis", + "state": "live", + "source": { + "image": "redis:8.2.9", + "repo": null, + "branch": null + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [ + { + "volumeId": "1de4c728-4246-43d0-98e6-41a83cd44672", + "volumeName": "redis-volume", + "mountPath": "/data" + } + ], + "latestDeployment": { + "id": "d11b183e-43bc-450e-b009-30777e4c6a99", + "status": "SUCCESS", + "createdAt": "2026-09-11T03:33:58.784Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "356589e7-d546-4eeb-84d8-6dec0fa40863", + "name": "learn", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "0ec66e42-74a4-4b4a-817c-adbfafc90b2d", + "status": "SLEEPING", + "createdAt": "2026-11-12T03:22:27.956Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "c8bca5d9-eb38-4d3c-9318-40a5b72fe0bd", + "name": "Postgres", + "state": "live", + "source": { + "image": "ghcr.io/railwayapp-templates/postgres-ssl:latest", + "repo": null, + "branch": null + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [ + { + "volumeId": "3dfadc08-5ed0-4470-893a-a15f5667fc66", + "volumeName": "ink-volume", + "mountPath": "/var/lib/postgresql/data" + } + ], + "latestDeployment": { + "id": "a73fde67-df04-42ea-ab77-96e1c5c51909", + "status": "SUCCESS", + "createdAt": "2026-11-03T05:11:34.562Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "99a7baae-d20f-48d1-83a8-f4d0965f26f2", + "name": "worker", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "e5e29a90-fb23-4c1f-927a-c92c15ca70ed", + "status": "SUCCESS", + "createdAt": "2026-11-12T03:22:27.757Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "2655a246-ede9-46b7-a4d1-fce379d985d4", + "name": "support", + "state": "live", + "source": null, + "regions": ["sfo"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "8fa44b29-1dfe-4d77-b3d0-acd3632251c6", + "status": "FAILED", + "createdAt": "2026-09-24T23:29:09.508Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "f2015c97-62cd-4f1b-9144-4c64d13e487b", + "name": "api", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "f25a26d6-dab0-4534-b42a-db10d84f03bc", + "status": "SUCCESS", + "createdAt": "2026-11-13T00:54:07.822Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "2c361c7e-0936-4777-a3a8-31973b08f9c5", + "name": "website", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "main" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "551ab25c-7443-4f53-8fd1-60ec2bb14c0c", + "status": "SLEEPING", + "createdAt": "2026-11-12T03:22:27.695Z", + "url": null + }, + "stagedChangeCount": 0 + } + ], + "volumes": [ + { + "id": "3dfadc08-5ed0-4470-893a-a15f5667fc66", + "name": "ink-volume", + "state": "live", + "region": "us-west2", + "sizeMB": 5000, + "mountedOn": { + "serviceId": "c8bca5d9-eb38-4d3c-9318-40a5b72fe0bd", + "serviceName": "Postgres", + "mountPath": "/var/lib/postgresql/data" + }, + "stagedChangeCount": 0 + }, + { + "id": "1de4c728-4246-43d0-98e6-41a83cd44672", + "name": "redis-volume", + "state": "live", + "region": "us-west2", + "sizeMB": 5000, + "mountedOn": { + "serviceId": "a6e778c7-4c13-48ba-81bd-f3db8c9ec0f0", + "serviceName": "Redis", + "mountPath": "/data" + }, + "stagedChangeCount": 0 + } + ], + "buckets": [], + "sharedVariableNames": [] + }, + "services": { + "api": { + "service": { + "id": "f2015c97-62cd-4f1b-9144-4c64d13e487b", + "name": "api", + "state": "live" + }, + "environment": { + "id": "1902828c-65ae-455c-90c8-5a370b7cedab", + "name": "staging" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "lovat-server-staging.up.railway.app": {} + }, + "privateNetworkEndpoint": "lovat-server" + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/server/**", + "/packages/db/**", + "/.railway/**" + ], + "buildCommand": "", + "buildEnvironment": "V3", + "dockerfilePath": "apps/server/Dockerfile", + "nixpacksPlan": { + "repo": "MangoSwirl/lovat-server" + } + }, + "deploy": { + "startCommand": "sh -c 'export DATABASE_URL=\"$DATABASE_PRIVATE_URL\"; npm --prefix ../../packages/db run db:deploy && exec npm start'", + "healthcheckPath": "/status", + "limitOverride": { + "containers": { + "cpu": 2, + "memoryBytes": 2147483648 + } + }, + "healthcheckTimeout": 1200, + "restartPolicyMaxRetries": 20, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "configFile": "" + }, + "stagedChanges": [], + "variableNames": [ + "AUTH0_DOMAIN", + "BASE_URL", + "CORS_ALLOWED_ORIGINS", + "DATABASE_PRIVATE_URL", + "DATABASE_URL", + "DIRECT_DATABASE_URL", + "LOVAT_SIGNING_KEY", + "LOVAT_WEBSITE", + "NPM_CONFIG_PRODUCTION", + "PIT_DISPLAY_KEY", + "PORT", + "POSTHOG_PROJECT_API_KEY", + "REDIS_URL", + "RESEND_KEY", + "SLACK_APP_ID", + "SLACK_CLIENT_ID", + "SLACK_CLIENT_SECRET", + "SLACK_VERIFICATION_KEY", + "SLACK_WEBHOOK", + "TBA_KEY" + ], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "5db43b64-860e-4a9f-8b6b-6b27ee758194", + "domain": "lovat-server-staging.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "f25a26d6-dab0-4534-b42a-db10d84f03bc", + "status": "SUCCESS", + "createdAt": "2026-11-13T00:54:07.822Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "worker": { + "service": { + "id": "99a7baae-d20f-48d1-83a8-f4d0965f26f2", + "name": "worker", + "state": "live" + }, + "environment": { + "id": "1902828c-65ae-455c-90c8-5a370b7cedab", + "name": "staging" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "privateNetworkEndpoint": "learn-b671070f-ed43-449f-9106-1f2605856b3a" + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/worker/**", + "/packages/db/**", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/worker/Dockerfile" + }, + "deploy": { + "startCommand": "bun index.ts", + "healthcheckPath": "/health", + "healthcheckTimeout": 120, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + }, + "drainingSeconds": 60 + } + }, + "stagedChanges": [], + "variableNames": ["DATABASE_URL", "TBA_KEY", "WORKER_CONCURRENCY"], + "volumes": [], + "domains": { + "serviceDomains": [], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "e5e29a90-fb23-4c1f-927a-c92c15ca70ed", + "status": "SUCCESS", + "createdAt": "2026-11-12T03:22:27.757Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "dashboard": { + "service": { + "id": "7466d74a-228c-43e4-8dfb-28e9d7a5975d", + "name": "dashboard", + "state": "live" + }, + "environment": { + "id": "1902828c-65ae-455c-90c8-5a370b7cedab", + "name": "staging" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/apps/dashboard", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "lovat-dashboard-staging.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": ["/apps/dashboard/**", "/.railway/**"], + "buildEnvironment": "V3", + "dockerfilePath": "Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "cdn": { + "enabled": true + } + }, + "stagedChanges": [], + "variableNames": ["LOVAT_API_BASE", "LOVAT_WEBSITE_URL", "PORT"], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "6a02b62b-fdd7-4c01-af21-e0f903675f6c", + "domain": "lovat-dashboard-staging.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "bea9389e-51c7-4f9b-937e-781d8e2ba770", + "status": "SLEEPING", + "createdAt": "2026-11-13T00:54:59.597Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "website": { + "service": { + "id": "2c361c7e-0936-4777-a3a8-31973b08f9c5", + "name": "website", + "state": "live" + }, + "environment": { + "id": "1902828c-65ae-455c-90c8-5a370b7cedab", + "name": "staging" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "lovat-website-staging.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/website/**", + "/CHANGELOG.md", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/website/Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "cdn": { + "enabled": true + } + }, + "stagedChanges": [], + "variableNames": [ + "LOVAT_API_BASE", + "LOVAT_SIGNING_KEY", + "ORIGIN", + "PORT", + "PUBLIC_DASHBOARD_URL", + "PUBLIC_LEARN_URL", + "PUBLIC_WEBSITE_URL" + ], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "eb71dc27-1c2a-4d1e-abc3-8ae1e7b64e37", + "domain": "lovat-website-staging.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "551ab25c-7443-4f53-8fd1-60ec2bb14c0c", + "status": "SLEEPING", + "createdAt": "2026-11-12T03:22:27.695Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "learn": { + "service": { + "id": "356589e7-d546-4eeb-84d8-6dec0fa40863", + "name": "learn", + "state": "live" + }, + "environment": { + "id": "1902828c-65ae-455c-90c8-5a370b7cedab", + "name": "staging" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "main", + "rootDirectory": "/apps/learn", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "lovat-learn-staging.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": ["/apps/learn/**", "/.railway/**"], + "buildEnvironment": "V3", + "dockerfilePath": "Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "cdn": { + "enabled": true + } + }, + "stagedChanges": [], + "variableNames": ["PORT", "PUBLIC_WEBSITE_URL"], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "6bcc1ed3-4368-4b41-8239-5e29bbaefa11", + "domain": "lovat-learn-staging.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "0ec66e42-74a4-4b4a-817c-adbfafc90b2d", + "status": "SLEEPING", + "createdAt": "2026-11-12T03:22:27.956Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + } + } + }, + "preview128": { + "inventory": { + "project": { + "id": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "name": "lovat", + "workspaceName": "8033 Admin's Projects" + }, + "environment": { + "id": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "name": "lovat-pr-128", + "isEphemeral": true + }, + "staged": null, + "region": null, + "services": [ + { + "id": "99a7baae-d20f-48d1-83a8-f4d0965f26f2", + "name": "worker", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": null, + "stagedChangeCount": 0 + }, + { + "id": "2c361c7e-0936-4777-a3a8-31973b08f9c5", + "name": "website", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "bbbdf529-a857-4de3-b7ff-ec7e0eb3fd96", + "status": "SLEEPING", + "createdAt": "2026-11-13T06:30:36.234Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "c8bca5d9-eb38-4d3c-9318-40a5b72fe0bd", + "name": "Postgres", + "state": "live", + "source": { + "image": "ghcr.io/railwayapp-templates/postgres-ssl:latest", + "repo": null, + "branch": null + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [ + { + "volumeId": "3dfadc08-5ed0-4470-893a-a15f5667fc66", + "volumeName": "ink-volume", + "mountPath": "/var/lib/postgresql/data" + } + ], + "latestDeployment": { + "id": "ccbbcb55-e3ca-498f-8adf-387631b3e6da", + "status": "SUCCESS", + "createdAt": "2026-11-13T06:30:35.957Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "2655a246-ede9-46b7-a4d1-fce379d985d4", + "name": "support", + "state": "live", + "source": null, + "regions": ["sfo"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": null, + "stagedChangeCount": 0 + }, + { + "id": "f2015c97-62cd-4f1b-9144-4c64d13e487b", + "name": "api", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "4c063820-8764-4190-9814-a689df7fe417", + "status": "SUCCESS", + "createdAt": "2026-11-13T06:30:36.218Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "7466d74a-228c-43e4-8dfb-28e9d7a5975d", + "name": "dashboard", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "1ab2fa7e-023e-4463-a573-bab102debd96", + "status": "SLEEPING", + "createdAt": "2026-11-13T06:30:36.241Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "356589e7-d546-4eeb-84d8-6dec0fa40863", + "name": "learn", + "state": "live", + "source": { + "image": null, + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and" + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [], + "latestDeployment": { + "id": "575feabd-6eb6-43e9-8c84-18277c508c32", + "status": "SLEEPING", + "createdAt": "2026-11-13T06:30:36.210Z", + "url": null + }, + "stagedChangeCount": 0 + }, + { + "id": "a6e778c7-4c13-48ba-81bd-f3db8c9ec0f0", + "name": "Redis", + "state": "live", + "source": { + "image": "redis:8.2.9", + "repo": null, + "branch": null + }, + "regions": ["us-west2"], + "numReplicas": 1, + "cronSchedule": null, + "volumeMounts": [ + { + "volumeId": "1de4c728-4246-43d0-98e6-41a83cd44672", + "volumeName": "redis-volume", + "mountPath": "/data" + } + ], + "latestDeployment": { + "id": "df7c6773-5dbb-4c35-99b8-0b9d499eca36", + "status": "SUCCESS", + "createdAt": "2026-11-13T06:30:35.963Z", + "url": null + }, + "stagedChangeCount": 0 + } + ], + "volumes": [ + { + "id": "1de4c728-4246-43d0-98e6-41a83cd44672", + "name": "redis-volume", + "state": "live", + "region": "us-west2", + "sizeMB": 50000, + "mountedOn": { + "serviceId": "a6e778c7-4c13-48ba-81bd-f3db8c9ec0f0", + "serviceName": "Redis", + "mountPath": "/data" + }, + "stagedChangeCount": 0 + }, + { + "id": "3dfadc08-5ed0-4470-893a-a15f5667fc66", + "name": "ink-volume", + "state": "live", + "region": "us-west2", + "sizeMB": 50000, + "mountedOn": { + "serviceId": "c8bca5d9-eb38-4d3c-9318-40a5b72fe0bd", + "serviceName": "Postgres", + "mountPath": "/var/lib/postgresql/data" + }, + "stagedChangeCount": 0 + } + ], + "buckets": [], + "sharedVariableNames": [] + }, + "services": { + "api": { + "service": { + "id": "f2015c97-62cd-4f1b-9144-4c64d13e487b", + "name": "api", + "state": "live" + }, + "environment": { + "id": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "name": "lovat-pr-128" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "api-lovat-pr-128.up.railway.app": {} + }, + "privateNetworkEndpoint": "lovat-server" + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/server/**", + "/packages/db/**", + "/.railway/**" + ], + "buildCommand": "", + "buildEnvironment": "V3", + "dockerfilePath": "apps/server/Dockerfile", + "nixpacksPlan": { + "repo": "MangoSwirl/lovat-server" + } + }, + "deploy": { + "startCommand": "sh -c 'export DATABASE_URL=\"$DATABASE_PRIVATE_URL\"; npm --prefix ../../packages/db run db:deploy && exec npm start'", + "healthcheckPath": "/status", + "limitOverride": { + "containers": { + "cpu": 2, + "memoryBytes": 2147483648 + } + }, + "healthcheckTimeout": 1200, + "restartPolicyMaxRetries": 20, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + }, + "configFile": "" + }, + "stagedChanges": [], + "variableNames": [ + "AUTH0_DOMAIN", + "BASE_URL", + "CORS_ALLOWED_ORIGINS", + "DATABASE_PRIVATE_URL", + "DATABASE_URL", + "DIRECT_DATABASE_URL", + "LOVAT_SIGNING_KEY", + "LOVAT_WEBSITE", + "NPM_CONFIG_PRODUCTION", + "PIT_DISPLAY_KEY", + "PORT", + "POSTHOG_PROJECT_API_KEY", + "REDIS_URL", + "RESEND_KEY", + "SLACK_APP_ID", + "SLACK_CLIENT_ID", + "SLACK_CLIENT_SECRET", + "SLACK_VERIFICATION_KEY", + "SLACK_WEBHOOK", + "TBA_KEY" + ], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "a43013c8-b72c-4a6d-af6b-094114be68e9", + "domain": "api-lovat-pr-128.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "4c063820-8764-4190-9814-a689df7fe417", + "status": "SUCCESS", + "createdAt": "2026-11-13T06:30:36.218Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "worker": { + "service": { + "id": "99a7baae-d20f-48d1-83a8-f4d0965f26f2", + "name": "worker", + "state": "live" + }, + "environment": { + "id": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "name": "lovat-pr-128" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "privateNetworkEndpoint": "learn-b671070f-ed43-449f-9106-1f2605856b3a" + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/worker/**", + "/packages/db/**", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/worker/Dockerfile" + }, + "deploy": { + "startCommand": "bun index.ts", + "healthcheckPath": "/health", + "healthcheckTimeout": 120, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + }, + "drainingSeconds": 60 + } + }, + "stagedChanges": [], + "variableNames": ["DATABASE_URL", "TBA_KEY", "WORKER_CONCURRENCY"], + "volumes": [], + "domains": { + "serviceDomains": [], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": null, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "dashboard": { + "service": { + "id": "7466d74a-228c-43e4-8dfb-28e9d7a5975d", + "name": "dashboard", + "state": "live" + }, + "environment": { + "id": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "name": "lovat-pr-128" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and", + "rootDirectory": "/apps/dashboard", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "dashboard-lovat-pr-128.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": ["/apps/dashboard/**", "/.railway/**"], + "buildEnvironment": "V3", + "dockerfilePath": "Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + } + }, + "stagedChanges": [], + "variableNames": ["LOVAT_API_BASE", "LOVAT_WEBSITE_URL", "PORT"], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "89fd7818-22a0-48bf-8972-abb41371550a", + "domain": "dashboard-lovat-pr-128.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "1ab2fa7e-023e-4463-a573-bab102debd96", + "status": "SLEEPING", + "createdAt": "2026-11-13T06:30:36.241Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "website": { + "service": { + "id": "2c361c7e-0936-4777-a3a8-31973b08f9c5", + "name": "website", + "state": "live" + }, + "environment": { + "id": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "name": "lovat-pr-128" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and", + "rootDirectory": "/", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "website-lovat-pr-128.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": [ + "/apps/website/**", + "/CHANGELOG.md", + "/.railway/**" + ], + "buildEnvironment": "V3", + "dockerfilePath": "apps/website/Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + } + }, + "stagedChanges": [], + "variableNames": [ + "LOVAT_API_BASE", + "LOVAT_SIGNING_KEY", + "ORIGIN", + "PORT", + "PUBLIC_DASHBOARD_URL", + "PUBLIC_LEARN_URL", + "PUBLIC_WEBSITE_URL" + ], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "933ad1f3-42dd-42aa-bccf-fd88f3f14b32", + "domain": "website-lovat-pr-128.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "bbbdf529-a857-4de3-b7ff-ec7e0eb3fd96", + "status": "SLEEPING", + "createdAt": "2026-11-13T06:30:36.234Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + }, + "learn": { + "service": { + "id": "356589e7-d546-4eeb-84d8-6dec0fa40863", + "name": "learn", + "state": "live" + }, + "environment": { + "id": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "name": "lovat-pr-128" + }, + "staged": null, + "config": { + "source": { + "repo": "HighlanderRobotics/lovat", + "branch": "jackshim415/lvt-334-server-redact-request-analytics-and", + "rootDirectory": "/apps/learn", + "checkSuites": false + }, + "networking": { + "serviceDomains": { + "learn-lovat-pr-128.up.railway.app": {} + } + }, + "build": { + "builder": "DOCKERFILE", + "watchPatterns": ["/apps/learn/**", "/.railway/**"], + "buildEnvironment": "V3", + "dockerfilePath": "Dockerfile" + }, + "deploy": { + "healthcheckPath": "/healthz", + "healthcheckTimeout": 120, + "restartPolicyMaxRetries": 3, + "sleepApplication": true, + "useLegacyStacker": false, + "ipv6EgressEnabled": false, + "runtime": "V2", + "multiRegionConfig": { + "us-west2": { + "numReplicas": 1 + } + } + } + }, + "stagedChanges": [], + "variableNames": ["PORT", "PUBLIC_WEBSITE_URL"], + "volumes": [], + "domains": { + "serviceDomains": [ + { + "id": "b13c725b-921d-42e4-9044-f73153744614", + "domain": "learn-lovat-pr-128.up.railway.app", + "targetPort": null + } + ], + "customDomains": [] + }, + "tcpProxies": [], + "latestDeployment": { + "id": "575feabd-6eb6-43e9-8c84-18277c508c32", + "status": "SLEEPING", + "createdAt": "2026-11-13T06:30:36.210Z", + "url": null + }, + "tracing": { + "tracingEnabled": false, + "autoInstrumentationEnabled": false, + "autoInstrumentationActive": false + } + } + } + } + }, + "credentialIsolation": { + "verified": false, + "reason": "Variable values withheld by connected app; only names and provisioned resources are visible." + } +} diff --git a/.railway/evidence/2026-11-12/preview128-plan-summary.json b/.railway/evidence/2026-11-12/preview128-plan-summary.json new file mode 100644 index 00000000..f5a2e712 --- /dev/null +++ b/.railway/evidence/2026-11-12/preview128-plan-summary.json @@ -0,0 +1,46 @@ +{ + "observedDate": "2026-11-12", + "context": { + "projectId": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "projectName": "lovat", + "environmentId": "d42d9835-c01a-48c4-bcd2-424fa61e93c3", + "environmentName": "lovat-pr-128", + "configEtag": "4d1991890e68aaefcbeb49148d9f55bf325ae85ac5513d488f2a1ed22ac3392a" + }, + "ownership": {}, + "baselineChanges": [ + { + "summary": "Update api deploy.limitOverride.containers.cpu, deploy.limitOverride.containers.memoryBytes, deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": [ + "deploy.limitOverride.containers.cpu (2 \u2192 null)", + "deploy.limitOverride.containers.memoryBytes (2147483648 \u2192 null)", + "deploy.sleepApplication (true \u2192 null)" + ] + }, + { + "summary": "Update dashboard deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update website deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update learn deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + } + ], + "baselineDiagnostics": [], + "note": "Read-only plan; no apply, staged patch or deployment was requested.", + "alignedChanges": [], + "alignedDiagnostics": [], + "alignedConfigEtag": "4d1991890e68aaefcbeb49148d9f55bf325ae85ac5513d488f2a1ed22ac3392a" +} diff --git a/.railway/evidence/2026-11-12/production-plan-summary.json b/.railway/evidence/2026-11-12/production-plan-summary.json new file mode 100644 index 00000000..aa3a44bd --- /dev/null +++ b/.railway/evidence/2026-11-12/production-plan-summary.json @@ -0,0 +1,42 @@ +{ + "observedDate": "2026-11-12", + "context": { + "projectId": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "projectName": "lovat", + "environmentId": "9f0088a8-9fe7-4afa-b634-cd1db046f045", + "environmentName": "production", + "configEtag": "836fda7d45c69402d150c376dee636579517a957916eaa058e908dfd19463de8" + }, + "ownership": { + "service.api": "lovat-apps", + "service.dashboard": "lovat-apps", + "service.learn": "lovat-apps", + "service.website": "lovat-apps", + "service.worker": "lovat-apps" + }, + "baselineChanges": [ + { + "summary": "Update dashboard deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update website deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update learn deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + } + ], + "baselineDiagnostics": [], + "note": "Read-only plan; no apply, staged patch or deployment was requested.", + "alignedChanges": [], + "alignedDiagnostics": [], + "alignedConfigEtag": "836fda7d45c69402d150c376dee636579517a957916eaa058e908dfd19463de8" +} diff --git a/.railway/evidence/2026-11-12/staging-plan-summary.json b/.railway/evidence/2026-11-12/staging-plan-summary.json new file mode 100644 index 00000000..3fe44582 --- /dev/null +++ b/.railway/evidence/2026-11-12/staging-plan-summary.json @@ -0,0 +1,88 @@ +{ + "observedDate": "2026-11-12", + "context": { + "projectId": "c210dce8-37af-4bf0-b1e0-7e28b30597c6", + "projectName": "lovat", + "environmentId": "1902828c-65ae-455c-90c8-5a370b7cedab", + "environmentName": "staging", + "configEtag": "507874d54ee1cb60cadf52892e50fe9ee05a26650ed8538be98990de97c694c3" + }, + "ownership": { + "service.api": "lovat-apps", + "service.dashboard": "lovat-apps", + "service.learn": "lovat-apps", + "service.website": "lovat-apps", + "service.worker": "lovat-apps" + }, + "baselineChanges": [ + { + "summary": "Update api source.branch", + "severity": "safe", + "kind": "resource.update", + "details": [ + "source.branch (null \u2192 \"offseason/mock-game-charged-up\")" + ] + }, + { + "summary": "Update api deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update worker source.branch", + "severity": "safe", + "kind": "resource.update", + "details": [ + "source.branch (null \u2192 \"offseason/mock-game-charged-up\")" + ] + }, + { + "summary": "Update dashboard source.branch", + "severity": "safe", + "kind": "resource.update", + "details": [ + "source.branch (null \u2192 \"offseason/mock-game-charged-up\")" + ] + }, + { + "summary": "Update dashboard deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update website source.branch", + "severity": "safe", + "kind": "resource.update", + "details": [ + "source.branch (null \u2192 \"offseason/mock-game-charged-up\")" + ] + }, + { + "summary": "Update website deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + }, + { + "summary": "Update learn source.branch", + "severity": "safe", + "kind": "resource.update", + "details": [ + "source.branch (null \u2192 \"offseason/mock-game-charged-up\")" + ] + }, + { + "summary": "Update learn deploy.sleepApplication", + "severity": "safe", + "kind": "resource.update", + "details": ["deploy.sleepApplication (true \u2192 null)"] + } + ], + "baselineDiagnostics": [], + "note": "Read-only plan; no apply, staged patch or deployment was requested.", + "alignedChanges": [], + "alignedDiagnostics": [], + "alignedConfigEtag": "507874d54ee1cb60cadf52892e50fe9ee05a26650ed8538be98990de97c694c3" +} diff --git a/.railway/evidence/2026-11-12/verification.md b/.railway/evidence/2026-11-12/verification.md new file mode 100644 index 00000000..e52332b7 --- /dev/null +++ b/.railway/evidence/2026-11-12/verification.md @@ -0,0 +1,108 @@ +# Lovat Railway cutover verification — November 12, 2026 + +Read-only inspection used Railway MCP plus Railway CLI **5.62.1**. The project is +`lovat` (`c210dce8-37af-4bf0-b1e0-7e28b30597c6`) in **8033 Admin's Projects**. +The connector's list-projects response omitted this project; direct lookup by +the project ID from GitHub's deployment status links and CLI linking succeeded. +No infrastructure apply, deployment, variable update, resource deletion or DNS +change was performed. Opening the associated application PRs automatically +created Railway preview builds through the existing GitHub integration. + +## Verified state + +| Environment | ID | App source branch | Named partial | Aligned plan | +| ------------ | -------------------------------------- | --------------------------------------------------------- | --------------------------- | ------------ | +| production | `9f0088a8-9fe7-4afa-b634-cd1db046f045` | `main` | `lovat-apps`, all five apps | No changes | +| staging | `1902828c-65ae-455c-90c8-5a370b7cedab` | `main` | `lovat-apps`, all five apps | No changes | +| lovat-pr-128 | `d42d9835-c01a-48c4-bcd2-424fa61e93c3` | `jackshim415/lvt-334-server-redact-request-analytics-and` | Pending adoption | No changes | + +All environments had no pending staged patch at inspection. Production/staging ownership maps +contain exactly `service.api`, `service.worker`, `service.dashboard`, +`service.website` and `service.learn`; databases and storage are outside this +partial. PR #128 has an empty ownership map. Its empty plan confirms matching +inherited settings, **not** explicit preview partial adoption. That adoption +requires a separately reviewed apply and subsequent ownership verification. Legacy Config File is blank on API; the other four apps have no legacy +file configured. All five use Dockerfile builds and include `/.railway/**` in +their watch patterns. API and Worker additionally watch `/packages/db/**`. + +| App | Source root | Dockerfile | Current healthcheck | +| --------- | ----------------- | ------------------------- | ----------------------- | +| api | `/` | `apps/server/Dockerfile` | `/status`, 1200 seconds | +| worker | `/` | `apps/worker/Dockerfile` | `/health`, 120 seconds | +| dashboard | `/apps/dashboard` | `Dockerfile` | `/healthz`, 120 seconds | +| website | `/` | `apps/website/Dockerfile` | `/healthz`, 120 seconds | +| learn | `/apps/learn` | `Dockerfile` | `/healthz`, 120 seconds | + +All apps used one replica in `us-west2` at the November 12 inspection. Dashboard, +Website, and Learn had sleeping enabled in all three environments. API sleeping +was enabled in staging and previews at that inspection. The November 20 audit +also confirmed it was enabled in production, and the current graph preserves it. +Staging and preview API have two CPUs/2 GiB container limits. Worker drains for +60 seconds. Current API start runs Prisma deploy before npm start; Worker does +not run migrations. This verifies the declared migration owner, not safe +coordination across concurrent API releases (LVT-338). + +## Drift fixed in the authoring file + +The baseline plans would have removed web sleeping in production; changed all +five staging sources back to `offseason/mock-game-charged-up`; removed staging +and preview sleeping; and removed the inherited preview API limits. The +accompanying IaC change preserves the observed source/sleeping/limit settings. +Replanned production, staging and PR #128 all return **zero changes and zero +diagnostics**, with no apply requested. See the individual plan summaries for +before/after differences and live config ETags. + +Deployment gates remain disabled in source config (LVT-337). API readiness and +termination are proposed in LVT-339; applying those settings requires deploying +the new image first. This audit intentionally leaves those live settings as +observed. No source root, watch path, variable set or resource identity changed. + +## Storage, credentials and remaining verification + +Production and staging each show Postgres and Redis volumes at 5 GB; PR #128 +shows its environment-provisioned volumes at 50 GB. Railway resource IDs are +project-scoped logical identities reused across environments, so matching IDs +alone do **not** establish shared data or isolation. Production additionally has +the `Postgres-PITR` bucket in `sjc`; its presence alone does not establish backup +coverage, retention or successful recovery. LVT-346 owns restore evidence. + +The OAuth connector exposes variable names only, with `valuesRedacted: true`. +No secret values were fetched or committed. The required variable names are +preserved in the partial, but PostgreSQL/Redis connection targets, credentials +and sandbox integration isolation remain **unverified**. An administrator must +verify their references/targets and sandbox credentials before running writes, +provider integrations, database copies or dependency fault injection in preview. + +PR #128's API, Website, Dashboard and Learn deployment checks passed during this +inspection. Its Worker had no preview deployment at the snapshot point. A +passing deployment or static health endpoint does not prove dependency health, +import freshness or isolation. No manual production traffic, fault injection, +restore or rollback exercise was performed. Keep LVT-336 open until the remaining +isolation, preview ownership and rollback evidence is recorded; named-partial +adoption itself is confirmed for production and staging. + +## Reproduce without applying changes + +From the repository root, with Node 22.20.0 and the pinned `.railway` tooling: + +```sh +railway link --project c210dce8-37af-4bf0-b1e0-7e28b30597c6 --environment production --service api +railway config partials list --json +railway config plan --json +# Repeat linking/planning for staging. +railway link --project c210dce8-37af-4bf0-b1e0-7e28b30597c6 --environment lovat-pr-128 --service api +railway config partials list --json +RAILWAY_CONFIG_BRANCH=jackshim415/lvt-334-server-redact-request-analytics-and railway config plan --json +``` + +Run CLI commands directly from the shell. The SDK's native-evaluation version +guard uses environment variable `_` to find the executable; a Python subprocess +wrapper left it pointing at Python and incorrectly reported an old Railway CLI. +Direct commands succeeded. Do not bypass the version requirement or upgrade the +pinned tooling to compensate for that wrapper behavior. + +The [live inventory](live-inventory.json) includes config, deployment IDs, +networking and variable **names** for rollback/reference. The plan summaries +exclude graph variable values. Before using a snapshot for recovery, recheck the +current project/environment, ETag, active deployment and staged changes. Use the +normal reviewed IaC procedure and preserve resources outside this partial. diff --git a/.railway/railway.ts b/.railway/railway.ts index 68939107..d6f821ee 100644 --- a/.railway/railway.ts +++ b/.railway/railway.ts @@ -5,7 +5,8 @@ export const partial = "lovat-apps"; // Railway omits platform defaults from stored config: sleeping defaults to false, // restart policy to ON_FAILURE, and retry count to 10. Do not re-declare those -// defaults, which otherwise produce a perpetual no-op plan. +// defaults, which otherwise produce a perpetual no-op plan. Explicit sleeping +// settings below preserve the non-default live production/staging/preview policy. export default defineRailway((ctx) => { if (!ctx.environment?.trim()) { throw new Error( @@ -14,12 +15,14 @@ export default defineRailway((ctx) => { } const production = ctx.environment === "production"; + const waitForCi = process.env.RAILWAY_WAIT_FOR_CI; + if (waitForCi !== undefined && waitForCi !== "true" && waitForCi !== "false") { + throw new Error("RAILWAY_WAIT_FOR_CI must be true or false"); + } const branch = production ? "main" : (process.env.RAILWAY_CONFIG_BRANCH ?? - (ctx.environment === "staging" - ? "offseason/mock-game-charged-up" - : undefined)); + (ctx.environment === "staging" ? "main" : undefined)); if (!branch?.trim()) { throw new Error( @@ -31,7 +34,7 @@ export default defineRailway((ctx) => { github("HighlanderRobotics/lovat", { branch, rootDirectory, - checkSuites: false, + checkSuites: waitForCi === "true", }); const keep = (...names: string[]) => Object.fromEntries(names.map((name) => [name, preserve()])); @@ -46,6 +49,7 @@ export default defineRailway((ctx) => { }, deploy: { healthcheckPath: "/healthz", + sleepApplication: true, healthcheckTimeout: 120, restartPolicyMaxRetries: 3, }, @@ -61,6 +65,7 @@ export default defineRailway((ctx) => { }, deploy: { healthcheckPath: "/healthz", + sleepApplication: true, healthcheckTimeout: 120, restartPolicyMaxRetries: 3, }, @@ -109,9 +114,10 @@ export default defineRailway((ctx) => { }, }, restartPolicyMaxRetries: 20, + sleepApplication: true, healthcheckPath: "/status", healthcheckTimeout: 1200, - ...(ctx.environment === "staging" + ...(!production ? { limitOverride: { containers: { cpu: 2, memoryBytes: 2147483648 } } } : {}), }, @@ -136,6 +142,7 @@ export default defineRailway((ctx) => { }, deploy: { healthcheckPath: "/healthz", + sleepApplication: true, healthcheckTimeout: 120, restartPolicyMaxRetries: 3, }, diff --git a/scripts/ci-results.mjs b/scripts/ci-results.mjs index 0c7370d6..6960c9ca 100644 --- a/scripts/ci-results.mjs +++ b/scripts/ci-results.mjs @@ -10,6 +10,7 @@ export const jobSelectors = { "dashboard-browser": "dashboard", website: "website", "website-browser": "website", + "web-images": "web-images", learn: "learn", contracts: "contracts", }; @@ -25,7 +26,7 @@ const reportJobs = new Set([ ]); export function requireCiResults(needs, publishReports = false) { const errors = []; - for (const job of ["changes", "structure", "railway-config"]) + for (const job of ["changes", "structure", "railway-config", "codeql"]) if (needs[job]?.result !== "success") errors.push(`${job} must succeed`); const selected = needs.changes?.outputs ?? {}; for (const [job, selector] of Object.entries(jobSelectors)) { diff --git a/scripts/ci-results.test.mjs b/scripts/ci-results.test.mjs index 42a938d9..f17fe24c 100644 --- a/scripts/ci-results.test.mjs +++ b/scripts/ci-results.test.mjs @@ -6,6 +6,7 @@ function fixture(selected = []) { changes: { result: "success", outputs: {} }, structure: { result: "success" }, "railway-config": { result: "success" }, + codeql: { result: "success" }, }; for (const [job, selector] of Object.entries(jobSelectors)) { needs.changes.outputs[selector] = String(selected.includes(selector)); @@ -25,6 +26,16 @@ test("an applicable suite cannot silently skip, fail, cancel, or disappear", () assert.throws(() => requireCiResults(needs), /contracts/); } }); +test("image failures and unavailable CodeQL results fail the deployment gate", () => { + for (const result of ["skipped", "failure", "cancelled", undefined]) { + const needs = fixture(["web-images"]); + needs["web-images"].result = result; + assert.throws(() => requireCiResults(needs), /web-images/); + needs["web-images"].result = "success"; + needs.codeql.result = result; + assert.throws(() => requireCiResults(needs), /codeql/); + } +}); test("main publication requires all report producers even without changed files", () => { assert.throws(() => requireCiResults(fixture(), true), /required/); const needs = fixture([ diff --git a/scripts/ci-selection.test.mjs b/scripts/ci-selection.test.mjs index 1cc804a6..62aa5432 100644 --- a/scripts/ci-selection.test.mjs +++ b/scripts/ci-selection.test.mjs @@ -24,9 +24,20 @@ test("Server and database changes run consumer contracts while isolated web edit } const jobs = selectJobs(["apps/website/src/routes/+page.svelte"]); assert.equal(jobs.website, true); + assert.equal(jobs["web-images"], true); assert.equal(jobs.contracts, false); assert.equal(jobs.collection, false); }); +test("hosting smoke tests run for deployment configuration and image test edits", () => { + for (const path of [ + ".railway/railway.ts", + ".github/workflows/web-hosting.yml", + "scripts/test-web-hosting.mjs", + ]) { + assert.equal(selectJobs([path])["web-images"], true, path); + } + assert.equal(selectJobs(["apps/worker/src/worker.ts"])["web-images"], false); +}); test("workflow and selector changes choose all affected jobs", () => { for (const path of [".github/workflows/ci.yml", ".github/ci-filters.json"]) for (const selected of Object.values(selectJobs([path]))) diff --git a/scripts/codeql-matrix.mjs b/scripts/codeql-matrix.mjs index a77aaf4f..5e858683 100644 --- a/scripts/codeql-matrix.mjs +++ b/scripts/codeql-matrix.mjs @@ -49,10 +49,9 @@ export function codeqlMatrix(changes, forceAll = false) { ) { throw new TypeError("Changed CodeQL filters must be an array of strings"); } - const all = forceAll || changes.includes("workflow"); return { include: jobs - .filter((job) => all || changes.includes(job.filter)) + .filter((job) => forceAll || changes.includes(job.filter)) .map(({ filter: _filter, ...job }) => job), }; } diff --git a/scripts/codeql-matrix.test.mjs b/scripts/codeql-matrix.test.mjs index 0b6e62ff..895b886f 100644 --- a/scripts/codeql-matrix.test.mjs +++ b/scripts/codeql-matrix.test.mjs @@ -1,4 +1,5 @@ import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; import test from "node:test"; import { codeqlMatrix } from "./codeql-matrix.mjs"; @@ -24,7 +25,12 @@ test("platform changes select only that platform", () => { ["java-kotlin"], ); }); -test("workflow edits outside CodeQL select only the Actions analysis", () => { +test("workflow edits select only the Actions analysis, including edits to CodeQL itself", () => { + const filters = JSON.parse( + readFileSync(new URL("../.github/codeql-filters.json", import.meta.url)), + ); + assert.equal(Object.hasOwn(filters, "workflow"), false); + assert(filters.actions.includes(".github/workflows/**")); assert.deepEqual( codeqlMatrix(["actions"]).include.map((job) => job.language), ["actions"], @@ -40,8 +46,8 @@ test("combined changes select each analysis once", () => { 2, ); }); -test("CodeQL configuration changes and explicit manual scans select all six analyses", () => { - assert.equal(codeqlMatrix(["workflow"]).include.length, 6); +test("only a manual full scan overrides language path selection", () => { + assert.deepEqual(codeqlMatrix(["workflow"]), { include: [] }); assert.equal(codeqlMatrix([], true).include.length, 6); }); test("invalid filter output fails rather than silently omitting analysis", () => {