test(yardstick): a new-work order without a slug leaves the use numerator not measured (red)

Measured 2026-10-03: the two new-work orders on the real queue carry no `slug:`
(0 of 690 orders do), so "0 of 2" was forced by the missing join key, not by
work going around Voyage. An absence without a possible match is "not
measured", never 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-10-03 18:20:32 +02:00
commit 66cbf228c7
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q

View file

@ -228,6 +228,24 @@ test('use: plan and prove are NEW work, ikke-nytt is not; unmarked and pre-2026-
} finally { cleanup(coord); }
});
test('use: a new-work order without a slug leaves the numerator NOT MEASURED - never a 0', () => {
// Measured 2026-10-03 on the real queue: 2 new-work orders, 0 of 690 orders carry `slug:`.
// "0 of 2" would read as two deliveries outside Voyage, when nothing could match at all.
const coord = fixture({
'r/orders/a.md': order({ id: 'a', date: '2026-09-29T00:00:00Z', marker: 'prove', slug: 'feat-a' }),
'r/orders/b.md': order({ id: 'b', date: '2026-09-29T00:00:00Z', marker: 'plan' }),
});
try {
const row = measureUse({ queue: readOrders(coord), slugs: new Set(['feat-a']), cutoff: DEFAULT_CUTOFF });
assert.equal(row.countable, false);
assert.equal(row.value, null);
assert.equal(row.denominator, 2, 'the denominator is still read and shown');
assert.equal(row.facts.withVoyageRun, 1, 'what CAN be matched is still reported');
assert.equal(row.facts.withoutSlug, 1);
assert.match(row.detail, /1 of 2 new-work orders carry no slug - the numerator is not measured/);
} finally { cleanup(coord); }
});
test('use: work-class in the frontmatter no longer decides anything - only the marker does', () => {
const coord = fixture({
'r/orders/a.md': order({ id: 'a', date: '2026-09-29T00:00:00Z', workClass: 'new', slug: 'feat-a' }),