singularity-forge/tests/fixtures/record.ts
TÂCHES 6f410a0041 feat(ci): implement three-stage promotion pipeline (Dev → Test → Prod) (#1098)
* feat(ci): add version stamp script for dev publishes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add CLI smoke tests for pipeline test stage

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add FixtureProvider for LLM conversation recording and replay

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add fixture test runner and sample recordings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add live test stubs and pipeline npm scripts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add three-stage promotion pipeline workflow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add weekly cleanup workflow for stale dev versions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(ci): add fixture recording helper stub

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 00:40:06 -06:00

50 lines
1.6 KiB
TypeScript

/**
* Fixture Recording Helper
*
* Records LLM conversations as fixture files for replay in CI.
*
* Usage:
* GSD_FIXTURE_MODE=record npm run test:fixtures:record
*
* This script is a placeholder for the full recording workflow.
* To create new fixture recordings:
*
* 1. Set GSD_FIXTURE_MODE=record in your environment
* 2. Run an agent conversation that you want to capture
* 3. The FixtureRecorder (from provider.ts) collects turns automatically
* 4. Recordings are saved as JSON to tests/fixtures/recordings/
*
* For manual fixture creation, create a JSON file in recordings/ matching
* the FixtureRecording interface from provider.ts:
*
* {
* "name": "descriptive-name",
* "description": "What this fixture tests",
* "turns": [
* { "role": "user", "content": "..." },
* { "role": "assistant", "content": "...", "toolUses": [...] }
* ]
* }
*
* Then run `npm run test:fixtures` to validate the recording.
*/
import { getFixtureMode, getFixtureDir } from "./provider.ts";
const mode = getFixtureMode();
const dir = getFixtureDir();
if (mode !== "record") {
console.log("Fixture recording is not active.");
console.log("Set GSD_FIXTURE_MODE=record to enable recording.");
console.log("");
console.log("Usage:");
console.log(" npm run test:fixtures:record # Start recording");
console.log(" npm run test:fixtures # Replay and verify recordings");
console.log("");
console.log(`Recordings directory: ${dir}`);
process.exit(0);
}
console.log(`Recording mode active. Fixture directory: ${dir}`);
console.log("Recording integration is pending full agent hookup.");