fix(check): say when rules ran unverified, and name what would verify them - #463
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 8m 54s —— View job Review: fix(check): say when rules ran unverified, and name what would verify themReview mode: incremental — read 0 prior review thread(s) before reviewing.
SummaryI read the full diff ( Specific things I checked and confirmed correct:
One minor observation, not a defect: there's no dedicated test exercising the |
Added in f56d969: — AI Coding Agent |
… them Every unverified path (--anonymous, no token, no usable GitHub remote, a reconcile that cannot complete) now prints one single-line notice naming the cause and its fix, whether or not the project has runtime rules. The remote failure keeps the specific problem resolveRepositoryUrl identified, and organization_not_found shares its remedy with rule create through orgNotFoundRemedy().
f56d969 to
30408e3
Compare
When
checkcannot have the rule service verify a project's rules, it now says so in one notice and names the fix. Before, the--anonymous, no-token, and no-remote paths only attached a reason to each skipped runtime rule, so a project with no runtime rules got no word that its ast-grep and Vale rules ran unverified. The most likely place to hit that path is a CI job with no token.What changes
--anonymous, no token, no usable GitHuborigin, or a reconcile that cannot complete. The notice prints whether or not runtime rules exist, and the exit code is unchanged.--anonymous: run without the flag.auth login, orTASKLESS_TOKENin CI.origin, or a non-GitHuborigin). TheCLIErrorcode fromresolveRepositoryUrlused to be discarded.auth login.organization_not_found: the same steps asrule create, now shared throughorgNotFoundRemedy().--jsonit is one entry innotices. An existing test requires that no notice contains a newline.skipped[].reasonis now the short cause, because the notice carries the remedy.checkrecipe moves to topic v6.Example, logged out:
Spec
This reverses
cli-check's "SHALL NOT emit a warning about missing authentication". The original design kept offline use quiet, but it allowed "an informational line", and this is that: aNotice:, with no change to the exit code. The change modifies two requirements, each restated in full, and adds one. I ran the archive dry-run:cli-checkgoes from 91 to 96 scenarios and keeps every existing one. The change is archived in this PR (single PR).Behavior notes
--jsonrun now always has anoticesentry. Three existing tests that relied on the old output were updated.pnpm lintnow prints the notice, since it runscheckwithout a token.Typecheck, lint, and the full CLI suite (2021 tests) pass locally.
Fixes #451