Files
Jobs_Applier_AI_Agent/vitest.config.ts
feder-cr 5316d43308 guest: dot-install only installs, the images are what their inputs say, and the Go copies of the protocol are held
- dot-install refused nothing apt reads as an action: "foo-" removed foo, as root. A name can no longer end in "-";
  a test runs the real script against stubs.
- The VM proxy's setup is runtime/vmproxy.py, staged on the runtime ISO: a bad value, a host that does not resolve and
  no default route each say so (exit 3, 4, 5) instead of all reading "not socks5"; the firewall still drops all. The
  smoke runs the file itself.
- dot-agentd is built one way everywhere (-trimpath -buildvcs=false -ldflags=-s -w): a commit no longer changes the
  binary and the runtime ISO. go.mod pins the toolchain, setup-go@v6 reads it, a repo test keeps every spelling equal.
- The golden image's apt packages come from an Ubuntu snapshot (pins.json apt_snapshot, in the inputs digest); the
  browser environment installs wheels only, with no cache left in the image.
- tests/repo/agentd-protocol.test.ts compares the Go routes and constants (and the engine's defaults) with
  packages/shared; a Linux test runs the real dot-agentd under the real GuestClient: proof, auth, exec, files, the
  agent proxy and its SSE.
- vm-manager: one assertImages, the VM bounds from CONFIG_BOUNDS, the pid file in its own module; one
  resolveImageVersion and publishImage for the golden, runtime and prebuilt images.
- Fixed-sleep tests wait for their signal; the docs no longer say the images are never published or speak of CD-ROMs.
2026-10-11 17:50:35 +02:00

37 lines
2.0 KiB
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
// The web app's tsconfig keeps JSX for Next to compile; a test compiles it itself.
oxc: { jsx: { runtime: "automatic" } },
test: {
include: [
"apps/*/{src,test}/**/*.test.{ts,tsx}",
"packages/*/{src,test}/**/*.test.ts",
"guest/image-builder/{src,test}/**/*.test.ts",
// Checks over the whole repository, such as the platform branches of section 1.1.
"tests/repo/**/*.test.ts",
],
// The web client's tests run here with everything else: the ones of plain functions in
// node, the component tests (.test.tsx) in jsdom, chosen by the file's own
// "@vitest-environment jsdom" line so that no other test pays for a DOM.
// invisible_engine_dots/ holds the nanobot fork: Python, with its own pytest suite
// (the engine job of the CI workflow); nothing of it runs here.
// A `*.linux.test.ts` drives a Linux program of the guest itself (dot-agentd, with its bash and its unix
// sockets): it is collected on Linux only, so on another host it is neither run nor counted as skipped.
exclude: ["**/node_modules/**", "**/.next/**", "invisible_engine_dots/**", ...(process.platform === "linux" ? [] : ["**/*.linux.test.ts"])],
environment: "node",
// Setup hooks boot an embedded PostgreSQL (PGlite, WebAssembly) and run
// the migrations, or start servers and child processes. On a loaded
// machine that takes longer than vitest's default 10 s without anything
// being wrong (measured: the API suite's setup timed out in a container
// running the whole suite in parallel), so it gets one allowance here
// instead of one per file.
hookTimeout: 60_000,
// The same for a test: one that starts servers or child processes can
// stall for seconds under heavy disk contention without anything being
// wrong. A test that waits on a condition fails on a code fault only,
// never on the machine's speed.
testTimeout: 30_000,
},
});