build(forgebox): rebuild base template from LuCLI template so box install boots clean#3196
Merged
Merged
Conversation
…tall boots clean The published wheels-base-template ForgeBox package was broken end to end: a raw `box install` produced an app that `box server start` could not boot, and the artifact diverged from what `wheels new` produces. Source the app/config/db/public/tests/vendor scaffold from the single source of truth (cli/lucli/templates/app/) instead of the repo-root demo app, then layer the CommandBox-only build artifacts (server.json, box.json, README.md, base .gitignore, .mcp.json, .opencode.json) on top. Fixes: - #3173: substitute placeholders at BUILD TIME to working defaults (appName=Wheels, cfengine=lucee, datasourceName=wheels, reloadPassword empty). `box install` has no substitution step, so the |cfmlEngine| token previously killed `box server start` with "Invalid slug detected". The published artifact now carries zero |tokens| / {{tokens}}. - #3174: the base .gitignore no longer excludes /db/** — db/ (with db/.keep) ships so JDBC drivers have a parent dir. Only generated *.sqlite/*.db files are ignored. - #3176: sourcing from the LuCLI template auto-drops repo-only demo cruft (app/jobs/ProcessOrdersJob.cfc, public/ApplicationProxy.cfc, public/index.bxm, the dev /cli + /modules mappings in public/Application.cfc). The template's settings.cfm carries set(useUnderscoreReferenceColumns=true) and the current guides.wheels.dev links; README dependency corrected to wheels-core 4.0.3. Generate the default Main controller + app/views/main/index.cfm in the build exactly as `wheels new` does post-copy — without them the root route (main##index) throws Wheels.ViewNotFound on GET /. Verified end to end in CommandBox docker (CommandBox 6.3.3 / Lucee 7.0.4): clean `box install` auto-pulls wheels-core to vendor/wheels, `box server start` boots with zero manual edits, GET / -> 200 welcome page, /wheels/info and /wheels/routes -> 200 in dev, clean URLs route (dropped Widgets controller resolves; unknown route -> 404), db/ ships. tools/ci/smoke-env.sh reload-gate probes pass (reload-unauthenticated and reload-wrong-password both refused); the info-404 and trace-marker probes note dev-expected behavior (info page + debugbar render only in development). Fixes #3176, #3173, #3174 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
…-base guard The ForgeBox base-template rebuild (#3196) made prepare-base.sh CWD-independent: it derives REPO_ROOT from BASH_SOURCE and reads every source file by absolute path, including `cp "${REPO_ROOT}/LICENSE" "${BUILD_DIR}/"`. The three sibling prepare scripts (core/cli/starterApp) run from the repo root and keep the bare `cp LICENSE "${BUILD_DIR}/"` form. buildArtifactLicenseSpec only matched the bare form, so the keystone rebuild failed two assertions even though LICENSE/NOTICE still land in BUILD_DIR. Broaden both the LICENSE and NOTICE regexes to accept an optional `"${REPO_ROOT}/` prefix while staying tight enough that deleting a copy line still fails the guard (verified red->green: original spec 6 pass / 2 fail, fixed spec 8 pass / 0 fail). prepare-base.sh is left on the robust absolute-path form on purpose — running it from an unrelated CWD still produces a complete build (LICENSE, NOTICE, db/, no residual placeholders), which a bare `cp LICENSE` would break. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <petera@pai.com>
This was referenced Jun 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KEYSTONE of the ForgeBox/CommandBox path-repair campaign. The published
wheels-base-templateForgeBox package was broken end to end: a rawbox installproduced an app thatbox server startcould not boot, and the artifact had drifted from whatwheels newproduces.Per the locked maintainer decision (Peter, 2026-06-12), the base template is now regenerated from
cli/lucli/templates/app/— the single source of truth (the canonicalwheels newoutput) — instead of the repo-root demo app. CommandBox-only build artifacts (server.json,box.json,README.md, the base.gitignore,.mcp.json,.opencode.json) are layered on top; these are the CommandBox equivalents of the LuCLIlucee.json/rewrite.config/_envthatwheels newusers get.What changed
tools/build/scripts/prepare-base.sh— sourcesapp/config/db/public/tests/vendorfrom the LuCLI template (auto-drops repo-only demo cruft); substitutes the{{appName}}/{{datasourceName}}/{{reloadPassword}}/{{luceeAdminPassword}}and legacy|appName|/|cfmlEngine|/… placeholders to working defaults at BUILD time (scoped to config/server/env/layout —app/snippets/*.txtcode-gen templates ship verbatim); translates_env→env.example; generates the defaultMain.cfc+app/views/main/index.cfmexactly aswheels newdoes post-copy.tools/build/base/.gitignore— no longer excludes/db/**; only generated*.sqlite/*.dbare ignored sodb/(withdb/.keep) ships.tools/build/base/server.json— hardcoded sane defaults (name=Wheels,cfengine=lucee); substitution is now a belt-and-suspenders safety net.tools/build/base/box.json— fixedformatscript paths for the 4.0app/layout, simplifiedpostInstall, de-duped keywords.tools/build/base/README.md— corrected dependency from^3.1.0to4.0.3; documents the box-install path + CLI-first recommendation.tools/build/base/config/{app.cfm,settings.cfm}— these now come from the LuCLI template (soset(useUnderscoreReferenceColumns=true), theenv("WHEELS_RELOAD_PASSWORD","")reload pattern, and currentguides.wheels.devdoc links all flow from the single source).Defects fixed
box server startfails out of the box #3173 — published artifact carried literal|cfmlEngine|/|appName|/|datasourceName|/|reloadPassword|placeholders that only the dead CommandBox flow ever substituted;box server startdied with "Invalid slug detected". Now substituted at build time → zero|tokens|/{{tokens}}in the published artifact./db/**strips it at publish #3174 —tools/build/base/.gitignore/db/**caused CommandBoxpackage publishto stripdb/from the zip. Fixed →db/ships withdb/.keep.wheels newtemplate (single source of truth) #3176 — demo cruft (ProcessOrdersJob.cfc,ApplicationProxy.cfc,index.bxm, dev/cli+/modulesmappings), stale3.1.0doc links, README^3.1.0dep, and the missinguseUnderscoreReferenceColumns=true— all resolved by sourcing from the LuCLI template + the README fix.Verification (CommandBox docker, CommandBox 6.3.3 / Lucee 7.0.4.34)
Before (current
prepare-base.shoutput): placeholders present,box server start→ "Invalid slug detected" on|cfmlEngine|;db/stripped on publish; demo cruft + 5/climappings; nouseUnderscoreReferenceColumns;3.1.0links.After (clean pipeline, zero manual edits):
box installexit 0 →wheels-coreauto-pulled tovendor/wheels/box server startboots Lucee 7.0.4.34, profileWheels, webrootpublicGET /→ 200 "Welcome to Wheels" page/wheels/info→ 200,/wheels/routes→ 200 (dev)Widgetscontroller →/widgetsand/widgets/indexroute to the app layout;/nonexistentcontroller→ 404 (proves routing is real)db/present (.keep+.gitignore)tools/ci/smoke-env.shreload-gate probes PASS (reload-unauthenticated-refusedandreload-wrong-password-refusedboth refused, not 302). Thewheels-info-clean-404androot-no-trace-markersprobes note dev-expected behavior (info page + debugbar render only in development).No
cli/paths modified (the LuCLI template was read-only as the source of truth).Fixes #3176, #3173, #3174
🤖 Generated with Claude Code