fix(boot-test): run every boot test with exactly what a new server gets
Validate game templates / validate (push) Successful in 22s
Validate game templates / boot-test (push) Skipped
Validate game templates / publish (push) Skipped

CI's boot test gave every blank password-like setting a throwaway value. A
real deploy only fills x-generate fields, so a template whose server won't
start without one passed CI and failed for the first owner who deployed it.

boottest-payload now fills only x-generate fields, for CI and the builder
alike. The old behaviour is kept as -fill-blank-passwords, used only by
the builder's second boot to tell whether an empty setting is why a draft
fails. Messages and AUTHORING.md no longer say boot tests fill passwords;
a server that needs a join password gets x-generate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gregandClaude Opus 5.5 committed 2026-10-25 22:01:16 -04:00
1 parent 98ba043bec
commit fe790ad223
6 files changed
+35 -32

No files matched your search

+7 -6
View File
@@ -32,8 +32,9 @@ func runBootTestPayload(args []string) error {
fs := flag.NewFlagSet("boottest-payload", flag.ExitOnError)
gamesDir := fs.String("games", "games", "directory holding one folder per game")
out := fs.String("out", "", "file to write (default stdout)")
asDeployed := fs.Bool("as-deployed", false, "settings exactly as a new server gets them: only x-generate fields filled, "+
"no throwaway passwords (the AI builder boots drafts this way)")
fillBlank := fs.Bool("fill-blank-passwords", false, "also give blank password settings a throwaway value. Never for a "+
"boot test: a real server doesn't get one. Only the AI builder uses it, to find out whether an empty setting is "+
"why a draft fails")
fs.Parse(args)
if fs.NArg() != 1 {
return errors.New("boottest-payload needs a game id")
@@ -73,12 +74,12 @@ func runBootTestPayload(args []string) error {
config[key] = value
}
}
// Like the panel fills blank x-generate fields on deploy; other blank passwords (which an owner
// would type in, and some games refuse to start without) get a throwaway value too, except
// -as-deployed: a draft must start with exactly what a new server gets
// Exactly what a new server gets: the panel fills blank x-generate fields on deploy and nothing else, so
// the boot test does too. Filling other blank passwords hid templates whose server won't start without
// one: they passed CI and failed on the first real deploy.
for key, p := range schemaProperties(g) {
prop, _ := p.(map[string]any)
if prop["x-generate"] == nil && (*asDeployed || !passwordKey.MatchString(key)) {
if prop["x-generate"] == nil && (!*fillBlank || !passwordKey.MatchString(key)) {
continue
}
// Only missing or empty text: ports, booleans and other values are never touched