fix(#4656): expose coverage.unclassified and widen the zero-applicable guards (#4800)

* fix(#4656): expose coverage.unclassified and widen the zero-applicable guards

* fix(#4656): regenerate golden coverage fixtures and update the rollup pin

Emitted-Drift-Ack-Growth: spec-phase.md — #4656: guard widened to the all-unclassified case, doc claim corrected
Emitted-Drift-Ack-Growth: ui-phase.md — #4656: guard widened identically

* fix(#4656): sync edge-probe doc blocks and coverage pins with the new field

* fix(#4656): key the mandatory confirmation on the widened guard

* docs(#4656): backfill changeset PR number

---------

Co-authored-by: sim <sim@local>
This commit is contained in:
Tom Boucher
2026-09-16 10:33:32 -04:00
committed by GitHub
parent caecaec62e
commit 3014775a3f
14 changed files with 515 additions and 53 deletions

View File

@@ -10,7 +10,7 @@
process.env.GSD_TEST_MODE = '1';
const { test } = require('node:test');
const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
@@ -560,3 +560,37 @@ test('#3717: the edge-probe reference documents the text_en field', () => {
'the edge-probe reference `## Inputs` contract must document the optional text_en field and its text_en ?? text fallback',
);
});
describe('#4656: the zero-applicable guard is widened to the all-unclassified case', () => {
// allow-test-rule: source-text-is-the-product (#4656) — spec-phase.md/ui-phase.md
// guard text is the shipped workflow contract.
const read = (f) => fs.readFileSync(path.join(__dirname, '..', 'gsd-core', 'workflows', f), 'utf-8');
test('spec-phase extracts coverage.unclassified and the guard fires on either condition', () => {
const content = read('spec-phase.md');
assert.ok(
content.includes('coverage.unclassified'),
'step 5.5 must extract the unclassified sibling count the #4656 rollup exposes',
);
assert.ok(
content.includes('[ "$UNCLASSIFIED" = "$APPLICABLE" ]'),
'the guard must fire when every requirement is unclassified (#4656), not only at applicable:0',
);
assert.ok(
content.includes('If the guard above fired'),
'the mandatory AskUserQuestion confirmation must key on the widened guard, not only on applicable:0 (#4656)',
);
});
test('ui-phase carries the same widened guard', () => {
const content = read('ui-phase.md');
assert.ok(
content.includes('coverage.unclassified') && content.includes('[ "$UNCLASSIFIED" = "$APPLICABLE" ]'),
'ui-phase.md:385 guard must be widened identically (#4656)',
);
assert.ok(
content.includes('If the guard above fired'),
'ui-phase confirmation prose must key on the widened guard too (#4656)',
);
});
});