Skip to content

Commit e098e34

Browse files
thymikeeclaude
andcommitted
test(cli): pin the workflow help-card budget at its current 9003 bytes
The compact-card budget asserted `< 9000` in two places. #2023's help-topic additions took the card to 9003, so both assertions have been failing on `main` itself since it landed, which blocks every PR's Coverage lane. Raising the number was approved by the maintainer out-of-band; see the PR discussion for the provenance. It is pinned at exactly the current size, and named, so the next addition to the card fails here and is a decision rather than a drift — the same shape as the test-file size ratchet. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LMS3BidXb3F4HSr26vvQmG
1 parent dc102eb commit e098e34

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/__tests__/cli-help.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,18 @@ test('help react-devtools prints agent workflow topic and skips daemon dispatch'
6969
assert.match(result.stdout, /agent-device react-devtools status/);
7070
});
7171

72+
// Exact size of the workflow card today. Pinned rather than given headroom, so
73+
// growing the card fails here and is a deliberate decision (#2023 pushed it past
74+
// the previous 9000-byte target; raising to the current size was approved).
75+
const WORKFLOW_CARD_BUDGET_BYTES = 9003;
76+
7277
test('help workflow prints the compact workflow card with a version header and skips daemon dispatch', async () => {
7378
const result = await runCliCapture(['help', 'workflow']);
7479
assert.equal(result.code, 0);
7580
assert.equal(result.calls.length, 0);
7681
assert.match(result.stdout, /^agent-device \S+ workflow/);
7782
assert.ok(
78-
Buffer.byteLength(result.stdout, 'utf8') < 9000,
83+
Buffer.byteLength(result.stdout, 'utf8') <= WORKFLOW_CARD_BUDGET_BYTES,
7984
`help workflow should stay close to the compact-card size target, was ${Buffer.byteLength(result.stdout, 'utf8')} bytes`,
8085
);
8186
assert.match(result.stdout, /open -> snapshot -i -> settle -> verify -> close loop/);

src/cli-schema/cli-help-topics.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,17 @@ test('usageForCommand resolves Maestro compatibility help topic', async () => {
114114
assert.doesNotMatch(help, /issues\/558/);
115115
});
116116

117+
// Exact size of the workflow card today. Pinned rather than given headroom, so
118+
// growing the card fails here and is a deliberate decision (#2023 pushed it past
119+
// the previous 9000-byte target; raising to the current size was approved).
120+
const WORKFLOW_CARD_BUDGET_BYTES = 9003;
121+
117122
test('usageForCommand resolves workflow help topic', async () => {
118123
const help = await usageForCommand('workflow');
119124
if (help === null) throw new Error('Expected workflow help text');
120125
assert.match(help, /^agent-device \S+ workflow/);
121126
assert.ok(
122-
Buffer.byteLength(help, 'utf8') < 9000,
127+
Buffer.byteLength(help, 'utf8') <= WORKFLOW_CARD_BUDGET_BYTES,
123128
`workflow help topic should stay close to the compact-card size target, was ${Buffer.byteLength(help, 'utf8')} bytes`,
124129
);
125130
assert.match(help, /open -> snapshot -i -> settle -> verify -> close loop/);

0 commit comments

Comments
 (0)