Skip to content

add interactive microservice-selection checklist to install wizard#312

Merged
HumanBean17 merged 1 commit into
masterfrom
feat/install-microservice-checklist
Jun 13, 2026
Merged

add interactive microservice-selection checklist to install wizard#312
HumanBean17 merged 1 commit into
masterfrom
feat/install-microservice-checklist

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

What

Implements the interactive microservice-selection checklist from propose/completed/CLI-INSTALL-PROPOSE.md Stage 1 (Case B) — a step that was specified in the proposal but never built. Previously, java-codebase-rag install auto-selected every detected microservice with no user interaction, so a user installing into a microservice monorepo had no way to exclude services.

User-visible changes

  • When install detects 2 or more microservices (a monorepo where cwd has no root build file but multiple subdirectories contain pom.xml / build.gradle*), it now shows an interactive checklist (questionary.checkbox) with all services pre-checked. Toggle off the ones to exclude (Space), confirm with Enter:
    • Select allmicroservice_roots is omitted from .java-codebase-rag.yml (the indexer walks the entire tree — equivalent to accepting the default).
    • Select a subset → only those roots are written to microservice_roots.
    • Deselect everything → "At least one module is required. Re-select?" (Yes retries, No aborts with exit code 2).
  • Single-module projects (root has its own build file) and single-service detection skip the checklist — there's nothing to choose.
  • On re-run (install into an existing config, choosing Update), the previously-selected microservice_roots subset is pre-checked, so the user can adjust rather than start over.

Behavior change to note

In non-interactive mode (--non-interactive or piped stdin), a multi-service install previously wrote an explicit full microservice_roots list to the YAML; it now omits the key entirely. Both index everything — the new behavior just matches the proposal's "accept default → omitted" rule and produces cleaner YAML. No test asserted the old shape.

Scope / impact

  • CLI wizard only. No --microservice flag added — non-interactive keeps the "index all" default per the proposal's non-interactive section.
  • No re-index required. No env-var, ontology, or schema changes.

Tests

  • New TestSelectMicroservices (7 tests): non-interactive → None; non-TTY → None (default=all); subset selection; all-selected → None; empty + decline → exit 2; re-run preselected marks the right checked choices; single dir → None.
  • tests/test_installer.py: 73 passed. Full suite: 760 passed, 11 skipped. ruff check clean.

Manual verification (interactive TTY — can't run under CI)

In a real terminal from a multi-service fixture dir (service-a/pom.xml, service-b/pom.xml, service-c/pom.xml, no root build file):

java-codebase-rag install
  • Confirm source root (Enter) → microservice checklist appears, all checked.
  • Toggle one off (Space), Enter → .java-codebase-rag.yml lists only the selected subset under microservice_roots.
  • Re-run install, choose Update → the previously-unchecked service starts unchecked.
  • Re-run, uncheck all, answer No to re-select → exit code 2.

Non-interactive end-to-end (proves the wiring): java-codebase-rag install --non-interactive --agent claude-code.java-codebase-rag.yml has no microservice_roots key.

Implements propose/completed/CLI-INSTALL-PROPOSE.md Stage 1 (Case B).

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 1a85866 into master Jun 13, 2026
1 check failed
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