carlos / platform Public

reconcile: the stripped-runtime backstop judges socket-backed records only (whole-branch r2 P1)

A static or upstream-backed record of a rootfs app carries no runtime by
design and is minted as before, with no kind-marker read. Witnessed
through the create door and Reconcile (TestRootfsAppPlainRecordsReachTheBox).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev c45670c6a6cb4662d0c76e2e0b89cdc783946c83 parent fb201af
2 files changed, +19 −3
  • internal/provision/reconcile.go +5 −1
  • internal/provision/reconcile_rootfs_backstop_test.go +14 −2
diff --git a/internal/provision/reconcile.go b/internal/provision/reconcile.go
index 8418bc3d8..1bfe7abe7 100644
--- a/internal/provision/reconcile.go
+++ b/internal/provision/reconcile.go
@@ -1405,12 +1405,16 @@ func Reconcile(ctx context.Context, s release.Store, reg *registry.Registry, cfg
// rootfs app has a marker, written by its first ship and never
// rewritten; an app with none (binary apps shipped before markers) is
// not rootfs. A marker that cannot be read defers the mint this pass.
+ // Only a socket-backed instance record (DerivesPaths) is a process a
+ // runtime describes: a static or upstream-backed record of a rootfs app
+ // carries none by design (the create door mints it plain) and is minted
+ // as before, with no read (whole-branch review round 2, P1).
kindReads := map[acctApp]struct {
rootfs bool
err error
}{}
strippedRootfs := func(rec Record) bool {
- if rec.Runtime != "" {
+ if rec.Runtime != "" || !rec.DerivesPaths() {
return false
}
k := acctApp{rec.Account, rec.App}
diff --git a/internal/provision/reconcile_rootfs_backstop_test.go b/internal/provision/reconcile_rootfs_backstop_test.go
index ea43a8736..939bc03cc 100644
--- a/internal/provision/reconcile_rootfs_backstop_test.go
+++ b/internal/provision/reconcile_rootfs_backstop_test.go
@@ -63,7 +63,8 @@ func strippedRecord(sqid, host string) Record {
// [Whole-branch review P1-2] The box's backstop: a record with no runtime
// for an app whose kind marker says rootfs is never minted as a binary row.
-// It is left unmaterialized and logged, pass after pass. A binary app's
+// It is left unmaterialized and logged, pass after pass, while the app's
+// static and upstream-backed records mint as before. A binary app's
// record, or one of an app with no marker, mints as before. The marker is
// read once per app per pass and only for a record with no row yet; a
// read that fails defers the mint.
@@ -73,7 +74,11 @@ func TestReconcileRefusesABinaryRowForARootfsApp(t *testing.T) {
d, sqid := rootfsSetup(t)
s := &kindMarkerStore{DirStore: d}
putKindMarker(t, s, sqid, release.KindRootfs)
- for _, rec := range []Record{strippedRecord(sqid, a), strippedRecord(sqid, b), rootfsRecord(sqid, c, false)} {
+ static := strippedRecord(sqid, "static.shop.example.com")
+ static.Kind = "static"
+ upstream := strippedRecord(sqid, "api.shop.example.com")
+ upstream.Addrs = []string{"127.0.0.1:9000"}
+ for _, rec := range []Record{strippedRecord(sqid, a), strippedRecord(sqid, b), rootfsRecord(sqid, c, false), static, upstream} {
if err := CreateRecord(ctx, s, rec); err != nil {
t.Fatal(err)
}
@@ -94,6 +99,13 @@ func TestReconcileRefusesABinaryRowForARootfsApp(t *testing.T) {
if got := mustGet(t, reg, c); got.Runtime != registry.RuntimeRootfsV1 {
t.Fatalf("pass %d: the rootfs record's row = %+v", pass, got)
}
+ // A static or upstream-backed record of a rootfs app starts no
+ // process and carries no runtime by design: minted as before.
+ for _, host := range []string{static.Host, upstream.Host} {
+ if got := mustGet(t, reg, host); got.Runtime != "" {
+ t.Fatalf("pass %d: %s minted %+v, want a plain row", pass, host, got)
+ }
+ }
if n := s.markerGets(); n != 1 {
t.Fatalf("pass %d: %d marker reads, want 1 (once per app per pass)", pass, n)
}