You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: wheels generate controller Name a,b silently emits invalid CFML — comma-joined action list becomes one action #3112
wheels generate controller Authors index,show
# create app/controllers/Authors.cfc# create app/views/authors/index,show.cfm <-- one file, comma in the name
grep -n functionapp/controllers/Authors.cfc# 20: function index,show() { <-- invalid CFML, won't compile
The documented form (wheels generate controller Authors index show, space-separated — code-generation.mdx:104,114) works correctly. But the comma form is the natural guess for anyone coming from validatesPresenceOf("a,b")-style comma lists elsewhere in Wheels, and the generator accepts it silently, reports success, and writes a controller that errors at first request plus a view file with a comma in its filename.
Fix options
Split positional action tokens on commas before generating (friendliest), or
Validate each action name against a CFML-identifier pattern and reject with a clear error.
Either way the generator must not write function index,show().
Dedupe: no overlap with #3072–#3090 or in-flight PRs #3100–#3108. Found during the P2 guide-behavioral-audit (p2-2-cliref) while verifying code-generation.mdx.
The report shows wheels generate controller Authors index,show silently emitting function index,show() (invalid CFML that fails to compile) plus a view file index,show.cfm with a comma in its name. There is a clear "what happened" (function index,show() written, reports success) vs. "what I expected" (the space-separated form index show works). Reproducible in isolation.
Suspected layer
cli — the code generator. The comma-joined token is passed through as a single action element rather than being split or validated.
Fix sketch
The action list arrives as ["index,show"] (one element) in CodeGen.cfc::generateController (cli/lucli/services/CodeGen.cfc:117), which writes function ACTION() per element and a view file per element. The likely fix is at the boundary where positional action tokens are collected — either split each token on commas before generating (so index,show becomes ["index","show"], mirroring validatesPresenceOf("a,b") list semantics), or validate each action against a CFML-identifier pattern and reject with a clear error. Touch points: CodeGen.cfc::generateController and possibly the positional-arg parsing in cli/lucli/Module.cfc. Mechanical, no design trade-offs, no cross-engine concern.
Confidence: high
Clear repro with expected-vs-actual, unambiguous single layer (cli generator), and a mechanical one-spot fix; none of the auto-downgrade rules (security/middleware/migration/DI/deploy/cross-engine) apply.
Spec: cli/lucli/tests/specs/services/CodeGenSpec.cfc — added failing → passing cases asserting actions = ["index,show"] yields function index() / function show() (never index,show), plus trim/de-dup coverage.
Implementation: cli/lucli/services/CodeGen.cfc (new normalizeActions() splits comma-joined tokens, returns the normalized list) and cli/lucli/Module.cfc (view loop now uses the normalized actions so view filenames match the controller methods).
A human review is required before merge. The Reviewer will weigh in shortly. Doc updates (MDX guides, .ai/wheels/, CLAUDE.md) are handled separately by bot-update-docs.yml.
Activity
wheels-bot commentedon Jun 12, 2026
Wheels Bot — Triage
Classified as bug.
The report shows
wheels generate controller Authors index,showsilently emittingfunction index,show()(invalid CFML that fails to compile) plus a view fileindex,show.cfmwith a comma in its name. There is a clear "what happened" (function index,show()written, reports success) vs. "what I expected" (the space-separated formindex showworks). Reproducible in isolation.Suspected layer
cli— the code generator. The comma-joined token is passed through as a single action element rather than being split or validated.Fix sketch
The action list arrives as
["index,show"](one element) inCodeGen.cfc::generateController(cli/lucli/services/CodeGen.cfc:117), which writesfunction ACTION()per element and a view file per element. The likely fix is at the boundary where positional action tokens are collected — either split each token on commas before generating (soindex,showbecomes["index","show"], mirroringvalidatesPresenceOf("a,b")list semantics), or validate each action against a CFML-identifier pattern and reject with a clear error. Touch points:CodeGen.cfc::generateControllerand possibly the positional-arg parsing incli/lucli/Module.cfc. Mechanical, no design trade-offs, no cross-engine concern.Confidence:
highClear repro with expected-vs-actual, unambiguous single layer (cli generator), and a mechanical one-spot fix; none of the auto-downgrade rules (security/middleware/migration/DI/deploy/cross-engine) apply.
<!-- wheels-bot:triage:3112 -->
<!-- wheels-bot:triage-class:bug -->
<!-- wheels-bot:triage-confidence:high -->
wheels-bot commentedon Jun 12, 2026
Wheels Bot — Fix proposed
Draft PR: #3131
Spec:
cli/lucli/tests/specs/services/CodeGenSpec.cfc— added failing → passing cases assertingactions = ["index,show"]yieldsfunction index()/function show()(neverindex,show), plus trim/de-dup coverage.Implementation:
cli/lucli/services/CodeGen.cfc(newnormalizeActions()splits comma-joined tokens, returns the normalized list) andcli/lucli/Module.cfc(view loop now uses the normalized actions so view filenames match the controller methods).A human review is required before merge. The Reviewer will weigh in shortly. Doc updates (MDX guides,
.ai/wheels/,CLAUDE.md) are handled separately bybot-update-docs.yml.fix(cli): split comma-joined action tokens in generate controller (#3131