fix(builder): boot drafts with the settings a new server really gets
Validate game templates / validate (push) Successful in 31s
Validate game templates / boot-test (push) Skipped
Validate game templates / publish (push) Skipped

The builder's boot test filled every blank password-like setting with a
throwaway value. A real deploy only fills x-generate fields, so a draft whose
server refuses to run with an empty join password passed the builder and CI,
and then shut down on its first real deploy.

The builder now boots drafts with boottest-payload -as-deployed: only
x-generate fields are filled, everything else exactly as the template's
defaults. A server that won't run with its own defaults fails the build, and
the model is told that empty settings stay empty, so the value must come from
a default or x-generate. CI's boot test is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gregandClaude Opus 5.5 committed 2026-10-25 21:14:17 -04:00
1 parent d1505991e4
commit 72a4280d44
3 files changed
+25 -4

No files matched your search

+16
View File
@@ -63,4 +63,20 @@ configSchema:
if c["MOTD"] != "gbr-boot-test on 25565" {
t.Errorf("placeholders not resolved: %v", c["MOTD"])
}
// As a new server gets it (what the AI builder boots): only x-generate is filled, a blank join password stays blank
if err := runBootTestPayload([]string{"-as-deployed", "-games", filepath.Join(dir, "games"), "-out", out, "demo"}); err != nil {
t.Fatal(err)
}
raw, _ = os.ReadFile(out)
payload.GameConfig = nil
if err := json.Unmarshal(raw, &payload); err != nil {
t.Fatal(err)
}
if s, _ := payload.GameConfig["RCON_PASSWORD"].(string); !strings.HasPrefix(s, "boot-") {
t.Errorf("as deployed: x-generate RCON_PASSWORD not filled: %v", payload.GameConfig["RCON_PASSWORD"])
}
if payload.GameConfig["ServerPassword"] != "" {
t.Errorf("as deployed: ServerPassword should stay empty, got %v", payload.GameConfig["ServerPassword"])
}
}