flow-muse-commit-pilot-data-integrity.test.mjs
39 lines 1.5 KB
Raw
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge Human 14 hours ago
1 /**
2 * Data-integrity — pilot workspace versions align across harnesses (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 parseGeneratedMarkerVersion,
13 MUSE_COMMIT_PILOT_EVIDENCE_REL,
14 } from '../lib/flow/muse-commit-pilot-evidence.mjs';
15
16 const REPO_ROOT = join(fileURLToPath(new URL('.', import.meta.url)), '..');
17 const ART = join(REPO_ROOT, MUSE_COMMIT_PILOT_EVIDENCE_REL, 'artifacts');
18
19 describe('flow-muse-commit-pilot (data-integrity, 7A-14)', () => {
20 it('v0.1.0 and v0.2.0 artifact pairs share harness-specific marker versions', () => {
21 const pairs = [
22 ['overseer.AGENTS.v0.1.0.md', 'overseer.AGENTS.v0.2.0.md'],
23 ['overseer.v0.1.0.mdc', 'overseer.v0.2.0.mdc'],
24 ];
25 for (const [v1, v2] of pairs) {
26 const oldContent = readFileSync(join(ART, v1), 'utf8');
27 const newContent = readFileSync(join(ART, v2), 'utf8');
28 assert.equal(parseGeneratedMarkerVersion(oldContent), '0.1.0');
29 assert.equal(parseGeneratedMarkerVersion(newContent), '0.2.0');
30 }
31 });
32
33 it('hand-edited artifact differs from canonical v0.2.0 render', () => {
34 const canonical = readFileSync(join(ART, 'overseer.AGENTS.v0.2.0.md'), 'utf8');
35 const handedited = readFileSync(join(ART, 'overseer.AGENTS.handedited.md'), 'utf8');
36 assert.ok(handedited.includes('hand-scribbled note'));
37 assert.ok(handedited.length > canonical.length);
38 });
39 });
File History 1 commit
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge Human 14 hours ago