Repository navigation
Commit fa9a4cd
committed
feat(taskless): enforce the workspace CLI in CI instead of asking for it
The check step added in the previous commit carried a comment asking a
reader not to "fix" `pnpm cli check` back to `npx @taskless/cli check`. A
request is not a boundary, and this repository lints its own prose precisely
because comments do not hold. So the invariant becomes a rule.
`ci-uses-workspace-cli` fails any `.github/workflows/*.yml` step whose `run:`
invokes a published `@taskless/cli`. The repository IS the CLI: checking its
rules with a published build would let a commit that breaks rule evaluation
pass its own CI and surface a release later, in someone else's project.
Three things the matcher has to get right, each measured rather than assumed:
`npx @taskless/cli` already appears in PROSE in `validate.yml` and
`release-cli-nightly.yml`, explaining this same decision. A rule that flagged
its own rationale would be worse than no rule, so the matcher is anchored to
a `run:` key's value rather than to file text. Verified: the clean tree
reports nothing.
A `run:` value is a `flow_node` inline and a `block_scalar` under `|`, and
both spellings are ordinary here, so both are matched. The first attempt
carried one `regex` with no sibling `kind` and was rejected by this repo's
own `regex-requires-kind` check, which is the dogfooding working.
`@taskless/cli-nightly` is deliberately excluded. The nightly is a published
artifact by design and the release workflows reference it on purpose. The
pattern ends at `($|[@\s])` rather than a negative lookahead, which the Rust
regex engine ast-grep uses does not support.
Proven both ways: with the step reverted to `npx @taskless/cli check`,
`check` exits 1 naming this rule; restored, it exits 0.1 parent bc6533d commit fa9a4cd
3 files changed
Lines changed: 89 additions & 9 deletions
File tree
- .github/workflows
- .taskless/rules/sg/ci-uses-workspace-cli
- .tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
99 | 96 | | |
100 | 97 | | |
101 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
0 commit comments