From 5844601fd3c2786366bfe034ec8ffdecc10eb522 Mon Sep 17 00:00:00 2001 From: Mark Malstrom Date: Mon, 12 Oct 2026 14:05:52 -0500 Subject: [PATCH] tools: bound the real discovery check and name its Bun requirement The workflow tool's discovery test now runs in `vp run check`, and it starts Oh My Pi under Bun. Cold Bun startup can exceed Vitest's five-second default on CI, so the subprocess gets a 30-second bound and the test 35 seconds. The gate's Bun requirement is now stated where setup is described. --- .omp/tools/dynamic-workflows/index.test.ts | 11 +++++++++-- AGENTS.md | 2 +- guides/getting-started.md | 8 +++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.omp/tools/dynamic-workflows/index.test.ts b/.omp/tools/dynamic-workflows/index.test.ts index 2996a90..f8aca44 100644 --- a/.omp/tools/dynamic-workflows/index.test.ts +++ b/.omp/tools/dynamic-workflows/index.test.ts @@ -593,10 +593,17 @@ describe("OMP custom-tool discovery (real loader boundary)", () => { `}));`, ].join("\n"); - let out = execFileSync("bun", ["-e", script], { cwd, encoding: "utf8" }); + // Cold Bun and OMP startup can exceed Vitest's five-second default on CI, so the subprocess + // gets its own bound and the test a little more to report it. + let out = execFileSync("bun", ["-e", script], { + cwd, + encoding: "utf8", + killSignal: "SIGKILL", + timeout: 30_000, + }); let loaded = JSON.parse(out) as { errors: unknown[]; tools: string[] }; expect(loaded.errors).toEqual([]); expect(loaded.tools).toContain("workflow"); - }); + }, 35_000); }); diff --git a/AGENTS.md b/AGENTS.md index 3422dde..79ec5a3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -353,7 +353,7 @@ Skill: `.agents/skills/tracking-defects/`. ## Quality gates -[Vite+](https://viteplus.dev) runs the toolchain. `.node-version` pins Node, which runs the TypeScript in `tools/` directly; `package.json#devEngines` pins pnpm. +[Vite+](https://viteplus.dev) runs the toolchain. `.node-version` pins Node, which runs the TypeScript in `tools/` directly; `package.json#devEngines` pins pnpm. `vp run test` also needs [Bun](https://bun.sh) on the `PATH`: one test loads the `workflow` tool through Oh My Pi's real loader, which runs on Bun. ```sh vp install # dependencies, with the pinned pnpm diff --git a/guides/getting-started.md b/guides/getting-started.md index d5edc4f..6c59b40 100644 --- a/guides/getting-started.md +++ b/guides/getting-started.md @@ -30,6 +30,12 @@ From the repository root, install the project's dependencies. Vite+ uses the Nod vp install ``` +The gate also needs [Bun](https://bun.sh), which Vite+ does not install. One test loads the `workflow` tool through Oh My Pi's real loader, and that loader runs on Bun: + +```sh +curl -fsSL https://bun.sh/install | bash +``` + Then run the complete local gate: ```sh @@ -38,7 +44,7 @@ vp run check `vp run check` succeeds only when formatting, lint, and type checks, record validation, tests, and the documentation build all finish without an error. The documentation build also catches dead links. -**One tool Vite+ does not install: the [GitHub CLI](https://cli.github.com).** The process runs on pull requests, so `gh` must be present and authenticated against your remote: +**Vite+ does not install the [GitHub CLI](https://cli.github.com) either.** The process runs on pull requests, so `gh` must be present and authenticated against your remote: ```sh gh auth login -- knotmirror 0.0.1