Repository navigation
test(create): fail when template bundle vars drift from the CLI - #1788
Draft
marcossevilla wants to merge 1 commit into
Draft
marcossevilla wants to merge 1 commit into
marcossevilla wants to merge 1 commit into
Conversation
2 of 7 tasks
marcossevilla
force-pushed
the
test/template-vars-check
branch
from
October 29, 2026 12:43
b7909d0 to
ef3ed33
Compare
Template bundles are regenerated by automated bump PRs, so new bundle vars could land without the CLI passing them. Add a unit test that checks every create subcommand's templateVarResolvers against its templates' bundle vars in both directions, plus Template.defaultedVars as the explicit allowlist for vars intentionally left to the template default. flame_game's application_id is allowlisted since the template derives it from org_name and project_name. flutter_plugin now passes dart_fix_output: true; the var is only read by the post_gen hook, which the CLI never runs, so generated output is unchanged. This check fails on purpose for the org_name var of app_ui_package, dart_cli, dart_package and flutter_package until the follow-up that adds --org-name to those subcommands.
marcossevilla
force-pushed
the
test/template-vars-check
branch
from
October 29, 2026 12:50
ef3ed33 to
1d19191
Compare
This branch has not been deployed
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.
Status
READY
Description
Part 2/3 of stack #1790. CI on this PR is red on purpose until #1789 lands on top; merge the stack as a unit.
Template bundles are regenerated by automated bump PRs (
bump_templates.yaml), so new bundle vars can land without the CLI passing them. This adds a unit test (run by the existing CI) that checks, for everyvery_good createsubcommand and template:templateVarResolversand not listed inTemplate.defaultedVars→ fail.defaultedVarsentries the bundle does not declare → fail.Failure messages name the subcommand, template, bundle, vars, and how to fix them.
Also:
Template.defaultedVars(empty by default) as the explicit allowlist.flame_gamelistsapplication_id, which the template derives fromorg_nameandproject_namewhen omitted.flutter_pluginnow passesdart_fix_output: true. The var is only read by the bundle'spost_genhook, which the CLI never runs (onGenerateCompletealready runsdart fix), so output is unchanged.Fails today on
org_nameforapp_ui_package,dart_cli,dart_packageandflutter_package(fixed in #1789).Type of Change