flow-muse-commit-pilot-performance.test.mjs
33 lines 1.3 KB
Raw
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf mirror: GitHub Phase A durable MCP OAuth (#270) Human minor ⚠ breaking 10 days ago
1 /**
2 * Performance — evidence validators stay fast on pilot artifact sizes (7A-14).
3 */
4
5 import { describe, it } from 'node:test';
6 import assert from 'node:assert/strict';
7 import { readFileSync } from 'node:fs';
8 import { join } from 'node:path';
9 import { fileURLToPath } from 'node:url';
10
11 import {
12 assertNoSecretLeakageInProjection,
13 assertCleanAntiDriftDiff,
14 MUSE_COMMIT_PILOT_EVIDENCE_REL,
15 } from '../lib/flow/muse-commit-pilot-evidence.mjs';
16
17 const REPO_ROOT = join(fileURLToPath(new URL('.', import.meta.url)), '..');
18 const ART = join(REPO_ROOT, MUSE_COMMIT_PILOT_EVIDENCE_REL, 'artifacts');
19 const WS = join(REPO_ROOT, MUSE_COMMIT_PILOT_EVIDENCE_REL, 'pilot-workspace');
20
21 describe('flow-muse-commit-pilot (performance, 7A-14)', () => {
22 it('100 secret scans + diff checks complete under 500ms p95 budget', () => {
23 const runbook = readFileSync(join(WS, 'overseer.AGENTS.md'), 'utf8');
24 const diff = readFileSync(join(ART, 'overseer.runbook.v1-to-v2.diff'), 'utf8');
25 const start = performance.now();
26 for (let i = 0; i < 100; i += 1) {
27 assertNoSecretLeakageInProjection(runbook);
28 assertCleanAntiDriftDiff(diff);
29 }
30 const elapsed = performance.now() - start;
31 assert.ok(elapsed < 500, `elapsed ${elapsed}ms exceeds 500ms budget`);
32 });
33 });
File History 2 commits
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf mirror: GitHub Phase A durable MCP OAuth (#270) Human minor 10 days ago
sha256:d8c648b20a4d53b2673c5c082ee7edfa7b2fc9b11080832da1f38807b6bf940b fix(7C-L1b): route hosted delegation proposals through cani… Human minor 30 days ago