Skip to content

fix(cli): allow targeting a project named help - #2390

Merged
codeforester merged 4 commits into
mainfrom
bug/2388-20260928-activate-uninstall-a-project-literally-named-help-can-no-lon
Sep 29, 2026
Merged

codeforester merged 4 commits into
mainfrom
bug/2388-20260928-activate-uninstall-a-project-literally-named-help-can-no-lon

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

Keep bare help as the help alias for activate and uninstall, while adding an explicit --project <name> selector so a project literally named help remains reachable. Reference the disambiguation behavior introduced by #2366.

Validation

  • 22 activate/uninstall BATS tests
  • bash -n
  • ShellCheck
  • git diff --check

Fixes #2388
Refs #2366

@codeforester
codeforester requested a review from a team as a code owner September 28, 2026 18:17
@codeforester

Copy link
Copy Markdown
Collaborator Author

Automated review findings

This adds a --project <name> escape hatch to activate.sh/uninstall.sh, letting a project literally named help be targeted explicitly - a sound resolution to #2388. Two things worth fixing before merge:

  1. Run-bundle labeling regression (cli/bash/commands/basectl/basectl.sh, basectl_run_bundle_project, ~line 606): this function already treats --project as a value-consuming flag to skip when scanning a subcommand's argv for the positional slug used to label the run-bundle/log directory. So basectl activate --project myproj - the exact new form this PR introduces, and the only way to reach a project named help - now produces a run bundle labeled just activate instead of activate__myproj, silently losing per-project log separation. Verified directly: --project is in basectl_run_bundle_project's option-value allowlist, so the loop skips both the flag and its value and never reaches basectl_runtime_slug.

  2. Duplicated parsing logic instead of reuse: activate.sh already sources cli/bash/commands/basectl/subcommands/project_command_helpers.sh, which defines base_project_command_parse_args - a shared helper that already implements --project/--project=value parsing with duplicate-detection, and is already used by demo.sh/test.sh. This PR hand-rolls a second, independent ~20-line copy of the same logic in both activate.sh and uninstall.sh instead of reusing it. The two copies have already drifted: uninstall.sh reports a different, less precise error message ("The 'uninstall' command accepts at most one project name") than activate.sh ("does not accept a positional project with --project") for the identical misuse of combining --project with a positional name.

Posted via Claude Code

@codeforester

Copy link
Copy Markdown
Collaborator Author

Addressed the follow-up findings in commit bc7b4968:

  • --project <name> and --project=<name> now label run bundles with the selected project.
  • activate and uninstall reuse the shared project-selection parser instead of maintaining duplicate parsing logic.
  • Added parser and run-bundle regression coverage.

Validation: 81 focused BATS tests, Bash syntax, ShellCheck, and git diff --check all pass.

@codeforester
codeforester merged commit f351ae6 into main Sep 29, 2026
22 checks passed
@codeforester
codeforester deleted the bug/2388-20260928-activate-uninstall-a-project-literally-named-help-can-no-lon branch September 29, 2026 19:32
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.

activate/uninstall: a project literally named "help" can no longer be targeted

1 participant