Recheck the domain claim before restarting; read it strictly
Astra's review of b809fd4 found two gaps. A resumed configure could restart the old record. If the write landed before capture and the domain was then re-pointed or detached, WriteAgentKeys returned early and configure restarted the baseline's record. RestartCanonical now resolves the claim again after the dry run, the last read before the restart, and refuses with restart-binding-<code> or restart-binding-changed. A claim that is only not live still passes, so a rollback can reach the same record. Domains decoding let the last repeated field win, matched names in any case and read null as empty. The answer is now read field by field: repeated fields, case variants of the fields read, nulls, wrong types, non-object rows and a row with no route are ErrMalformedAnswer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 files changed,
+336
−17
adopt/restart.go+35 −0adopt/restart_test.go+79 −0carlosop/client.go+76 −17carlosop/client_test.go+72 −0carlosop/fakecarlos/fakecarlos.go+29 −0cmd/alta-adopt/main_test.go+45 −0
CI passed — run details
CI log
=== vet === go vet ./... === fmt === === test === CGO_ENABLED=0 go test ./... ok amadan.net/oficina/alta/adopt 17.617s ok amadan.net/oficina/alta/carlosop 0.053s ? amadan.net/oficina/alta/carlosop/fakecarlos [no test files] ok amadan.net/oficina/alta/cmd/alta (cached) ok amadan.net/oficina/alta/cmd/alta-adopt 21.897s ok amadan.net/oficina/alta/console (cached) ? amadan.net/oficina/alta/console/fakeconsole [no test files] ok amadan.net/oficina/alta/homeop (cached) ok amadan.net/oficina/alta/homeop/fakehome (cached) ok amadan.net/oficina/alta/internal/web (cached) ok amadan.net/oficina/alta/provision (cached) === compat === cd homecompat && go vet ./... && CGO_ENABLED=0 go test ./... ok amadan.net/oficina/home/altacompat 0.553s
diff --git a/adopt/restart.go b/adopt/restart.go| index 5d47ab3..81b242e 100644 |
| --- a/adopt/restart.go |
| +++ b/adopt/restart.go |
| @@ -32,6 +32,11 @@ var ( |
| // will not cycle now, but the next request wakes it on the new config, |
| // and the probe that follows makes that request. |
| // |
| +// id may be a journalled baseline, so after the dry run, the last read |
| +// before the restart, the claim is resolved again (claimHolds). A claim |
| +// that no longer binds the canonical domain to id's record restarts |
| +// nothing, with or without apply. |
| +// |
| // A console without the narrowed door (carlosop.ErrNoScopedRestart), a |
| // 503 or any other refusal is returned as it is, and nothing falls back |
| // to the app-wide door. Without apply, only the dry run is made. |
| @@ -52,6 +57,9 @@ func RestartCanonical(ctx context.Context, c *carlosop.Client, app provision.App |
| if err := exactlyHost(routes, id.RecordHost); err != nil { |
| return err |
| } |
| + if err := claimHolds(ctx, c, app, id); err != nil { |
| + return err |
| + } |
| if !apply { |
| return nil |
| } |
| @@ -64,6 +72,33 @@ func RestartCanonical(ctx context.Context, c *carlosop.Client, app provision.App |
| return exactlyHost(routes, id.RecordHost) |
| } |
| +// claimHolds is nil when app's canonical domain still resolves to id's |
| +// record through id's route. Otherwise it is restart-binding-<code>, the |
| +// code canonicalRecord refused with, or restart-binding-changed for a |
| +// claim that now resolves elsewhere; a read that fails is its own error. |
| +// Whether the claim is live is not asked: a rollback has to reach the |
| +// same record while its domain is unwell. |
| +func claimHolds(ctx context.Context, c *carlosop.Client, app provision.App, id Identity) error { |
| + ds, err := c.Domains(ctx, app.Slug) |
| + if err != nil { |
| + return err |
| + } |
| + all, err := c.Instances(ctx, app.Slug) |
| + if err != nil { |
| + return err |
| + } |
| + d, _, code, err := canonicalRecord(CanonicalHost(app), ds, all) |
| + switch { |
| + case err != nil: |
| + return err |
| + case code != "": |
| + return errors.New("adopt: restart-binding-" + code) |
| + case d.Route != id.Route: |
| + return errors.New("adopt: restart-binding-changed") |
| + } |
| + return nil |
| +} |
| + |
| // exactlyHost is nil when routes is the one route host. |
| func exactlyHost(routes []carlosop.RestartRoute, host string) error { |
| if len(routes) != 1 || routes[0].Host != host { |
diff --git a/adopt/restart_test.go b/adopt/restart_test.go| index 9825e89..5eace19 100644 |
| --- a/adopt/restart_test.go |
| +++ b/adopt/restart_test.go |
| @@ -5,6 +5,7 @@ import ( |
| "context" |
| "encoding/json" |
| "errors" |
| + "fmt" |
| "io" |
| "net" |
| "net/http" |
| @@ -211,6 +212,84 @@ func TestRestartCanonicalStopsOnUnavailableRegistry(t *testing.T) { |
| x.noRestarts(t, docsRoute) |
| } |
| +// The saved identity is only what was true when it was saved. The claim |
| +// is read again before a restart, and one that no longer binds the |
| +// canonical domain to that record restarts nothing, on either record. |
| +func TestRestartCanonicalRefusesAMovedClaim(t *testing.T) { |
| + const other = "docs-2.bds.oncarlos.com" |
| + cases := map[string]struct { |
| + edit func(x *carlosFixture) |
| + want string |
| + }{ |
| + "re-pointed": {func(x *carlosFixture) { |
| + in := fixtureInstance(x.app) |
| + in.Host = other |
| + x.f.AddInstance(in) |
| + x.f.AttachDomain("docs", "docs.oficina.works", other, "live") |
| + }, "restart-binding-changed"}, |
| + "detached": {func(x *carlosFixture) { x.f.DetachDomain("docs", "docs.oficina.works") }, "restart-binding-domain-missing"}, |
| + "route to a missing record": {func(x *carlosFixture) { |
| + x.f.AttachDomain("docs", "docs.oficina.works", "gone-docs.bds.oncarlos.com", "live") |
| + }, "restart-binding-instance-missing"}, |
| + } |
| + for name, tc := range cases { |
| + for _, apply := range []bool{false, true} { |
| + t.Run(fmt.Sprintf("%s apply=%v", name, apply), func(t *testing.T) { |
| + x := newCarlosFixture(t, "docs") |
| + id := x.identity(t) |
| + tc.edit(x) |
| + err := RestartCanonical(context.Background(), x.c, x.app, id, apply) |
| + if err == nil || !strings.Contains(err.Error(), tc.want) { |
| + t.Fatalf("err = %v, want %s", err, tc.want) |
| + } |
| + x.noRestarts(t, docsRoute, other) |
| + }) |
| + } |
| + } |
| +} |
| + |
| +// The claim moving after the dry run, the last moment before the restart, |
| +// is still caught. |
| +func TestRestartCanonicalReadsTheClaimAfterTheDryRun(t *testing.T) { |
| + x := newCarlosFixture(t, "docs") |
| + id := x.identity(t) |
| + x.f.DuringDryRun = func(string) { x.f.DetachDomain("docs", "docs.oficina.works") } |
| + err := RestartCanonical(context.Background(), x.c, x.app, id, true) |
| + if err == nil || !strings.Contains(err.Error(), "restart-binding-domain-missing") { |
| + t.Fatalf("err = %v", err) |
| + } |
| + x.noRestarts(t, docsRoute) |
| +} |
| + |
| +// A claim that cannot be read is not a claim that held. |
| +func TestRestartCanonicalRefusesAnUnreadableClaim(t *testing.T) { |
| + for _, door := range []string{"/domains", "/instances"} { |
| + t.Run(door, func(t *testing.T) { |
| + x := newCarlosFixture(t, "docs") |
| + id := x.identity(t) |
| + x.f.FailRead(door, http.StatusBadGateway) |
| + if err := RestartCanonical(context.Background(), x.c, x.app, id, true); err == nil { |
| + t.Fatal("restarted without reading the claim") |
| + } |
| + x.noRestarts(t, docsRoute) |
| + }) |
| + } |
| +} |
| + |
| +// A claim merely not live still binds the same record: a rollback has to |
| +// be able to restart it. |
| +func TestRestartCanonicalAllowsAnUnchangedClaimNotLive(t *testing.T) { |
| + x := newCarlosFixture(t, "docs") |
| + id := x.identity(t) |
| + x.f.AttachDomain("docs", "docs.oficina.works", docsRoute, "checking") |
| + if err := RestartCanonical(context.Background(), x.c, x.app, id, true); err != nil { |
| + t.Fatalf("RestartCanonical: %v", err) |
| + } |
| + if n := x.f.RestartCount(docsRoute); n != 1 { |
| + t.Fatalf("restarts = %d", n) |
| + } |
| +} |
| + |
| func TestRestartCanonicalRefusesAnotherAppsIdentity(t *testing.T) { |
| x := newCarlosFixture(t, "docs") |
| id := x.identity(t) |
diff --git a/carlosop/client.go b/carlosop/client.go| index 2ec9d98..7b9a758 100644 |
| --- a/carlosop/client.go |
| +++ b/carlosop/client.go |
| @@ -646,36 +646,95 @@ func (c *Client) Instance(ctx context.Context, app, host string) (Instance, erro |
| // list` reads (carlos/platform internal/console/apidomains.go, |
| // handleAPIDomainList). Its route admits the Publish and Instance roles |
| // and so, as every route does, Admin: the same credential that lists the |
| -// instances reads it. The door is one unpaged list; an answer with no |
| -// list, or a null one, is refused rather than read as "no domains", and |
| -// so is a row with no host. |
| +// instances reads it. |
| +// |
| +// The answer decides which record is canonical, so it is read field by |
| +// field rather than by json.Unmarshal, which lets the last of two repeated |
| +// fields win, matches names in any case and reads null as empty. The list |
| +// is required; a row needs a host and a route; state, via and instances |
| +// may be left out, never null. Any other shape is ErrMalformedAnswer. |
| func (c *Client) Domains(ctx context.Context, app string) ([]Domain, error) { |
| const door = "GET /domains" |
| - var w struct { |
| - Domains *[]struct { |
| - Host string `json:"host"` |
| - Route string `json:"route"` |
| - State string `json:"state"` |
| - Via string `json:"via"` |
| - Instances bool `json:"instances"` |
| - } `json:"domains"` |
| - } |
| - if err := c.do(ctx, http.MethodGet, app, door, "/domains", nil, &w); err != nil { |
| + var raw json.RawMessage |
| + if err := c.do(ctx, http.MethodGet, app, door, "/domains", nil, &raw); err != nil { |
| return nil, as(err, notFound) |
| } |
| - if w.Domains == nil { |
| + top, ok := strictFields(raw, "domains") |
| + if !ok { |
| + return nil, malformed(door, "a repeated or ambiguous field") |
| + } |
| + var rows []json.RawMessage |
| + if json.Unmarshal(top["domains"], &rows) != nil || rows == nil { |
| return nil, malformed(door, "no domain list") |
| } |
| - out := make([]Domain, 0, len(*w.Domains)) |
| - for _, d := range *w.Domains { |
| + out := make([]Domain, 0, len(rows)) |
| + for _, row := range rows { |
| + f, ok := strictFields(row, "host", "route", "state", "via", "instances") |
| + if !ok { |
| + return nil, malformed(door, "a repeated or ambiguous field") |
| + } |
| + var d Domain |
| + _, hasRoute := f["route"] |
| + if !hasRoute || !optional(f, "host", &d.Host) || !optional(f, "route", &d.Route) || !optional(f, "state", &d.State) || |
| + !optional(f, "via", &d.Via) || !optional(f, "instances", &d.Instances) { |
| + return nil, malformed(door, "a malformed row") |
| + } |
| if d.Host == "" { |
| return nil, malformed(door, "a row with no host") |
| } |
| - out = append(out, Domain{Host: d.Host, Route: d.Route, State: d.State, Via: d.Via, Instances: d.Instances}) |
| + out = append(out, d) |
| } |
| return out, nil |
| } |
| +// strictFields splits one JSON object, already known to be valid JSON, |
| +// into its fields. It answers false for anything but an object, for a |
| +// field repeated, and for a field that is one of the read names in |
| +// another case. |
| +func strictFields(raw []byte, read ...string) (map[string]json.RawMessage, bool) { |
| + dec := json.NewDecoder(bytes.NewReader(raw)) |
| + if t, err := dec.Token(); err != nil || t != json.Delim('{') { |
| + return nil, false |
| + } |
| + out := map[string]json.RawMessage{} |
| + for dec.More() { |
| + t, err := dec.Token() |
| + key, isKey := t.(string) |
| + if err != nil || !isKey { |
| + return nil, false |
| + } |
| + if _, repeated := out[key]; repeated { |
| + return nil, false |
| + } |
| + for _, name := range read { |
| + if key != name && strings.EqualFold(key, name) { |
| + return nil, false |
| + } |
| + } |
| + var v json.RawMessage |
| + if dec.Decode(&v) != nil { |
| + return nil, false |
| + } |
| + out[key] = v |
| + } |
| + return out, true |
| +} |
| + |
| +// optional decodes field name into dst when it is present. It answers |
| +// false for a null or a value of another type. |
| +func optional[T any](f map[string]json.RawMessage, name string, dst *T) bool { |
| + v, ok := f[name] |
| + if !ok { |
| + return true |
| + } |
| + var p *T |
| + if json.Unmarshal(v, &p) != nil || p == nil { |
| + return false |
| + } |
| + *dst = *p |
| + return true |
| +} |
| + |
| // RestartHost asks the narrowed restart door to cycle exactly host, or |
| // with dryRun to say what it would cycle. It never calls the app-wide |
| // door: a 404 is ErrNoScopedRestart (a console that predates the narrowed |
diff --git a/carlosop/client_test.go b/carlosop/client_test.go| index eb6a9d5..4ad1982 100644 |
| --- a/carlosop/client_test.go |
| +++ b/carlosop/client_test.go |
| @@ -552,6 +552,78 @@ func TestDomainsKeepsCatchallMarks(t *testing.T) { |
| } |
| } |
| +// The door's answer is read field by field: a repeated field, or a null |
| +// where the console sends a value or nothing, has no one meaning, so it |
| +// is refused rather than resolved by whichever came last. |
| +func TestDomainsRefusesAmbiguousRawAnswers(t *testing.T) { |
| + const live = `{"host":"docs.oficina.works","route":"docs.bds.oncarlos.com","state":"live"}` |
| + cases := map[string]string{ |
| + "repeated domains": `{"domains":[` + live + `,` + live + `],"domains":[` + live + `]}`, |
| + "repeated domains, null last": `{"domains":[` + live + `],"domains":null}`, |
| + "domains in another case": `{"domains":[` + live + `],"Domains":[]}`, |
| + "repeated host": `{"domains":[{"host":"a.example","host":"docs.oficina.works","route":"r","state":"live"}]}`, |
| + "repeated route": `{"domains":[{"host":"docs.oficina.works","route":"a","route":"b","state":"live"}]}`, |
| + "repeated state": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"pending-dns","state":"live"}]}`, |
| + "repeated via": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","via":"*.x","via":""}]}`, |
| + "repeated instances": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","instances":true,"instances":false}]}`, |
| + "route in another case": `{"domains":[{"host":"docs.oficina.works","route":"a","ROUTE":"b","state":"live"}]}`, |
| + "via only in another case": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","VIA":"*.x"}]}`, |
| + "instances in another case": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","Instances":true}]}`, |
| + "no route": `{"domains":[{"host":"docs.oficina.works","state":"live"}]}`, |
| + "null host": `{"domains":[{"host":null,"route":"r","state":"live"}]}`, |
| + "null route": `{"domains":[{"host":"docs.oficina.works","route":null,"state":"live"}]}`, |
| + "null state": `{"domains":[{"host":"docs.oficina.works","route":"r","state":null}]}`, |
| + "null via": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","via":null}]}`, |
| + "null instances": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","instances":null}]}`, |
| + "null row": `{"domains":[null]}`, |
| + "row not an object": `{"domains":["docs.oficina.works"]}`, |
| + "row an array of pairs": `{"domains":[["host","docs.oficina.works","route","r","state","live"]]}`, |
| + "answer an array of pairs": `["domains",[]]`, |
| + "list not an array": `{"domains":{}}`, |
| + "answer null": `null`, |
| + "answer an array": `[]`, |
| + "route a number": `{"domains":[{"host":"docs.oficina.works","route":1,"state":"live"}]}`, |
| + "via a number": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","via":1}]}`, |
| + "instances a string": `{"domains":[{"host":"docs.oficina.works","route":"r","state":"live","instances":"false"}]}`, |
| + "trailing value": `{"domains":[]} {"domains":[]}`, |
| + } |
| + for name, raw := range cases { |
| + t.Run(name, func(t *testing.T) { |
| + srv, _ := rawConsole(t, func(w http.ResponseWriter, r *http.Request) { |
| + w.Header().Set("Content-Type", "application/json") |
| + _, _ = io.WriteString(w, raw) |
| + }) |
| + c := carlosop.New(srv.URL, acct, []byte("svc_token")) |
| + defer c.Close() |
| + got, err := c.Domains(ctx, "docs") |
| + if !errors.Is(err, carlosop.ErrMalformedAnswer) { |
| + t.Fatalf("Domains = %+v, %v; want ErrMalformedAnswer", got, err) |
| + } |
| + for _, quoted := range []string{"docs.oficina.works", "a.example", "*.x"} { |
| + if strings.Contains(err.Error(), quoted) { |
| + t.Fatalf("the error quotes the answer: %v", err) |
| + } |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// What the console leaves out is still fine: a row with no state, via or |
| +// instances is an older console's, and a field adoption does not read may |
| +// hold anything. |
| +func TestDomainsAcceptsOmittedAndUnreadFields(t *testing.T) { |
| + srv, _ := rawConsole(t, func(w http.ResponseWriter, r *http.Request) { |
| + w.Header().Set("Content-Type", "application/json") |
| + _, _ = io.WriteString(w, `{"deployment":null,"domains":[{"host":"docs.oficina.works","route":"r","guidance":null,"records":[{"set":"a"}]}]}`) |
| + }) |
| + c := carlosop.New(srv.URL, acct, []byte("svc_token")) |
| + defer c.Close() |
| + got, err := c.Domains(ctx, "docs") |
| + if want := []carlosop.Domain{{Host: "docs.oficina.works", Route: "r"}}; err != nil || !slices.Equal(got, want) { |
| + t.Fatalf("Domains = %+v, %v", got, err) |
| + } |
| +} |
| + |
| func TestDomainsAcceptsAnEmptyList(t *testing.T) { |
| srv, _ := rawConsole(t, func(w http.ResponseWriter, r *http.Request) { |
| writeJSON(w, 200, map[string]any{"domains": []any{}}) |
diff --git a/carlosop/fakecarlos/fakecarlos.go b/carlosop/fakecarlos/fakecarlos.go| index b90e40b..5fe1440 100644 |
| --- a/carlosop/fakecarlos/fakecarlos.go |
| +++ b/carlosop/fakecarlos/fakecarlos.go |
| @@ -81,6 +81,9 @@ type Fake struct { |
| // outside the fake's lock, so it may call PlatformWrite or SetSecret: |
| // a platform writer landing between the caller's read and the write. |
| BeforePut func(app string) |
| + // DuringDryRun runs on each dry run of POST /restart/scope, outside |
| + // the fake's lock: a change landing after the caller decided to ask. |
| + DuringDryRun func(app string) |
| // PageSize, when set, pages GET /instances by that many rows. |
| PageSize int |
| @@ -88,6 +91,7 @@ type Fake struct { |
| noCond bool |
| noScope bool |
| failRestart int |
| + failRead map[string]int // door -> status |
| restarts map[string]int |
| appWide int |
| requests []string |
| @@ -285,6 +289,17 @@ func (f *Fake) NoScopedRestart() { f.mu.Lock(); f.noScope = true; f.mu.Unlock() |
| // restarted; 0 restores it. |
| func (f *Fake) FailRestart(status int) { f.mu.Lock(); f.failRestart = status; f.mu.Unlock() } |
| +// FailRead makes every GET of door ("/domains", "/instances") answer |
| +// status. |
| +func (f *Fake) FailRead(door string, status int) { |
| + f.mu.Lock() |
| + defer f.mu.Unlock() |
| + if f.failRead == nil { |
| + f.failRead = map[string]int{} |
| + } |
| + f.failRead[door] = status |
| +} |
| + |
| // RestartCount is how many narrowed restarts were requested for host. |
| func (f *Fake) RestartCount(host string) int { |
| f.mu.Lock() |
| @@ -338,6 +353,16 @@ func (f *Fake) serve(w http.ResponseWriter, r *http.Request) { |
| if r.Method == http.MethodPut && rest == "/config" && f.BeforePut != nil { |
| f.BeforePut(appName) |
| } |
| + if r.Method == http.MethodPost && rest == "/restart/scope" && f.DuringDryRun != nil { |
| + body, _ := io.ReadAll(io.LimitReader(r.Body, 1<<20)) |
| + r.Body = io.NopCloser(bytes.NewReader(body)) |
| + var q struct { |
| + DryRun bool `json:"dry_run"` |
| + } |
| + if json.Unmarshal(body, &q) == nil && q.DryRun { |
| + f.DuringDryRun(appName) |
| + } |
| + } |
| f.mu.Lock() |
| defer f.mu.Unlock() |
| f.requests = append(f.requests, r.Method+" "+door) |
| @@ -347,6 +372,10 @@ func (f *Fake) serve(w http.ResponseWriter, r *http.Request) { |
| return |
| } |
| raw, _ := io.ReadAll(io.LimitReader(r.Body, 1<<20)) |
| + if status := f.failRead[rest]; status != 0 && r.Method == http.MethodGet { |
| + refuse(w, status, "this read is failing") |
| + return |
| + } |
| switch { |
| case r.Method == http.MethodGet && rest == "/config": |
| f.getConfig(w, r, appName, a) |
diff --git a/cmd/alta-adopt/main_test.go b/cmd/alta-adopt/main_test.go| index c5e6989..c38af91 100644 |
| --- a/cmd/alta-adopt/main_test.go |
| +++ b/cmd/alta-adopt/main_test.go |
| @@ -829,6 +829,51 @@ func TestConfigureResumesDeliveryCheck(t *testing.T) { |
| } |
| } |
| +// A write that landed before its restart is resumed by configure alone, |
| +// and the resume restarts nothing once the canonical domain has left the |
| +// record the baseline saw (Astra review, 2026-11-18). |
| +func TestConfigureResumeRestartsNothingAfterTheClaimMoved(t *testing.T) { |
| + t.Parallel() |
| + const other = "docs-2.bds.oncarlos.com" |
| + docs, _ := provision.AppBySlug("docs") |
| + cases := map[string]struct { |
| + edit func(r *rig) |
| + code string |
| + }{ |
| + "re-pointed": {func(r *rig) { |
| + r.carlos.AddInstance(carlosop.Instance{Host: other, App: "docs", Slug: "s-docs-2", Channel: "stable", Region: "eu"}) |
| + r.carlos.AttachDomain("docs", adopt.CanonicalHost(docs), other, "live") |
| + }, "restart-binding-changed"}, |
| + "detached": {func(r *rig) { r.carlos.DetachDomain("docs", adopt.CanonicalHost(docs)) }, "restart-binding-domain-missing"}, |
| + } |
| + for name, tc := range cases { |
| + t.Run(name, func(t *testing.T) { |
| + t.Parallel() |
| + r := newRig(t) |
| + r.throughPlanA() |
| + // The write lands; the restart that follows it does not. |
| + r.carlos.FailRestart(http.StatusServiceUnavailable) |
| + r.refused("", "", true, "configure", "--app", "docs", "--apply") |
| + r.carlos.FailRestart(0) |
| + puts := r.writes().puts |
| + if puts == 0 { |
| + t.Fatal("setup: the write did not land") |
| + } |
| + tc.edit(r) |
| + out := r.refused("", "", true, "configure", "--app", "docs", "--apply") |
| + if !strings.Contains(out, tc.code) { |
| + t.Fatalf("the resume did not name %s\n%s", tc.code, out) |
| + } |
| + if n := r.carlos.RestartCount(routeOf(docs)) + r.carlos.RestartCount(other); n != 0 { |
| + t.Fatalf("the resume restarted %d times", n) |
| + } |
| + if r.writes().puts != puts { |
| + t.Fatal("the resume wrote again") |
| + } |
| + }) |
| + } |
| +} |
| + |
| // A served release that is not the reviewed one is refused before |
| // anything is written (Astra review, 2026-11-17): by preflight, by |
| // configure's dry run and by configure itself, which journals and sends |