Skip to content

Commit f78d7c2

Browse files
committed
test(cli): set the exit-signal and refusal-renders-once vacuity floors at about two thirds of the measured counts
Each anti-vacuity floor in the two command-population pins now sits at about two thirds of its count measured on 185512c (72/164/53 and 72/64/3), so deleting one command is a green change while an emptied population still reds. The `this.error` population (3 modules) keeps a non-empty floor. Each floor is written once, with its measured value and date beside it. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5m4bTCRGQcuJTsnyfD
1 parent 185512c commit f78d7c2

2 files changed

Lines changed: 27 additions & 33 deletions

File tree

‎packages/cli/test/exit-signal.pin.test.ts‎

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -468,28 +468,20 @@ const FLOW = new Map(
468468
);
469469

470470
/**
471-
* Floors, not counts of today: the population and the `this.exit`-in-`try`
472-
* sites this was widened over, on `f9a8eb889e`. That is 65 commands: 46
473-
* JSON-capable (32 `--json`, 14 `--format json`, the first population) and 19
474-
* text-face only. It is 127 sites: 105 in the first population, 21 of them
475-
* `os build`'s through `compile.ts`, and 22 in the three text-face commands
476-
* the widening was filed on. A discovery or analyzer that silently stops
477-
* finding anything returns zero, and zero passes every per-member assertion —
478-
* these are what notice. A drop below them is a broken detector or a
479-
* deliberate removal; say which when you lower one.
480-
*
481-
* Seeding `this.error` raised the site floor to 131, measured on
482-
* `bee8d1c62c` over the same 65 commands: the 127 `this.exit` sites, plus
483-
* four `this.error` sites — `compile.ts`'s bundling refusal, counted for
484-
* `os compile` and again for `os build` through it, and `os init`'s two
485-
* refusals inside its outer `try`. Those four sites now spell `this.exit(2)`
486-
* (the status `this.error` raised, with the sentence rendered once): both
487-
* spellings are seeds, so the floor is unchanged.
471+
* Vacuity floors, not counts of today. A discovery or analyzer that silently
472+
* stops finding anything returns zero, and zero passes every per-member
473+
* assertion; these are what notice. Each sits at about two thirds of its
474+
* measured count, so deleting a command is an ordinary green change while a
475+
* walk or scan that resolves nothing is not. The site count is every
476+
* signal-raising call inside a `try` (`this.exit`, and `this.error`, which
477+
* raises the same signal in another spelling), summed over each member's
478+
* inheritance chain, so `compile.ts`'s sites count for `os build` too. Raise
479+
* one only alongside a reason that the smaller number is impossible.
488480
*/
489-
const POPULATION_FLOOR = 65;
490-
const SITE_FLOOR = 131;
491-
/** The first population's floor, kept so a face-label regression is seen too. */
492-
const JSON_FACE_FLOOR = 46;
481+
const POPULATION_FLOOR = 48; // measured 72 on 2026-10-27 (`185512cc`)
482+
const SITE_FLOOR = 109; // measured 164 on 2026-10-27 (`185512cc`)
483+
/** The first population (the JSON-capable commands), kept so a face-label regression is seen too. */
484+
const JSON_FACE_FLOOR = 35; // measured 53 on 2026-10-27 (`185512cc`)
493485

494486
// ---------------------------------------------------------------------------
495487
// 1. The analyzer, against fixtures — it must be able to fail
@@ -622,7 +614,7 @@ describe('every command lets the exit signal through', () => {
622614
});
623615

624616
it('the population is not vacuous — the floor holds and the commands this was filed on are in it', () => {
625-
expect(POPULATION.length, 'fewer commands discovered than this pin was widened over').toBeGreaterThanOrEqual(POPULATION_FLOOR);
617+
expect(POPULATION.length, 'fewer commands discovered than the vacuity floor').toBeGreaterThanOrEqual(POPULATION_FLOOR);
626618
// The population IS the walk: every module the walk lists is a member.
627619
expect(POPULATION).toHaveLength(COMMAND_FILES.length);
628620
expect(
@@ -643,7 +635,7 @@ describe('every command lets the exit signal through', () => {
643635

644636
it('the scan reaches the sites — including the completed-apply exit and the text-face refusals this was filed on', () => {
645637
const total = [...FLOW.values()].reduce((n, f) => n + f.sites.length, 0);
646-
expect(total, 'fewer signal-raising calls inside a try found than this pin was widened over').toBeGreaterThanOrEqual(SITE_FLOOR);
638+
expect(total, 'fewer signal-raising calls inside a try found than the vacuity floor').toBeGreaterThanOrEqual(SITE_FLOOR);
647639
expect(FLOW.get('migrate recorded-by')?.sites.map((s) => s.call)).toContain(
648640
"this.exit(result.status === 'completed' ? 0 : 1)",
649641
);

‎packages/cli/test/refusal-renders-once.test.ts‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -216,20 +216,22 @@ const FILES = commandFiles(COMMANDS_DIR);
216216
const SCANS = FILES.map((file) => ({ file: relative(PKG_ROOT, file), scan: scanRefusalPairs(file, readFileSync(file, 'utf8')) }));
217217

218218
/**
219-
* Floors, measured on `fd5a1cd597`: 65 command modules, 57 of them calling a
220-
* refusal printer, and `this.error` raised from 3 (`os datasource introspect`,
221-
* `list-tables`, `validate`) once `init.ts` and `compile.ts` stopped. A scan
222-
* that silently finds nothing reports zero pairs, and zero passes every
223-
* assertion below; these are what notice. A drop below them is a broken
224-
* detector or a deliberate removal — say which when you lower one.
219+
* Vacuity floors, not counts of today. A scan that silently finds nothing
220+
* reports zero pairs, and zero passes every assertion below; these are what
221+
* notice. Each sits at about two thirds of its measured count, so deleting a
222+
* command is an ordinary green change while a walk or scan that resolves
223+
* nothing is not. `this.error` is raised from only 3 modules (`os datasource
224+
* introspect`, `list-tables`, `validate`), too few for a fraction, so that
225+
* floor only says the population is not empty. Raise one only alongside a
226+
* reason that the smaller number is impossible.
225227
*/
226-
const FILE_FLOOR = 60;
227-
const PRINTER_FILE_FLOOR = 50;
228-
const ERROR_FILE_FLOOR = 3;
228+
const FILE_FLOOR = 48; // measured 72 on 2026-10-27 (`185512cc`)
229+
const PRINTER_FILE_FLOOR = 42; // measured 64 on 2026-10-27 (`185512cc`)
230+
const ERROR_FILE_FLOOR = 1; // non-empty: measured 3 on 2026-10-27 (`185512cc`)
229231

230232
describe('no command renders a refusal and also raises it with this.error', () => {
231233
it('the population is not vacuous — the floors hold', () => {
232-
expect(FILES.length, 'fewer command modules than this pin was written over').toBeGreaterThanOrEqual(FILE_FLOOR);
234+
expect(FILES.length, 'fewer command modules than the vacuity floor').toBeGreaterThanOrEqual(FILE_FLOOR);
233235
expect(SCANS.filter((s) => s.scan.printerCalls > 0).length, 'refusal printers not found').toBeGreaterThanOrEqual(PRINTER_FILE_FLOOR);
234236
expect(SCANS.filter((s) => s.scan.errorCalls > 0).length, '`this.error` not found').toBeGreaterThanOrEqual(ERROR_FILE_FLOOR);
235237
});

0 commit comments

Comments
 (0)