mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-04 06:21:59 +09:00
* test(mods): real-binary test tier with a scripted mock model (ADR-504) Runs the real `claude` binary headless against a local mock of the Anthropic Messages API, with ruflo-mods loaded through --plugin-dir in a throwaway project with its own HOME. No API key, no paid model. - mock-model.mjs: scripted Messages server (streaming and not), logs every request; untool'd or unknown requests get a minimal answer. - run.ts: runner with a minimal child environment, PATH recorders for dangerous commands, and readers for events, requests and files. - loads.test.ts (contract 1): with every option on, the heartbeat is written, /ruflo-mods is registered and answered with no model request. Negative control: a #4485-shaped copy (second bare session.start) is refused silently by the real loader and fails those assertions. - contracts.test.ts (contracts 2-5): verified-success record from a scripted fix turn; [RUFLO_LESSONS] reaches the request (and not below the gate); ruflo denies the root delete with its own reason and denies a listed command the engine allows (which runs without the plugin); the route block reaches the request (and not without the plugin). - Excluded from the CLI, v3 and root-ratchet default runs; run with `npm run test:real-binary`. New CI job mods-real-binary pins Claude Code 2.1.289 and fails, naming the step, if the binary will not start. Co-Authored-By: RuFlo <ruv@ruv.net> * docs(adr): ADR-504 status names PR #4589 Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x>
18 lines
621 B
TypeScript
18 lines
621 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
/**
|
|
* The real-binary tier (ADR-504): the real `claude` binary against a scripted mock model. It needs the binary, so it
|
|
* is excluded from the default `vitest run` (vitest.config.ts) and runs only through `npm run test:real-binary` and
|
|
* the `mods-real-binary` CI job. Files run one after another: each test is a whole Claude Code process.
|
|
*/
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
include: ['__tests__/real-binary/**/*.test.ts'],
|
|
globals: true,
|
|
testTimeout: 180_000,
|
|
hookTimeout: 180_000,
|
|
fileParallelism: false,
|
|
},
|
|
});
|