carlos / platform Public

provision: re-pin NewServer for the Environments form route

NewServer's only change on this branch is registering POST
/a/{sqid}/apps/{app}/settings/environments; its Save writes the config
bundle through writeConfig and ApplyAtVersion, no instance or sidecar
record. Class and kinds unchanged (key-site, lit:instances); a layered
consoleSecretsWriteCensusInventory re-pins the digest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev fcf358289eb70b17aad0f527b43091c3c73cd524 parent ceaaed9
2 files changed, +37 −1
  • internal/provision/console_secrets_census_test.go +36 −0
  • internal/provision/plan9_b8_census_test.go +1 −1

CI passed — run details

Intent

Attributed to this commit: 54.5 g CO₂e (3,191,144 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-console-secrets, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/internal/provision/console_secrets_census_test.go b/internal/provision/console_secrets_census_test.go
new file mode 100644
index 000000000..06f0788b2
--- /dev/null
+++ b/internal/provision/console_secrets_census_test.go
@@ -0,0 +1,36 @@
+package provision
+
+// Record-write census entry for console secrets slice 2 (branch
+// design-console-secrets), layered on instanceRestore658WriteCensusInventory
+// (the inventory TestPlan9B8RecordWriteCensus used before this branch).
+// Reviewed by the branch's CI-fix implementer against git diff
+// origin/main...HEAD -- internal/console/server.go. No record write is
+// added, moved or reclassified:
+// - NewServer: the only change is one registration,
+// POST /a/{sqid}/apps/{app}/settings/environments (handleEnvForm,
+// internal/console/envform.go and envsave.go), and its comment. The
+// handler's Save writes the app's config bundle through writeConfig
+// and appconfig.ApplyAtVersion under release.WithAppMutation, the
+// config PUT's path; it writes no instance or sidecar record. Kinds are
+// unchanged: the existing "instances" literal keeps it a key-site.
+func consoleSecretsWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), instanceRestore658WriteCensusInventory()...)
+ repins := []censusEntry{
+ {"internal/console/server.go", "NewServer", "key-site", "lit:instances", "2b425a0f5b2694ff5e13dcef7c13795c4832a5407bcbd0c1a5f3ac119dd8043e"},
+ }
+ for _, r := range repins {
+ found := false
+ for i, e := range entries {
+ if e.File == r.File && e.Unit == r.Unit {
+ if e.Class != r.Class || e.Kinds != r.Kinds {
+ panic("console secrets re-pin changes the class or kinds of " + r.File + ":" + r.Unit)
+ }
+ entries[i], found = r, true
+ }
+ }
+ if !found {
+ panic("console secrets re-pin of an unlisted unit " + r.File + ":" + r.Unit)
+ }
+ }
+ return entries
+}
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index 5782b4e7c..78c24a77e 100644
--- a/internal/provision/plan9_b8_census_test.go
+++ b/internal/provision/plan9_b8_census_test.go
@@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) {
if len(got) < 100 {
t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root)
}
- inventory := instanceRestore658WriteCensusInventory()
+ inventory := consoleSecretsWriteCensusInventory()
problems := append(censusDiff(inventory, got), censusPolicy(inventory)...)
if len(problems) > 0 {
t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n "))