flow-muse-commit-pilot-data-integrity.test.mjs
sha256:b5f647cb9c409f563d4671fe3fc05ddea01fabfed9b41fc11cb923588e1c1baf
mirror: GitHub Phase A durable MCP OAuth (#270)
Human
minor
⚠ breaking
10 days 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
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