Commit 6318bee
fix(cli): handle bare
* fix(cli): handle bare `wheels` invocation by delegating to showHelp()
LuCLI's module router dispatches a no-args `wheels` invocation to a
`main()` function on the module. `cli/lucli/Module.cfc` only defined
`showHelp()`, so picocli surfaced
Component [modules.wheels.Module] has no function with name [main]
every time a user typed `wheels` with no subcommand. Add `main()` as a
thin delegate to `showHelp()` (and hide it from `mcpHiddenTools()` so it
doesn't leak as an MCP tool — it's a CLI-only no-args dispatch target).
Fixes #2840
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
* docs(web/guides): note bare `wheels` invocation prints help in verification section
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
* fix(cli): address Reviewer A/B consensus findings (round 1)
- cli/lucli/Module.cfc: strip `(#2840)` issue reference from inline
comment on `main()` (CLAUDE.md: don't reference current task/fix
in comments — belongs in PR description).
- cli/lucli/Module.cfc: rewrite misleading `hint:` text on `main()`.
The previous "shown when `wheels` is run with no arguments" implied
the hint text itself was user-visible — it isn't (`showHelp()`
output is, and `main` is suppressed from MCP listing via
`mcpHiddenTools()`). New hint describes the dispatch mechanism.
- CHANGELOG.md: move `### Fixed` below `### Added` and `### Changed`
under `[Unreleased]` to follow Keep a Changelog's canonical section
order (Added → Changed → Deprecated → Removed → Fixed → Security).
- web/sites/guides/.../installation.mdx: correct "pre-4.0.x build"
diagnosis to "a build that predates this fix — upgrade to the
latest 4.0.x release". The LuCLI-based `wheels` CLI did not exist
before 4.0, so users seeing this error are on a 4.x release that
predates the patch, not a pre-4.x build.
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
* test(cli): harden #2840 main() regression spec to be comment-aware
The bot's MainCommandSpec scanned raw Module.cfc with a fixed 400-char
window, so a commented-out main() could false-green it (the PR #2595 /
CLAUDE.md anti-pattern #14 class of bug). Strengthen the scan:
- strip line and block comments before matching, so commented-out
declarations no longer satisfy the assertions (negative-control tested)
- scope the showHelp() delegate check to main()'s body (declaration
through its first closing brace) rather than a fixed-width window
- assert showHelp() actually emits the "Wheels CLI " banner, so a stubbed
delegate target cannot pass
- guard Left(str, 0), which crashes Lucee 7 (cross-engine invariant #8)
Verified: regex logic against the real Module.cfc incl. a negative
control, and bare `wheels` printing the help banner end-to-end via the
LuCLI launcher with the worktree module mounted.
Signed-off-by: Peter Amiri <peter@alurium.com>
* test(cli): line-anchor the #2840 spec instead of stripping comments
The previous revision stripped comments with a global non-greedy
reReplace over the ~6k-line Module.cfc before scanning. That match hung
the Lucee 7 CLI test suite (5-minute timeout, HTTP 000000) while passing
on the Lucee that LuCLI 0.3.7 bundles — a classic engine-dependent
catastrophic backtrack.
Same comment-robustness, no whole-file scan: match declarations with
(?m)^[ \t]*public ... function main, which a commented-out
`// public ... main()` or a ` * ...` docblock line cannot satisfy. The
check is now a cheap first-match reFind with no backtracking-prone
construct.
Logic re-verified against the real Module.cfc incl. //-comment and
docblock negative controls.
Signed-off-by: Peter Amiri <peter@alurium.com>
---------
Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Signed-off-by: Peter Amiri <peter@alurium.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Peter Amiri <peter@alurium.com>wheels invocation by delegating to showHelp() (#2842)1 parent f4ed637 commit 6318bee
4 files changed
Lines changed: 99 additions & 0 deletions
File tree
- cli/lucli
- tests/specs/commands
- web/sites/guides/src/content/docs/v4-0-0/command-line-tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
185 | 197 | | |
186 | 198 | | |
187 | 199 | | |
| |||
| 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 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
| 217 | + | |
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
| |||
0 commit comments