Skip to content

fix(cli): render setup validation errors cleanly - #966

Merged
blafourcade merged 5 commits into
nextfrom
fix/cli-setup-validation-auto
Oct 7, 2026
Merged

blafourcade merged 5 commits into
nextfrom
fix/cli-setup-validation-auto

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

aidd setup --scope user --ai claude --plugins all now prints the existing refusal and remedies and exits 1 without a stack trace or minified bundle dump. Help and README explain the shipped user-scope limits.

🛠️ How it works

Construct SetupFlow inside the existing command error boundary. Cover constructor refusals through command and built-binary tests, derive help support from the registry, and update the setup help snapshot. Domain validation and installation capabilities stay as shipped.

🧪 How to verify

  • pnpm --dir cli test: 6,805 passed; one existing opt-in runtime test skipped.
  • Commit hooks: 549 repository script tests, lint, architecture, typecheck, type-honesty, and documentation checks passed.
  • Pre-push dead-code analysis passed. Independent review reran 62 domain, command, and hermetic e2e tests.

⚠️ Heads-up

The unchanged startup update-check hook may construct dependencies before the setup action runs. The regression proves that a refused setup action does not create its own dependencies. Existing unrelated lint and Vitest deprecation warnings remain.

🔗 Linked issue

Closes #891

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

blafourcade and others added 5 commits October 6, 2026 17:16
Keep unsupported user-scope combinations inside the command error boundary so intentional refusals print remedies without a stack trace. Document current registration and installation scope limits.

Refs #891

AIDD-Session-Id: 01a111bd-4959-7be1-9ad4-093a46ef8295
Record the approved review and outcome challenge for #891, mark the plan reviewed, and clarify that dependency construction assertions apply to the setup action.

AIDD-Session-Id: 01a111bd-4959-7be1-9ad4-093a46ef8295
The table carried a second subject — plugin install file scope — and a closing
paragraph that restated it, then recited what the change does not do. Both are
out of what #891 asks, which is the refusal and the state already shipped.

It also stated the support list by hand next to a --help list generated from
supportsUserScopeActivation. Two sources for one fact, and only one of them can
drift. The table now says the minimum and points at the generated one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AIDD-Session-Id: bf713ca4-3c1b-491d-ac0a-4d4533330b5c
`referenced-paths` anchors on whatever top-level entry is on disk, so `.aidd/`
becomes an anchor the moment a contributor runs the CLI in this checkout. From
then on the two pages documenting `.aidd/config.json` — the telemetry opt-in
switch a repository commits to turn measurement on — were refused for naming a
file this repository deliberately does not hold. Its absence is the state those
pages describe.

The checker now skips that path where it skips a command or a placeholder. The
test states the case with the anchor present, so it is red on a clean clone too,
where the old gate passed by accident.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AIDD-Session-Id: bf713ca4-3c1b-491d-ac0a-4d4533330b5c
… gates on

`git push --delete` runs the pre-push gates over a push that carries no commit:
41 seconds of the cli suite to remove a branch. Three measurements say no fix is
reachable from inside the hook — lefthook forwards git pre-push stdin to no
command, the hook environment is byte-identical to a normal push, and a glob
filter still matches. Owning the git hook file to read that stdin is a
structural change for a rare operation, so the limit is written down instead,
inside the paragraph that already rules on --no-verify rather than beside it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AIDD-Session-Id: bf713ca4-3c1b-491d-ac0a-4d4533330b5c
@blafourcade
blafourcade marked this pull request as ready for review October 7, 2026 04:24
@blafourcade
blafourcade requested a review from a team as a code owner October 7, 2026 04:24
@blafourcade
blafourcade merged commit 7f92f85 into next Oct 7, 2026
25 checks passed
@blafourcade
blafourcade deleted the fix/cli-setup-validation-auto branch October 7, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant