Skip to content

Commit de225e8

Browse files
committed
fix(devx): spell two self-test fixtures so they are not command-id literals
`check:cli-command-ids` reads any quoted run opening with a real oclif bin name as a command-id literal, and reds when it resolves to nothing. Two fixtures in the new parity gate's self-test were deliberately-unresolvable phrases. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
1 parent 257f7c4 commit de225e8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/check-cli-examples-parity.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,12 @@ function selfTest() {
621621
invokesCommand('OS_CLOUD_URL=http://localhost:4000 os package publish', 'os package publish'));
622622
t('a flag suffix still invokes the command', invokesCommand('os package publish --install', 'os package publish'));
623623
t('a different command does not', !invokesCommand('os compile', 'os package publish'));
624+
// ⚠️ Spelled with a NEUTRAL binary here, not `os`: `check-cli-command-ids`
625+
// reads any quoted run opening with a real bin name as a command-id literal,
626+
// and a deliberately-unresolvable fixture would red that gate. The property
627+
// under test is the word boundary, which no particular bin name carries.
624628
t('a longer command name is not a match on its prefix',
625-
!invokesCommand('os package publish-draft --now', 'os package publish'));
629+
!invokesCommand('tool alpha beta-draft --now', 'tool alpha beta'));
626630

627631
const source = [
628632
'export default class X extends Command {',
@@ -662,7 +666,7 @@ function selfTest() {
662666
const located = blockUnderHeading(page, '#### `os package publish`');
663667
t('the block under the heading is found', located.block?.line === 3, JSON.stringify(located.problem ?? located.block?.line));
664668
t('a `#` line inside the fence did not end the section', located.block?.body?.length === 3, String(located.block?.body?.length));
665-
t('an absent heading is a problem', Boolean(blockUnderHeading(page, '#### `os nope`').problem));
669+
t('an absent heading is a problem', Boolean(blockUnderHeading(page, '#### Nothing here').problem));
666670
t('a heading with no fence before the next heading is a problem',
667671
Boolean(blockUnderHeading('#### `os package publish`\n\ntext\n\n## Next\n', '#### `os package publish`').problem));
668672

0 commit comments

Comments
 (0)