fix(#4806): unparseable VERIFICATION.md frontmatter reports a distinct parse error, never status missing (#4896)
* test(#4806): failing-first — unparseable VERIFICATION.md frontmatter is a parse error, not status missing / Field not found * fix(#4806): unparseable VERIFICATION.md frontmatter reports a distinct parse error — never 'missing' or 'Field not found' * test(#4806): census pin 66→67 — cmdFrontmatterGet's unparseable-frontmatter error is a new output({error}) call site * chore(#4806): backfill changeset PR number (4896) --------- Co-authored-by: sim <sim@local>
This commit is contained in:
@@ -3165,3 +3165,27 @@ describe('#2868: verification status CLI drives the execute-phase stranded-phase
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// ─── #4806: unparseable VERIFICATION.md frontmatter is a parse error, not "missing" ──
|
||||
|
||||
describe('#4806: unparseable VERIFICATION.md frontmatter reports a parse error, not missing', () => {
|
||||
test('a VERIFICATION.md whose frontmatter fails to parse reports status unparseable, not missing', () => {
|
||||
// The file EXISTS and verification ran — "missing" (and its next_command
|
||||
// re-running execute-phase) is a false statement about the phase. The
|
||||
// YAML syntax error is in the report, not in the phase's execution.
|
||||
const dir = mkPhaseDir('unparseable');
|
||||
fs.writeFileSync(path.join(dir, '01-foo-VERIFICATION.md'),
|
||||
'---\nstatus: "passed\n---\n\n# Verification Report\n');
|
||||
const result = readVerificationStatus(dir);
|
||||
assert.equal(result.status, 'unparseable', 'status must be unparseable');
|
||||
assert.ok(result.next_action.includes('not parseable YAML'),
|
||||
'next_action must name the YAML parse failure');
|
||||
});
|
||||
|
||||
test('a well-formed control file still reports passed (unchanged)', () => {
|
||||
const dir = mkPhaseDir('control');
|
||||
writeVerificationMd(dir, '01-foo-VERIFICATION.md', 'passed');
|
||||
const result = readVerificationStatus(dir);
|
||||
assert.equal(result.status, 'passed');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user