Public: anyone can read this; the crew can change it.
The forge runs from one bun build bundle (no runtime readdirSync of its own source), measured with and without --bytecode #16911
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/16853-the-forge-runs-from-one-bun-build-bundle → main 0 commits fork 1 thread · 1 unresolved
35 files
changed +2247
−346
- AGENTS.md
- docs/features/bundle.md
- scripts/boot-measure.ts
- scripts/gate.ts
- scripts/own-source.ts
- src/chaos/run.ts
- src/core/schema.ts
- src/generated/duties.ts
- src/generated/marks.ts
- src/generated/migrations.ts
- src/generated/screens.ts
- src/http/route_marks.ts
- src/kernel/data_home.ts
- src/kernel/migrate.ts
- src/maintain/duty_files.ts
- src/maintain/registry.ts
- src/release/boot.ts
- src/release/launch.ts
- src/runner/main.ts
- src/snapshot/drill_child.ts
- src/snapshot/restore.ts
- src/spawn/supervisor.ts
- src/tui/screens/entries.ts
- src/tui/screens/entry_mark.ts
- test/boot-idle-memory.test.ts
- test/bundle-boot.test.ts
- test/duty-roster.test.ts
- test/helpers/bundle-boot.ts
- test/helpers/read-source-dirs.ts
- test/launch-no-tla.test.ts
- test/own-source.test.ts
- test/palette-entries.test.ts
- test/route-marks-roster.test.ts
- test/schema-migrations.test.ts
- test/worker-database-opens.test.ts
AGENTS.md +1 −1
| @@ -4,7 +4,7 @@ Read `CLAUDE.md` first: it is the rulebook for agents editing this repo. | ||
| 4 | 4 | |
| 5 | 5 | Read the guide first, in this order: `docs/guide-what-a-forge-is.md`, `docs/guide-first-app.md`, `docs/guide-tell-the-crew.md`, `docs/guide-ship-and-undo.md`, `docs/guide-your-apps.md`, `docs/guide-hosting.md`, `docs/guide-own-ai.md`, `docs/guide-agents.md`, `docs/guide-backups-moving.md`, `docs/guide-settings.md`, `docs/guide-when-wrong.md`. That is the spine (ordered in `src/view/guide.ts`, served at `/docs` with search, listed first by /llms.txt): eleven pages, each at most 300 words and 60 lines, every command, path and link in them checked by `test/guide.test.ts`. A feature's `docs/features/<name>.md` is its reference; open it with front matter `topic:` and `row:` (#14248), which builds its row in `docs/features/README.md`, the index every spine page links; never edit that list by hand (`test/feature-orphans.test.ts`). The section list of `docs/DESIGN.md` is built the same way: a section file under `docs/design/sections/` opens with `order:` and `nest:` front matter and its first heading is its title (#14354, `test/design-spine.test.ts`). `docs/THREATS.md` is an index: each adversary's `## ` section is a file in `docs/threats/`, linked from the index in order; a new protection goes in its adversary's file, a new adversary is a new file and a new link. `readThreats` in `src/core/threats.ts` puts them back together for the Resilience page, `/docs/THREATS.md` and the tests (#15005, `test/threats-sections-linked.test.ts`). |
| 6 | 6 | |
| 7 | A maintenance duty is a file in `src/maintain/duties/` that exports `duty`; `src/maintain/registry.ts` builds the roster from that directory, never edit a list by hand (#14355, `test/duty-roster.test.ts`). | |
| 7 | A maintenance duty is a file in `src/maintain/duties/` that exports `duty`; `src/maintain/registry.ts` takes the roster from `src/generated/duties.ts`. Never edit a generated file by hand: after adding a duty file, a migration, a route mark (`src/http/marks/`) or a screen that exports a palette entry, run `bun scripts/own-source.ts` and commit `src/generated/` (the forge reads none of its own source directories at boot, so one `bun build --minify` bundle can run it; #16853, #14355, `test/own-source.test.ts`, `test/duty-roster.test.ts`). | |
| 8 | 8 | |
| 9 | 9 | A pull that adds a feature file (a page, a screen, a how-to, a new module, vendored code) names the issue it serves as `#123` in a commit message; the gate refuses one that names none, and counts nothing else: whether the pull is whole and single-purpose is the reviewer's judgment, asking for a split only when each part could be used alone. |
| 10 | 10 | README.md is capped: a new feature's how-to goes in `docs/features/<name>.md`, not a new README section. |
docs/features/bundle.md added +17
| @@ -0,0 +1,17 @@ | ||
| 1 | --- | |
| 2 | topic: What a forge is | |
| 3 | row: Run the forge as one bundle | |
| 4 | --- | |
| 5 | # Run the forge as one bundle | |
| 6 | ||
| 7 | `bun build --minify --target bun --outdir out src/main.ts` makes one `out/main.js`; `bun out/main.js` boots and answers | |
| 8 | `/healthz` and `/` (`test/bundle-boot.test.ts`). The forge reads none of its own source directories at boot: the | |
| 9 | migrations, the route marks, the maintenance duties and the screens' palette entries are listed in `src/generated/`, | |
| 10 | written by `bun scripts/own-source.ts` (run it after adding one of those files and commit the result; | |
| 11 | `test/own-source.test.ts` fails when it is stale). | |
| 12 | ||
| 13 | It is an option: `forge.json` still runs `bun run src/main.ts`. The bundle does not yet carry what is read from the tree | |
| 14 | beside the code (the page and look workers, the docs search index, assets built from source), so those say so in the log | |
| 15 | and degrade. `bun scripts/boot-measure.ts` prints cold start, warm start and idle RSS for the source, the bundle and the | |
| 16 | `--bytecode` build. `--bytecode` cannot make a `main.js` (it needs `--format=cjs`, and `main.ts` awaits at the top | |
| 17 | level), so that row is a compiled executable. |
scripts/boot-measure.ts added +64
| @@ -0,0 +1,64 @@ | ||
| 1 | /** | |
| 2 | * Cold start, warm start and idle RSS of the forge as source, as one `bun build --minify` bundle, | |
| 3 | * and as that bundle with `--bytecode` (#16853). Start is the time from spawn to `/healthz` | |
| 4 | * answering 200; the first run of a mode is cold (nothing of it in the page cache or Bun's | |
| 5 | * transpile cache), the rest warm; RSS is read from /proc a few seconds after it is up. | |
| 6 | * Usage: `bun scripts/boot-measure.ts [runs]`. Linux only. | |
| 7 | */ | |
| 8 | import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; | |
| 9 | import { tmpdir } from "node:os"; | |
| 10 | import { join } from "node:path"; | |
| 11 | import { freePort } from "../src/kernel/port.ts"; | |
| 12 | import { bundleBoot } from "../test/helpers/bundle-boot.ts"; | |
| 13 | import { productionEnv } from "../test/helpers/production-env.ts"; | |
| 14 | ||
| 15 | const ROOT = join(import.meta.dir, ".."); | |
| 16 | const rss = (pid: number): number => Number(/^VmRSS:\s+(\d+) kB/m.exec(readFileSync(`/proc/${pid}/status`, "utf8"))?.[1] ?? 0) / 1024; | |
| 17 | ||
| 18 | async function once(argv: string[], work: string): Promise<{ startMs: number; rssMiB: number }> { | |
| 19 | const data = join(work, `d${Math.random().toString(36).slice(2)}`); | |
| 20 | mkdirSync(data, { recursive: true }); | |
| 21 | const caFile = join(work, "ca.crt"); | |
| 22 | writeFileSync(caFile, "-----BEGIN CERTIFICATE-----\nMIIBfake\n-----END CERTIFICATE-----\n"); | |
| 23 | const port = await freePort(); | |
| 24 | const env: Record<string, string> = { PATH: process.env["PATH"] ?? "", ...productionEnv({ dataDir: data, port, sshPort: await freePort(), caFile }) }; | |
| 25 | for (const key of ["HOME", "TMPDIR", "FORGE_CELLS", "FORGE_TEST_SOCKET"]) if (process.env[key]) env[key] = process.env[key]!; | |
| 26 | const t0 = performance.now(); | |
| 27 | const child = Bun.spawn(argv, { cwd: work, env, stdout: "inherit", stderr: "inherit" }); | |
| 28 | try { | |
| 29 | for (;;) { | |
| 30 | const ok = await fetch(`http://127.0.0.1:${port}/healthz`).then((r) => r.status === 200, () => false); | |
| 31 | if (ok) break; | |
| 32 | if (performance.now() - t0 > 60_000) throw new Error("no answer in 60 s"); | |
| 33 | await Bun.sleep(20); // real-timer: polling a real boot | |
| 34 | } | |
| 35 | const startMs = performance.now() - t0; | |
| 36 | await Bun.sleep(8_000); // real-timer: RSS settles over seconds | |
| 37 | return { startMs, rssMiB: rss(child.pid) }; | |
| 38 | } finally { | |
| 39 | child.kill("SIGKILL"); | |
| 40 | await child.exited; | |
| 41 | } | |
| 42 | } | |
| 43 | ||
| 44 | if (import.meta.main) { | |
| 45 | const runs = Number(process.argv[2] ?? 3); | |
| 46 | const work = mkdtempSync(join(tmpdir(), "forge-boot-measure-")); | |
| 47 | try { | |
| 48 | const plain = bundleBoot(join(work, "plain"), false); | |
| 49 | const bytecode = bundleBoot(join(work, "bytecode"), true); | |
| 50 | const modes: [string, string[]][] = [ | |
| 51 | ["source", [process.execPath, join(ROOT, "src/main.ts")]], | |
| 52 | ["bundle", plain], | |
| 53 | ["bundle --bytecode (compiled)", bytecode], | |
| 54 | ]; | |
| 55 | for (const [name, argv] of modes) { | |
| 56 | const got: { startMs: number; rssMiB: number }[] = []; | |
| 57 | for (let i = 0; i < runs; i++) got.push(await once(argv, work)); | |
| 58 | const warm = got.slice(1); | |
| 59 | console.log(`${name}: cold ${got[0]!.startMs.toFixed(0)} ms, warm ${warm.map((g) => g.startMs.toFixed(0)).join("/")} ms, idle RSS ${got.map((g) => g.rssMiB.toFixed(0)).join("/")} MiB`); | |
| 60 | } | |
| 61 | } finally { | |
| 62 | rmSync(work, { recursive: true, force: true }); | |
| 63 | } | |
| 64 | } |
scripts/gate.ts +1
| @@ -51,6 +51,7 @@ export const EXCLUDED: readonly Exclusion[] = []; | ||
| 51 | 51 | * short: an entry is a debt with an owner, not a home. |
| 52 | 52 | */ |
| 53 | 53 | export const SLOW: readonly Exclusion[] = [ |
| 54 | { file: "test/bundle-boot.test.ts", reason: "bundles src/main.ts with bun build --minify and boots the one file with no source beside it; 2.6 s a test under full-suite load", issue: 16853 }, | |
| 54 | 55 | { file: "test/boot-idle-memory.test.ts", reason: "boots the real src/main.ts and waits real seconds for its RSS to settle; 8.6 s a test", issue: 16851 }, |
| 55 | 56 | { file: "test/landsim.test.ts", reason: "runs seeded landing simulations over real repositories and queues; 16 s a file alone, 28.8 s and 2.8 s a test under full-suite load", issue: 13765 }, |
| 56 | 57 | { file: "test/propose-via-fork.test.ts", reason: "runs two real forges and a fake origin, each test pushing real git branches through a fork; 11 s a file alone, 23.9 s and 4.4 s a test under full-suite load", issue: 15193 }, |
scripts/own-source.ts added +88
| @@ -0,0 +1,88 @@ | ||
| 1 | /** | |
| 2 | * The forge's own source lists, written down at build time (#16853). The forge used to read three | |
| 3 | * of its own directories when it booted (`core/migrations`, `http/marks`, `tui/screens`), which a | |
| 4 | * single `bun build` bundle cannot do: the files are inside it, not beside it. This writes | |
| 5 | * `src/generated/{migrations,marks,screens}.ts`, a static import of each, and `--check` fails when | |
| 6 | * the file on disk is not what the directories now say. A pull that adds a migration, a mark or a | |
| 7 | * screen runs `bun scripts/own-source.ts` and commits the result; `test/own-source.test.ts` holds | |
| 8 | * it to that. | |
| 9 | */ | |
| 10 | import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs"; | |
| 11 | import { join } from "node:path"; | |
| 12 | import { dutyFiles } from "../src/maintain/duty_files.ts"; | |
| 13 | import { entryFiles } from "../src/tui/screens/entry_mark.ts"; | |
| 14 | ||
| 15 | const SRC = join(import.meta.dir, "..", "src"); | |
| 16 | export const OUT = join(SRC, "generated"); | |
| 17 | ||
| 18 | const HEADER = "// Generated by `bun scripts/own-source.ts`; do not edit. `test/own-source.test.ts` fails when it is\n// stale."; | |
| 19 | ||
| 20 | /** | |
| 21 | * The text each generated file should hold, by file name, from the directories as they are now. | |
| 22 | * Three files, not one: the screens import half the forge, and a list that imported them with | |
| 23 | * the migrations would start a cycle (the marks are read by modules the screens load). | |
| 24 | */ | |
| 25 | export function generate(src: string = SRC): Record<string, string> { | |
| 26 | const migrations = readdirSync(join(src, "core", "migrations")).sort(); | |
| 27 | const marks = readdirSync(join(src, "http", "marks")).filter((f) => f.endsWith(".json")).sort(); | |
| 28 | const screens = entryFiles(join(src, "tui", "screens")); | |
| 29 | const duties = dutyFiles(new URL(`file://${join(src, "maintain", "duties")}/`)); | |
| 30 | return { | |
| 31 | "duties.ts": [ | |
| 32 | HEADER, | |
| 33 | "", | |
| 34 | "/**\n * Each duty file's name and a loader for it, in name order; loaded on call because a duty reaches\n * the runner, which imports the roster.\n */", | |
| 35 | "export const DUTY_MODULES: readonly (readonly [string, () => { duty?: unknown }])[] = [", | |
| 36 | ...duties.map((f) => ` [${JSON.stringify(f)}, () => require("../maintain/duties/${f}")],`), | |
| 37 | "];", | |
| 38 | "", | |
| 39 | ].join("\n"), | |
| 40 | "migrations.ts": [ | |
| 41 | HEADER, | |
| 42 | "", | |
| 43 | ...migrations.map((f, i) => `import m${i} from "../core/migrations/${f}";`), | |
| 44 | "", | |
| 45 | "/** Each migration file's name and its default export, in name order. */", | |
| 46 | "export const MIGRATION_MODULES: readonly (readonly [string, unknown])[] = [", | |
| 47 | ...migrations.map((f, i) => ` [${JSON.stringify(f)}, m${i}],`), | |
| 48 | "];", | |
| 49 | "", | |
| 50 | ].join("\n"), | |
| 51 | "marks.ts": [ | |
| 52 | HEADER, | |
| 53 | "", | |
| 54 | ...marks.map((f, i) => `import k${i} from "../http/marks/${f}";`), | |
| 55 | "", | |
| 56 | "/** Each file of `http/marks/`, parsed, in name order. */", | |
| 57 | "export const MARK_FILES: readonly unknown[] = [", | |
| 58 | ...marks.map((_, i) => ` k${i},`), | |
| 59 | "];", | |
| 60 | "", | |
| 61 | ].join("\n"), | |
| 62 | "screens.ts": [ | |
| 63 | HEADER, | |
| 64 | "", | |
| 65 | ...screens.map(([f], i) => `import * as s${i} from "../tui/screens/${f}";`), | |
| 66 | "", | |
| 67 | "/** Each screen file that declares palette entries: its module and the export names. */", | |
| 68 | "export const SCREEN_MODULES: readonly (readonly [Record<string, unknown>, readonly string[]])[] = [", | |
| 69 | ...screens.map(([, names], i) => ` [s${i}, ${JSON.stringify(names)}],`), | |
| 70 | "];", | |
| 71 | "", | |
| 72 | ].join("\n"), | |
| 73 | }; | |
| 74 | } | |
| 75 | ||
| 76 | if (import.meta.main) { | |
| 77 | const want = generate(); | |
| 78 | if (process.argv.includes("--check")) { | |
| 79 | const stale = Object.entries(want).filter(([name, text]) => !existsSync(join(OUT, name)) || readFileSync(join(OUT, name), "utf8") !== text); | |
| 80 | if (stale.length > 0) { | |
| 81 | console.error(`src/generated/${stale.map(([n]) => n).join(", ")} is stale: run \`bun scripts/own-source.ts\` and commit it`); | |
| 82 | process.exit(1); | |
| 83 | } | |
| 84 | } else { | |
| 85 | mkdirSync(OUT, { recursive: true }); | |
| 86 | for (const [name, text] of Object.entries(want)) writeFileSync(join(OUT, name), text); | |
| 87 | } | |
| 88 | } |
src/chaos/run.ts +15 −12
| @@ -86,15 +86,18 @@ export async function chaos( | ||
| 86 | 86 | return { seed, faults: order, findings, log }; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | if (import.meta.main) { | |
| 90 | const flag = (name: string): string | undefined => { | |
| 91 | const at = process.argv.indexOf(name); | |
| 92 | return at === -1 ? undefined : process.argv[at + 1]; | |
| 93 | }; | |
| 94 | const seed = Number(flag("--seed") ?? Date.now() % 2 ** 32); | |
| 95 | const rounds = Number(flag("--rounds") ?? 12); | |
| 96 | const night = await chaos(seed, rounds); | |
| 97 | console.log(night.log.join("\n")); | |
| 98 | if (process.argv.includes("--report")) console.log(await fileReport(night)); | |
| 99 | process.exit(night.findings.length === 0 ? 0 : 1); | |
| 100 | } | |
| 89 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 90 | // (#16853). | |
| 91 | if (import.meta.main) | |
| 92 | void (async () => { | |
| 93 | const flag = (name: string): string | undefined => { | |
| 94 | const at = process.argv.indexOf(name); | |
| 95 | return at === -1 ? undefined : process.argv[at + 1]; | |
| 96 | }; | |
| 97 | const seed = Number(flag("--seed") ?? Date.now() % 2 ** 32); | |
| 98 | const rounds = Number(flag("--rounds") ?? 12); | |
| 99 | const night = await chaos(seed, rounds); | |
| 100 | console.log(night.log.join("\n")); | |
| 101 | if (process.argv.includes("--report")) console.log(await fileReport(night)); | |
| 102 | process.exit(night.findings.length === 0 ? 0 : 1); | |
| 103 | })(); |
src/core/schema.ts +3 −5
| @@ -15,12 +15,10 @@ | ||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | import type { Database } from "bun:sqlite"; |
| 18 | import { join } from "node:path"; | |
| 19 | import { type MigrationFile, readMigrations } from "../kernel/migrate.ts"; | |
| 18 | import { MIGRATION_MODULES } from "../generated/migrations.ts"; | |
| 19 | import { type MigrationFile, checkMigrations } from "../kernel/migrate.ts"; | |
| 20 | 20 | |
| 21 | export const migrationFiles: readonly MigrationFile[] = readMigrations( | |
| 22 | join(import.meta.dir, "migrations"), | |
| 23 | ); | |
| 21 | export const migrationFiles: readonly MigrationFile[] = checkMigrations(MIGRATION_MODULES); | |
| 24 | 22 | |
| 25 | 23 | export const migrations: readonly string[] = migrationFiles.map((m) => m.sql); |
| 26 | 24 |
src/generated/duties.ts added +37
| @@ -0,0 +1,37 @@ | ||
| 1 | // Generated by `bun scripts/own-source.ts`; do not edit. `test/own-source.test.ts` fails when it is | |
| 2 | // stale. | |
| 3 | ||
| 4 | /** | |
| 5 | * Each duty file's name and a loader for it, in name order; loaded on call because a duty reaches | |
| 6 | * the runner, which imports the roster. | |
| 7 | */ | |
| 8 | export const DUTY_MODULES: readonly (readonly [string, () => { duty?: unknown }])[] = [ | |
| 9 | ["account_purge.ts", () => require("../maintain/duties/account_purge.ts")], | |
| 10 | ["backup_age.ts", () => require("../maintain/duties/backup_age.ts")], | |
| 11 | ["backup_growth.ts", () => require("../maintain/duties/backup_growth.ts")], | |
| 12 | ["chapter_stall.ts", () => require("../maintain/duties/chapter_stall.ts")], | |
| 13 | ["cloud_watch.ts", () => require("../maintain/duties/cloud_watch.ts")], | |
| 14 | ["daily_proof.ts", () => require("../maintain/duties/daily_proof.ts")], | |
| 15 | ["dead_doc_paths.ts", () => require("../maintain/duties/dead_doc_paths.ts")], | |
| 16 | ["deepsec_sweep.ts", () => require("../maintain/duties/deepsec_sweep.ts")], | |
| 17 | ["disk_free.ts", () => require("../maintain/duties/disk_free.ts")], | |
| 18 | ["edge_kept.ts", () => require("../maintain/duties/edge_kept.ts")], | |
| 19 | ["edge_resilience.ts", () => require("../maintain/duties/edge_resilience.ts")], | |
| 20 | ["efficiency_watcher.ts", () => require("../maintain/duties/efficiency_watcher.ts")], | |
| 21 | ["flaky_tests.ts", () => require("../maintain/duties/flaky_tests.ts")], | |
| 22 | ["flow_keeper.ts", () => require("../maintain/duties/flow_keeper.ts")], | |
| 23 | ["merged_branches.ts", () => require("../maintain/duties/merged_branches.ts")], | |
| 24 | ["one_click_drill.ts", () => require("../maintain/duties/one_click_drill.ts")], | |
| 25 | ["pinned_lifetimes.ts", () => require("../maintain/duties/pinned_lifetimes.ts")], | |
| 26 | ["preview_dirs.ts", () => require("../maintain/duties/preview_dirs.ts")], | |
| 27 | ["red_apps.ts", () => require("../maintain/duties/red_apps.ts")], | |
| 28 | ["rule_watcher.ts", () => require("../maintain/duties/rule_watcher.ts")], | |
| 29 | ["slow_tests.ts", () => require("../maintain/duties/slow_tests.ts")], | |
| 30 | ["stale_branches.ts", () => require("../maintain/duties/stale_branches.ts")], | |
| 31 | ["stale_issues.ts", () => require("../maintain/duties/stale_issues.ts")], | |
| 32 | ["stale_pulls.ts", () => require("../maintain/duties/stale_pulls.ts")], | |
| 33 | ["untested_sources.ts", () => require("../maintain/duties/untested_sources.ts")], | |
| 34 | ["v1_proven.ts", () => require("../maintain/duties/v1_proven.ts")], | |
| 35 | ["visitor_retention.ts", () => require("../maintain/duties/visitor_retention.ts")], | |
| 36 | ["wait_split.ts", () => require("../maintain/duties/wait_split.ts")], | |
| 37 | ]; |
src/generated/marks.ts added +395
| @@ -0,0 +1,395 @@ | ||
| 1 | // Generated by `bun scripts/own-source.ts`; do not edit. `test/own-source.test.ts` fails when it is | |
| 2 | // stale. | |
| 3 | ||
| 4 | import k0 from "../http/marks/admin.json"; | |
| 5 | import k1 from "../http/marks/agents.json"; | |
| 6 | import k2 from "../http/marks/api-v1-admin.json"; | |
| 7 | import k3 from "../http/marks/api-v1-agents.json"; | |
| 8 | import k4 from "../http/marks/api-v1-app-templates.json"; | |
| 9 | import k5 from "../http/marks/api-v1-apps.json"; | |
| 10 | import k6 from "../http/marks/api-v1-asked.json"; | |
| 11 | import k7 from "../http/marks/api-v1-asks.json"; | |
| 12 | import k8 from "../http/marks/api-v1-boards.json"; | |
| 13 | import k9 from "../http/marks/api-v1-broker.json"; | |
| 14 | import k10 from "../http/marks/api-v1-builds.json"; | |
| 15 | import k11 from "../http/marks/api-v1-cache.json"; | |
| 16 | import k12 from "../http/marks/api-v1-changelog.json"; | |
| 17 | import k13 from "../http/marks/api-v1-cloud.json"; | |
| 18 | import k14 from "../http/marks/api-v1-codes.json"; | |
| 19 | import k15 from "../http/marks/api-v1-config.json"; | |
| 20 | import k16 from "../http/marks/api-v1-contribute.json"; | |
| 21 | import k17 from "../http/marks/api-v1-conversation-confirms.json"; | |
| 22 | import k18 from "../http/marks/api-v1-conversation-tokens.json"; | |
| 23 | import k19 from "../http/marks/api-v1-conversation.json"; | |
| 24 | import k20 from "../http/marks/api-v1-conversations.json"; | |
| 25 | import k21 from "../http/marks/api-v1-credit.json"; | |
| 26 | import k22 from "../http/marks/api-v1-crew.json"; | |
| 27 | import k23 from "../http/marks/api-v1-devices.json"; | |
| 28 | import k24 from "../http/marks/api-v1-drills.json"; | |
| 29 | import k25 from "../http/marks/api-v1-explore.json"; | |
| 30 | import k26 from "../http/marks/api-v1-family.json"; | |
| 31 | import k27 from "../http/marks/api-v1-features.json"; | |
| 32 | import k28 from "../http/marks/api-v1-feed.json"; | |
| 33 | import k29 from "../http/marks/api-v1-first-admin.json"; | |
| 34 | import k30 from "../http/marks/api-v1-flags.json"; | |
| 35 | import k31 from "../http/marks/api-v1-fleet.json"; | |
| 36 | import k32 from "../http/marks/api-v1-flow.json"; | |
| 37 | import k33 from "../http/marks/api-v1-forge-templates.json"; | |
| 38 | import k34 from "../http/marks/api-v1-forge.json"; | |
| 39 | import k35 from "../http/marks/api-v1-forges.json"; | |
| 40 | import k36 from "../http/marks/api-v1-front.json"; | |
| 41 | import k37 from "../http/marks/api-v1-health.json"; | |
| 42 | import k38 from "../http/marks/api-v1-heartbeat.json"; | |
| 43 | import k39 from "../http/marks/api-v1-here.json"; | |
| 44 | import k40 from "../http/marks/api-v1-keeper.json"; | |
| 45 | import k41 from "../http/marks/api-v1-maintenance.json"; | |
| 46 | import k42 from "../http/marks/api-v1-map.json"; | |
| 47 | import k43 from "../http/marks/api-v1-migrate.json"; | |
| 48 | import k44 from "../http/marks/api-v1-offers.json"; | |
| 49 | import k45 from "../http/marks/api-v1-openapi.json.json"; | |
| 50 | import k46 from "../http/marks/api-v1-orgs.json"; | |
| 51 | import k47 from "../http/marks/api-v1-packs.json"; | |
| 52 | import k48 from "../http/marks/api-v1-passport.json"; | |
| 53 | import k49 from "../http/marks/api-v1-places.json"; | |
| 54 | import k50 from "../http/marks/api-v1-plans.json"; | |
| 55 | import k51 from "../http/marks/api-v1-proof.json"; | |
| 56 | import k52 from "../http/marks/api-v1-reach.json"; | |
| 57 | import k53 from "../http/marks/api-v1-release.json"; | |
| 58 | import k54 from "../http/marks/api-v1-releases.json"; | |
| 59 | import k55 from "../http/marks/api-v1-repos.json"; | |
| 60 | import k56 from "../http/marks/api-v1-returns.json"; | |
| 61 | import k57 from "../http/marks/api-v1-runner.json"; | |
| 62 | import k58 from "../http/marks/api-v1-search.json"; | |
| 63 | import k59 from "../http/marks/api-v1-secrets.json"; | |
| 64 | import k60 from "../http/marks/api-v1-sessions.json"; | |
| 65 | import k61 from "../http/marks/api-v1-share.json"; | |
| 66 | import k62 from "../http/marks/api-v1-slash.json"; | |
| 67 | import k63 from "../http/marks/api-v1-start.json"; | |
| 68 | import k64 from "../http/marks/api-v1-status.json"; | |
| 69 | import k65 from "../http/marks/api-v1-telemetry.json"; | |
| 70 | import k66 from "../http/marks/api-v1-templates.json"; | |
| 71 | import k67 from "../http/marks/api-v1-thoughts.json"; | |
| 72 | import k68 from "../http/marks/api-v1-timers.json"; | |
| 73 | import k69 from "../http/marks/api-v1-tokens.json"; | |
| 74 | import k70 from "../http/marks/api-v1-usage.json"; | |
| 75 | import k71 from "../http/marks/api-v1-user.json"; | |
| 76 | import k72 from "../http/marks/api-v1-users.json"; | |
| 77 | import k73 from "../http/marks/api-v1-version.json"; | |
| 78 | import k74 from "../http/marks/api-v1.json"; | |
| 79 | import k75 from "../http/marks/api.json"; | |
| 80 | import k76 from "../http/marks/apple-touch-icon-precomposed.png.json"; | |
| 81 | import k77 from "../http/marks/apple-touch-icon.png.json"; | |
| 82 | import k78 from "../http/marks/apps.json"; | |
| 83 | import k79 from "../http/marks/asked.json"; | |
| 84 | import k80 from "../http/marks/asks.json"; | |
| 85 | import k81 from "../http/marks/assets.json"; | |
| 86 | import k82 from "../http/marks/audit.csv.json"; | |
| 87 | import k83 from "../http/marks/audit.json"; | |
| 88 | import k84 from "../http/marks/big.json"; | |
| 89 | import k85 from "../http/marks/board.json"; | |
| 90 | import k86 from "../http/marks/boards.json"; | |
| 91 | import k87 from "../http/marks/bring.json"; | |
| 92 | import k88 from "../http/marks/broker.json"; | |
| 93 | import k89 from "../http/marks/changelog.atom.json"; | |
| 94 | import k90 from "../http/marks/changelog.json"; | |
| 95 | import k91 from "../http/marks/claim.json"; | |
| 96 | import k92 from "../http/marks/cloud.json"; | |
| 97 | import k93 from "../http/marks/contract.json"; | |
| 98 | import k94 from "../http/marks/contribute.json"; | |
| 99 | import k95 from "../http/marks/csp-report.json"; | |
| 100 | import k96 from "../http/marks/dash.json"; | |
| 101 | import k97 from "../http/marks/data.json"; | |
| 102 | import k98 from "../http/marks/dataset.json"; | |
| 103 | import k99 from "../http/marks/deploy-to.json"; | |
| 104 | import k100 from "../http/marks/design.json"; | |
| 105 | import k101 from "../http/marks/desk.json"; | |
| 106 | import k102 from "../http/marks/displays.json"; | |
| 107 | import k103 from "../http/marks/docs.json"; | |
| 108 | import k104 from "../http/marks/edge.json"; | |
| 109 | import k105 from "../http/marks/edition.json"; | |
| 110 | import k106 from "../http/marks/events.json"; | |
| 111 | import k107 from "../http/marks/explore.atom.json"; | |
| 112 | import k108 from "../http/marks/explore.json"; | |
| 113 | import k109 from "../http/marks/explore.json.json"; | |
| 114 | import k110 from "../http/marks/family.json"; | |
| 115 | import k111 from "../http/marks/favicon.ico.json"; | |
| 116 | import k112 from "../http/marks/feed.json"; | |
| 117 | import k113 from "../http/marks/feed.json.json"; | |
| 118 | import k114 from "../http/marks/first-admin.json"; | |
| 119 | import k115 from "../http/marks/fleet.json"; | |
| 120 | import k116 from "../http/marks/flow.json"; | |
| 121 | import k117 from "../http/marks/forge.json"; | |
| 122 | import k118 from "../http/marks/forges.json"; | |
| 123 | import k119 from "../http/marks/front.json"; | |
| 124 | import k120 from "../http/marks/funnel.json"; | |
| 125 | import k121 from "../http/marks/go.json"; | |
| 126 | import k122 from "../http/marks/health.json"; | |
| 127 | import k123 from "../http/marks/home.json"; | |
| 128 | import k124 from "../http/marks/hooks.json"; | |
| 129 | import k125 from "../http/marks/icons.json"; | |
| 130 | import k126 from "../http/marks/infra.json"; | |
| 131 | import k127 from "../http/marks/join.json"; | |
| 132 | import k128 from "../http/marks/live.json"; | |
| 133 | import k129 from "../http/marks/llms-full.txt.json"; | |
| 134 | import k130 from "../http/marks/llms.txt.json"; | |
| 135 | import k131 from "../http/marks/login.json"; | |
| 136 | import k132 from "../http/marks/logout.json"; | |
| 137 | import k133 from "../http/marks/maintenance-json.json"; | |
| 138 | import k134 from "../http/marks/maintenance.json"; | |
| 139 | import k135 from "../http/marks/manifest.webmanifest.json"; | |
| 140 | import k136 from "../http/marks/map.json"; | |
| 141 | import k137 from "../http/marks/mcp.json"; | |
| 142 | import k138 from "../http/marks/measure.json"; | |
| 143 | import k139 from "../http/marks/metrics.json"; | |
| 144 | import k140 from "../http/marks/migrate.json"; | |
| 145 | import k141 from "../http/marks/new.json"; | |
| 146 | import k142 from "../http/marks/next.json"; | |
| 147 | import k143 from "../http/marks/notes.json"; | |
| 148 | import k144 from "../http/marks/now.json"; | |
| 149 | import k145 from "../http/marks/oauth.json"; | |
| 150 | import k146 from "../http/marks/oembed.json"; | |
| 151 | import k147 from "../http/marks/offers.json"; | |
| 152 | import k148 from "../http/marks/offline.json"; | |
| 153 | import k149 from "../http/marks/og.json"; | |
| 154 | import k150 from "../http/marks/openapi.json.json"; | |
| 155 | import k151 from "../http/marks/opensearch.xml.json"; | |
| 156 | import k152 from "../http/marks/organizations.json"; | |
| 157 | import k153 from "../http/marks/origins.json"; | |
| 158 | import k154 from "../http/marks/owner.atom.json"; | |
| 159 | import k155 from "../http/marks/owner.json"; | |
| 160 | import k156 from "../http/marks/packs.json"; | |
| 161 | import k157 from "../http/marks/peek.json"; | |
| 162 | import k158 from "../http/marks/pinned.json"; | |
| 163 | import k159 from "../http/marks/pipeline.json"; | |
| 164 | import k160 from "../http/marks/plugins.json"; | |
| 165 | import k161 from "../http/marks/pricing.json"; | |
| 166 | import k162 from "../http/marks/privacy.json"; | |
| 167 | import k163 from "../http/marks/recover.json"; | |
| 168 | import k164 from "../http/marks/releases.json"; | |
| 169 | import k165 from "../http/marks/releases.json.json"; | |
| 170 | import k166 from "../http/marks/repos.json"; | |
| 171 | import k167 from "../http/marks/resilience.json"; | |
| 172 | import k168 from "../http/marks/review.json"; | |
| 173 | import k169 from "../http/marks/robots.txt.json"; | |
| 174 | import k170 from "../http/marks/root.json"; | |
| 175 | import k171 from "../http/marks/runs.json"; | |
| 176 | import k172 from "../http/marks/script-error.json"; | |
| 177 | import k173 from "../http/marks/search.json"; | |
| 178 | import k174 from "../http/marks/security.json"; | |
| 179 | import k175 from "../http/marks/settings.json"; | |
| 180 | import k176 from "../http/marks/sign-in.json"; | |
| 181 | import k177 from "../http/marks/signin.json"; | |
| 182 | import k178 from "../http/marks/signup.json"; | |
| 183 | import k179 from "../http/marks/sitemap.xml.json"; | |
| 184 | import k180 from "../http/marks/status.json"; | |
| 185 | import k181 from "../http/marks/sw.js.json"; | |
| 186 | import k182 from "../http/marks/system.json"; | |
| 187 | import k183 from "../http/marks/talk.json"; | |
| 188 | import k184 from "../http/marks/tell.json"; | |
| 189 | import k185 from "../http/marks/templates.json"; | |
| 190 | import k186 from "../http/marks/templates.json.json"; | |
| 191 | import k187 from "../http/marks/terms.json"; | |
| 192 | import k188 from "../http/marks/theme.json"; | |
| 193 | import k189 from "../http/marks/toolbar-lab.js.json"; | |
| 194 | import k190 from "../http/marks/toolbar-lab.json"; | |
| 195 | import k191 from "../http/marks/verify.json"; | |
| 196 | import k192 from "../http/marks/welcome.json"; | |
| 197 | import k193 from "../http/marks/well-known.json"; | |
| 198 | ||
| 199 | /** Each file of `http/marks/`, parsed, in name order. */ | |
| 200 | export const MARK_FILES: readonly unknown[] = [ | |
| 201 | k0, | |
| 202 | k1, | |
| 203 | k2, | |
| 204 | k3, | |
| 205 | k4, | |
| 206 | k5, | |
| 207 | k6, | |
| 208 | k7, | |
| 209 | k8, | |
| 210 | k9, | |
| 211 | k10, | |
| 212 | k11, | |
| 213 | k12, | |
| 214 | k13, | |
| 215 | k14, | |
| 216 | k15, | |
| 217 | k16, | |
| 218 | k17, | |
| 219 | k18, | |
| 220 | k19, | |
| 221 | k20, | |
| 222 | k21, | |
| 223 | k22, | |
| 224 | k23, | |
| 225 | k24, | |
| 226 | k25, | |
| 227 | k26, | |
| 228 | k27, | |
| 229 | k28, | |
| 230 | k29, | |
| 231 | k30, | |
| 232 | k31, | |
| 233 | k32, | |
| 234 | k33, | |
| 235 | k34, | |
| 236 | k35, | |
| 237 | k36, | |
| 238 | k37, | |
| 239 | k38, | |
| 240 | k39, | |
| 241 | k40, | |
| 242 | k41, | |
| 243 | k42, | |
| 244 | k43, | |
| 245 | k44, | |
| 246 | k45, | |
| 247 | k46, | |
| 248 | k47, | |
| 249 | k48, | |
| 250 | k49, | |
| 251 | k50, | |
| 252 | k51, | |
| 253 | k52, | |
| 254 | k53, | |
| 255 | k54, | |
| 256 | k55, | |
| 257 | k56, | |
| 258 | k57, | |
| 259 | k58, | |
| 260 | k59, | |
| 261 | k60, | |
| 262 | k61, | |
| 263 | k62, | |
| 264 | k63, | |
| 265 | k64, | |
| 266 | k65, | |
| 267 | k66, | |
| 268 | k67, | |
| 269 | k68, | |
| 270 | k69, | |
| 271 | k70, | |
| 272 | k71, | |
| 273 | k72, | |
| 274 | k73, | |
| 275 | k74, | |
| 276 | k75, | |
| 277 | k76, | |
| 278 | k77, | |
| 279 | k78, | |
| 280 | k79, | |
| 281 | k80, | |
| 282 | k81, | |
| 283 | k82, | |
| 284 | k83, | |
| 285 | k84, | |
| 286 | k85, | |
| 287 | k86, | |
| 288 | k87, | |
| 289 | k88, | |
| 290 | k89, | |
| 291 | k90, | |
| 292 | k91, | |
| 293 | k92, | |
| 294 | k93, | |
| 295 | k94, | |
| 296 | k95, | |
| 297 | k96, | |
| 298 | k97, | |
| 299 | k98, | |
| 300 | k99, | |
| 301 | k100, | |
| 302 | k101, | |
| 303 | k102, | |
| 304 | k103, | |
| 305 | k104, | |
| 306 | k105, | |
| 307 | k106, | |
| 308 | k107, | |
| 309 | k108, | |
| 310 | k109, | |
| 311 | k110, | |
| 312 | k111, | |
| 313 | k112, | |
| 314 | k113, | |
| 315 | k114, | |
| 316 | k115, | |
| 317 | k116, | |
| 318 | k117, | |
| 319 | k118, | |
| 320 | k119, | |
| 321 | k120, | |
| 322 | k121, | |
| 323 | k122, | |
| 324 | k123, | |
| 325 | k124, | |
| 326 | k125, | |
| 327 | k126, | |
| 328 | k127, | |
| 329 | k128, | |
| 330 | k129, | |
| 331 | k130, | |
| 332 | k131, | |
| 333 | k132, | |
| 334 | k133, | |
| 335 | k134, | |
| 336 | k135, | |
| 337 | k136, | |
| 338 | k137, | |
| 339 | k138, | |
| 340 | k139, | |
| 341 | k140, | |
| 342 | k141, | |
| 343 | k142, | |
| 344 | k143, | |
| 345 | k144, | |
| 346 | k145, | |
| 347 | k146, | |
| 348 | k147, | |
| 349 | k148, | |
| 350 | k149, | |
| 351 | k150, | |
| 352 | k151, | |
| 353 | k152, | |
| 354 | k153, | |
| 355 | k154, | |
| 356 | k155, | |
| 357 | k156, | |
| 358 | k157, | |
| 359 | k158, | |
| 360 | k159, | |
| 361 | k160, | |
| 362 | k161, | |
| 363 | k162, | |
| 364 | k163, | |
| 365 | k164, | |
| 366 | k165, | |
| 367 | k166, | |
| 368 | k167, | |
| 369 | k168, | |
| 370 | k169, | |
| 371 | k170, | |
| 372 | k171, | |
| 373 | k172, | |
| 374 | k173, | |
| 375 | k174, | |
| 376 | k175, | |
| 377 | k176, | |
| 378 | k177, | |
| 379 | k178, | |
| 380 | k179, | |
| 381 | k180, | |
| 382 | k181, | |
| 383 | k182, | |
| 384 | k183, | |
| 385 | k184, | |
| 386 | k185, | |
| 387 | k186, | |
| 388 | k187, | |
| 389 | k188, | |
| 390 | k189, | |
| 391 | k190, | |
| 392 | k191, | |
| 393 | k192, | |
| 394 | k193, | |
| 395 | ]; |
src/generated/migrations.ts added +883
| @@ -0,0 +1,883 @@ | ||
| 1 | // Generated by `bun scripts/own-source.ts`; do not edit. `test/own-source.test.ts` fails when it is | |
| 2 | // stale. | |
| 3 | ||
| 4 | import m0 from "../core/migrations/0001-foundation.ts"; | |
| 5 | import m1 from "../core/migrations/0002-conversations.ts"; | |
| 6 | import m2 from "../core/migrations/0003-pull-requests.ts"; | |
| 7 | import m3 from "../core/migrations/0004-forks.ts"; | |
| 8 | import m4 from "../core/migrations/0005-organizations-and-teams.ts"; | |
| 9 | import m5 from "../core/migrations/0006-ssh-public-keys.ts"; | |
| 10 | import m6 from "../core/migrations/0007-per-user-interface-preferences.ts"; | |
| 11 | import m7 from "../core/migrations/0008-origins.ts"; | |
| 12 | import m8 from "../core/migrations/0009-oauth-for-origins.ts"; | |
| 13 | import m9 from "../core/migrations/0010-a-short-link-for-a.ts"; | |
| 14 | import m10 from "../core/migrations/0011-counts-on-a-list.ts"; | |
| 15 | import m11 from "../core/migrations/0012-the-indexes-a-busy-forge.ts"; | |
| 16 | import m12 from "../core/migrations/0013-review-states.ts"; | |
| 17 | import m13 from "../core/migrations/0014-apps.ts"; | |
| 18 | import m14 from "../core/migrations/0015-an-app-s-environment.ts"; | |
| 19 | import m15 from "../core/migrations/0016-a-paused-run.ts"; | |
| 20 | import m16 from "../core/migrations/0017-checks.ts"; | |
| 21 | import m17 from "../core/migrations/0018-a-run-s-lease.ts"; | |
| 22 | import m18 from "../core/migrations/0019-how-many-turns-an-agent.ts"; | |
| 23 | import m19 from "../core/migrations/0020-issues-that-depend-on-issues.ts"; | |
| 24 | import m20 from "../core/migrations/0021-a-repository-can-run-on.ts"; | |
| 25 | import m21 from "../core/migrations/0022-the-decision-ledger.ts"; | |
| 26 | import m22 from "../core/migrations/0023-the-look.ts"; | |
| 27 | import m23 from "../core/migrations/0024-a-variable-has-a-scope.ts"; | |
| 28 | import m24 from "../core/migrations/0025-what-a-running-app-said.ts"; | |
| 29 | import m25 from "../core/migrations/0026-subscriptions.ts"; | |
| 30 | import m26 from "../core/migrations/0027-the-moment-a-deploy-started.ts"; | |
| 31 | import m27 from "../core/migrations/0028-a-failed-check-s-own.ts"; | |
| 32 | import m28 from "../core/migrations/0029-a-third-width.ts"; | |
| 33 | import m29 from "../core/migrations/0030-take-it-back.ts"; | |
| 34 | import m30 from "../core/migrations/0031-a-look-knows-which-page.ts"; | |
| 35 | import m31 from "../core/migrations/0032-an-app-s-own-domains.ts"; | |
| 36 | import m32 from "../core/migrations/0033-where-a-repository-s-next.ts"; | |
| 37 | import m33 from "../core/migrations/0034-forge-level-secrets.ts"; | |
| 38 | import m34 from "../core/migrations/0035-what-a-viewer-did-with.ts"; | |
| 39 | import m35 from "../core/migrations/0036-a-share.ts"; | |
| 40 | import m36 from "../core/migrations/0037-the-usage-ledger.ts"; | |
| 41 | import m37 from "../core/migrations/0038-a-subscription-s-standing.ts"; | |
| 42 | import m38 from "../core/migrations/0039-whether-the-agent-s-shell.ts"; | |
| 43 | import m39 from "../core/migrations/0040-a-fleet-operation-s-receipt.ts"; | |
| 44 | import m40 from "../core/migrations/0041-the-meter.ts"; | |
| 45 | import m41 from "../core/migrations/0042-every-credential-is-a-subscription.ts"; | |
| 46 | import m42 from "../core/migrations/0043-an-interrupted-run-is-not.ts"; | |
| 47 | import m43 from "../core/migrations/0044-why-an-issue-closed.ts"; | |
| 48 | import m44 from "../core/migrations/0045-oauth-clients-registered-dynamically.ts"; | |
| 49 | import m45 from "../core/migrations/0046-which-address-the-forge-s.ts"; | |
| 50 | import m46 from "../core/migrations/0047-a-report-from-outside.ts"; | |
| 51 | import m47 from "../core/migrations/0048-an-account-the-owner-suspended.ts"; | |
| 52 | import m48 from "../core/migrations/0049-the-asks-ledger.ts"; | |
| 53 | import m49 from "../core/migrations/0050-outsiders-may-trigger-the-crew.ts"; | |
| 54 | import m50 from "../core/migrations/0051-the-front-page-s-picks.ts"; | |
| 55 | import m51 from "../core/migrations/0052-a-whole-life-budget-on.ts"; | |
| 56 | import m52 from "../core/migrations/0053-whether-an-account-s-email.ts"; | |
| 57 | import m53 from "../core/migrations/0054-the-people-a-private-app.ts"; | |
| 58 | import m54 from "../core/migrations/0055-a-hold-on-a-pull.ts"; | |
| 59 | import m55 from "../core/migrations/0056-what-an-account-has-spent.ts"; | |
| 60 | import m56 from "../core/migrations/0057-spend-reported-from-outside.ts"; | |
| 61 | import m57 from "../core/migrations/0058-a-signed-in-browser-has.ts"; | |
| 62 | import m58 from "../core/migrations/0059-every-message-the-forge-sent.ts"; | |
| 63 | import m59 from "../core/migrations/0060-who-a-picture-was-taken.ts"; | |
| 64 | import m60 from "../core/migrations/0061-an-agent-never-owns-an.ts"; | |
| 65 | import m61 from "../core/migrations/0062-only-an-agent-is-ever.ts"; | |
| 66 | import m62 from "../core/migrations/0063-the-forge-s-capacity.ts"; | |
| 67 | import m63 from "../core/migrations/0064-the-front-page-s-settings.ts"; | |
| 68 | import m64 from "../core/migrations/0065-a-sealed-issue.ts"; | |
| 69 | import m65 from "../core/migrations/0066-a-milestone-a-person-watches.ts"; | |
| 70 | import m66 from "../core/migrations/0067-every-fork-a-person-made.ts"; | |
| 71 | import m67 from "../core/migrations/0068-the-run-a-comment-was.ts"; | |
| 72 | import m68 from "../core/migrations/0069-an-event-s-place-in.ts"; | |
| 73 | import m69 from "../core/migrations/0070-a-sealed-repository-is-never.ts"; | |
| 74 | import m70 from "../core/migrations/0071-an-optional-anthropic-compatible-api.ts"; | |
| 75 | import m71 from "../core/migrations/0072-when-a-mirror-lost-its.ts"; | |
| 76 | import m72 from "../core/migrations/0073-authorization-codes-for-the-mcp.ts"; | |
| 77 | import m73 from "../core/migrations/0074-a-look-a-person-attached.ts"; | |
| 78 | import m74 from "../core/migrations/0075-a-limb-s-place-among.ts"; | |
| 79 | import m75 from "../core/migrations/0076-the-sentinel-s-memory.ts"; | |
| 80 | import m76 from "../core/migrations/0077-openid-connect-over-the-same.ts"; | |
| 81 | import m77 from "../core/migrations/0078-variants.ts"; | |
| 82 | import m78 from "../core/migrations/0079-degraded-history.ts"; | |
| 83 | import m79 from "../core/migrations/0080-restore-drills.ts"; | |
| 84 | import m80 from "../core/migrations/0081-thoughts.ts"; | |
| 85 | import m81 from "../core/migrations/0082-passkeys.ts"; | |
| 86 | import m82 from "../core/migrations/0083-releases.ts"; | |
| 87 | import m83 from "../core/migrations/0084-placements.ts"; | |
| 88 | import m84 from "../core/migrations/0085-a-standing-rule-per-repository.ts"; | |
| 89 | import m85 from "../core/migrations/0086-what-a-production-deploy-carries.ts"; | |
| 90 | import m86 from "../core/migrations/0087-supersession-and-repeats.ts"; | |
| 91 | import m87 from "../core/migrations/0088-what-the-machine-used.ts"; | |
| 92 | import m88 from "../core/migrations/0089-a-parked-pull.ts"; | |
| 93 | import m89 from "../core/migrations/0090-a-green-check-proven.ts"; | |
| 94 | import m90 from "../core/migrations/0091-where-a-check-ran.ts"; | |
| 95 | import m91 from "../core/migrations/20261015000100-plans-need-a-nod.ts"; | |
| 96 | import m92 from "../core/migrations/20261015090000-a-repository-put-away.ts"; | |
| 97 | import m93 from "../core/migrations/20261015090000-feed-chips.ts"; | |
| 98 | import m94 from "../core/migrations/20261015120000-check-base-tip.ts"; | |
| 99 | import m95 from "../core/migrations/20261015230000-a-domain-drill.ts"; | |
| 100 | import m96 from "../core/migrations/20261015230532-telemetry-read.ts"; | |
| 101 | import m97 from "../core/migrations/20261016090000-sentinel-kept-settings.ts"; | |
| 102 | import m98 from "../core/migrations/20261016120000-kept-is-a-person-s.ts"; | |
| 103 | import m99 from "../core/migrations/20261016120000-proposal-state.ts"; | |
| 104 | import m100 from "../core/migrations/20261016130000-sign-in-with-the-parent.ts"; | |
| 105 | import m101 from "../core/migrations/20261016130000-usage-count.ts"; | |
| 106 | import m102 from "../core/migrations/20261016140000-a-model-grant.ts"; | |
| 107 | import m103 from "../core/migrations/20261016140000-drill-counts.ts"; | |
| 108 | import m104 from "../core/migrations/20261016140000-flag-use.ts"; | |
| 109 | import m105 from "../core/migrations/20261016140000-machine-temperature.ts"; | |
| 110 | import m106 from "../core/migrations/20261016150000-memory-hour.ts"; | |
| 111 | import m107 from "../core/migrations/20261016160000-cloud-audit.ts"; | |
| 112 | import m108 from "../core/migrations/20261016160000-proposal-tokens.ts"; | |
| 113 | import m109 from "../core/migrations/20261016170000-pull-run-grant.ts"; | |
| 114 | import m110 from "../core/migrations/20261016170000-upstream-proposals.ts"; | |
| 115 | import m111 from "../core/migrations/20261016180000-account-ceiling.ts"; | |
| 116 | import m112 from "../core/migrations/20261016180000-signin-only-code.ts"; | |
| 117 | import m113 from "../core/migrations/20261016190000-member.ts"; | |
| 118 | import m114 from "../core/migrations/20261016200000-invite.ts"; | |
| 119 | import m115 from "../core/migrations/20261017195831-ceiling-reserved.ts"; | |
| 120 | import m116 from "../core/migrations/20261018100000-incident-remembered.ts"; | |
| 121 | import m117 from "../core/migrations/20261018110000-limb-replan.ts"; | |
| 122 | import m118 from "../core/migrations/20261019120000-drill-phases.ts"; | |
| 123 | import m119 from "../core/migrations/20261019130000-crew-teams.ts"; | |
| 124 | import m120 from "../core/migrations/20261019130000-run-model-prompt.ts"; | |
| 125 | import m121 from "../core/migrations/20261019140000-route-timing.ts"; | |
| 126 | import m122 from "../core/migrations/20261019150000-page-vitals.ts"; | |
| 127 | import m123 from "../core/migrations/20261019160000-app-vitals.ts"; | |
| 128 | import m124 from "../core/migrations/20261019160000-issue-teams.ts"; | |
| 129 | import m125 from "../core/migrations/20261019170000-edge-links.ts"; | |
| 130 | import m126 from "../core/migrations/20261019180000-board-pins.ts"; | |
| 131 | import m127 from "../core/migrations/20261019180000-parent-link.ts"; | |
| 132 | import m128 from "../core/migrations/20261020010000-anon-spawns.ts"; | |
| 133 | import m129 from "../core/migrations/20261020090000-webhook-refusal.ts"; | |
| 134 | import m130 from "../core/migrations/20261020100000-preview-findings.ts"; | |
| 135 | import m131 from "../core/migrations/20261020110000-a-look-has-a-theme.ts"; | |
| 136 | import m132 from "../core/migrations/20261020120000-app-vitals-five.ts"; | |
| 137 | import m133 from "../core/migrations/20261020130000-machine-serving.ts"; | |
| 138 | import m134 from "../core/migrations/20261020180000-origin-repo-size.ts"; | |
| 139 | import m135 from "../core/migrations/20261020180000-repo-provenance.ts"; | |
| 140 | import m136 from "../core/migrations/20261021090000-egress-grants.ts"; | |
| 141 | import m137 from "../core/migrations/20261021100000-migrate-mirror-target.ts"; | |
| 142 | import m138 from "../core/migrations/20261021120000-crew-devices.ts"; | |
| 143 | import m139 from "../core/migrations/20261022090000-milestone-origin.ts"; | |
| 144 | import m140 from "../core/migrations/20261022100000-repo-upstream.ts"; | |
| 145 | import m141 from "../core/migrations/20261022110000-run-tokens.ts"; | |
| 146 | import m142 from "../core/migrations/20261022120000-flow-indexes.ts"; | |
| 147 | import m143 from "../core/migrations/20261022130000-app-notes.ts"; | |
| 148 | import m144 from "../core/migrations/20261022140000-note-pictures.ts"; | |
| 149 | import m145 from "../core/migrations/20261025090000-upstream-check-history.ts"; | |
| 150 | import m146 from "../core/migrations/20261025120000-run-error-line.ts"; | |
| 151 | import m147 from "../core/migrations/20261026090000-event-actor-index.ts"; | |
| 152 | import m148 from "../core/migrations/20261026120000-front-epoch.ts"; | |
| 153 | import m149 from "../core/migrations/20261026140000-theme-version.ts"; | |
| 154 | import m150 from "../core/migrations/20261026174505-queue-batch.ts"; | |
| 155 | import m151 from "../core/migrations/20261026174649-check-gate.ts"; | |
| 156 | import m152 from "../core/migrations/20261026180000-file-hold.ts"; | |
| 157 | import m153 from "../core/migrations/20261026190000-check-flake.ts"; | |
| 158 | import m154 from "../core/migrations/20261026190000-hold-until-green.ts"; | |
| 159 | import m155 from "../core/migrations/20261026215105-queue-gate.ts"; | |
| 160 | import m156 from "../core/migrations/20261027010000-clog-watch.ts"; | |
| 161 | import m157 from "../core/migrations/20261027041521-gate-result.ts"; | |
| 162 | import m158 from "../core/migrations/20261027090000-home-visit.ts"; | |
| 163 | import m159 from "../core/migrations/20261027100000-clog-peak.ts"; | |
| 164 | import m160 from "../core/migrations/20261027110000-event-pull-push-index.ts"; | |
| 165 | import m161 from "../core/migrations/20261027110000-flow-only.ts"; | |
| 166 | import m162 from "../core/migrations/20261027120000-clog-started-at.ts"; | |
| 167 | import m163 from "../core/migrations/20261027130000-flow-only-alarm.ts"; | |
| 168 | import m164 from "../core/migrations/20261027140000-release-keeper.ts"; | |
| 169 | import m165 from "../core/migrations/20261027140000-run-model-reason.ts"; | |
| 170 | import m166 from "../core/migrations/20261101090000-conversation.ts"; | |
| 171 | import m167 from "../core/migrations/20261101100000-report-filer.ts"; | |
| 172 | import m168 from "../core/migrations/20261101120000-proof-run.ts"; | |
| 173 | import m169 from "../core/migrations/20261101120000-via-token.ts"; | |
| 174 | import m170 from "../core/migrations/20261101130000-fork-follow-mode.ts"; | |
| 175 | import m171 from "../core/migrations/20261101130000-issue-first.ts"; | |
| 176 | import m172 from "../core/migrations/20261101130000-keeper.ts"; | |
| 177 | import m173 from "../core/migrations/20261101130000-run-verify.ts"; | |
| 178 | import m174 from "../core/migrations/20261101140000-model-review.ts"; | |
| 179 | import m175 from "../core/migrations/20261101190000-conversation-fence.ts"; | |
| 180 | import m176 from "../core/migrations/20261102040000-event-repo-kind-at-index.ts"; | |
| 181 | import m177 from "../core/migrations/20261102120000-cold-home-indexes.ts"; | |
| 182 | import m178 from "../core/migrations/20261102120000-conversation-confirm.ts"; | |
| 183 | import m179 from "../core/migrations/20261102130000-conversation-run.ts"; | |
| 184 | import m180 from "../core/migrations/20261102150000-event-kind-seq-merged-pull-index.ts"; | |
| 185 | import m181 from "../core/migrations/20261102160000-conversation-write.ts"; | |
| 186 | import m182 from "../core/migrations/20261102160000-drop-event-repo-kind-at.ts"; | |
| 187 | import m183 from "../core/migrations/20261102160000-feed-likes.ts"; | |
| 188 | import m184 from "../core/migrations/20261102160000-oauth-token.ts"; | |
| 189 | import m185 from "../core/migrations/20261102160000-remove-proof.ts"; | |
| 190 | import m186 from "../core/migrations/20261102160000-webhook-ping-own-row.ts"; | |
| 191 | import m187 from "../core/migrations/20261102170000-oauth-refresh.ts"; | |
| 192 | import m188 from "../core/migrations/20261102170000-run-agent-latest.ts"; | |
| 193 | import m189 from "../core/migrations/20261102180000-pull-carried.ts"; | |
| 194 | import m190 from "../core/migrations/20261102190000-pillar-slots.ts"; | |
| 195 | import m191 from "../core/migrations/20261102190000-pull-pass.ts"; | |
| 196 | import m192 from "../core/migrations/20261102190000-queue-verdict.ts"; | |
| 197 | import m193 from "../core/migrations/20261102200000-flow-valves.ts"; | |
| 198 | import m194 from "../core/migrations/20261102200000-issue-plan.ts"; | |
| 199 | import m195 from "../core/migrations/20261102200000-issue-rank.ts"; | |
| 200 | import m196 from "../core/migrations/20261102200000-pull-carried-backfill.ts"; | |
| 201 | import m197 from "../core/migrations/20261102200000-review-findings.ts"; | |
| 202 | import m198 from "../core/migrations/20261103090000-pinned-forge.ts"; | |
| 203 | import m199 from "../core/migrations/20261103100000-bets.ts"; | |
| 204 | import m200 from "../core/migrations/20261103100000-drop-flow-only.ts"; | |
| 205 | import m201 from "../core/migrations/20261103110000-conversation-run-resume.ts"; | |
| 206 | import m202 from "../core/migrations/20261103110000-pinned-address.ts"; | |
| 207 | import m203 from "../core/migrations/20261103110000-week-retro.ts"; | |
| 208 | import m204 from "../core/migrations/20261103120000-conversation-file.ts"; | |
| 209 | import m205 from "../core/migrations/20261103120000-conversation-run-context.ts"; | |
| 210 | import m206 from "../core/migrations/20261103120000-conversation-turn-replaced.ts"; | |
| 211 | import m207 from "../core/migrations/20261103120000-conversations-many.ts"; | |
| 212 | import m208 from "../core/migrations/20261103120000-keeper-boot-stall.ts"; | |
| 213 | import m209 from "../core/migrations/20261103130000-conversation-run-stopped.ts"; | |
| 214 | import m210 from "../core/migrations/20261103130000-polish-share.ts"; | |
| 215 | import m211 from "../core/migrations/20261103140000-agent-roles.ts"; | |
| 216 | import m212 from "../core/migrations/20261103140000-origin-software.ts"; | |
| 217 | import m213 from "../core/migrations/20261103140000-week-readings.ts"; | |
| 218 | import m214 from "../core/migrations/20261103150000-flow-software.ts"; | |
| 219 | import m215 from "../core/migrations/20261103160000-origin-pull-check.ts"; | |
| 220 | import m216 from "../core/migrations/20261103160000-subscription-measure.ts"; | |
| 221 | import m217 from "../core/migrations/20261103160000-trusted-sources.ts"; | |
| 222 | import m218 from "../core/migrations/20261104090000-guest-approval.ts"; | |
| 223 | import m219 from "../core/migrations/20261104100000-conversation-run-stopped-state.ts"; | |
| 224 | import m220 from "../core/migrations/20261104100000-follow-sources.ts"; | |
| 225 | import m221 from "../core/migrations/20261104120000-flow-return.ts"; | |
| 226 | import m222 from "../core/migrations/20261104120000-traffic-history.ts"; | |
| 227 | import m223 from "../core/migrations/20261104161033-app-features.ts"; | |
| 228 | import m224 from "../core/migrations/20261105130000-guest-contribution.ts"; | |
| 229 | import m225 from "../core/migrations/20261108100000-scrape-evidence.ts"; | |
| 230 | import m226 from "../core/migrations/20261108110000-conversation-find.ts"; | |
| 231 | import m227 from "../core/migrations/20261108120000-machine-sessions.ts"; | |
| 232 | import m228 from "../core/migrations/20261108140000-dep-latest.ts"; | |
| 233 | import m229 from "../core/migrations/20261108150000-traffic-views.ts"; | |
| 234 | import m230 from "../core/migrations/20261108160000-dep-advisory.ts"; | |
| 235 | import m231 from "../core/migrations/20261108160000-scan-findings.ts"; | |
| 236 | import m232 from "../core/migrations/20261108170000-one-shot-spend.ts"; | |
| 237 | import m233 from "../core/migrations/20261108180000-app-feature-summary.ts"; | |
| 238 | import m234 from "../core/migrations/20261109040000-run-combined-oid.ts"; | |
| 239 | import m235 from "../core/migrations/20261109050000-feature-fire.ts"; | |
| 240 | import m236 from "../core/migrations/20261109120000-pull-run.ts"; | |
| 241 | import m237 from "../core/migrations/20261109130000-team-member-role.ts"; | |
| 242 | import m238 from "../core/migrations/20261109150000-repo-redirect.ts"; | |
| 243 | import m239 from "../core/migrations/20261109160000-team-queue-indexes.ts"; | |
| 244 | import m240 from "../core/migrations/20261109170000-issue-team-by-slug.ts"; | |
| 245 | import m241 from "../core/migrations/20261109180000-a-look-keeps-its-page-size.ts"; | |
| 246 | import m242 from "../core/migrations/20261109190000-run-context-tokens.ts"; | |
| 247 | import m243 from "../core/migrations/20261109190100-run-pushed.ts"; | |
| 248 | import m244 from "../core/migrations/20261109200000-feed-like-ledger.ts"; | |
| 249 | import m245 from "../core/migrations/20261110090000-origin-read-only.ts"; | |
| 250 | import m246 from "../core/migrations/20261110100000-app-template.ts"; | |
| 251 | import m247 from "../core/migrations/20261110110000-app-variant.ts"; | |
| 252 | import m248 from "../core/migrations/20261110110000-devices.ts"; | |
| 253 | import m249 from "../core/migrations/20261110110000-disk-readings.ts"; | |
| 254 | import m250 from "../core/migrations/20261110120000-device-grants.ts"; | |
| 255 | import m251 from "../core/migrations/20261110130000-print-log.ts"; | |
| 256 | import m252 from "../core/migrations/20261110140000-csp-violations.ts"; | |
| 257 | import m253 from "../core/migrations/20261110140000-setting-change-reason.ts"; | |
| 258 | import m254 from "../core/migrations/20261110150000-note-shipped.ts"; | |
| 259 | import m255 from "../core/migrations/20261110160000-account-requests.ts"; | |
| 260 | import m256 from "../core/migrations/20261110160000-csp-violation-seen.ts"; | |
| 261 | import m257 from "../core/migrations/20261110160000-start-accounts.ts"; | |
| 262 | import m258 from "../core/migrations/20261110170000-chat-build.ts"; | |
| 263 | import m259 from "../core/migrations/20261110170000-fork-follow-dont-follow.ts"; | |
| 264 | import m260 from "../core/migrations/20261110170000-run-agent-actor.ts"; | |
| 265 | import m261 from "../core/migrations/20261110170000-talk-captain.ts"; | |
| 266 | import m262 from "../core/migrations/20261110190000-curated-packs.ts"; | |
| 267 | import m263 from "../core/migrations/20261110200000-billing-entitlements.ts"; | |
| 268 | import m264 from "../core/migrations/20261110200000-traffic-view-visitor.ts"; | |
| 269 | import m265 from "../core/migrations/20261111000000-gift-codes.ts"; | |
| 270 | import m266 from "../core/migrations/20261111100000-maintenance-run.ts"; | |
| 271 | import m267 from "../core/migrations/20261111110000-efficiency.ts"; | |
| 272 | import m268 from "../core/migrations/20261111110000-maintenance-run-doctor.ts"; | |
| 273 | import m269 from "../core/migrations/20261111120000-check-flake-ms.ts"; | |
| 274 | import m270 from "../core/migrations/20261111120000-maintenance-duty-state.ts"; | |
| 275 | import m271 from "../core/migrations/20261111120000-stripe-events.ts"; | |
| 276 | import m272 from "../core/migrations/20261111120000-visitors.ts"; | |
| 277 | import m273 from "../core/migrations/20261111130000-maintenance-run-dollars.ts"; | |
| 278 | import m274 from "../core/migrations/20261111140000-forge-orders.ts"; | |
| 279 | import m275 from "../core/migrations/20261111150000-forge-order-address.ts"; | |
| 280 | import m276 from "../core/migrations/20261111160000-governor-last.ts"; | |
| 281 | import m277 from "../core/migrations/20261111160000-route-hour.ts"; | |
| 282 | import m278 from "../core/migrations/20261111160000-script-errors.ts"; | |
| 283 | import m279 from "../core/migrations/20261111170000-first-ask-refusals.ts"; | |
| 284 | import m280 from "../core/migrations/20261111170000-keeper-beat.ts"; | |
| 285 | import m281 from "../core/migrations/20261112090000-planner-pause.ts"; | |
| 286 | import m282 from "../core/migrations/20261112090000-timers.ts"; | |
| 287 | import m283 from "../core/migrations/20261112100000-access-links.ts"; | |
| 288 | import m284 from "../core/migrations/20261112120000-chapters.ts"; | |
| 289 | import m285 from "../core/migrations/20261112130000-keeper-beat-tick.ts"; | |
| 290 | import m286 from "../core/migrations/20261112130000-run-interruptions.ts"; | |
| 291 | import m287 from "../core/migrations/20261112140000-ask-filters.ts"; | |
| 292 | import m288 from "../core/migrations/20261112140000-domain-old-records.ts"; | |
| 293 | import m289 from "../core/migrations/20261112140000-keeper-stages.ts"; | |
| 294 | import m290 from "../core/migrations/20261112180000-edge-handover.ts"; | |
| 295 | import m291 from "../core/migrations/20261112200000-issue-rank-owner.ts"; | |
| 296 | import m292 from "../core/migrations/20261113115530-drop-unused-indexes.ts"; | |
| 297 | import m293 from "../core/migrations/20261113120000-keeper-interrupted-runs.ts"; | |
| 298 | import m294 from "../core/migrations/20261113180000-keeper-rollback-time.ts"; | |
| 299 | import m295 from "../core/migrations/20261113180311-deploy-landed.ts"; | |
| 300 | import m296 from "../core/migrations/20261113181056-drop-event-repo-index.ts"; | |
| 301 | import m297 from "../core/migrations/20261113190000-run-hot-indexes.ts"; | |
| 302 | import m298 from "../core/migrations/20261113200000-issue-estimates.ts"; | |
| 303 | import m299 from "../core/migrations/20261113201743-child-reach.ts"; | |
| 304 | import m300 from "../core/migrations/20261113210000-stamp-and-deploy-indexes.ts"; | |
| 305 | import m301 from "../core/migrations/20261113220000-run-latest-and-review-indexes.ts"; | |
| 306 | import m302 from "../core/migrations/20261113230000-run-live-state-indexes.ts"; | |
| 307 | import m303 from "../core/migrations/20261113240000-run-spend-and-finished-indexes.ts"; | |
| 308 | import m304 from "../core/migrations/20261114000000-estimate-done.ts"; | |
| 309 | import m305 from "../core/migrations/20261114000100-release-how.ts"; | |
| 310 | import m306 from "../core/migrations/20261114000200-db-size-day.ts"; | |
| 311 | import m307 from "../core/migrations/20261114000200-delivery-event-index.ts"; | |
| 312 | import m308 from "../core/migrations/20261114010000-contribute-tokens.ts"; | |
| 313 | import m309 from "../core/migrations/20261114010000-machine-sample-hourly.ts"; | |
| 314 | import m310 from "../core/migrations/20261114020000-feature-run.ts"; | |
| 315 | import m311 from "../core/migrations/20261114030000-repo-landing.ts"; | |
| 316 | import m312 from "../core/migrations/20261114030000-run-state-and-deploy-live-indexes.ts"; | |
| 317 | import m313 from "../core/migrations/20261114030100-engine-observation.ts"; | |
| 318 | import m314 from "../core/migrations/20261114040000-run-failed-finished-index.ts"; | |
| 319 | import m315 from "../core/migrations/20261114050000-drop-run-kind-state.ts"; | |
| 320 | import m316 from "../core/migrations/20261114050000-landing-intent-and-run-holder.ts"; | |
| 321 | import m317 from "../core/migrations/20261114050000-origin-broker.ts"; | |
| 322 | import m318 from "../core/migrations/20261114060000-decision-outcome-index.ts"; | |
| 323 | import m319 from "../core/migrations/20261114060000-upstream-follow-from-parent.ts"; | |
| 324 | import m320 from "../core/migrations/20261114070000-review-base.ts"; | |
| 325 | import m321 from "../core/migrations/20261114070000-secret-grants.ts"; | |
| 326 | import m322 from "../core/migrations/20261114070100-app-env-kind.ts"; | |
| 327 | import m323 from "../core/migrations/20261114080000-run-tokens.ts"; | |
| 328 | import m324 from "../core/migrations/20261114090000-a-share-note.ts"; | |
| 329 | import m325 from "../core/migrations/20261114090000-invite-org.ts"; | |
| 330 | import m326 from "../core/migrations/20261114090000-reports-closed.ts"; | |
| 331 | import m327 from "../core/migrations/20261114120000-posts-by-author.ts"; | |
| 332 | import m328 from "../core/migrations/20261114130000-desk-note.ts"; | |
| 333 | import m329 from "../core/migrations/20261114130000-repo-template.ts"; | |
| 334 | import m330 from "../core/migrations/20261114140000-desk-note-repo.ts"; | |
| 335 | import m331 from "../core/migrations/20261114235900-admin-ask.ts"; | |
| 336 | import m332 from "../core/migrations/20261115100000-usage-issue-review-approved.ts"; | |
| 337 | import m333 from "../core/migrations/20261115110000-comment-question.ts"; | |
| 338 | import m334 from "../core/migrations/20261115110000-keeper-write-pause.ts"; | |
| 339 | import m335 from "../core/migrations/20261115110000-offer-receipt.ts"; | |
| 340 | import m336 from "../core/migrations/20261115110000-payments.ts"; | |
| 341 | import m337 from "../core/migrations/20261115120000-app-migration.ts"; | |
| 342 | import m338 from "../core/migrations/20261115120000-gate-snooze.ts"; | |
| 343 | import m339 from "../core/migrations/20261115120000-payment-refund-pending.ts"; | |
| 344 | import m340 from "../core/migrations/20261115130000-oauth-grant-start.ts"; | |
| 345 | import m341 from "../core/migrations/20261115130000-repo-wallet.ts"; | |
| 346 | import m342 from "../core/migrations/20261115140000-event-actor-id-index.ts"; | |
| 347 | import m343 from "../core/migrations/20261115150000-app-release.ts"; | |
| 348 | import m344 from "../core/migrations/20261115150000-crew-off.ts"; | |
| 349 | import m345 from "../core/migrations/20261115150000-pull-proposal-attestation.ts"; | |
| 350 | import m346 from "../core/migrations/20261115150000-pull-review-steps.ts"; | |
| 351 | import m347 from "../core/migrations/20261116005600-check-runner.ts"; | |
| 352 | import m348 from "../core/migrations/20261116090000-timer-content-type.ts"; | |
| 353 | import m349 from "../core/migrations/20261116100000-domain-cut-over.ts"; | |
| 354 | import m350 from "../core/migrations/20261116110000-bet-cap.ts"; | |
| 355 | import m351 from "../core/migrations/20261116110000-duty-dismissed.ts"; | |
| 356 | import m352 from "../core/migrations/20261116120000-fork-offer.ts"; | |
| 357 | import m353 from "../core/migrations/20261116120000-session-browser.ts"; | |
| 358 | import m354 from "../core/migrations/20261117090000-run-agent-window.ts"; | |
| 359 | import m355 from "../core/migrations/20261120100000-conversation-pinned.ts"; | |
| 360 | import m356 from "../core/migrations/20261120100000-maintenance-quiet.ts"; | |
| 361 | import m357 from "../core/migrations/20261120120000-fork-offer-withdrawn.ts"; | |
| 362 | import m358 from "../core/migrations/20261120120000-issue-closed-done.ts"; | |
| 363 | import m359 from "../core/migrations/20261120140000-issue-origin-clock.ts"; | |
| 364 | import m360 from "../core/migrations/20261121010000-idempotency-headers.ts"; | |
| 365 | import m361 from "../core/migrations/20261121010100-script-error-untrusted.ts"; | |
| 366 | import m362 from "../core/migrations/20261121090000-guest-approval-head.ts"; | |
| 367 | import m363 from "../core/migrations/20261121090000-run-token-read.ts"; | |
| 368 | import m364 from "../core/migrations/20261121120000-org-grant-owner.ts"; | |
| 369 | import m365 from "../core/migrations/20261121150000-feed-filter-steps.ts"; | |
| 370 | import m366 from "../core/migrations/20261121170000-repo-deleting.ts"; | |
| 371 | import m367 from "../core/migrations/20261121190000-check-runner-jobs.ts"; | |
| 372 | import m368 from "../core/migrations/20261121210000-check-runner-ran.ts"; | |
| 373 | import m369 from "../core/migrations/20261121230000-heap-census.ts"; | |
| 374 | import m370 from "../core/migrations/20261122090000-account-close-request.ts"; | |
| 375 | import m371 from "../core/migrations/20261122120000-daily-proof.ts"; | |
| 376 | import m372 from "../core/migrations/20261122120000-status-day.ts"; | |
| 377 | import m373 from "../core/migrations/20261123032018-conversation-card.ts"; | |
| 378 | import m374 from "../core/migrations/20261123090000-account-purge-tried.ts"; | |
| 379 | import m375 from "../core/migrations/20261123090000-chapter-item-place.ts"; | |
| 380 | import m376 from "../core/migrations/20261123090000-outsider-status.ts"; | |
| 381 | import m377 from "../core/migrations/20261123100000-account-purge-held.ts"; | |
| 382 | import m378 from "../core/migrations/20261123110000-report-reason.ts"; | |
| 383 | import m379 from "../core/migrations/20261123120000-daily-proof-release.ts"; | |
| 384 | import m380 from "../core/migrations/20261123120000-offer-receipt-reason.ts"; | |
| 385 | import m381 from "../core/migrations/20261123130000-conversation-run-reported.ts"; | |
| 386 | import m382 from "../core/migrations/20261123130000-finding-autoclose.ts"; | |
| 387 | import m383 from "../core/migrations/20261123130000-oauth-reuse.ts"; | |
| 388 | import m384 from "../core/migrations/20261123130000-order-price.ts"; | |
| 389 | import m385 from "../core/migrations/20261123130000-origin-run-note.ts"; | |
| 390 | import m386 from "../core/migrations/20261123130000-repo-made-from.ts"; | |
| 391 | import m387 from "../core/migrations/20261123130000-route-hour-synthetic.ts"; | |
| 392 | import m388 from "../core/migrations/20261123130000-timer-awaiting.ts"; | |
| 393 | import m389 from "../core/migrations/20261123140000-cloud-account-ceiling.ts"; | |
| 394 | import m390 from "../core/migrations/20261124034500-conversation-card-press.ts"; | |
| 395 | import m391 from "../core/migrations/20261124040000-pinned-claimed.ts"; | |
| 396 | import m392 from "../core/migrations/20261124042209-pinned-host-claim.ts"; | |
| 397 | import m393 from "../core/migrations/20261124053225-pinned-reached.ts"; | |
| 398 | import m394 from "../core/migrations/20261124151500-run-sent.ts"; | |
| 399 | import m395 from "../core/migrations/20261124185948-pinned-place.ts"; | |
| 400 | import m396 from "../core/migrations/20261124191005-pinned-dns.ts"; | |
| 401 | import m397 from "../core/migrations/20261124200000-follow-crew-resolves.ts"; | |
| 402 | import m398 from "../core/migrations/20261124232400-pull-draft.ts"; | |
| 403 | import m399 from "../core/migrations/20261124234131-contributors.ts"; | |
| 404 | import m400 from "../core/migrations/20261125001539-web-page.ts"; | |
| 405 | import m401 from "../core/migrations/20261125010000-warm-pool.ts"; | |
| 406 | import m402 from "../core/migrations/20261125020000-forge-order-place.ts"; | |
| 407 | import m403 from "../core/migrations/20261125180000-connections.ts"; | |
| 408 | import m404 from "../core/migrations/20261125180000-invite-repo.ts"; | |
| 409 | import m405 from "../core/migrations/20261125183000-talk-model-choice.ts"; | |
| 410 | import m406 from "../core/migrations/20261125190500-connection-effort.ts"; | |
| 411 | import m407 from "../core/migrations/20261125200000-copies-elsewhere.ts"; | |
| 412 | import m408 from "../core/migrations/20261125201000-connection-scope.ts"; | |
| 413 | import m409 from "../core/migrations/20261125214141-subscription-limited.ts"; | |
| 414 | import m410 from "../core/migrations/20261127000000-pinned-watch.ts"; | |
| 415 | import m411 from "../core/migrations/20261127090000-run-agent-finished-actor.ts"; | |
| 416 | import m412 from "../core/migrations/20261127100000-check-start.ts"; | |
| 417 | import m413 from "../core/migrations/20261127100000-cloud-account-project.ts"; | |
| 418 | import m414 from "../core/migrations/20261127100000-cloud-watch.ts"; | |
| 419 | import m415 from "../core/migrations/20261127110000-talk-watch.ts"; | |
| 420 | import m416 from "../core/migrations/20261127200000-order-quote.ts"; | |
| 421 | import m417 from "../core/migrations/20261127220000-experiment.ts"; | |
| 422 | import m418 from "../core/migrations/20261127233000-routine-said.ts"; | |
| 423 | import m419 from "../core/migrations/20261128042458-conversation-plan.ts"; | |
| 424 | import m420 from "../core/migrations/20261128100000-journey-walks.ts"; | |
| 425 | import m421 from "../core/migrations/20261128210000-allocation.ts"; | |
| 426 | import m422 from "../core/migrations/20261129090000-print-job-id.ts"; | |
| 427 | import m423 from "../core/migrations/20261129100000-pinned-lifetime.ts"; | |
| 428 | import m424 from "../core/migrations/20261130040757-comment-issue-author.ts"; | |
| 429 | import m425 from "../core/migrations/20261130090000-repo-review.ts"; | |
| 430 | import m426 from "../core/migrations/20261130100000-app-flag.ts"; | |
| 431 | import m427 from "../core/migrations/20261130110000-forge-template.ts"; | |
| 432 | import m428 from "../core/migrations/20261130110000-gift-giver.ts"; | |
| 433 | import m429 from "../core/migrations/20261130110000-origin-read-grant.ts"; | |
| 434 | import m430 from "../core/migrations/20261130120000-drop-retired-keeper-beat.ts"; | |
| 435 | import m431 from "../core/migrations/20261130130000-look-theme-key.ts"; | |
| 436 | import m432 from "../core/migrations/20261130140000-config-store.ts"; | |
| 437 | import m433 from "../core/migrations/20261130140000-lent-runner-scope.ts"; | |
| 438 | import m434 from "../core/migrations/20261130140000-look-drops-old-key.ts"; | |
| 439 | import m435 from "../core/migrations/20261130170000-fence-read-from.ts"; | |
| 440 | import m436 from "../core/migrations/20261130170100-chat-build-lane.ts"; | |
| 441 | import m437 from "../core/migrations/20261130235220-run-check-plan.ts"; | |
| 442 | ||
| 443 | /** Each migration file's name and its default export, in name order. */ | |
| 444 | export const MIGRATION_MODULES: readonly (readonly [string, unknown])[] = [ | |
| 445 | ["0001-foundation.ts", m0], | |
| 446 | ["0002-conversations.ts", m1], | |
| 447 | ["0003-pull-requests.ts", m2], | |
| 448 | ["0004-forks.ts", m3], | |
| 449 | ["0005-organizations-and-teams.ts", m4], | |
| 450 | ["0006-ssh-public-keys.ts", m5], | |
| 451 | ["0007-per-user-interface-preferences.ts", m6], | |
| 452 | ["0008-origins.ts", m7], | |
| 453 | ["0009-oauth-for-origins.ts", m8], | |
| 454 | ["0010-a-short-link-for-a.ts", m9], | |
| 455 | ["0011-counts-on-a-list.ts", m10], | |
| 456 | ["0012-the-indexes-a-busy-forge.ts", m11], | |
| 457 | ["0013-review-states.ts", m12], | |
| 458 | ["0014-apps.ts", m13], | |
| 459 | ["0015-an-app-s-environment.ts", m14], | |
| 460 | ["0016-a-paused-run.ts", m15], | |
| 461 | ["0017-checks.ts", m16], | |
| 462 | ["0018-a-run-s-lease.ts", m17], | |
| 463 | ["0019-how-many-turns-an-agent.ts", m18], | |
| 464 | ["0020-issues-that-depend-on-issues.ts", m19], | |
| 465 | ["0021-a-repository-can-run-on.ts", m20], | |
| 466 | ["0022-the-decision-ledger.ts", m21], | |
| 467 | ["0023-the-look.ts", m22], | |
| 468 | ["0024-a-variable-has-a-scope.ts", m23], | |
| 469 | ["0025-what-a-running-app-said.ts", m24], | |
| 470 | ["0026-subscriptions.ts", m25], | |
| 471 | ["0027-the-moment-a-deploy-started.ts", m26], | |
| 472 | ["0028-a-failed-check-s-own.ts", m27], | |
| 473 | ["0029-a-third-width.ts", m28], | |
| 474 | ["0030-take-it-back.ts", m29], | |
| 475 | ["0031-a-look-knows-which-page.ts", m30], | |
| 476 | ["0032-an-app-s-own-domains.ts", m31], | |
| 477 | ["0033-where-a-repository-s-next.ts", m32], | |
| 478 | ["0034-forge-level-secrets.ts", m33], | |
| 479 | ["0035-what-a-viewer-did-with.ts", m34], | |
| 480 | ["0036-a-share.ts", m35], | |
| 481 | ["0037-the-usage-ledger.ts", m36], | |
| 482 | ["0038-a-subscription-s-standing.ts", m37], | |
| 483 | ["0039-whether-the-agent-s-shell.ts", m38], | |
| 484 | ["0040-a-fleet-operation-s-receipt.ts", m39], | |
| 485 | ["0041-the-meter.ts", m40], | |
| 486 | ["0042-every-credential-is-a-subscription.ts", m41], | |
| 487 | ["0043-an-interrupted-run-is-not.ts", m42], | |
| 488 | ["0044-why-an-issue-closed.ts", m43], | |
| 489 | ["0045-oauth-clients-registered-dynamically.ts", m44], | |
| 490 | ["0046-which-address-the-forge-s.ts", m45], | |
| 491 | ["0047-a-report-from-outside.ts", m46], | |
| 492 | ["0048-an-account-the-owner-suspended.ts", m47], | |
| 493 | ["0049-the-asks-ledger.ts", m48], | |
| 494 | ["0050-outsiders-may-trigger-the-crew.ts", m49], | |
| 495 | ["0051-the-front-page-s-picks.ts", m50], | |
| 496 | ["0052-a-whole-life-budget-on.ts", m51], | |
| 497 | ["0053-whether-an-account-s-email.ts", m52], | |
| 498 | ["0054-the-people-a-private-app.ts", m53], | |
| 499 | ["0055-a-hold-on-a-pull.ts", m54], | |
| 500 | ["0056-what-an-account-has-spent.ts", m55], | |
| 501 | ["0057-spend-reported-from-outside.ts", m56], | |
| 502 | ["0058-a-signed-in-browser-has.ts", m57], | |
| 503 | ["0059-every-message-the-forge-sent.ts", m58], | |
| 504 | ["0060-who-a-picture-was-taken.ts", m59], | |
| 505 | ["0061-an-agent-never-owns-an.ts", m60], | |
| 506 | ["0062-only-an-agent-is-ever.ts", m61], | |
| 507 | ["0063-the-forge-s-capacity.ts", m62], | |
| 508 | ["0064-the-front-page-s-settings.ts", m63], | |
| 509 | ["0065-a-sealed-issue.ts", m64], | |
| 510 | ["0066-a-milestone-a-person-watches.ts", m65], | |
| 511 | ["0067-every-fork-a-person-made.ts", m66], | |
| 512 | ["0068-the-run-a-comment-was.ts", m67], | |
| 513 | ["0069-an-event-s-place-in.ts", m68], | |
| 514 | ["0070-a-sealed-repository-is-never.ts", m69], | |
| 515 | ["0071-an-optional-anthropic-compatible-api.ts", m70], | |
| 516 | ["0072-when-a-mirror-lost-its.ts", m71], | |
| 517 | ["0073-authorization-codes-for-the-mcp.ts", m72], | |
| 518 | ["0074-a-look-a-person-attached.ts", m73], | |
| 519 | ["0075-a-limb-s-place-among.ts", m74], | |
| 520 | ["0076-the-sentinel-s-memory.ts", m75], | |
| 521 | ["0077-openid-connect-over-the-same.ts", m76], | |
| 522 | ["0078-variants.ts", m77], | |
| 523 | ["0079-degraded-history.ts", m78], | |
| 524 | ["0080-restore-drills.ts", m79], | |
| 525 | ["0081-thoughts.ts", m80], | |
| 526 | ["0082-passkeys.ts", m81], | |
| 527 | ["0083-releases.ts", m82], | |
| 528 | ["0084-placements.ts", m83], | |
| 529 | ["0085-a-standing-rule-per-repository.ts", m84], | |
| 530 | ["0086-what-a-production-deploy-carries.ts", m85], | |
| 531 | ["0087-supersession-and-repeats.ts", m86], | |
| 532 | ["0088-what-the-machine-used.ts", m87], | |
| 533 | ["0089-a-parked-pull.ts", m88], | |
| 534 | ["0090-a-green-check-proven.ts", m89], | |
| 535 | ["0091-where-a-check-ran.ts", m90], | |
| 536 | ["20261015000100-plans-need-a-nod.ts", m91], | |
| 537 | ["20261015090000-a-repository-put-away.ts", m92], | |
| 538 | ["20261015090000-feed-chips.ts", m93], | |
| 539 | ["20261015120000-check-base-tip.ts", m94], | |
| 540 | ["20261015230000-a-domain-drill.ts", m95], | |
| 541 | ["20261015230532-telemetry-read.ts", m96], | |
| 542 | ["20261016090000-sentinel-kept-settings.ts", m97], | |
| 543 | ["20261016120000-kept-is-a-person-s.ts", m98], | |
| 544 | ["20261016120000-proposal-state.ts", m99], | |
| 545 | ["20261016130000-sign-in-with-the-parent.ts", m100], | |
| 546 | ["20261016130000-usage-count.ts", m101], | |
| 547 | ["20261016140000-a-model-grant.ts", m102], | |
| 548 | ["20261016140000-drill-counts.ts", m103], | |
| 549 | ["20261016140000-flag-use.ts", m104], | |
| 550 | ["20261016140000-machine-temperature.ts", m105], | |
| 551 | ["20261016150000-memory-hour.ts", m106], | |
| 552 | ["20261016160000-cloud-audit.ts", m107], | |
| 553 | ["20261016160000-proposal-tokens.ts", m108], | |
| 554 | ["20261016170000-pull-run-grant.ts", m109], | |
| 555 | ["20261016170000-upstream-proposals.ts", m110], | |
| 556 | ["20261016180000-account-ceiling.ts", m111], | |
| 557 | ["20261016180000-signin-only-code.ts", m112], | |
| 558 | ["20261016190000-member.ts", m113], | |
| 559 | ["20261016200000-invite.ts", m114], | |
| 560 | ["20261017195831-ceiling-reserved.ts", m115], | |
| 561 | ["20261018100000-incident-remembered.ts", m116], | |
| 562 | ["20261018110000-limb-replan.ts", m117], | |
| 563 | ["20261019120000-drill-phases.ts", m118], | |
| 564 | ["20261019130000-crew-teams.ts", m119], | |
| 565 | ["20261019130000-run-model-prompt.ts", m120], | |
| 566 | ["20261019140000-route-timing.ts", m121], | |
| 567 | ["20261019150000-page-vitals.ts", m122], | |
| 568 | ["20261019160000-app-vitals.ts", m123], | |
| 569 | ["20261019160000-issue-teams.ts", m124], | |
| 570 | ["20261019170000-edge-links.ts", m125], | |
| 571 | ["20261019180000-board-pins.ts", m126], | |
| 572 | ["20261019180000-parent-link.ts", m127], | |
| 573 | ["20261020010000-anon-spawns.ts", m128], | |
| 574 | ["20261020090000-webhook-refusal.ts", m129], | |
| 575 | ["20261020100000-preview-findings.ts", m130], | |
| 576 | ["20261020110000-a-look-has-a-theme.ts", m131], | |
| 577 | ["20261020120000-app-vitals-five.ts", m132], | |
| 578 | ["20261020130000-machine-serving.ts", m133], | |
| 579 | ["20261020180000-origin-repo-size.ts", m134], | |
| 580 | ["20261020180000-repo-provenance.ts", m135], | |
| 581 | ["20261021090000-egress-grants.ts", m136], | |
| 582 | ["20261021100000-migrate-mirror-target.ts", m137], | |
| 583 | ["20261021120000-crew-devices.ts", m138], | |
| 584 | ["20261022090000-milestone-origin.ts", m139], | |
| 585 | ["20261022100000-repo-upstream.ts", m140], | |
| 586 | ["20261022110000-run-tokens.ts", m141], | |
| 587 | ["20261022120000-flow-indexes.ts", m142], | |
| 588 | ["20261022130000-app-notes.ts", m143], | |
| 589 | ["20261022140000-note-pictures.ts", m144], | |
| 590 | ["20261025090000-upstream-check-history.ts", m145], | |
| 591 | ["20261025120000-run-error-line.ts", m146], | |
| 592 | ["20261026090000-event-actor-index.ts", m147], | |
| 593 | ["20261026120000-front-epoch.ts", m148], | |
| 594 | ["20261026140000-theme-version.ts", m149], | |
| 595 | ["20261026174505-queue-batch.ts", m150], | |
| 596 | ["20261026174649-check-gate.ts", m151], | |
| 597 | ["20261026180000-file-hold.ts", m152], | |
| 598 | ["20261026190000-check-flake.ts", m153], | |
| 599 | ["20261026190000-hold-until-green.ts", m154], | |
| 600 | ["20261026215105-queue-gate.ts", m155], | |
| 601 | ["20261027010000-clog-watch.ts", m156], | |
| 602 | ["20261027041521-gate-result.ts", m157], | |
| 603 | ["20261027090000-home-visit.ts", m158], | |
| 604 | ["20261027100000-clog-peak.ts", m159], | |
| 605 | ["20261027110000-event-pull-push-index.ts", m160], | |
| 606 | ["20261027110000-flow-only.ts", m161], | |
| 607 | ["20261027120000-clog-started-at.ts", m162], | |
| 608 | ["20261027130000-flow-only-alarm.ts", m163], | |
| 609 | ["20261027140000-release-keeper.ts", m164], | |
| 610 | ["20261027140000-run-model-reason.ts", m165], | |
| 611 | ["20261101090000-conversation.ts", m166], | |
| 612 | ["20261101100000-report-filer.ts", m167], | |
| 613 | ["20261101120000-proof-run.ts", m168], | |
| 614 | ["20261101120000-via-token.ts", m169], | |
| 615 | ["20261101130000-fork-follow-mode.ts", m170], | |
| 616 | ["20261101130000-issue-first.ts", m171], | |
| 617 | ["20261101130000-keeper.ts", m172], | |
| 618 | ["20261101130000-run-verify.ts", m173], | |
| 619 | ["20261101140000-model-review.ts", m174], | |
| 620 | ["20261101190000-conversation-fence.ts", m175], | |
| 621 | ["20261102040000-event-repo-kind-at-index.ts", m176], | |
| 622 | ["20261102120000-cold-home-indexes.ts", m177], | |
| 623 | ["20261102120000-conversation-confirm.ts", m178], | |
| 624 | ["20261102130000-conversation-run.ts", m179], | |
| 625 | ["20261102150000-event-kind-seq-merged-pull-index.ts", m180], | |
| 626 | ["20261102160000-conversation-write.ts", m181], | |
| 627 | ["20261102160000-drop-event-repo-kind-at.ts", m182], | |
| 628 | ["20261102160000-feed-likes.ts", m183], | |
| 629 | ["20261102160000-oauth-token.ts", m184], | |
| 630 | ["20261102160000-remove-proof.ts", m185], | |
| 631 | ["20261102160000-webhook-ping-own-row.ts", m186], | |
| 632 | ["20261102170000-oauth-refresh.ts", m187], | |
| 633 | ["20261102170000-run-agent-latest.ts", m188], | |
| 634 | ["20261102180000-pull-carried.ts", m189], | |
| 635 | ["20261102190000-pillar-slots.ts", m190], | |
| 636 | ["20261102190000-pull-pass.ts", m191], | |
| 637 | ["20261102190000-queue-verdict.ts", m192], | |
| 638 | ["20261102200000-flow-valves.ts", m193], | |
| 639 | ["20261102200000-issue-plan.ts", m194], | |
| 640 | ["20261102200000-issue-rank.ts", m195], | |
| 641 | ["20261102200000-pull-carried-backfill.ts", m196], | |
| 642 | ["20261102200000-review-findings.ts", m197], | |
| 643 | ["20261103090000-pinned-forge.ts", m198], | |
| 644 | ["20261103100000-bets.ts", m199], | |
| 645 | ["20261103100000-drop-flow-only.ts", m200], | |
| 646 | ["20261103110000-conversation-run-resume.ts", m201], | |
| 647 | ["20261103110000-pinned-address.ts", m202], | |
| 648 | ["20261103110000-week-retro.ts", m203], | |
| 649 | ["20261103120000-conversation-file.ts", m204], | |
| 650 | ["20261103120000-conversation-run-context.ts", m205], | |
| 651 | ["20261103120000-conversation-turn-replaced.ts", m206], | |
| 652 | ["20261103120000-conversations-many.ts", m207], | |
| 653 | ["20261103120000-keeper-boot-stall.ts", m208], | |
| 654 | ["20261103130000-conversation-run-stopped.ts", m209], | |
| 655 | ["20261103130000-polish-share.ts", m210], | |
| 656 | ["20261103140000-agent-roles.ts", m211], | |
| 657 | ["20261103140000-origin-software.ts", m212], | |
| 658 | ["20261103140000-week-readings.ts", m213], | |
| 659 | ["20261103150000-flow-software.ts", m214], | |
| 660 | ["20261103160000-origin-pull-check.ts", m215], | |
| 661 | ["20261103160000-subscription-measure.ts", m216], | |
| 662 | ["20261103160000-trusted-sources.ts", m217], | |
| 663 | ["20261104090000-guest-approval.ts", m218], | |
| 664 | ["20261104100000-conversation-run-stopped-state.ts", m219], | |
| 665 | ["20261104100000-follow-sources.ts", m220], | |
| 666 | ["20261104120000-flow-return.ts", m221], | |
| 667 | ["20261104120000-traffic-history.ts", m222], | |
| 668 | ["20261104161033-app-features.ts", m223], | |
| 669 | ["20261105130000-guest-contribution.ts", m224], | |
| 670 | ["20261108100000-scrape-evidence.ts", m225], | |
| 671 | ["20261108110000-conversation-find.ts", m226], | |
| 672 | ["20261108120000-machine-sessions.ts", m227], | |
| 673 | ["20261108140000-dep-latest.ts", m228], | |
| 674 | ["20261108150000-traffic-views.ts", m229], | |
| 675 | ["20261108160000-dep-advisory.ts", m230], | |
| 676 | ["20261108160000-scan-findings.ts", m231], | |
| 677 | ["20261108170000-one-shot-spend.ts", m232], | |
| 678 | ["20261108180000-app-feature-summary.ts", m233], | |
| 679 | ["20261109040000-run-combined-oid.ts", m234], | |
| 680 | ["20261109050000-feature-fire.ts", m235], | |
| 681 | ["20261109120000-pull-run.ts", m236], | |
| 682 | ["20261109130000-team-member-role.ts", m237], | |
| 683 | ["20261109150000-repo-redirect.ts", m238], | |
| 684 | ["20261109160000-team-queue-indexes.ts", m239], | |
| 685 | ["20261109170000-issue-team-by-slug.ts", m240], | |
| 686 | ["20261109180000-a-look-keeps-its-page-size.ts", m241], | |
| 687 | ["20261109190000-run-context-tokens.ts", m242], | |
| 688 | ["20261109190100-run-pushed.ts", m243], | |
| 689 | ["20261109200000-feed-like-ledger.ts", m244], | |
| 690 | ["20261110090000-origin-read-only.ts", m245], | |
| 691 | ["20261110100000-app-template.ts", m246], | |
| 692 | ["20261110110000-app-variant.ts", m247], | |
| 693 | ["20261110110000-devices.ts", m248], | |
| 694 | ["20261110110000-disk-readings.ts", m249], | |
| 695 | ["20261110120000-device-grants.ts", m250], | |
| 696 | ["20261110130000-print-log.ts", m251], | |
| 697 | ["20261110140000-csp-violations.ts", m252], | |
| 698 | ["20261110140000-setting-change-reason.ts", m253], | |
| 699 | ["20261110150000-note-shipped.ts", m254], | |
| 700 | ["20261110160000-account-requests.ts", m255], | |
| 701 | ["20261110160000-csp-violation-seen.ts", m256], | |
| 702 | ["20261110160000-start-accounts.ts", m257], | |
| 703 | ["20261110170000-chat-build.ts", m258], | |
| 704 | ["20261110170000-fork-follow-dont-follow.ts", m259], | |
| 705 | ["20261110170000-run-agent-actor.ts", m260], | |
| 706 | ["20261110170000-talk-captain.ts", m261], | |
| 707 | ["20261110190000-curated-packs.ts", m262], | |
| 708 | ["20261110200000-billing-entitlements.ts", m263], | |
| 709 | ["20261110200000-traffic-view-visitor.ts", m264], | |
| 710 | ["20261111000000-gift-codes.ts", m265], | |
| 711 | ["20261111100000-maintenance-run.ts", m266], | |
| 712 | ["20261111110000-efficiency.ts", m267], | |
| 713 | ["20261111110000-maintenance-run-doctor.ts", m268], | |
| 714 | ["20261111120000-check-flake-ms.ts", m269], | |
| 715 | ["20261111120000-maintenance-duty-state.ts", m270], | |
| 716 | ["20261111120000-stripe-events.ts", m271], | |
| 717 | ["20261111120000-visitors.ts", m272], | |
| 718 | ["20261111130000-maintenance-run-dollars.ts", m273], | |
| 719 | ["20261111140000-forge-orders.ts", m274], | |
| 720 | ["20261111150000-forge-order-address.ts", m275], | |
| 721 | ["20261111160000-governor-last.ts", m276], | |
| 722 | ["20261111160000-route-hour.ts", m277], | |
| 723 | ["20261111160000-script-errors.ts", m278], | |
| 724 | ["20261111170000-first-ask-refusals.ts", m279], | |
| 725 | ["20261111170000-keeper-beat.ts", m280], | |
| 726 | ["20261112090000-planner-pause.ts", m281], | |
| 727 | ["20261112090000-timers.ts", m282], | |
| 728 | ["20261112100000-access-links.ts", m283], | |
| 729 | ["20261112120000-chapters.ts", m284], | |
| 730 | ["20261112130000-keeper-beat-tick.ts", m285], | |
| 731 | ["20261112130000-run-interruptions.ts", m286], | |
| 732 | ["20261112140000-ask-filters.ts", m287], | |
| 733 | ["20261112140000-domain-old-records.ts", m288], | |
| 734 | ["20261112140000-keeper-stages.ts", m289], | |
| 735 | ["20261112180000-edge-handover.ts", m290], | |
| 736 | ["20261112200000-issue-rank-owner.ts", m291], | |
| 737 | ["20261113115530-drop-unused-indexes.ts", m292], | |
| 738 | ["20261113120000-keeper-interrupted-runs.ts", m293], | |
| 739 | ["20261113180000-keeper-rollback-time.ts", m294], | |
| 740 | ["20261113180311-deploy-landed.ts", m295], | |
| 741 | ["20261113181056-drop-event-repo-index.ts", m296], | |
| 742 | ["20261113190000-run-hot-indexes.ts", m297], | |
| 743 | ["20261113200000-issue-estimates.ts", m298], | |
| 744 | ["20261113201743-child-reach.ts", m299], | |
| 745 | ["20261113210000-stamp-and-deploy-indexes.ts", m300], | |
| 746 | ["20261113220000-run-latest-and-review-indexes.ts", m301], | |
| 747 | ["20261113230000-run-live-state-indexes.ts", m302], | |
| 748 | ["20261113240000-run-spend-and-finished-indexes.ts", m303], | |
| 749 | ["20261114000000-estimate-done.ts", m304], | |
| 750 | ["20261114000100-release-how.ts", m305], | |
| 751 | ["20261114000200-db-size-day.ts", m306], | |
| 752 | ["20261114000200-delivery-event-index.ts", m307], | |
| 753 | ["20261114010000-contribute-tokens.ts", m308], | |
| 754 | ["20261114010000-machine-sample-hourly.ts", m309], | |
| 755 | ["20261114020000-feature-run.ts", m310], | |
| 756 | ["20261114030000-repo-landing.ts", m311], | |
| 757 | ["20261114030000-run-state-and-deploy-live-indexes.ts", m312], | |
| 758 | ["20261114030100-engine-observation.ts", m313], | |
| 759 | ["20261114040000-run-failed-finished-index.ts", m314], | |
| 760 | ["20261114050000-drop-run-kind-state.ts", m315], | |
| 761 | ["20261114050000-landing-intent-and-run-holder.ts", m316], | |
| 762 | ["20261114050000-origin-broker.ts", m317], | |
| 763 | ["20261114060000-decision-outcome-index.ts", m318], | |
| 764 | ["20261114060000-upstream-follow-from-parent.ts", m319], | |
| 765 | ["20261114070000-review-base.ts", m320], | |
| 766 | ["20261114070000-secret-grants.ts", m321], | |
| 767 | ["20261114070100-app-env-kind.ts", m322], | |
| 768 | ["20261114080000-run-tokens.ts", m323], | |
| 769 | ["20261114090000-a-share-note.ts", m324], | |
| 770 | ["20261114090000-invite-org.ts", m325], | |
| 771 | ["20261114090000-reports-closed.ts", m326], | |
| 772 | ["20261114120000-posts-by-author.ts", m327], | |
| 773 | ["20261114130000-desk-note.ts", m328], | |
| 774 | ["20261114130000-repo-template.ts", m329], | |
| 775 | ["20261114140000-desk-note-repo.ts", m330], | |
| 776 | ["20261114235900-admin-ask.ts", m331], | |
| 777 | ["20261115100000-usage-issue-review-approved.ts", m332], | |
| 778 | ["20261115110000-comment-question.ts", m333], | |
| 779 | ["20261115110000-keeper-write-pause.ts", m334], | |
| 780 | ["20261115110000-offer-receipt.ts", m335], | |
| 781 | ["20261115110000-payments.ts", m336], | |
| 782 | ["20261115120000-app-migration.ts", m337], | |
| 783 | ["20261115120000-gate-snooze.ts", m338], | |
| 784 | ["20261115120000-payment-refund-pending.ts", m339], | |
| 785 | ["20261115130000-oauth-grant-start.ts", m340], | |
| 786 | ["20261115130000-repo-wallet.ts", m341], | |
| 787 | ["20261115140000-event-actor-id-index.ts", m342], | |
| 788 | ["20261115150000-app-release.ts", m343], | |
| 789 | ["20261115150000-crew-off.ts", m344], | |
| 790 | ["20261115150000-pull-proposal-attestation.ts", m345], | |
| 791 | ["20261115150000-pull-review-steps.ts", m346], | |
| 792 | ["20261116005600-check-runner.ts", m347], | |
| 793 | ["20261116090000-timer-content-type.ts", m348], | |
| 794 | ["20261116100000-domain-cut-over.ts", m349], | |
| 795 | ["20261116110000-bet-cap.ts", m350], | |
| 796 | ["20261116110000-duty-dismissed.ts", m351], | |
| 797 | ["20261116120000-fork-offer.ts", m352], | |
| 798 | ["20261116120000-session-browser.ts", m353], | |
| 799 | ["20261117090000-run-agent-window.ts", m354], | |
| 800 | ["20261120100000-conversation-pinned.ts", m355], | |
| 801 | ["20261120100000-maintenance-quiet.ts", m356], | |
| 802 | ["20261120120000-fork-offer-withdrawn.ts", m357], | |
| 803 | ["20261120120000-issue-closed-done.ts", m358], | |
| 804 | ["20261120140000-issue-origin-clock.ts", m359], | |
| 805 | ["20261121010000-idempotency-headers.ts", m360], | |
| 806 | ["20261121010100-script-error-untrusted.ts", m361], | |
| 807 | ["20261121090000-guest-approval-head.ts", m362], | |
| 808 | ["20261121090000-run-token-read.ts", m363], | |
| 809 | ["20261121120000-org-grant-owner.ts", m364], | |
| 810 | ["20261121150000-feed-filter-steps.ts", m365], | |
| 811 | ["20261121170000-repo-deleting.ts", m366], | |
| 812 | ["20261121190000-check-runner-jobs.ts", m367], | |
| 813 | ["20261121210000-check-runner-ran.ts", m368], | |
| 814 | ["20261121230000-heap-census.ts", m369], | |
| 815 | ["20261122090000-account-close-request.ts", m370], | |
| 816 | ["20261122120000-daily-proof.ts", m371], | |
| 817 | ["20261122120000-status-day.ts", m372], | |
| 818 | ["20261123032018-conversation-card.ts", m373], | |
| 819 | ["20261123090000-account-purge-tried.ts", m374], | |
| 820 | ["20261123090000-chapter-item-place.ts", m375], | |
| 821 | ["20261123090000-outsider-status.ts", m376], | |
| 822 | ["20261123100000-account-purge-held.ts", m377], | |
| 823 | ["20261123110000-report-reason.ts", m378], | |
| 824 | ["20261123120000-daily-proof-release.ts", m379], | |
| 825 | ["20261123120000-offer-receipt-reason.ts", m380], | |
| 826 | ["20261123130000-conversation-run-reported.ts", m381], | |
| 827 | ["20261123130000-finding-autoclose.ts", m382], | |
| 828 | ["20261123130000-oauth-reuse.ts", m383], | |
| 829 | ["20261123130000-order-price.ts", m384], | |
| 830 | ["20261123130000-origin-run-note.ts", m385], | |
| 831 | ["20261123130000-repo-made-from.ts", m386], | |
| 832 | ["20261123130000-route-hour-synthetic.ts", m387], | |
| 833 | ["20261123130000-timer-awaiting.ts", m388], | |
| 834 | ["20261123140000-cloud-account-ceiling.ts", m389], | |
| 835 | ["20261124034500-conversation-card-press.ts", m390], | |
| 836 | ["20261124040000-pinned-claimed.ts", m391], | |
| 837 | ["20261124042209-pinned-host-claim.ts", m392], | |
| 838 | ["20261124053225-pinned-reached.ts", m393], | |
| 839 | ["20261124151500-run-sent.ts", m394], | |
| 840 | ["20261124185948-pinned-place.ts", m395], | |
| 841 | ["20261124191005-pinned-dns.ts", m396], | |
| 842 | ["20261124200000-follow-crew-resolves.ts", m397], | |
| 843 | ["20261124232400-pull-draft.ts", m398], | |
| 844 | ["20261124234131-contributors.ts", m399], | |
| 845 | ["20261125001539-web-page.ts", m400], | |
| 846 | ["20261125010000-warm-pool.ts", m401], | |
| 847 | ["20261125020000-forge-order-place.ts", m402], | |
| 848 | ["20261125180000-connections.ts", m403], | |
| 849 | ["20261125180000-invite-repo.ts", m404], | |
| 850 | ["20261125183000-talk-model-choice.ts", m405], | |
| 851 | ["20261125190500-connection-effort.ts", m406], | |
| 852 | ["20261125200000-copies-elsewhere.ts", m407], | |
| 853 | ["20261125201000-connection-scope.ts", m408], | |
| 854 | ["20261125214141-subscription-limited.ts", m409], | |
| 855 | ["20261127000000-pinned-watch.ts", m410], | |
| 856 | ["20261127090000-run-agent-finished-actor.ts", m411], | |
| 857 | ["20261127100000-check-start.ts", m412], | |
| 858 | ["20261127100000-cloud-account-project.ts", m413], | |
| 859 | ["20261127100000-cloud-watch.ts", m414], | |
| 860 | ["20261127110000-talk-watch.ts", m415], | |
| 861 | ["20261127200000-order-quote.ts", m416], | |
| 862 | ["20261127220000-experiment.ts", m417], | |
| 863 | ["20261127233000-routine-said.ts", m418], | |
| 864 | ["20261128042458-conversation-plan.ts", m419], | |
| 865 | ["20261128100000-journey-walks.ts", m420], | |
| 866 | ["20261128210000-allocation.ts", m421], | |
| 867 | ["20261129090000-print-job-id.ts", m422], | |
| 868 | ["20261129100000-pinned-lifetime.ts", m423], | |
| 869 | ["20261130040757-comment-issue-author.ts", m424], | |
| 870 | ["20261130090000-repo-review.ts", m425], | |
| 871 | ["20261130100000-app-flag.ts", m426], | |
| 872 | ["20261130110000-forge-template.ts", m427], | |
| 873 | ["20261130110000-gift-giver.ts", m428], | |
| 874 | ["20261130110000-origin-read-grant.ts", m429], | |
| 875 | ["20261130120000-drop-retired-keeper-beat.ts", m430], | |
| 876 | ["20261130130000-look-theme-key.ts", m431], | |
| 877 | ["20261130140000-config-store.ts", m432], | |
| 878 | ["20261130140000-lent-runner-scope.ts", m433], | |
| 879 | ["20261130140000-look-drops-old-key.ts", m434], | |
| 880 | ["20261130170000-fence-read-from.ts", m435], | |
| 881 | ["20261130170100-chat-build-lane.ts", m436], | |
| 882 | ["20261130235220-run-check-plan.ts", m437], | |
| 883 | ]; |
src/generated/screens.ts added +251
| @@ -0,0 +1,251 @@ | ||
| 1 | // Generated by `bun scripts/own-source.ts`; do not edit. `test/own-source.test.ts` fails when it is | |
| 2 | // stale. | |
| 3 | ||
| 4 | import * as s0 from "../tui/screens/access.ts"; | |
| 5 | import * as s1 from "../tui/screens/account_access.ts"; | |
| 6 | import * as s2 from "../tui/screens/agents.ts"; | |
| 7 | import * as s3 from "../tui/screens/app_templates.ts"; | |
| 8 | import * as s4 from "../tui/screens/apps_crew.ts"; | |
| 9 | import * as s5 from "../tui/screens/archived.ts"; | |
| 10 | import * as s6 from "../tui/screens/ask_data.ts"; | |
| 11 | import * as s7 from "../tui/screens/audit.ts"; | |
| 12 | import * as s8 from "../tui/screens/bets.ts"; | |
| 13 | import * as s9 from "../tui/screens/billing.ts"; | |
| 14 | import * as s10 from "../tui/screens/billinglinks.ts"; | |
| 15 | import * as s11 from "../tui/screens/bills.ts"; | |
| 16 | import * as s12 from "../tui/screens/boards.ts"; | |
| 17 | import * as s13 from "../tui/screens/bottleneck.ts"; | |
| 18 | import * as s14 from "../tui/screens/bugs.ts"; | |
| 19 | import * as s15 from "../tui/screens/bulk.ts"; | |
| 20 | import * as s16 from "../tui/screens/captain.ts"; | |
| 21 | import * as s17 from "../tui/screens/childcredit.ts"; | |
| 22 | import * as s18 from "../tui/screens/claim_link.ts"; | |
| 23 | import * as s19 from "../tui/screens/claim_start.ts"; | |
| 24 | import * as s20 from "../tui/screens/cloud.ts"; | |
| 25 | import * as s21 from "../tui/screens/codes.ts"; | |
| 26 | import * as s22 from "../tui/screens/connections.ts"; | |
| 27 | import * as s23 from "../tui/screens/controls.ts"; | |
| 28 | import * as s24 from "../tui/screens/cores.ts"; | |
| 29 | import * as s25 from "../tui/screens/crewbudgets.ts"; | |
| 30 | import * as s26 from "../tui/screens/crewhandover.ts"; | |
| 31 | import * as s27 from "../tui/screens/crewkey.ts"; | |
| 32 | import * as s28 from "../tui/screens/crewsplits.ts"; | |
| 33 | import * as s29 from "../tui/screens/crewtop.ts"; | |
| 34 | import * as s30 from "../tui/screens/dataset.ts"; | |
| 35 | import * as s31 from "../tui/screens/design.ts"; | |
| 36 | import * as s32 from "../tui/screens/design_gallery.ts"; | |
| 37 | import * as s33 from "../tui/screens/devices.ts"; | |
| 38 | import * as s34 from "../tui/screens/disks.ts"; | |
| 39 | import * as s35 from "../tui/screens/displays.ts"; | |
| 40 | import * as s36 from "../tui/screens/domains.ts"; | |
| 41 | import * as s37 from "../tui/screens/dotfiles.ts"; | |
| 42 | import * as s38 from "../tui/screens/drift.ts"; | |
| 43 | import * as s39 from "../tui/screens/dutybudgets.ts"; | |
| 44 | import * as s40 from "../tui/screens/dutyswitch.ts"; | |
| 45 | import * as s41 from "../tui/screens/economics.ts"; | |
| 46 | import * as s42 from "../tui/screens/edgeonly.ts"; | |
| 47 | import * as s43 from "../tui/screens/experiments.ts"; | |
| 48 | import * as s44 from "../tui/screens/featurefeed.ts"; | |
| 49 | import * as s45 from "../tui/screens/features.ts"; | |
| 50 | import * as s46 from "../tui/screens/featureswitch.ts"; | |
| 51 | import * as s47 from "../tui/screens/feed.ts"; | |
| 52 | import * as s48 from "../tui/screens/flowsall.ts"; | |
| 53 | import * as s49 from "../tui/screens/footing.ts"; | |
| 54 | import * as s50 from "../tui/screens/forgeready.ts"; | |
| 55 | import * as s51 from "../tui/screens/forges.ts"; | |
| 56 | import * as s52 from "../tui/screens/forgeview.ts"; | |
| 57 | import * as s53 from "../tui/screens/front.ts"; | |
| 58 | import * as s54 from "../tui/screens/frontms.ts"; | |
| 59 | import * as s55 from "../tui/screens/funnel.ts"; | |
| 60 | import * as s56 from "../tui/screens/gifts.ts"; | |
| 61 | import * as s57 from "../tui/screens/health_voice.ts"; | |
| 62 | import * as s58 from "../tui/screens/home_pins.ts"; | |
| 63 | import * as s59 from "../tui/screens/hostreach.ts"; | |
| 64 | import * as s60 from "../tui/screens/infra.ts"; | |
| 65 | import * as s61 from "../tui/screens/inventory.ts"; | |
| 66 | import * as s62 from "../tui/screens/invites.ts"; | |
| 67 | import * as s63 from "../tui/screens/knobs.ts"; | |
| 68 | import * as s64 from "../tui/screens/lapsed.ts"; | |
| 69 | import * as s65 from "../tui/screens/limits.ts"; | |
| 70 | import * as s66 from "../tui/screens/loopstalls.ts"; | |
| 71 | import * as s67 from "../tui/screens/madefrom.ts"; | |
| 72 | import * as s68 from "../tui/screens/maintainruns.ts"; | |
| 73 | import * as s69 from "../tui/screens/maintenance.ts"; | |
| 74 | import * as s70 from "../tui/screens/maintenanceweek.ts"; | |
| 75 | import * as s71 from "../tui/screens/mergedbranches.ts"; | |
| 76 | import * as s72 from "../tui/screens/mirrorpacks.ts"; | |
| 77 | import * as s73 from "../tui/screens/model.ts"; | |
| 78 | import * as s74 from "../tui/screens/money.ts"; | |
| 79 | import * as s75 from "../tui/screens/newissue.ts"; | |
| 80 | import * as s76 from "../tui/screens/next.ts"; | |
| 81 | import * as s77 from "../tui/screens/nowlist.ts"; | |
| 82 | import * as s78 from "../tui/screens/offers.ts"; | |
| 83 | import * as s79 from "../tui/screens/offsite.ts"; | |
| 84 | import * as s80 from "../tui/screens/orggrants.ts"; | |
| 85 | import * as s81 from "../tui/screens/orgteams.ts"; | |
| 86 | import * as s82 from "../tui/screens/originahead.ts"; | |
| 87 | import * as s83 from "../tui/screens/owner.ts"; | |
| 88 | import * as s84 from "../tui/screens/packrepos.ts"; | |
| 89 | import * as s85 from "../tui/screens/payments.ts"; | |
| 90 | import * as s86 from "../tui/screens/people.ts"; | |
| 91 | import * as s87 from "../tui/screens/pinned.ts"; | |
| 92 | import * as s88 from "../tui/screens/planner.ts"; | |
| 93 | import * as s89 from "../tui/screens/planrow.ts"; | |
| 94 | import * as s90 from "../tui/screens/plans.ts"; | |
| 95 | import * as s91 from "../tui/screens/previewdirs.ts"; | |
| 96 | import * as s92 from "../tui/screens/profile.ts"; | |
| 97 | import * as s93 from "../tui/screens/quotas.ts"; | |
| 98 | import * as s94 from "../tui/screens/recoverykit.ts"; | |
| 99 | import * as s95 from "../tui/screens/refused.ts"; | |
| 100 | import * as s96 from "../tui/screens/repolist.ts"; | |
| 101 | import * as s97 from "../tui/screens/requests.ts"; | |
| 102 | import * as s98 from "../tui/screens/resilience.ts"; | |
| 103 | import * as s99 from "../tui/screens/returning.ts"; | |
| 104 | import * as s100 from "../tui/screens/returns.ts"; | |
| 105 | import * as s101 from "../tui/screens/scorecard.ts"; | |
| 106 | import * as s102 from "../tui/screens/scrapes.ts"; | |
| 107 | import * as s103 from "../tui/screens/secrets.ts"; | |
| 108 | import * as s104 from "../tui/screens/sentinel.ts"; | |
| 109 | import * as s105 from "../tui/screens/ship_time.ts"; | |
| 110 | import * as s106 from "../tui/screens/slowpages.ts"; | |
| 111 | import * as s107 from "../tui/screens/sold.ts"; | |
| 112 | import * as s108 from "../tui/screens/spend.ts"; | |
| 113 | import * as s109 from "../tui/screens/stalepulls.ts"; | |
| 114 | import * as s110 from "../tui/screens/subscriptions.ts"; | |
| 115 | import * as s111 from "../tui/screens/system.ts"; | |
| 116 | import * as s112 from "../tui/screens/teams.ts"; | |
| 117 | import * as s113 from "../tui/screens/telemetry.ts"; | |
| 118 | import * as s114 from "../tui/screens/tell_undo.ts"; | |
| 119 | import * as s115 from "../tui/screens/traffic.ts"; | |
| 120 | import * as s116 from "../tui/screens/trafficview.ts"; | |
| 121 | import * as s117 from "../tui/screens/valves.ts"; | |
| 122 | import * as s118 from "../tui/screens/waiting.ts"; | |
| 123 | import * as s119 from "../tui/screens/waiting_for_me.ts"; | |
| 124 | import * as s120 from "../tui/screens/wayback.ts"; | |
| 125 | import * as s121 from "../tui/screens/weekcard.ts"; | |
| 126 | ||
| 127 | /** Each screen file that declares palette entries: its module and the export names. */ | |
| 128 | export const SCREEN_MODULES: readonly (readonly [Record<string, unknown>, readonly string[]])[] = [ | |
| 129 | [s0, ["entry"]], | |
| 130 | [s1, ["entry"]], | |
| 131 | [s2, ["entry"]], | |
| 132 | [s3, ["entry"]], | |
| 133 | [s4, ["entry"]], | |
| 134 | [s5, ["entry"]], | |
| 135 | [s6, ["entry"]], | |
| 136 | [s7, ["entry"]], | |
| 137 | [s8, ["entry"]], | |
| 138 | [s9, ["entry"]], | |
| 139 | [s10, ["entry"]], | |
| 140 | [s11, ["entry"]], | |
| 141 | [s12, ["entry"]], | |
| 142 | [s13, ["entry"]], | |
| 143 | [s14, ["entry"]], | |
| 144 | [s15, ["entry"]], | |
| 145 | [s16, ["entry"]], | |
| 146 | [s17, ["entry"]], | |
| 147 | [s18, ["entry","recoveryEntry"]], | |
| 148 | [s19, ["entry"]], | |
| 149 | [s20, ["entry"]], | |
| 150 | [s21, ["entry"]], | |
| 151 | [s22, ["entry"]], | |
| 152 | [s23, ["entry"]], | |
| 153 | [s24, ["entry"]], | |
| 154 | [s25, ["entry"]], | |
| 155 | [s26, ["entry"]], | |
| 156 | [s27, ["entry"]], | |
| 157 | [s28, ["entry"]], | |
| 158 | [s29, ["entry"]], | |
| 159 | [s30, ["entry"]], | |
| 160 | [s31, ["entry"]], | |
| 161 | [s32, ["entry"]], | |
| 162 | [s33, ["entry"]], | |
| 163 | [s34, ["entry"]], | |
| 164 | [s35, ["entry"]], | |
| 165 | [s36, ["entry"]], | |
| 166 | [s37, ["entry"]], | |
| 167 | [s38, ["entry"]], | |
| 168 | [s39, ["entry"]], | |
| 169 | [s40, ["entry"]], | |
| 170 | [s41, ["entry"]], | |
| 171 | [s42, ["entry"]], | |
| 172 | [s43, ["entry"]], | |
| 173 | [s44, ["entry"]], | |
| 174 | [s45, ["entry"]], | |
| 175 | [s46, ["entry"]], | |
| 176 | [s47, ["entry"]], | |
| 177 | [s48, ["entry"]], | |
| 178 | [s49, ["entry"]], | |
| 179 | [s50, ["entry"]], | |
| 180 | [s51, ["entry"]], | |
| 181 | [s52, ["entry"]], | |
| 182 | [s53, ["entry"]], | |
| 183 | [s54, ["entry"]], | |
| 184 | [s55, ["entry"]], | |
| 185 | [s56, ["entry"]], | |
| 186 | [s57, ["entry"]], | |
| 187 | [s58, ["entry"]], | |
| 188 | [s59, ["entry"]], | |
| 189 | [s60, ["entry"]], | |
| 190 | [s61, ["entry"]], | |
| 191 | [s62, ["entry"]], | |
| 192 | [s63, ["entry"]], | |
| 193 | [s64, ["entry"]], | |
| 194 | [s65, ["entry"]], | |
| 195 | [s66, ["entry"]], | |
| 196 | [s67, ["entry"]], | |
| 197 | [s68, ["entry"]], | |
| 198 | [s69, ["entry"]], | |
| 199 | [s70, ["entry"]], | |
| 200 | [s71, ["entry"]], | |
| 201 | [s72, ["entry"]], | |
| 202 | [s73, ["modelGrantEntry","modelCeilingEntry"]], | |
| 203 | [s74, ["entry"]], | |
| 204 | [s75, ["entry"]], | |
| 205 | [s76, ["nextAllEntry"]], | |
| 206 | [s77, ["entry"]], | |
| 207 | [s78, ["entry"]], | |
| 208 | [s79, ["entry"]], | |
| 209 | [s80, ["entry"]], | |
| 210 | [s81, ["entry"]], | |
| 211 | [s82, ["entry"]], | |
| 212 | [s83, ["entry"]], | |
| 213 | [s84, ["entry"]], | |
| 214 | [s85, ["entry"]], | |
| 215 | [s86, ["entry"]], | |
| 216 | [s87, ["entry"]], | |
| 217 | [s88, ["entry"]], | |
| 218 | [s89, ["entry"]], | |
| 219 | [s90, ["entry"]], | |
| 220 | [s91, ["entry"]], | |
| 221 | [s92, ["entry"]], | |
| 222 | [s93, ["entry"]], | |
| 223 | [s94, ["entry"]], | |
| 224 | [s95, ["entry"]], | |
| 225 | [s96, ["entry"]], | |
| 226 | [s97, ["entry"]], | |
| 227 | [s98, ["entry"]], | |
| 228 | [s99, ["entry"]], | |
| 229 | [s100, ["entry"]], | |
| 230 | [s101, ["entry"]], | |
| 231 | [s102, ["entry"]], | |
| 232 | [s103, ["entry"]], | |
| 233 | [s104, ["entry"]], | |
| 234 | [s105, ["entry"]], | |
| 235 | [s106, ["entry"]], | |
| 236 | [s107, ["entry"]], | |
| 237 | [s108, ["entry"]], | |
| 238 | [s109, ["entry"]], | |
| 239 | [s110, ["entry"]], | |
| 240 | [s111, ["entry"]], | |
| 241 | [s112, ["entry"]], | |
| 242 | [s113, ["entry"]], | |
| 243 | [s114, ["entry"]], | |
| 244 | [s115, ["entry"]], | |
| 245 | [s116, ["entry"]], | |
| 246 | [s117, ["entry"]], | |
| 247 | [s118, ["entry"]], | |
| 248 | [s119, ["entry"]], | |
| 249 | [s120, ["entry"]], | |
| 250 | [s121, ["entry"]], | |
| 251 | ]; |
src/http/route_marks.ts +4 −13
| @@ -14,8 +14,7 @@ | ||
| 14 | 14 | * fails on a route marked neither, so a new route must choose here. |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | import { readdirSync, readFileSync } from "node:fs"; | |
| 18 | import { join } from "node:path"; | |
| 17 | import { MARK_FILES } from "../generated/marks.ts"; | |
| 19 | 18 | import { Router } from "./router.ts"; |
| 20 | 19 | |
| 21 | 20 | export type Mark = "admin" | "open"; |
| @@ -27,19 +26,11 @@ export interface Member { | ||
| 27 | 26 | readonly routes?: Readonly<Record<string, Mark>>; |
| 28 | 27 | } |
| 29 | 28 | |
| 30 | const DIR = join(import.meta.dir, "marks"); | |
| 31 | ||
| 32 | 29 | /** |
| 33 | * The members, one per file of `marks/`, in file-name order. A pull that adds a head adds a file. | |
| 30 | * The members, one per file of `marks/`, in file-name order, as `src/generated/` lists them. A pull | |
| 31 | * that adds a head adds a file and regenerates it. | |
| 34 | 32 | */ |
| 35 | export function readMembers(dir: string = DIR): Member[] { | |
| 36 | return readdirSync(dir) | |
| 37 | .filter((name) => name.endsWith(".json")) | |
| 38 | .sort() | |
| 39 | .map((name) => JSON.parse(readFileSync(join(dir, name), "utf8")) as Member); | |
| 40 | } | |
| 41 | ||
| 42 | const members = readMembers(); | |
| 33 | const members = MARK_FILES as readonly Member[]; | |
| 43 | 34 | |
| 44 | 35 | /** |
| 45 | 36 | * Every head of a registered route: one mark for all of it, or `mixed` when each route is listed |
src/kernel/data_home.ts +13 −7
| @@ -27,13 +27,19 @@ function real(path: string): string { | ||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | function git(args: string[], cwd: string): { code: number; out: string } { |
| 30 | const run = Bun.spawnSync(["git", ...args], { | |
| 31 | cwd, | |
| 32 | stdout: "pipe", | |
| 33 | stderr: "ignore", | |
| 34 | env: { PATH: process.env.PATH ?? "/usr/bin:/bin", LC_ALL: "C" }, | |
| 35 | }); | |
| 36 | return { code: run.exitCode ?? 1, out: run.stdout.toString().trim() }; | |
| 30 | try { | |
| 31 | const run = Bun.spawnSync(["git", ...args], { | |
| 32 | cwd, | |
| 33 | stdout: "pipe", | |
| 34 | stderr: "ignore", | |
| 35 | env: { PATH: process.env.PATH ?? "/usr/bin:/bin", LC_ALL: "C" }, | |
| 36 | }); | |
| 37 | return { code: run.exitCode ?? 1, out: run.stdout.toString().trim() }; | |
| 38 | } catch { | |
| 39 | // The directory is not on disk (a compiled executable's own files are in memory): no checkout | |
| 40 | // to guard. | |
| 41 | return { code: 1, out: "" }; | |
| 42 | } | |
| 37 | 43 | } |
| 38 | 44 | |
| 39 | 45 | /** |
src/kernel/migrate.ts +10 −18
| @@ -49,25 +49,17 @@ export interface MigrationFile { | ||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | * The migrations in `dir`, one file each, in the order their names sort. | |
| 53 | * Each file's default export is its SQL. Read once, at boot, synchronously: | |
| 54 | * the list is the schema, so a name that does not fit or a file that | |
| 55 | * exports no SQL is a defect, never a migration quietly skipped. | |
| 52 | * The migrations in order, from `[file name, default export]` pairs, which is how the bundle holds | |
| 53 | * them (`generated/migrations.ts`): the name fits, the export is SQL. | |
| 56 | 54 | */ |
| 57 | export function readMigrations(dir: string): MigrationFile[] { | |
| 58 | return readdirSync(dir) | |
| 59 | .sort() | |
| 60 | .map((file) => { | |
| 61 | if (!MIGRATION_FILE.test(file)) | |
| 62 | defect( | |
| 63 | "db.migration_name", | |
| 64 | `${file} in ${dir} is not <id>-<slug>.ts (id: 0NNN or YYYYMMDDHHMMSS)`, | |
| 65 | ); | |
| 66 | const sql: unknown = require(join(dir, file)).default; | |
| 67 | if (typeof sql !== "string") | |
| 68 | defect("db.migration_missing", `${file} has no default export of SQL`); | |
| 69 | return { name: file.slice(0, -".ts".length), sql }; | |
| 70 | }); | |
| 55 | export function checkMigrations(modules: readonly (readonly [string, unknown])[]): MigrationFile[] { | |
| 56 | return modules.map(([file, sql]) => { | |
| 57 | if (!MIGRATION_FILE.test(file)) | |
| 58 | defect("db.migration_name", `${file} is not <id>-<slug>.ts (id: 0NNN or YYYYMMDDHHMMSS)`); | |
| 59 | if (typeof sql !== "string") | |
| 60 | defect("db.migration_missing", `${file} has no default export of SQL`); | |
| 61 | return { name: file.slice(0, -".ts".length), sql }; | |
| 62 | }); | |
| 71 | 63 | } |
| 72 | 64 | |
| 73 | 65 | /** |
src/maintain/duty_files.ts added +13
| @@ -0,0 +1,13 @@ | ||
| 1 | /** | |
| 2 | * The duty files of a directory: read by the build step (`scripts/own-source.ts`) and the roster | |
| 3 | * test, never at boot (#16853). | |
| 4 | */ | |
| 5 | ||
| 6 | import { readdirSync } from "node:fs"; | |
| 7 | ||
| 8 | /** The duty files' names in a directory, sorted: every `.ts` but the idle watcher. */ | |
| 9 | export function dutyFiles(from: URL): string[] { | |
| 10 | return readdirSync(from) | |
| 11 | .filter((f) => f.endsWith(".ts") && f !== "duty_idle.ts") | |
| 12 | .sort(); | |
| 13 | } |
src/maintain/registry.ts +18 −25
| @@ -1,39 +1,32 @@ | ||
| 1 | 1 | /** |
| 2 | * The duties the forge runs, built from the files in `duties/` when this module loads (#14355): a | |
| 3 | * duty file exports `duty` and is on the roster; a pull that adds a duty adds that one file and | |
| 4 | * edits no shared list. Sorted by file name (the order the runner and /maintenance show). | |
| 5 | * `duty_idle.ts` is not listed: it watches the rest. | |
| 2 | * The duties the forge runs, one per file in `duties/` (#14355), listed in | |
| 3 | * `src/generated/duties.ts` by `scripts/own-source.ts`: a duty file exports `duty` and is on the | |
| 4 | * roster; a pull that adds a duty adds that one file and edits no shared list. Sorted by file name | |
| 5 | * (the order the runner and /maintenance show). `duty_idle.ts` is not listed: it watches the rest. | |
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | import { readdirSync } from "node:fs"; | |
| 9 | import { fileURLToPath } from "node:url"; | |
| 10 | 8 | import type { Duty } from "./duty.ts"; |
| 9 | import { DUTY_MODULES } from "../generated/duties.ts"; | |
| 11 | 10 | import { dutyIdle } from "./duties/duty_idle.ts"; |
| 12 | 11 | |
| 13 | const dir = new URL("./duties/", import.meta.url); | |
| 14 | ||
| 15 | /** The duty files' names in a directory, sorted: every `.ts` but the idle watcher. */ | |
| 16 | export function dutyFiles(from: URL = dir): string[] { | |
| 17 | return readdirSync(from) | |
| 18 | .filter((f) => f.endsWith(".ts") && f !== "duty_idle.ts") | |
| 19 | .sort(); | |
| 20 | } | |
| 21 | ||
| 22 | 12 | /** |
| 23 | * The duties the files in a directory export, in file-name order. A file without `duty` throws, | |
| 24 | * naming the file. Loaded with `require`, not a top-level `await import`: this module sits in | |
| 25 | * import cycles (a duty reaches the runner, which imports this), and a cycle through an awaiting | |
| 26 | * module never settles. | |
| 13 | * The duties the modules export, in the order given. A module without `duty` throws, naming its | |
| 14 | * file. Each is loaded with `require`, not a top-level `await import`: this module sits in import | |
| 15 | * cycles (a duty reaches the runner, which imports this), and a cycle through an awaiting module | |
| 16 | * never settles. | |
| 27 | 17 | */ |
| 28 | export function loadDuties(from: URL = dir): Duty[] { | |
| 29 | return dutyFiles(from).map((f) => { | |
| 30 | const m = require(fileURLToPath(new URL(f, from))) as { duty?: Duty }; | |
| 31 | if (m.duty === undefined) throw new Error(`${f} in ${fileURLToPath(from)} must export \`duty\` (it is the roster's entry, #14355)`); | |
| 32 | return m.duty; | |
| 18 | export function rosterOf(modules: readonly (readonly [string, () => { duty?: unknown }])[]): Duty[] { | |
| 19 | return modules.map(([f, load]) => { | |
| 20 | const m = load(); | |
| 21 | if (m.duty === undefined) throw new Error(`${f} must export \`duty\` (it is the roster's entry, #14355)`); | |
| 22 | return m.duty as Duty; | |
| 33 | 23 | }); |
| 34 | 24 | } |
| 35 | 25 | |
| 36 | const others: readonly Duty[] = loadDuties(); | |
| 26 | /** | |
| 27 | * The roster as `src/generated/duties.ts` lists it (a pull that adds a duty file regenerates it). | |
| 28 | */ | |
| 29 | const others: readonly Duty[] = rosterOf(DUTY_MODULES); | |
| 37 | 30 | |
| 38 | 31 | /** The duties plus the one that watches them for silence. */ |
| 39 | 32 | export const duties: readonly Duty[] = [...others, dutyIdle(others)]; |
src/release/boot.ts +17 −14
| @@ -227,17 +227,20 @@ export function parseArgs(argv: readonly string[]): { from?: string; budgetMs: n | ||
| 227 | 227 | return from === undefined ? { budgetMs } : { from, budgetMs }; |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | if (import.meta.main) { | |
| 231 | const args = parseArgs(process.argv.slice(2)); | |
| 232 | if (typeof args === "string") { | |
| 233 | console.error(args); | |
| 234 | process.exit(2); | |
| 235 | } | |
| 236 | const { version } = running(); | |
| 237 | const tree = join(import.meta.dir, "..", ".."); | |
| 238 | const result = await proveBoot({ tree, version, ...args }); | |
| 239 | const what = args.from === undefined ? "an empty data directory" : `a copy of ${args.from}`; | |
| 240 | if (result.ok) console.log(`boot ok: ${version} answered health on ${what} in ${result.ms}ms (${result.arch})`); | |
| 241 | else console.error(`boot failed: ${version} on ${what} ${result.line}`); | |
| 242 | process.exit(result.ok ? 0 : 1); | |
| 243 | } | |
| 230 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 231 | // (#16853). | |
| 232 | if (import.meta.main) | |
| 233 | void (async () => { | |
| 234 | const args = parseArgs(process.argv.slice(2)); | |
| 235 | if (typeof args === "string") { | |
| 236 | console.error(args); | |
| 237 | process.exit(2); | |
| 238 | } | |
| 239 | const { version } = running(); | |
| 240 | const tree = join(import.meta.dir, "..", ".."); | |
| 241 | const result = await proveBoot({ tree, version, ...args }); | |
| 242 | const what = args.from === undefined ? "an empty data directory" : `a copy of ${args.from}`; | |
| 243 | if (result.ok) console.log(`boot ok: ${version} answered health on ${what} in ${result.ms}ms (${result.arch})`); | |
| 244 | else console.error(`boot failed: ${version} on ${what} ${result.line}`); | |
| 245 | process.exit(result.ok ? 0 : 1); | |
| 246 | })(); |
src/release/launch.ts +48 −45
| @@ -454,49 +454,52 @@ export async function launch(input: LaunchInput): Promise<Launched> { | ||
| 454 | 454 | return { ran: "rollback", child, line: `${input.version}: ${why}; rolled back to ${good.version}` }; |
| 455 | 455 | } |
| 456 | 456 | |
| 457 | if (import.meta.main) { | |
| 458 | const env = process.env; | |
| 459 | const version = (env["FORGE_VERSION"] ?? "").trim().replace(/^v(?=\d)/, ""); | |
| 460 | const commit = (env["FORGE_COMMIT"] ?? "").trim(); | |
| 461 | const graceS = Number(env["FORGE_READY_GRACE_S"] ?? ""); | |
| 462 | let current: Subprocess | undefined; | |
| 463 | let stopping = false; | |
| 464 | const dataHere = env["FORGE_DATA"] || "data"; | |
| 465 | // Whatever an earlier container left names processes that are not ours. | |
| 466 | clearServing(dataHere); | |
| 467 | for (const signal of ["SIGTERM", "SIGINT"] as const) | |
| 468 | process.on(signal, () => { | |
| 469 | stopping = true; | |
| 470 | current?.kill(signal); | |
| 471 | signalServing(dataHere, signal); | |
| 457 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 458 | // (#16853). | |
| 459 | if (import.meta.main) | |
| 460 | void (async () => { | |
| 461 | const env = process.env; | |
| 462 | const version = (env["FORGE_VERSION"] ?? "").trim().replace(/^v(?=\d)/, ""); | |
| 463 | const commit = (env["FORGE_COMMIT"] ?? "").trim(); | |
| 464 | const graceS = Number(env["FORGE_READY_GRACE_S"] ?? ""); | |
| 465 | let current: Subprocess | undefined; | |
| 466 | let stopping = false; | |
| 467 | const dataHere = env["FORGE_DATA"] || "data"; | |
| 468 | // Whatever an earlier container left names processes that are not ours. | |
| 469 | clearServing(dataHere); | |
| 470 | for (const signal of ["SIGTERM", "SIGINT"] as const) | |
| 471 | process.on(signal, () => { | |
| 472 | stopping = true; | |
| 473 | current?.kill(signal); | |
| 474 | signalServing(dataHere, signal); | |
| 475 | }); | |
| 476 | const launched = await launch({ | |
| 477 | tree: join(import.meta.dir, "..", ".."), | |
| 478 | dataDir: env["FORGE_DATA"] || "data", | |
| 479 | port: Number(env["PORT"] ?? 3000), | |
| 480 | version: VERSION.test(version) ? version : "dev", | |
| 481 | commit: commit === "" ? null : commit, | |
| 482 | env, | |
| 483 | ...(env["FORGE_LAUNCH_HANDOFF"] === "1" && env["FORGE_STDERR_TAIL"] ? { stderrFile: env["FORGE_STDERR_TAIL"] } : {}), | |
| 484 | ...(Number.isInteger(graceS) && graceS > 0 ? { graceMs: graceS * 1000 } : {}), | |
| 485 | started: (child) => { | |
| 486 | current = child; | |
| 487 | }, | |
| 488 | stopping: () => stopping, | |
| 472 | 489 | }); |
| 473 | const launched = await launch({ | |
| 474 | tree: join(import.meta.dir, "..", ".."), | |
| 475 | dataDir: env["FORGE_DATA"] || "data", | |
| 476 | port: Number(env["PORT"] ?? 3000), | |
| 477 | version: VERSION.test(version) ? version : "dev", | |
| 478 | commit: commit === "" ? null : commit, | |
| 479 | env, | |
| 480 | ...(env["FORGE_LAUNCH_HANDOFF"] === "1" && env["FORGE_STDERR_TAIL"] ? { stderrFile: env["FORGE_STDERR_TAIL"] } : {}), | |
| 481 | ...(Number.isInteger(graceS) && graceS > 0 ? { graceMs: graceS * 1000 } : {}), | |
| 482 | started: (child) => { | |
| 483 | current = child; | |
| 484 | }, | |
| 485 | stopping: () => stopping, | |
| 486 | }); | |
| 487 | console.error(`launch: ${launched.line}`); | |
| 488 | if (launched.ran === "none") process.exit(stopping ? 0 : 1); | |
| 489 | const handoff = env["FORGE_LAUNCH_HANDOFF"] === "1"; | |
| 490 | if (handoff) { | |
| 491 | // The entrypoint (boot.sh) waits on what serves from here, so this second Bun runtime ends | |
| 492 | // once the forge is ready: the release is named in serving.json and left running. | |
| 493 | writeServing(dataHere, { pid: launched.child.pid, sha: commit === "" ? version || "dev" : commit }); | |
| 494 | launched.child.unref(); | |
| 495 | process.exit(0); | |
| 496 | } | |
| 497 | const code = await launched.child.exited; | |
| 498 | // A swapped release took over and the process we started has drained: this container is that | |
| 499 | // process's now, and goes when it does (the pod then restarts on the newest good tree). | |
| 500 | await follow(dataHere, launched.child.pid); | |
| 501 | process.exit(code); | |
| 502 | } | |
| 490 | console.error(`launch: ${launched.line}`); | |
| 491 | if (launched.ran === "none") process.exit(stopping ? 0 : 1); | |
| 492 | const handoff = env["FORGE_LAUNCH_HANDOFF"] === "1"; | |
| 493 | if (handoff) { | |
| 494 | // The entrypoint (boot.sh) waits on what serves from here, so this second Bun runtime ends | |
| 495 | // once the forge is ready: the release is named in serving.json and left running. | |
| 496 | writeServing(dataHere, { pid: launched.child.pid, sha: commit === "" ? version || "dev" : commit }); | |
| 497 | launched.child.unref(); | |
| 498 | process.exit(0); | |
| 499 | } | |
| 500 | const code = await launched.child.exited; | |
| 501 | // A swapped release took over and the process we started has drained: this container is that | |
| 502 | // process's now, and goes when it does (the pod then restarts on the newest good tree). | |
| 503 | await follow(dataHere, launched.child.pid); | |
| 504 | process.exit(code); | |
| 505 | })(); |
src/runner/main.ts +32 −29
| @@ -446,32 +446,35 @@ export async function runRunner(options: RunnerOptions): Promise<void> { | ||
| 446 | 446 | await Promise.all(Array.from({ length: slots }, () => loop())); |
| 447 | 447 | } |
| 448 | 448 | |
| 449 | if (import.meta.main) { | |
| 450 | const forgeUrl = process.env["FORGE_URL"] ?? ""; | |
| 451 | const token = process.env["FORGE_RUNNER_TOKEN"] ?? ""; | |
| 452 | if (!/^https?:\/\//.test(forgeUrl) || token === "") { | |
| 453 | console.error( | |
| 454 | "usage: FORGE_URL=https://your.forge FORGE_RUNNER_TOKEN=forge_runner_… bun src/runner/main.ts", | |
| 455 | ); | |
| 456 | process.exit(2); | |
| 457 | } | |
| 458 | // The token is this process's alone: nothing it starts may read it from the environment. | |
| 459 | delete process.env["FORGE_RUNNER_TOKEN"]; | |
| 460 | const stopping = new AbortController(); | |
| 461 | for (const sig of ["SIGINT", "SIGTERM"] as const) | |
| 462 | process.on(sig, () => stopping.abort()); | |
| 463 | try { | |
| 464 | await runRunner({ | |
| 465 | forgeUrl, | |
| 466 | token, | |
| 467 | root: process.env["FORGE_RUNNER_DIR"] ?? join(tmpdir(), "forge-runner"), | |
| 468 | jobs: Number(process.env["FORGE_RUNNER_JOBS"] ?? "1") || 1, | |
| 469 | snapshots: process.env["FORGE_RUNNER_SNAPSHOTS"] || undefined, | |
| 470 | once: process.env["FORGE_RUNNER_ONCE"] === "1", | |
| 471 | signal: stopping.signal, | |
| 472 | }); | |
| 473 | } catch (error) { | |
| 474 | console.error(error instanceof Error ? error.message : String(error)); | |
| 475 | process.exit(1); | |
| 476 | } | |
| 477 | } | |
| 449 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 450 | // (#16853). | |
| 451 | if (import.meta.main) | |
| 452 | void (async () => { | |
| 453 | const forgeUrl = process.env["FORGE_URL"] ?? ""; | |
| 454 | const token = process.env["FORGE_RUNNER_TOKEN"] ?? ""; | |
| 455 | if (!/^https?:\/\//.test(forgeUrl) || token === "") { | |
| 456 | console.error( | |
| 457 | "usage: FORGE_URL=https://your.forge FORGE_RUNNER_TOKEN=forge_runner_… bun src/runner/main.ts", | |
| 458 | ); | |
| 459 | process.exit(2); | |
| 460 | } | |
| 461 | // The token is this process's alone: nothing it starts may read it from the environment. | |
| 462 | delete process.env["FORGE_RUNNER_TOKEN"]; | |
| 463 | const stopping = new AbortController(); | |
| 464 | for (const sig of ["SIGINT", "SIGTERM"] as const) | |
| 465 | process.on(sig, () => stopping.abort()); | |
| 466 | try { | |
| 467 | await runRunner({ | |
| 468 | forgeUrl, | |
| 469 | token, | |
| 470 | root: process.env["FORGE_RUNNER_DIR"] ?? join(tmpdir(), "forge-runner"), | |
| 471 | jobs: Number(process.env["FORGE_RUNNER_JOBS"] ?? "1") || 1, | |
| 472 | snapshots: process.env["FORGE_RUNNER_SNAPSHOTS"] || undefined, | |
| 473 | once: process.env["FORGE_RUNNER_ONCE"] === "1", | |
| 474 | signal: stopping.signal, | |
| 475 | }); | |
| 476 | } catch (error) { | |
| 477 | console.error(error instanceof Error ? error.message : String(error)); | |
| 478 | process.exit(1); | |
| 479 | } | |
| 480 | })(); |
src/snapshot/drill_child.ts +25 −22
| @@ -41,25 +41,28 @@ export function peakSoFar(readings: number): number { | ||
| 41 | 41 | |
| 42 | 42 | const say = (line: DrillLine): void => void process.stdout.write(`${JSON.stringify(line)}\n`); |
| 43 | 43 | |
| 44 | if (import.meta.main) { | |
| 45 | const job = JSON.parse(await Bun.stdin.text()) as DrillJob; | |
| 46 | let last = 0; | |
| 47 | let peak = 0; | |
| 48 | const result = await runDrill({ | |
| 49 | store: storeFrom(job.store), | |
| 50 | dataDir: job.dataDir, | |
| 51 | passphrase: job.passphrase, | |
| 52 | // A restore reports often; a line a second says as much. | |
| 53 | onProgress: (progress) => { | |
| 54 | const now = Date.now(); | |
| 55 | if (now - last < 1_000) return; | |
| 56 | last = now; | |
| 57 | // Buffers of finished reads are given back at once, not at the collector's leisure. | |
| 58 | Bun.gc(false); | |
| 59 | peak = Math.max(peak, process.memoryUsage.rss()); | |
| 60 | say({ progress }); | |
| 61 | }, | |
| 62 | }); | |
| 63 | say({ result, cost: { elapsedMs: Math.round(process.uptime() * 1_000), peakBytes: peakSoFar(peak) } }); | |
| 64 | process.exit(0); | |
| 65 | } | |
| 44 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 45 | // (#16853). | |
| 46 | if (import.meta.main) | |
| 47 | void (async () => { | |
| 48 | const job = JSON.parse(await Bun.stdin.text()) as DrillJob; | |
| 49 | let last = 0; | |
| 50 | let peak = 0; | |
| 51 | const result = await runDrill({ | |
| 52 | store: storeFrom(job.store), | |
| 53 | dataDir: job.dataDir, | |
| 54 | passphrase: job.passphrase, | |
| 55 | // A restore reports often; a line a second says as much. | |
| 56 | onProgress: (progress) => { | |
| 57 | const now = Date.now(); | |
| 58 | if (now - last < 1_000) return; | |
| 59 | last = now; | |
| 60 | // Buffers of finished reads are given back at once, not at the collector's leisure. | |
| 61 | Bun.gc(false); | |
| 62 | peak = Math.max(peak, process.memoryUsage.rss()); | |
| 63 | say({ progress }); | |
| 64 | }, | |
| 65 | }); | |
| 66 | say({ result, cost: { elapsedMs: Math.round(process.uptime() * 1_000), peakBytes: peakSoFar(peak) } }); | |
| 67 | process.exit(0); | |
| 68 | })(); |
src/snapshot/restore.ts +108 −104
| @@ -700,116 +700,120 @@ export async function restoreHostedInto( | ||
| 700 | 700 | return one; |
| 701 | 701 | } |
| 702 | 702 | |
| 703 | if (import.meta.main) { | |
| 704 | const args = process.argv.slice(2); | |
| 705 | let clones: number | undefined; | |
| 706 | const at = args.indexOf("--clones"); | |
| 707 | if (at >= 0) { | |
| 708 | clones = parseClones(args[at + 1] ?? ""); | |
| 709 | if (clones === undefined) { | |
| 710 | // CLI message on stderr for the person at the terminal. | |
| 711 | console.error(`--clones takes a whole number from 1 to ${MAX_CLONES}`); | |
| 703 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 704 | // (#16853). | |
| 705 | if (import.meta.main) | |
| 706 | void (async () => { | |
| 707 | const args = process.argv.slice(2); | |
| 708 | let clones: number | undefined; | |
| 709 | const at = args.indexOf("--clones"); | |
| 710 | if (at >= 0) { | |
| 711 | clones = parseClones(args[at + 1] ?? ""); | |
| 712 | if (clones === undefined) { | |
| 713 | // CLI message on stderr for the person at the terminal. | |
| 714 | console.error(`--clones takes a whole number from 1 to ${MAX_CLONES}`); | |
| 715 | process.exit(2); | |
| 716 | } | |
| 717 | args.splice(at, 2); | |
| 718 | } | |
| 719 | // `--offsite`: read the sealed off-site lane (FORGE_MIRROR_S3_*) in place of the destination | |
| 720 | // (#11805). | |
| 721 | const offsite = args.indexOf("--offsite"); | |
| 722 | if (offsite >= 0) args.splice(offsite, 1); | |
| 723 | // `--forge NAME`: one hosted forge alone, into <data-dir>/children/<bodyId> with its ledger | |
| 724 | // under spawn/ (#13819). | |
| 725 | const only = args.indexOf("--forge"); | |
| 726 | const forgeName = only >= 0 ? args[only + 1] : undefined; | |
| 727 | if (only >= 0) args.splice(only, 2); | |
| 728 | // `--kit FILE`: the recovery kit (`kit.ts`) in place of the environment's store, so a clean | |
| 729 | // machine needs only the kit and the passphrase (#14242). | |
| 730 | const kitAt = args.indexOf("--kit"); | |
| 731 | const kitFile = kitAt >= 0 ? args[kitAt + 1] : undefined; | |
| 732 | if (kitAt >= 0) args.splice(kitAt, 2); | |
| 733 | const triesAt = args.indexOf("--attempts"); | |
| 734 | const tries = triesAt >= 0 ? Number(args[triesAt + 1]) : undefined; | |
| 735 | if (triesAt >= 0) args.splice(triesAt, 2); | |
| 736 | const [name, dataDir] = args; | |
| 737 | if (!name || !dataDir || args.length > 2 || (only >= 0 && !forgeName)) { | |
| 738 | // CLI usage on stderr for the person at the terminal, not a forge event. | |
| 739 | console.error( | |
| 740 | "usage: bun run src/snapshot/restore.ts <snapshot-name|latest> <data-dir> [--clones N] [--offsite] [--forge NAME] [--kit FILE [--attempts N]]", | |
| 741 | ); | |
| 712 | 742 | process.exit(2); |
| 713 | 743 | } |
| 714 | args.splice(at, 2); | |
| 715 | } | |
| 716 | // `--offsite`: read the sealed off-site lane (FORGE_MIRROR_S3_*) in place of the destination (#11805). | |
| 717 | const offsite = args.indexOf("--offsite"); | |
| 718 | if (offsite >= 0) args.splice(offsite, 1); | |
| 719 | // `--forge NAME`: one hosted forge alone, into <data-dir>/children/<bodyId> with its ledger under | |
| 720 | // spawn/ (#13819). | |
| 721 | const only = args.indexOf("--forge"); | |
| 722 | const forgeName = only >= 0 ? args[only + 1] : undefined; | |
| 723 | if (only >= 0) args.splice(only, 2); | |
| 724 | // `--kit FILE`: the recovery kit (`kit.ts`) in place of the environment's store, so a clean | |
| 725 | // machine needs only the kit and the passphrase (#14242). | |
| 726 | const kitAt = args.indexOf("--kit"); | |
| 727 | const kitFile = kitAt >= 0 ? args[kitAt + 1] : undefined; | |
| 728 | if (kitAt >= 0) args.splice(kitAt, 2); | |
| 729 | const triesAt = args.indexOf("--attempts"); | |
| 730 | const tries = triesAt >= 0 ? Number(args[triesAt + 1]) : undefined; | |
| 731 | if (triesAt >= 0) args.splice(triesAt, 2); | |
| 732 | const [name, dataDir] = args; | |
| 733 | if (!name || !dataDir || args.length > 2 || (only >= 0 && !forgeName)) { | |
| 734 | // CLI usage on stderr for the person at the terminal, not a forge event. | |
| 735 | console.error( | |
| 736 | "usage: bun run src/snapshot/restore.ts <snapshot-name|latest> <data-dir> [--clones N] [--offsite] [--forge NAME] [--kit FILE [--attempts N]]", | |
| 737 | ); | |
| 738 | process.exit(2); | |
| 739 | } | |
| 740 | if (kitAt >= 0 && (!kitFile || offsite >= 0)) { | |
| 741 | // CLI usage on stderr for the person at the terminal. | |
| 742 | console.error("--kit takes the kit's file, and does not combine with --offsite"); | |
| 743 | process.exit(2); | |
| 744 | } | |
| 745 | // A restore starts from an empty directory, so nothing is sealed yet: the | |
| 746 | // same resolver answers from the environment alone. | |
| 747 | const lane = offsite >= 0 ? offsiteFromEnv() : undefined; | |
| 748 | if (typeof lane === "string") { | |
| 749 | // CLI message on stderr for the person at the terminal. | |
| 750 | console.error(lane); | |
| 751 | process.exit(2); | |
| 752 | } | |
| 753 | let kitStored: Store | undefined; | |
| 754 | if (kitFile !== undefined) { | |
| 755 | const text = await Bun.file(kitFile).text().then( | |
| 756 | (t) => ({ t }), | |
| 757 | () => undefined, | |
| 758 | ); | |
| 759 | const kit = text === undefined ? "the kit's file cannot be read" : parseKit(text.t); | |
| 760 | const opened = typeof kit === "string" ? kit : kitStore(kit, process.env["FORGE_SNAPSHOT_PASSPHRASE"], Number.isInteger(tries) && tries! > 0 ? tries : undefined); | |
| 761 | if (typeof opened === "string") { | |
| 762 | // CLI message on stderr for the person at the terminal. | |
| 763 | console.error(`kit: ${opened}`); | |
| 744 | if (kitAt >= 0 && (!kitFile || offsite >= 0)) { | |
| 745 | // CLI usage on stderr for the person at the terminal. | |
| 746 | console.error("--kit takes the kit's file, and does not combine with --offsite"); | |
| 764 | 747 | process.exit(2); |
| 765 | 748 | } |
| 766 | kitStored = opened; | |
| 767 | } | |
| 768 | const store = kitStored ?? lane ?? resolveSnapshots({ create: false })?.store; | |
| 769 | if (store === undefined) { | |
| 770 | // CLI message on stderr for the person at the terminal. | |
| 771 | console.error( | |
| 772 | "no store: set S3_* as the forge has them, or FORGE_SNAPSHOT_DIR", | |
| 773 | ); | |
| 774 | process.exit(2); | |
| 775 | } | |
| 776 | const newest = name === "latest" ? (await listSnapshots(store))[0] : undefined; | |
| 777 | if (name === "latest" && newest === undefined) { | |
| 778 | // CLI message on stderr for the person at the terminal. | |
| 779 | console.error(`no snapshot in ${store.where}`); | |
| 780 | process.exit(1); | |
| 781 | } | |
| 782 | if (forgeName !== undefined) { | |
| 783 | const snap = newest?.name ?? name; | |
| 784 | try { | |
| 785 | const one = await restoreHostedInto(store, snap, forgeName, dataDir, { passphrase: process.env["FORGE_SNAPSHOT_PASSPHRASE"] || undefined }); | |
| 786 | console.log(`restored ${forgeName} from ${snap}: ${one.files} files, ${one.repos} repositories into ${one.dir}${one.key === "missing" ? "; its key was not restored" : ""}`); | |
| 787 | process.exit(0); | |
| 788 | } catch (e) { | |
| 749 | // A restore starts from an empty directory, so nothing is sealed yet: the | |
| 750 | // same resolver answers from the environment alone. | |
| 751 | const lane = offsite >= 0 ? offsiteFromEnv() : undefined; | |
| 752 | if (typeof lane === "string") { | |
| 789 | 753 | // CLI message on stderr for the person at the terminal. |
| 790 | console.error(e instanceof Error ? e.message : String(e)); | |
| 754 | console.error(lane); | |
| 755 | process.exit(2); | |
| 756 | } | |
| 757 | let kitStored: Store | undefined; | |
| 758 | if (kitFile !== undefined) { | |
| 759 | const text = await Bun.file(kitFile).text().then( | |
| 760 | (t) => ({ t }), | |
| 761 | () => undefined, | |
| 762 | ); | |
| 763 | const kit = text === undefined ? "the kit's file cannot be read" : parseKit(text.t); | |
| 764 | const opened = typeof kit === "string" ? kit : kitStore(kit, process.env["FORGE_SNAPSHOT_PASSPHRASE"], Number.isInteger(tries) && tries! > 0 ? tries : undefined); | |
| 765 | if (typeof opened === "string") { | |
| 766 | // CLI message on stderr for the person at the terminal. | |
| 767 | console.error(`kit: ${opened}`); | |
| 768 | process.exit(2); | |
| 769 | } | |
| 770 | kitStored = opened; | |
| 771 | } | |
| 772 | const store = kitStored ?? lane ?? resolveSnapshots({ create: false })?.store; | |
| 773 | if (store === undefined) { | |
| 774 | // CLI message on stderr for the person at the terminal. | |
| 775 | console.error( | |
| 776 | "no store: set S3_* as the forge has them, or FORGE_SNAPSHOT_DIR", | |
| 777 | ); | |
| 778 | process.exit(2); | |
| 779 | } | |
| 780 | const newest = name === "latest" ? (await listSnapshots(store))[0] : undefined; | |
| 781 | if (name === "latest" && newest === undefined) { | |
| 782 | // CLI message on stderr for the person at the terminal. | |
| 783 | console.error(`no snapshot in ${store.where}`); | |
| 791 | 784 | process.exit(1); |
| 792 | 785 | } |
| 793 | } | |
| 794 | // One line per phase when it ends: its count, bytes and seconds. | |
| 795 | let began = performance.now(); | |
| 796 | const done = await restoreSnapshot(store, newest?.name ?? name, dataDir, { | |
| 797 | passphrase: process.env["FORGE_SNAPSHOT_PASSPHRASE"] || undefined, | |
| 798 | clones, | |
| 799 | onProgress: (p) => { | |
| 800 | if (p.done < p.total) return; | |
| 801 | const seconds = ((performance.now() - began) / 1000).toFixed(1); | |
| 802 | console.log(`${p.phase}: ${p.done}/${p.total}, ${p.bytes} bytes, ${seconds}s`); | |
| 803 | began = performance.now(); | |
| 804 | }, | |
| 805 | }); | |
| 806 | console.log( | |
| 807 | `restored ${done.manifest.name} (forge ${done.manifest.version}): ${done.files} files, ${done.repos} repositories into ${dataDir}`, | |
| 808 | ); | |
| 809 | if (done.key === "missing") { | |
| 786 | if (forgeName !== undefined) { | |
| 787 | const snap = newest?.name ?? name; | |
| 788 | try { | |
| 789 | const one = await restoreHostedInto(store, snap, forgeName, dataDir, { passphrase: process.env["FORGE_SNAPSHOT_PASSPHRASE"] || undefined }); | |
| 790 | console.log(`restored ${forgeName} from ${snap}: ${one.files} files, ${one.repos} repositories into ${one.dir}${one.key === "missing" ? "; its key was not restored" : ""}`); | |
| 791 | process.exit(0); | |
| 792 | } catch (e) { | |
| 793 | // CLI message on stderr for the person at the terminal. | |
| 794 | console.error(e instanceof Error ? e.message : String(e)); | |
| 795 | process.exit(1); | |
| 796 | } | |
| 797 | } | |
| 798 | // One line per phase when it ends: its count, bytes and seconds. | |
| 799 | let began = performance.now(); | |
| 800 | const done = await restoreSnapshot(store, newest?.name ?? name, dataDir, { | |
| 801 | passphrase: process.env["FORGE_SNAPSHOT_PASSPHRASE"] || undefined, | |
| 802 | clones, | |
| 803 | onProgress: (p) => { | |
| 804 | if (p.done < p.total) return; | |
| 805 | const seconds = ((performance.now() - began) / 1000).toFixed(1); | |
| 806 | console.log(`${p.phase}: ${p.done}/${p.total}, ${p.bytes} bytes, ${seconds}s`); | |
| 807 | began = performance.now(); | |
| 808 | }, | |
| 809 | }); | |
| 810 | 810 | console.log( |
| 811 | `the key was not restored: ${done.sealedMissing.length} sealed value(s) will not open and must be set again:`, | |
| 811 | `restored ${done.manifest.name} (forge ${done.manifest.version}): ${done.files} files, ${done.repos} repositories into ${dataDir}`, | |
| 812 | 812 | ); |
| 813 | for (const n of done.sealedMissing) console.log(` ${n}`); | |
| 814 | } | |
| 815 | } | |
| 813 | if (done.key === "missing") { | |
| 814 | console.log( | |
| 815 | `the key was not restored: ${done.sealedMissing.length} sealed value(s) will not open and must be set again:`, | |
| 816 | ); | |
| 817 | for (const n of done.sealedMissing) console.log(` ${n}`); | |
| 818 | } | |
| 819 | })(); |
src/spawn/supervisor.ts +19 −16
| @@ -514,19 +514,22 @@ export function startSupervisor(ctl: string, config: SupervisorConfig, hooks: Su | ||
| 514 | 514 | }; |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | if (import.meta.main) { | |
| 518 | const ctl = process.argv[2]; | |
| 519 | if (ctl === undefined || !existsSync(files(ctl).config)) { | |
| 520 | console.error("usage: supervisor.ts <control directory>"); | |
| 521 | process.exit(2); | |
| 522 | } | |
| 523 | const config = parseConfig(readFileSync(files(ctl).config, "utf8")); | |
| 524 | if (config === undefined) { | |
| 525 | console.error("supervisor: config.json is not a config"); | |
| 526 | process.exit(2); | |
| 527 | } | |
| 528 | const s = runSupervisor(ctl, config); | |
| 529 | for (const sig of ["SIGTERM", "SIGINT", "SIGHUP"] as const) process.on(sig, s.stop); | |
| 530 | await s.done; | |
| 531 | process.exit(0); | |
| 532 | } | |
| 517 | // An async function, not a top-level await: a module with one cannot be `require`d from a bundle | |
| 518 | // (#16853). | |
| 519 | if (import.meta.main) | |
| 520 | void (async () => { | |
| 521 | const ctl = process.argv[2]; | |
| 522 | if (ctl === undefined || !existsSync(files(ctl).config)) { | |
| 523 | console.error("usage: supervisor.ts <control directory>"); | |
| 524 | process.exit(2); | |
| 525 | } | |
| 526 | const config = parseConfig(readFileSync(files(ctl).config, "utf8")); | |
| 527 | if (config === undefined) { | |
| 528 | console.error("supervisor: config.json is not a config"); | |
| 529 | process.exit(2); | |
| 530 | } | |
| 531 | const s = runSupervisor(ctl, config); | |
| 532 | for (const sig of ["SIGTERM", "SIGINT", "SIGHUP"] as const) process.on(sig, s.stop); | |
| 533 | await s.done; | |
| 534 | process.exit(0); | |
| 535 | })(); |
src/tui/screens/entries.ts +8 −21
| @@ -12,9 +12,7 @@ | ||
| 12 | 12 | import type { Ctx } from "../app/app.ts"; |
| 13 | 13 | import type { Command } from "../app/palette.ts"; |
| 14 | 14 | import type { Session } from "../session.ts"; |
| 15 | import { readdirSync, readFileSync } from "node:fs"; | |
| 16 | import { join } from "node:path"; | |
| 17 | import { entryNames } from "./entry_mark.ts"; | |
| 15 | import { SCREEN_MODULES } from "../../generated/screens.ts"; | |
| 18 | 16 | |
| 19 | 17 | export interface PaletteEntry { |
| 20 | 18 | readonly id: string; |
| @@ -36,24 +34,13 @@ export interface PaletteEntry { | ||
| 36 | 34 | run(session: Session, ctx: Ctx): void; |
| 37 | 35 | } |
| 38 | 36 | |
| 39 | /** The entries each screen file in `dir` declares: file name, then export names. */ | |
| 40 | export function entryFiles(dir: string = import.meta.dir): [string, string[]][] { | |
| 41 | return readdirSync(dir) | |
| 42 | .filter((f) => f.endsWith(".ts") && f !== "entries.ts") | |
| 43 | .sort() | |
| 44 | .flatMap((f): [string, string[]][] => { | |
| 45 | const names = entryNames(readFileSync(join(dir, f), "utf8")); | |
| 46 | return names.length > 0 ? [[f, names]] : []; | |
| 47 | }); | |
| 48 | } | |
| 49 | ||
| 50 | /** Every entry the files declare, by rank, then file name, then export name. */ | |
| 51 | export const ENTRIES: readonly PaletteEntry[] = entryFiles() | |
| 52 | .flatMap(([f, names]) => { | |
| 53 | const mod = require(join(import.meta.dir, f)) as Record<string, PaletteEntry>; | |
| 54 | return [...names].sort().map((k) => mod[k]!); | |
| 55 | }) | |
| 56 | .sort((a, b) => a.rank - b.rank); | |
| 37 | /** | |
| 38 | * Every entry the screen files declare, by rank, then file name, then export name. The roster is | |
| 39 | * `src/generated/screens.ts`. | |
| 40 | */ | |
| 41 | export const ENTRIES: readonly PaletteEntry[] = SCREEN_MODULES.flatMap(([mod, names]) => [...names].sort().map((k) => mod[k] as PaletteEntry)).sort( | |
| 42 | (a, b) => a.rank - b.rank, | |
| 43 | ); | |
| 57 | 44 | |
| 58 | 45 | /** |
| 59 | 46 | * Put each entry the session is offered into `commands`, after the command it names or at the end. |
src/tui/screens/entry_mark.ts +17
| @@ -4,9 +4,26 @@ | ||
| 4 | 4 | * counts as an entry (the roster, the reachability audits) reads it here. |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | import { readdirSync, readFileSync } from "node:fs"; | |
| 8 | import { join } from "node:path"; | |
| 9 | ||
| 7 | 10 | const DECL = /^export const (\w+): PaletteEntry = /gm; |
| 8 | 11 | |
| 9 | 12 | /** The names of the entries `source` exports, in the order it declares them. */ |
| 10 | 13 | export function entryNames(source: string): string[] { |
| 11 | 14 | return [...source.matchAll(DECL)].map((m) => m[1]!); |
| 12 | 15 | } |
| 16 | ||
| 17 | /** | |
| 18 | * The entries each screen file in `dir` declares: file name, then export names. Read by the build | |
| 19 | * step, not at boot. | |
| 20 | */ | |
| 21 | export function entryFiles(dir: string): [string, string[]][] { | |
| 22 | return readdirSync(dir) | |
| 23 | .filter((f) => f.endsWith(".ts") && f !== "entries.ts") | |
| 24 | .sort() | |
| 25 | .flatMap((f): [string, string[]][] => { | |
| 26 | const names = entryNames(readFileSync(join(dir, f), "utf8")); | |
| 27 | return names.length > 0 ? [[f, names]] : []; | |
| 28 | }); | |
| 29 | } |
test/boot-idle-memory.test.ts +14 −5
| @@ -13,6 +13,7 @@ import { tmpdir } from "node:os"; | ||
| 13 | 13 | import { join } from "node:path"; |
| 14 | 14 | import { freePort } from "../src/kernel/port.ts"; |
| 15 | 15 | import { collectOutput } from "./helpers/collect-output.ts"; |
| 16 | import { bundleBoot } from "./helpers/bundle-boot.ts"; | |
| 16 | 17 | import { productionEnv } from "./helpers/production-env.ts"; |
| 17 | 18 | |
| 18 | 19 | const MAIN = join(import.meta.dir, "..", "src", "main.ts"); |
| @@ -23,6 +24,13 @@ const MIB = 1048576; | ||
| 23 | 24 | * before), plus a margin for a loaded host. |
| 24 | 25 | */ |
| 25 | 26 | const IDLE_RSS_BUDGET = 360 * MIB; |
| 27 | /** | |
| 28 | * The bundle's own cap (#16853): 118 MiB measured on Linux 2026-11-30, plus a margin. Not like for | |
| 29 | * like with the source (the bundle leaves out the page workers and the docs search index). Lowering | |
| 30 | * `IDLE_RSS_BUDGET` to this waits until forge.json runs the bundle; until then the source keeps its | |
| 31 | * budget and this holds the bundle. | |
| 32 | */ | |
| 33 | const BUNDLE_IDLE_RSS_BUDGET = 180 * MIB; | |
| 26 | 34 | /** Why the budget is not held off Linux. */ |
| 27 | 35 | const IDLE_SKIP_REASON = "RSS is measured from /proc on Linux; other hosts count resident memory differently"; |
| 28 | 36 | /** Real time, named: RSS settles over seconds of a real process, there is no event to await. */ |
| @@ -45,10 +53,11 @@ beforeAll(() => { | ||
| 45 | 53 | }); |
| 46 | 54 | afterAll(() => rmSync(root, { recursive: true, force: true })); |
| 47 | 55 | |
| 56 | for (const [mode, budget] of [["source", IDLE_RSS_BUDGET], ["bundle", BUNDLE_IDLE_RSS_BUDGET]] as const) | |
| 48 | 57 | run( |
| 49 | "an idle fresh forge settles under its memory budget", | |
| 58 | `an idle fresh forge (${mode}) settles under its memory budget`, | |
| 50 | 59 | async () => { |
| 51 | const dir = join(root, "boot"); | |
| 60 | const dir = join(root, `boot-${mode}`); | |
| 52 | 61 | mkdirSync(join(dir, "data"), { recursive: true }); |
| 53 | 62 | const caFile = join(dir, "ca.crt"); |
| 54 | 63 | writeFileSync(caFile, "-----BEGIN CERTIFICATE-----\nMIIBfake\n-----END CERTIFICATE-----\n"); |
| @@ -61,7 +70,7 @@ run( | ||
| 61 | 70 | const value = process.env[key]; |
| 62 | 71 | if (value !== undefined && value !== "") env[key] = value; |
| 63 | 72 | } |
| 64 | const child = Bun.spawn([process.execPath, MAIN], { cwd: dir, env, stdin: "ignore", stdout: "pipe", stderr: "pipe" }); | |
| 73 | const child = Bun.spawn(mode === "source" ? [process.execPath, MAIN] : bundleBoot(join(root, "bundle"), false), { cwd: dir, env, stdin: "ignore", stdout: "pipe", stderr: "pipe" }); | |
| 65 | 74 | const out = { text: "" }; |
| 66 | 75 | const reading = collectOutput(out, child.stdout, child.stderr); |
| 67 | 76 | let settled = 0; |
| @@ -89,9 +98,9 @@ run( | ||
| 89 | 98 | await reading; |
| 90 | 99 | } |
| 91 | 100 | const shown = `${(settled / MIB).toFixed(0)} MiB`; |
| 92 | console.log(`idle rss ${shown} of ${(IDLE_RSS_BUDGET / MIB).toFixed(0)} MiB; ${own}`); | |
| 101 | console.log(`idle rss ${shown} of ${(budget / MIB).toFixed(0)} MiB; ${own}`); | |
| 93 | 102 | expect(settled, `could not read the RSS of the forge (pid ${child.pid}); output: ${out.text.slice(-500)}`).toBeGreaterThan(0); |
| 94 | expect(settled, `idle RSS ${shown} over the ${(IDLE_RSS_BUDGET / MIB).toFixed(0)} MiB budget; the forge's own line at settle: ${own}`).toBeLessThan(IDLE_RSS_BUDGET); | |
| 103 | expect(settled, `idle RSS ${shown} over the ${(budget / MIB).toFixed(0)} MiB budget; the forge's own line at settle: ${own}`).toBeLessThan(budget); | |
| 95 | 104 | }, |
| 96 | 105 | 120_000, |
| 97 | 106 | ); |
test/bundle-boot.test.ts added +51
| @@ -0,0 +1,51 @@ | ||
| 1 | /** | |
| 2 | * `bun build --minify` of `src/main.ts` is one file that boots, answers `/healthz` and `/` | |
| 3 | * (#16853). The bundle is an option: forge.json still runs `bun run src/main.ts`. | |
| 4 | * | |
| 5 | * @tree-scan: boots all of src/ through a bundle of main.ts. | |
| 6 | */ | |
| 7 | import { afterAll, expect, test } from "bun:test"; | |
| 8 | import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs"; | |
| 9 | import { tmpdir } from "node:os"; | |
| 10 | import { join } from "node:path"; | |
| 11 | import { freePort } from "../src/kernel/port.ts"; | |
| 12 | import { collectOutput } from "./helpers/collect-output.ts"; | |
| 13 | import { bundleBoot } from "./helpers/bundle-boot.ts"; | |
| 14 | import { waitFor } from "./helpers/poll.ts"; | |
| 15 | import { productionEnv } from "./helpers/production-env.ts"; | |
| 16 | ||
| 17 | const root = mkdtempSync(join(tmpdir(), "forge-bundle-boot-")); | |
| 18 | afterAll(() => rmSync(root, { recursive: true, force: true })); | |
| 19 | ||
| 20 | test("the minified bundle boots, answers /healthz and /, with no source beside it", async () => { | |
| 21 | const argv = bundleBoot(join(root, "out"), false); | |
| 22 | const dir = join(root, "run"); // the bundle runs from here: no src/ in reach of its working directory | |
| 23 | mkdirSync(join(dir, "data"), { recursive: true }); | |
| 24 | const caFile = join(dir, "ca.crt"); | |
| 25 | writeFileSync(caFile, "-----BEGIN CERTIFICATE-----\nMIIBfake\n-----END CERTIFICATE-----\n"); | |
| 26 | const port = await freePort(); | |
| 27 | const env: Record<string, string> = { PATH: process.env["PATH"] ?? "", ...productionEnv({ dataDir: join(dir, "data"), port, sshPort: await freePort(), caFile }) }; | |
| 28 | for (const key of ["HOME", "TMPDIR", "FORGE_CELLS", "FORGE_TEST_SOCKET"]) if (process.env[key]) env[key] = process.env[key]!; | |
| 29 | const child = Bun.spawn(argv, { cwd: dir, env, stdin: "ignore", stdout: "pipe", stderr: "pipe" }); | |
| 30 | const out = { text: "" }; | |
| 31 | const reading = collectOutput(out, child.stdout, child.stderr); | |
| 32 | try { | |
| 33 | let health = 0; | |
| 34 | for (const t0 = performance.now(); health !== 200 && child.exitCode === null && performance.now() - t0 < 60_000; ) { | |
| 35 | health = await fetch(`http://127.0.0.1:${port}/healthz`).then((r) => r.status, () => 0); | |
| 36 | if (health !== 200) await waitFor(() => false, { every: 100, within: 100 }); | |
| 37 | } | |
| 38 | expect(health, out.text.slice(-1500)).toBe(200); | |
| 39 | const home = await fetch(`http://127.0.0.1:${port}/`); | |
| 40 | const html = await home.text(); | |
| 41 | expect(home.status, out.text.slice(-1500)).toBe(200); | |
| 42 | expect(home.headers.get("content-type")).toContain("text/html"); | |
| 43 | expect(html).toContain("<title>"); | |
| 44 | expect(html.length).toBeGreaterThan(500); | |
| 45 | expect(home.headers.get("x-content-type-options")).toBe("nosniff"); | |
| 46 | } finally { | |
| 47 | child.kill("SIGKILL"); | |
| 48 | await child.exited; | |
| 49 | await reading; | |
| 50 | } | |
| 51 | }, 180_000); |
test/duty-roster.test.ts +4 −2
| @@ -2,14 +2,16 @@ import { expect, test } from "bun:test"; | ||
| 2 | 2 | import { mkdirSync, mkdtempSync, readdirSync, writeFileSync } from "node:fs"; |
| 3 | 3 | import { join } from "node:path"; |
| 4 | 4 | import { pathToFileURL } from "node:url"; |
| 5 | import { dutyFiles, duties, loadDuties } from "../src/maintain/registry.ts"; | |
| 5 | import { dutyFiles } from "../src/maintain/duty_files.ts"; | |
| 6 | import { duties } from "../src/maintain/registry.ts"; | |
| 7 | import { loadDuties } from "./helpers/read-source-dirs.ts"; | |
| 6 | 8 | import { NAME } from "../src/maintain/duties/duty_idle.ts"; |
| 7 | 9 | import { validName } from "../src/maintain/duty.ts"; |
| 8 | 10 | |
| 9 | 11 | // The roster is the files in duties/ (#14355). |
| 10 | 12 | test("every duty file is on the roster, once, and the idle watcher is last", () => { |
| 11 | 13 | const files = readdirSync("src/maintain/duties").filter((f) => f.endsWith(".ts") && f !== "duty_idle.ts"); |
| 12 | expect(dutyFiles()).toEqual(files.sort()); | |
| 14 | expect(dutyFiles(new URL("../src/maintain/duties/", import.meta.url))).toEqual(files.sort()); | |
| 13 | 15 | expect(duties.length).toBe(files.length + 1); |
| 14 | 16 | expect(duties.at(-1)?.name).toBe(NAME); |
| 15 | 17 | const names = duties.map((d) => d.name); |
test/helpers/bundle-boot.ts added +22
| @@ -0,0 +1,22 @@ | ||
| 1 | /** | |
| 2 | * Build `src/main.ts` for the tests and measurements of #16853, and say how to run it. | |
| 3 | * | |
| 4 | * `bun build --minify` makes one `main.js` that `bun` runs. `--bytecode` cannot make one: without | |
| 5 | * `--compile` it needs `--format=cjs`, and `main.ts` awaits at the top level, so the bytecode form | |
| 6 | * is a compiled executable (`--compile --bytecode --format esm`). | |
| 7 | */ | |
| 8 | import { join } from "node:path"; | |
| 9 | ||
| 10 | const ROOT = join(import.meta.dir, "..", ".."); | |
| 11 | ||
| 12 | /** Build into `outdir`; the argv that runs the result. */ | |
| 13 | export function bundleBoot(outdir: string, bytecode: boolean): string[] { | |
| 14 | const entry = join(ROOT, "src/main.ts"); | |
| 15 | const out = bytecode ? join(outdir, "forge") : join(outdir, "main.js"); | |
| 16 | const args = bytecode | |
| 17 | ? ["build", "--minify", "--bytecode", "--compile", "--format", "esm", "--outfile", out, entry] | |
| 18 | : ["build", "--minify", "--target", "bun", "--outdir", outdir, entry]; | |
| 19 | const built = Bun.spawnSync([process.execPath, ...args], { cwd: ROOT, stdout: "pipe", stderr: "pipe" }); | |
| 20 | if (built.exitCode !== 0) throw new Error(`bun build failed: ${built.stderr.toString()}`); | |
| 21 | return bytecode ? [out] : [process.execPath, out]; | |
| 22 | } |
test/helpers/read-source-dirs.ts added +21
| @@ -0,0 +1,21 @@ | ||
| 1 | /** | |
| 2 | * Read a directory of migrations or duties the way the forge no longer does at boot (#16853): for | |
| 3 | * tests that build their own directories. | |
| 4 | */ | |
| 5 | import { readdirSync } from "node:fs"; | |
| 6 | import { join } from "node:path"; | |
| 7 | import { fileURLToPath } from "node:url"; | |
| 8 | import { checkMigrations, type MigrationFile } from "../../src/kernel/migrate.ts"; | |
| 9 | import { dutyFiles } from "../../src/maintain/duty_files.ts"; | |
| 10 | import { rosterOf } from "../../src/maintain/registry.ts"; | |
| 11 | import type { Duty } from "../../src/maintain/duty.ts"; | |
| 12 | ||
| 13 | /** The migrations in `dir`, in name order, checked as the boot checks them. */ | |
| 14 | export function readMigrations(dir: string): MigrationFile[] { | |
| 15 | return checkMigrations(readdirSync(dir).sort().map((file) => [file, require(join(dir, file)).default] as const)); | |
| 16 | } | |
| 17 | ||
| 18 | /** The duties the files in `from` export, in file-name order. */ | |
| 19 | export function loadDuties(from: URL): Duty[] { | |
| 20 | return rosterOf(dutyFiles(from).map((f) => [f, () => require(fileURLToPath(new URL(f, from)))] as const)); | |
| 21 | } |
test/launch-no-tla.test.ts +8 −1
| @@ -7,6 +7,13 @@ import { expect, test } from "bun:test"; | ||
| 7 | 7 | import { readdirSync, readFileSync, statSync } from "node:fs"; |
| 8 | 8 | import { join } from "node:path"; |
| 9 | 9 | |
| 10 | /** | |
| 11 | * The generated duty list is the one literal relative require(): a duty reaches the runner, which | |
| 12 | * imports the roster, so a static import would be a cycle, and `bun build` bundles only a literal | |
| 13 | * path. It loaded the same files by require() before (src/maintain/registry.ts). | |
| 14 | */ | |
| 15 | const LITERAL_REQUIRE = new Set(["generated/duties.ts"]); | |
| 16 | ||
| 10 | 17 | const walk = (d: string): string[] => |
| 11 | 18 | readdirSync(d).flatMap((n) => { |
| 12 | 19 | const p = join(d, n); |
| @@ -15,7 +22,7 @@ const walk = (d: string): string[] => | ||
| 15 | 22 | |
| 16 | 23 | test("no module in src/ loads another with require(): a graph with a top-level await refuses it at runtime", () => { |
| 17 | 24 | const root = join(import.meta.dir, "..", "src"); |
| 18 | const offenders = walk(root).filter((f) => /\brequire\(\s*["'`]\.\.?\//.test(readFileSync(f, "utf8"))); | |
| 25 | const offenders = walk(root).filter((f) => !LITERAL_REQUIRE.has(f.slice(root.length + 1)) && /\brequire\(\s*["'`]\.\.?\//.test(readFileSync(f, "utf8"))); | |
| 19 | 26 | expect(offenders.map((f) => f.slice(root.length + 1))).toEqual([]); |
| 20 | 27 | }); |
| 21 | 28 |
test/own-source.test.ts added +31
| @@ -0,0 +1,31 @@ | ||
| 1 | /** | |
| 2 | * The forge reads none of its own source directories at boot (#16853): the migrations, the route | |
| 3 | * marks and the screens' palette entries are static imports listed in `src/generated/`, and the | |
| 4 | * list must match the directories. | |
| 5 | */ | |
| 6 | import { expect, test } from "bun:test"; | |
| 7 | import { existsSync, readFileSync, readdirSync } from "node:fs"; | |
| 8 | import { join } from "node:path"; | |
| 9 | import { generate, OUT } from "../scripts/own-source.ts"; | |
| 10 | import { migrationFiles } from "../src/core/schema.ts"; | |
| 11 | import { MARK_FILES } from "../src/generated/marks.ts"; | |
| 12 | import { ENTRIES } from "../src/tui/screens/entries.ts"; | |
| 13 | ||
| 14 | test("the generated lists are what the directories say now", () => { | |
| 15 | for (const [name, text] of Object.entries(generate())) { | |
| 16 | expect(existsSync(join(OUT, name)), `${name} is missing: run bun scripts/own-source.ts`).toBe(true); | |
| 17 | expect(readFileSync(join(OUT, name), "utf8") === text, `src/generated/${name} is stale: run bun scripts/own-source.ts and commit it`).toBe(true); | |
| 18 | } | |
| 19 | }); | |
| 20 | ||
| 21 | test("every migration file and every mark file is in the lists the forge boots from", () => { | |
| 22 | const migrations = readdirSync(join(import.meta.dir, "..", "src", "core", "migrations")).map((f) => f.replace(/\.ts$/, "")).sort(); | |
| 23 | expect(migrationFiles.map((m) => m.name)).toEqual(migrations); | |
| 24 | expect(MARK_FILES.length).toBe(readdirSync(join(import.meta.dir, "..", "src", "http", "marks")).filter((f) => f.endsWith(".json")).length); | |
| 25 | expect(ENTRIES.length).toBeGreaterThan(0); | |
| 26 | }); | |
| 27 | ||
| 28 | test("no module the forge boots from reads its own source directory", () => { | |
| 29 | for (const file of ["core/schema.ts", "http/route_marks.ts", "tui/screens/entries.ts"]) | |
| 30 | expect(readFileSync(join(import.meta.dir, "..", "src", file), "utf8")).not.toMatch(/readdirSync|readdir\(/); | |
| 31 | }); |
test/palette-entries.test.ts +2 −1
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | import { expect, test } from "bun:test"; |
| 2 | 2 | import type { Command } from "../src/tui/app/palette.ts"; |
| 3 | import { addEntries, ENTRIES, entryFiles, type PaletteEntry } from "../src/tui/screens/entries.ts"; | |
| 3 | import { entryFiles } from "../src/tui/screens/entry_mark.ts"; | |
| 4 | import { addEntries, ENTRIES, type PaletteEntry } from "../src/tui/screens/entries.ts"; | |
| 4 | 5 | import { mkdtempSync, writeFileSync, rmSync } from "node:fs"; |
| 5 | 6 | import { tmpdir } from "node:os"; |
| 6 | 7 | import { join } from "node:path"; |
test/route-marks-roster.test.ts +5 −4
| @@ -6,7 +6,8 @@ | ||
| 6 | 6 | import { expect, test } from "bun:test"; |
| 7 | 7 | import { readdirSync } from "node:fs"; |
| 8 | 8 | import { join } from "node:path"; |
| 9 | import { HEADS, ROUTES, headOf, readMembers } from "../src/http/route_marks.ts"; | |
| 9 | import { MARK_FILES } from "../src/generated/marks.ts"; | |
| 10 | import { HEADS, ROUTES, headOf, type Member } from "../src/http/route_marks.ts"; | |
| 10 | 11 | |
| 11 | 12 | const DIR = join(import.meta.dir, "../src/http/marks"); |
| 12 | 13 | const files = readdirSync(DIR); |
| @@ -16,7 +17,7 @@ test("the directory holds only member files, none hidden", () => { | ||
| 16 | 17 | }); |
| 17 | 18 | |
| 18 | 19 | test("HEADS is exactly the heads of the directory, each once", () => { |
| 19 | const heads = readMembers().map((m) => m.head); | |
| 20 | const heads = (MARK_FILES as Member[]).map((m) => m.head); | |
| 20 | 21 | expect(new Set(heads).size).toBe(heads.length); |
| 21 | 22 | expect(Object.keys(HEADS).sort()).toEqual([...heads].sort()); |
| 22 | 23 | expect(Object.keys(HEADS).length).toBe(files.length); |
| @@ -24,7 +25,7 @@ test("HEADS is exactly the heads of the directory, each once", () => { | ||
| 24 | 25 | |
| 25 | 26 | test("ROUTES is exactly the routes of the directory, each under its own head", () => { |
| 26 | 27 | const listed: string[] = []; |
| 27 | for (const m of readMembers()) { | |
| 28 | for (const m of (MARK_FILES as Member[])) { | |
| 28 | 29 | for (const pattern of Object.keys(m.routes ?? {})) { |
| 29 | 30 | expect(headOf(pattern), `${pattern} in the file of ${m.head}`).toBe(m.head); |
| 30 | 31 | listed.push(pattern); |
| @@ -35,7 +36,7 @@ test("ROUTES is exactly the routes of the directory, each under its own head", ( | ||
| 35 | 36 | }); |
| 36 | 37 | |
| 37 | 38 | test("a mixed head lists its routes, and a head that is not mixed has a mark of its own", () => { |
| 38 | for (const m of readMembers()) { | |
| 39 | for (const m of (MARK_FILES as Member[])) { | |
| 39 | 40 | if (m.mark === "mixed") expect(Object.keys(m.routes ?? {}).length, m.head).toBeGreaterThan(0); |
| 40 | 41 | else expect(["admin", "open"]).toContain(m.mark); |
| 41 | 42 | } |
test/schema-migrations.test.ts +1 −1
| @@ -32,10 +32,10 @@ import { | ||
| 32 | 32 | migrate, |
| 33 | 33 | migrationId, |
| 34 | 34 | pinBreaks, |
| 35 | readMigrations, | |
| 36 | 35 | readPins, |
| 37 | 36 | statements, |
| 38 | 37 | } from "../src/kernel/migrate.ts"; |
| 38 | import { readMigrations } from "./helpers/read-source-dirs.ts"; | |
| 39 | 39 | import { migrationFiles, migrations, NUMBERED } from "../src/core/schema.ts"; |
| 40 | 40 | import { failureReason } from "../src/apps/process.ts"; |
| 41 | 41 | import { breaches } from "./helpers/rule.ts"; |
test/worker-database-opens.test.ts +1
| @@ -69,6 +69,7 @@ const REACHED: Record<string, { opens: number; why: string }> = { | ||
| 69 | 69 | "src/snapshot/restore.ts": { opens: 1, why: "a restore reads the sealed names of the restored copy once, in the restore tool or a drill on the serving thread" }, |
| 70 | 70 | "src/snapshot/snapshot.ts": { opens: 1, why: "a snapshot counts the rows of its own copy once, as a duty of the serving thread (a hosted forge's copy is read in a process of its own, snapshot/hosted_copy.ts); the mirror Worker imports this file for the manifest only" }, |
| 71 | 71 | "src/spawn/child_runs.ts": { opens: 2, why: "called by the reader process (spawn/child_db_reader.ts), never by a thread of the forge; cell.ts re-exports the two for tests that read a file directly" }, |
| 72 | "src/web/render/sqlite.ts": { opens: 1, why: "a committed .sqlite file is deserialized read-only in memory for its page, on the serving thread behind a request; a Worker reaches it only through src/generated/screens.ts, which lists every screen so the bundle holds them, and calls no open" }, | |
| 72 | 73 | "src/system/compact.ts": { opens: 2, why: "compactFile opens the database and its copy once each, called only by the compaction's own process (system/compact_child.ts) at boot when the compact-on-boot marker asks; Workers reach the file through db_size.ts's keptCopies, which opens nothing" }, |
| 73 | 74 | }; |
| 74 | 75 |
new above
offline
Box 4 asks for the one budget constant to be lowered to the cheapest measurement. This adds a second cap (180 MiB) and leaves IDLE_RSS_BUDGET at 400 MiB. Lower the single constant, or defer the box in the pull.