Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/e2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion packages/app/infra/index.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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]
Expand Down Expand Up @@ -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,
},
}

Expand Down
5 changes: 2 additions & 3 deletions packages/app/src/server/api/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand All @@ -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(
Expand Down
Loading