diff --git a/docs/e2e.md b/docs/e2e.md index 27e94a5e..9b5cfa52 100644 --- a/docs/e2e.md +++ b/docs/e2e.md @@ -52,7 +52,8 @@ Do not edit them here. `models.ts` points official AI SDK providers at the Cloud - The decision model answers `agent.act`, `agent.assert`, and the affected-test filter. `E2E_DECISION_MODEL` selects it. The default is Cloudflare Clef. -- The language model writes text values. `E2E_LANGUAGE_MODEL` selects it. +- The language model writes text values. `E2E_LANGUAGE_MODEL` selects it. The default is + `meta/muse-ember-1.0`. Provide `CF_AI_GATEWAY_E2E_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`, and optionally `CF_AI_GATEWAY_E2E_ID` (default `default`). This is the account's existing default gateway, not diff --git a/packages/app/infra/index.ts b/packages/app/infra/index.ts index 20f2f29e..f8cce40a 100644 --- a/packages/app/infra/index.ts +++ b/packages/app/infra/index.ts @@ -1,3 +1,4 @@ +import { readFileSync } from "node:fs" import { dirname, resolve } from "node:path" import { fileURLToPath } from "node:url" import type { MonitorExecWorkerResource, MonitorTriggerWorkerResource } from "@solstatus/api/infra" @@ -8,6 +9,9 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = dirname(__filename) const appRoot = resolve(__dirname, "..") +// Tegami writes the published version to VERSION. The sidebar reads it from here. +const releaseVersion = readFileSync(resolve(appRoot, "../../VERSION"), "utf8").trim() + // Better Auth signs sessions with this value. An empty secret is not safe, so the stack stops. function requiredEnv(name: string) { const value = process.env[name] @@ -55,7 +59,7 @@ export function createApp( MONITOR_EXEC_NAME: `${resPrefix}-monitor-exec`, MONITOR_TRIGGER_NAME: `${resPrefix}-monitor-trigger`, CLOUDFLARE_ACCOUNT_ID: cloudflareAccountId, - VITE_APP_VERSION: process.env.VITE_APP_VERSION || "2.1.0-dev", + VITE_APP_VERSION: process.env.VITE_APP_VERSION || releaseVersion, }, } diff --git a/packages/app/src/server/api/handlers.ts b/packages/app/src/server/api/handlers.ts index f647fd3b..00508e49 100644 --- a/packages/app/src/server/api/handlers.ts +++ b/packages/app/src/server/api/handlers.ts @@ -105,8 +105,7 @@ const toMonitor = (row: typeof EndpointMonitorsTable.$inferSelect) => new Endpoi const toCheck = (row: typeof UptimeChecksTable.$inferSelect) => new UptimeCheck(row) -// A new monitor writes its first check right away. A local D1 read can lose that race, so the -// list read retries a few times before it reports a failure. +// Retry a thrown list read. A successful page, including an empty one, is not retried. const listRetry = { times: 4, schedule: Schedule.exponential("100 millis") } const EndpointMonitorHandlers = HttpApiBuilder.group(Api, "endpointMonitors", (handlers) => @@ -123,7 +122,7 @@ const EndpointMonitorHandlers = HttpApiBuilder.group(Api, "endpointMonitors", (h ) } - // Build the predicate per query. A shared SQL fragment is not safe to run twice. + // Build the predicate per query. A shared Drizzle predicate is not safe to run twice. const where = () => query.search ? or(