Skip to content

fix(cli): make bare volcano init produce base-only scaffold#9

Merged
tkkhq merged 3 commits into
mainfrom
feat/init-neutral-template
Jun 15, 2026
Merged

fix(cli): make bare volcano init produce base-only scaffold#9
tkkhq merged 3 commits into
mainfrom
feat/init-neutral-template

Conversation

@tkkhq

@tkkhq tkkhq commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Tracking

  • Related: bare volcano init previously defaulted to the JavaScript template

Summary

  • Change bare volcano init to create a base-only scaffold (environment files, migrations directory, README) instead of defaulting to the JavaScript template
  • Remove defaultStarter = "javascript" from projectinit; when no template is given, only the base starter is applied
  • Update init help text to document the base-only default and list all template aliases
  • Update README quickstart to use volcano init javascript so subsequent commands (config deploy, functions deploy --all) remain valid
  • Update starters/README.md resolution model to reflect base-only default and add the bare volcano init case to the resolution table
  • Update all tests to match the new base-only default behavior

Verification

  • make lint
  • go test ./...
  • go build ./...

tkkhq added 2 commits June 13, 2026 14:19
…e help text

Bare "volcano init" now creates only the base scaffold (volcano/ directory
with env files, migrations dir, and README) instead of defaulting to the
JavaScript template. Help text updated to accurately describe each template,
list all accepted aliases, and document all available --example options.
@tkkhq tkkhq requested a review from a team as a code owner June 13, 2026 18:59
Copilot AI review requested due to automatic review settings June 13, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the default behavior of volcano init so that running it without a template generates only the base scaffold (env files, migrations directory, and a Volcano README), rather than implicitly defaulting to the JavaScript starter. It also updates user-facing documentation/help text and adjusts tests to match the new default.

Changes:

  • Update projectinit so an empty starter name results in applying only the base starter (no language template).
  • Refresh CLI help text and repository docs to describe the base-only default and template aliases.
  • Update init/projectinit tests to assert base-only outputs for bare volcano init.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Updates quickstart to explicitly run init javascript, and documents base-only behavior for bare init.
internal/projectinit/starters/README.md Updates the starter resolution model docs to reflect base-only default and adds a resolution table entry for bare init.
internal/projectinit/projectinit.go Removes the JavaScript default starter and makes empty starter resolve to base-only.
internal/projectinit/projectinit_test.go Updates scaffold expectations and conflict/idempotency assertions for the base-only default.
internal/cmd/root/root_test.go Updates root-level init integration test expectations for base-only output.
internal/cmd/init/init.go Updates init command long help text to document base-only default and list template aliases/examples.
internal/cmd/init/init_test.go Updates help/output assertions to match the new base-only default behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marckong marckong left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Changes bare volcano init to produce a base-only scaffold (env files, migrations dir, README) instead of defaulting to the JavaScript template, by removing defaultStarter so an empty starter falls back to base. Help text, README quickstart, starter docs, and all affected tests are updated to match.

  • defaultStarter = "javascript" removed; empty starter now resolves to baseStarter.
  • Alias list in help text matches the starterAliases map; README quickstart switched to init javascript so the subsequent config deploy step stays valid.
  • e2e tests build their own fixtures and none rely on bare init creating functions, so nothing downstream breaks.

Review

Clean, well-scoped change — the implementation, docs, and tests are internally consistent and the full suite is green (verified go build ./..., go vet, go test ./...). No blocking issues found. One minor, non-blocking observation:

  • printResult (internal/cmd/init/init.go:154) always prints volcano functions deploy --all as a Next step, even for the now-default base-only scaffold that contains no functions. Not introduced by this PR and harmless (the config deploy step is already gated on hasConfig), but the default path now surfaces a step with nothing to deploy — worth a follow-up if you want the guidance to track what was actually scaffolded.

Overall correctness: correct — existing code and tests pass, and the patch is free of blocking issues.

@tkkhq tkkhq added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit 0071cda Jun 15, 2026
8 checks passed
@tkkhq tkkhq deleted the feat/init-neutral-template branch June 15, 2026 02:38

@swkeever swkeever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the base-only init behavior and ran go test ./... / go build ./.... No blocking issues found.

Every init run applies the `base` starter first. If no template is provided,
`projectinit` then applies the default starter, currently `javascript`.
only the `base` starter is applied (environment files, migrations directory,
and README — no language-specific files).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the no-template path creates only env files, migrations, and a README, the generated internal/projectinit/starters/base/volcano/README.md is stale: it still says the directory contains configuration/functions and suggests volcano functions deploy --all / cloud function deploy even though bare init creates no functions. Can we update that generated README guidance to match the new base-only scaffold?

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.

4 participants