Calls is a roster-mode app: every app is, and the address goes at the seed
Calls' team mode (oficina/meet #31, team-mode @ 8baa6f5, spec §16.9,
through Home's teammode.ConfigFromEnv("CALLS")): Roster true, the five
CALLS_TEAM_* keys from teamKeys (the roster token Home's bearer, fetched
by replaying step 5), and CALLS_ALLOWED_ADDRESSES no longer written:
resolveAllowlist admits an empty list beside team configuration.
CALLS_DEK GENERATED, CALLS_ZONE, CALLS_QUALITY_REPORTS=off and the relay
PLATFORM, as before. Step 11 verifies Calls through teammode.ProbePath.
cmd/calls reads no CALLS_APNS_*, on main or team-mode: a team's Calls
has no push, and the README says so.
With every app in roster mode no recipe writes the owner's address, so
forgetOwnerWhenWritten now waits only for apps whose recipe holds it
(NeedsOwner) and runs before the app steps too: the address goes in the
pass that seeds the team. TestOwnerForgottenOnceSeeded checks it before
any environment exists (removing the NeedsOwner condition fails it); the
parked-apps test now checks no environment holds the address. The team
page asks for the address again only for an unseeded team, or an app
that would need it. TestRosterRecipes pins Calls' names and that every
app is roster-mode; the end-to-end run, the crash suite and homecompat
(Home's real 0cee9ba engine) activate all six.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 files changed,
+120
−30
AGENTS.md+5 −3README.md+15 −8console/fakeconsole/fakeconsole.go+2 −2homecompat/compat_test.go+4 −2internal/web/app.go+10 −1internal/web/templates/team.html+1 −1provision/apps.go+25 −3provision/apps_test.go+5 −2provision/review_test.go+42 −6provision/steps.go+11 −2
CI passed — run details
diff --git a/AGENTS.md b/AGENTS.md| index 8c3278c..9d58561 100644 |
| --- a/AGENTS.md |
| +++ b/AGENTS.md |
| @@ -56,9 +56,11 @@ A [rastrillo](https://amadan.net/rastrillo/rastrillo) app, on the current |
| request never consumed a sequence. |
| - **Nothing is deleted to clean up**, and labels and retired hostnames are |
| never reused. The only DELETEs are §9's, inside a retire-apps run. |
| -- **No address at rest after step 13.** The owner's address lives sealed in |
| - `owner_inputs`, the credential plan and the owner-seed request until |
| - every allowlist is written, then all three are deleted (`secure_delete`). |
| +- **No address at rest once it is no longer needed.** The owner's address |
| + lives sealed in `owner_inputs`, the credential plan and the owner-seed |
| + request until the seed has committed and every recipe that writes it (a |
| + stopgap allowlist; none since every app has roster mode) is written, |
| + then all three are deleted (`secure_delete`). |
| - **Logs carry step keys and fixed codes only**: never a label, an address, |
| a key or a platform value. |
| - Screens work without JavaScript; the only script is estilo's `busy.js`. |
diff --git a/README.md b/README.md| index e84bb69..bc6557b 100644 |
| --- a/README.md |
| +++ b/README.md |
| @@ -127,14 +127,21 @@ recorded here instead (Fable's rulings on oficina/alta #1): |
| (`activationVersion` in `provision/steps.go`): a version Home would |
| refuse parks there as `version-unacceptable` instead of failing |
| activation. |
| -- **§6 step 11, `/api/team`**: the roster-mode apps are Docs, Sheets, |
| - Slides, Calendar and Memoria (team mode on each app's main or team-mode |
| - branch: Docs `e58a22f`, Sheets #52, Slides #33, Calendar #35, Memoria |
| - #32). Each serves the readiness probe once that build is deployed; until |
| - then it parks at `no-readiness-probe` (its directory row stays pending, |
| - and the owner's address is deleted all the same). Calls has no roster |
| - mode yet and keeps the owner allowlist. Memoria's AI stays off in team |
| - mode: no `MEMORIA_AI`, TensorX key, siblings or logged mail. |
| +- **§6 step 11, `/api/team`**: every app has roster mode — Docs, Sheets, |
| + Slides, Calendar, Calls and Memoria (team mode on each app's main or |
| + team-mode branch: Docs `e58a22f`, Sheets #52, Slides #33, Calendar #35, |
| + Calls oficina/meet #31, Memoria #32). Each serves the readiness probe |
| + once that build is deployed; until then it parks at |
| + `no-readiness-probe` and its directory row stays pending. |
| +- **§4–§5, the owner's address**: no recipe writes it any more (no |
| + stopgap allowlists), so the seed is its last use and Alta deletes it in |
| + the pass that seeds the team. The rule still waits for any app whose |
| + recipe holds the owner, should one return. |
| +- **Calls has no push**: `cmd/calls` does not read `CALLS_APNS_*` (on |
| + main or team-mode), so a team's Calls sends no Apple notifications. |
| + `CARLOS_RELAY` stays PLATFORM, minted per environment. |
| +- Memoria's AI stays off in team mode: no `MEMORIA_AI`, TensorX key, |
| + siblings or logged mail. |
| - **§11, Help**: the account menu has no Help items yet (no Colophon page). |
| ## Developing |
diff --git a/console/fakeconsole/fakeconsole.go b/console/fakeconsole/fakeconsole.go| index cc59f17..b5d74a1 100644 |
| --- a/console/fakeconsole/fakeconsole.go |
| +++ b/console/fakeconsole/fakeconsole.go |
| @@ -576,8 +576,8 @@ func (c *Console) Transport() http.RoundTripper { |
| } else { |
| rec.WriteString(i.serving) |
| } |
| - case r.URL.Path == "/api/team" && i.app != "calls" && !c.NoTeamProbe: |
| - // The roster-mode apps: all but Calls. |
| + case r.URL.Path == "/api/team" && !c.NoTeamProbe: |
| + // Every app has roster mode, and the probe. |
| p := strings.ToUpper(i.app) |
| b := c.envs[i.app][i.env] |
| _, token := b.vars[p+"_TEAM_ROSTER_TOKEN"] |
diff --git a/homecompat/compat_test.go b/homecompat/compat_test.go| index a36611a..125e11b 100644 |
| --- a/homecompat/compat_test.go |
| +++ b/homecompat/compat_test.go |
| @@ -385,8 +385,10 @@ func TestAltaAgainstHomesRealOperator(t *testing.T) { |
| if err := r.home.dirDB.QueryRow("SELECT state FROM team_instances WHERE consumer_id='lagged-calendar'").Scan(&state); err != nil || state != "live" { |
| t.Fatalf("calendar at the directory: %q %v", state, err) |
| } |
| - if err := r.home.dirDB.QueryRow("SELECT state FROM team_instances WHERE consumer_id='lagged-calls'").Scan(&state); err != nil || state != "pending" { |
| - t.Fatalf("calls at the directory: %q %v", state, err) |
| + // Every app has roster mode: all six are live at the directory. |
| + var live int |
| + if err := r.home.dirDB.QueryRow("SELECT count(*) FROM team_instances WHERE state='live'").Scan(&live); err != nil || live != 6 { |
| + t.Fatalf("live at the directory: %d %v", live, err) |
| } |
| var n int |
| _ = r.home.credDB.QueryRow("SELECT count(*) FROM consumers WHERE state='active'").Scan(&n) |
diff --git a/internal/web/app.go b/internal/web/app.go| index 07079f1..954ef12 100644 |
| --- a/internal/web/app.go |
| +++ b/internal/web/app.go |
| @@ -425,6 +425,15 @@ func (a *App) team(w http.ResponseWriter, r *http.Request) { |
| runs, _ := a.cfg.Store.Runs(ctx, t.Label) |
| audit, _ := a.cfg.Store.AuditLog(ctx, t.Label, 40) |
| _, holdsOwner, _ := a.cfg.Store.Owner(ctx, t.Label) |
| + // An app whose recipe still writes the owner (a stopgap allowlist) is |
| + // the only reason to ask for the address again once the team is at |
| + // Home. With every app in roster mode there is none. |
| + needsOwner := false |
| + for app, st := range t.Apps { |
| + if spec, ok := provision.AppBySlug(app); ok && st == "active" && provision.NeedsOwner(spec) { |
| + needsOwner = true |
| + } |
| + } |
| notice := "" |
| if code := r.URL.Query().Get("audit"); knownCode(code) { |
| notice = describe(code) |
| @@ -435,7 +444,7 @@ func (a *App) team(w http.ResponseWriter, r *http.Request) { |
| } |
| } |
| a.render(w, r, http.StatusOK, "team", page{Title: t.Name, Context: t.Label, Notice: notice, |
| - Data: map[string]any{"Team": t, "Apps": a.appViews(ctx, t, apps), "Addable": addable, "Runs": runs, "Audit": audit, "HoldsOwner": holdsOwner, "Seeded": t.TeamSQID != ""}}) |
| + Data: map[string]any{"Team": t, "Apps": a.appViews(ctx, t, apps), "Addable": addable, "Runs": runs, "Audit": audit, "HoldsOwner": holdsOwner, "NeedsOwner": needsOwner, "Seeded": t.TeamSQID != ""}}) |
| } |
| func (a *App) addApps(w http.ResponseWriter, r *http.Request) { |
diff --git a/internal/web/templates/team.html b/internal/web/templates/team.html| index 9aefd7f..5d03bc0 100644 |
| --- a/internal/web/templates/team.html |
| +++ b/internal/web/templates/team.html |
| @@ -27,7 +27,7 @@ |
| </form> |
| </section> |
| {{end}} |
| -{{if or (not .Data.Seeded) (not .Data.HoldsOwner)}} |
| +{{if or (not .Data.Seeded) (and .Data.NeedsOwner (not .Data.HoldsOwner))}} |
| <section class="alta-box"> |
| <h2>Owner's address</h2> |
| {{if not .Data.Seeded}}<p>The team is not yet at Home. If Home refused the owner (a mistyped address, or someone who has not signed in at oficina.works), correct it here, then continue under a new plan. The label stays this team's.</p> |
diff --git a/provision/apps.go b/provision/apps.go| index 494486c..5c24e1d 100644 |
| --- a/provision/apps.go |
| +++ b/provision/apps.go |
| @@ -47,7 +47,7 @@ var Apps = []App{ |
| {Slug: "sheets", Name: "Sheets", Prefix: "SHEETS", Roster: true, MailPrefixes: []string{"CARLOS_SMTP"}}, |
| {Slug: "slides", Name: "Slides", Prefix: "SLIDES", Roster: true, MailPrefixes: []string{"SLIDES_SMTP", "CARLOS_SMTP"}}, |
| {Slug: "calendar", Name: "Calendar", Prefix: "CALENDAR", Roster: true, MailPrefixes: []string{"CALENDAR_SMTP", "CARLOS_SMTP"}}, |
| - {Slug: "calls", Name: "Calls", Prefix: "CALLS", MailPrefixes: []string{"CALLS_SMTP", "CARLOS_SMTP"}, Relay: true}, |
| + {Slug: "calls", Name: "Calls", Prefix: "CALLS", Roster: true, MailPrefixes: []string{"CALLS_SMTP", "CARLOS_SMTP"}, Relay: true}, |
| {Slug: "memoria", Name: "Memoria", Prefix: "MEMORIA", Roster: true, MailPrefixes: []string{"CARLOS_SMTP"}}, |
| } |
| @@ -147,7 +147,6 @@ func Recipe(app App, in Inputs) []Key { |
| {Name: p + "_HOME_DEK_BASE64", Class: Generated, Secret: true}, |
| {Name: "HOME_DIRECTORY_ORIGIN", Class: Set, Value: in.Home.Directory}, |
| } |
| - owner := func(name string) Key { return Key{Name: name, Class: Set, Value: in.Owner, OwnerAddress: true} } |
| switch app.Slug { |
| case "docs": |
| keys = append(keys, |
| @@ -173,14 +172,19 @@ func Recipe(app App, in Inputs) []Key { |
| keys = append(keys, Key{Name: "CALENDAR_DEK", Class: Generated, Secret: true}) |
| keys = append(keys, teamKeys(p, in)...) |
| case "calls": |
| + // Team mode (oficina/meet #31, team-mode, through Home's |
| + // teammode; spec §16.9): CALLS_ALLOWED_ADDRESSES is optional |
| + // beside CALLS_TEAM_*, so the owner is not written. CARLOS_RELAY |
| + // stays PLATFORM, minted per environment. No CALLS_APNS_*: cmd/calls |
| + // does not read them, so a team's Calls has no push. |
| keys = append(keys, |
| Key{Name: "CALLS_DEK", Class: Generated, Secret: true}, |
| - owner("CALLS_ALLOWED_ADDRESSES"), |
| Key{Name: "CALLS_ZONE", Class: Set, Value: in.CallsZone}, |
| // A team's call-quality logs would land in the operator's |
| // `carlos logs`; off until that team's owner and Paul agree. |
| Key{Name: "CALLS_QUALITY_REPORTS", Class: Set, Value: "off"}, |
| ) |
| + keys = append(keys, teamKeys(p, in)...) |
| case "memoria": |
| // AI off: MEMORIA_AI, _TENSORX_KEY, _SIBLINGS, _SIBLING_TOKEN_* |
| // and _ALLOW_LOGGED_MAIL are simply absent (Paul: AI is off, and |
| @@ -200,6 +204,24 @@ func Recipe(app App, in Inputs) []Key { |
| return keys |
| } |
| +// ownerKey is a stopgap allowlist holding the owner's address, for an app |
| +// without roster mode (Track 1's shape). Every app has roster mode now, so |
| +// no recipe uses it; it stays so the address rules (§4: deleted once every |
| +// allowlist is written, retyped if needed again) keep one definition. |
| +func ownerKey(name string, in Inputs) Key { |
| + return Key{Name: name, Class: Set, Value: in.Owner, OwnerAddress: true} |
| +} |
| + |
| +// NeedsOwner reports whether app's recipe writes the owner's address. |
| +func NeedsOwner(app App) bool { |
| + for _, k := range Recipe(app, Inputs{}) { |
| + if k.OwnerAddress { |
| + return true |
| + } |
| + } |
| + return false |
| +} |
| + |
| // teamKeys is a roster-mode app's <P>_TEAM_* five, as Docs and Sheets read |
| // them: the team sqid, the directory, the signed provisioning record and |
| // the directory's provisioning key (SET), and Home's roster bearer |
diff --git a/provision/apps_test.go b/provision/apps_test.go| index 22bb23c..7e2beb5 100644 |
| --- a/provision/apps_test.go |
| +++ b/provision/apps_test.go |
| @@ -5,7 +5,9 @@ import ( |
| "testing" |
| ) |
| -// The recipes against each app's own config readers. Calendar follows |
| +// The recipes against each app's own config readers. Calls follows |
| +// oficina/meet team-mode (teammode; CALLS_ALLOWED_ADDRESSES optional beside |
| +// it; no CALLS_APNS_*, which cmd/calls does not read). Calendar follows |
| // oficina/calendar team-mode @ e8e509d (teammode; CALENDAR_ALLOWED_ADDRESSES |
| // optional beside it). Memoria follows |
| // oficina/memoria team-mode @ 88f6cec (teammode; MEMORIA_OWNERS optional |
| @@ -21,6 +23,7 @@ func TestRosterRecipes(t *testing.T) { |
| "docs": {"DOCS_ALLOWED_ADDRESSES", "DOCS_CONTENT_KEY", "DOCS_HOME_CONSUMER_ID", "DOCS_HOME_DEK_BASE64", "DOCS_HOME_ISSUER", "DOCS_HOME_KEYS_BASE64", "DOCS_INSTANCE_KEY", "DOCS_ORIGIN", "DOCS_TEAM_DIRECTORY_ORIGIN", "DOCS_TEAM_ID", "DOCS_TEAM_OPERATOR_KEYS_BASE64", "DOCS_TEAM_PROVISIONING_BASE64", "DOCS_TEAM_ROSTER_TOKEN", "HOME_DIRECTORY_ORIGIN"}, |
| "slides": {"HOME_DIRECTORY_ORIGIN", "SLIDES_HOME_CONSUMER_ID", "SLIDES_HOME_DEK_BASE64", "SLIDES_HOME_ISSUER", "SLIDES_HOME_KEYS_BASE64", "SLIDES_INSTANCE_KEY", "SLIDES_ORIGIN", "SLIDES_TEAM_DIRECTORY_ORIGIN", "SLIDES_TEAM_ID", "SLIDES_TEAM_OPERATOR_KEYS_BASE64", "SLIDES_TEAM_PROVISIONING_BASE64", "SLIDES_TEAM_ROSTER_TOKEN"}, |
| "memoria": {"HOME_DIRECTORY_ORIGIN", "MEMORIA_DEK", "MEMORIA_HOME_CONSUMER_ID", "MEMORIA_HOME_DEK_BASE64", "MEMORIA_HOME_ISSUER", "MEMORIA_HOME_KEYS_BASE64", "MEMORIA_INSTANCE_KEY", "MEMORIA_ORIGIN", "MEMORIA_TEAM", "MEMORIA_TEAM_DIRECTORY_ORIGIN", "MEMORIA_TEAM_ID", "MEMORIA_TEAM_OPERATOR_KEYS_BASE64", "MEMORIA_TEAM_PROVISIONING_BASE64", "MEMORIA_TEAM_ROSTER_TOKEN"}, |
| + "calls": {"CALLS_DEK", "CALLS_HOME_CONSUMER_ID", "CALLS_HOME_DEK_BASE64", "CALLS_HOME_ISSUER", "CALLS_HOME_KEYS_BASE64", "CALLS_INSTANCE_KEY", "CALLS_ORIGIN", "CALLS_QUALITY_REPORTS", "CALLS_TEAM_DIRECTORY_ORIGIN", "CALLS_TEAM_ID", "CALLS_TEAM_OPERATOR_KEYS_BASE64", "CALLS_TEAM_PROVISIONING_BASE64", "CALLS_TEAM_ROSTER_TOKEN", "CALLS_ZONE", "HOME_DIRECTORY_ORIGIN"}, |
| "calendar": {"CALENDAR_DEK", "CALENDAR_HOME_CONSUMER_ID", "CALENDAR_HOME_DEK_BASE64", "CALENDAR_HOME_ISSUER", "CALENDAR_HOME_KEYS_BASE64", "CALENDAR_INSTANCE_KEY", "CALENDAR_ORIGIN", "CALENDAR_TEAM_DIRECTORY_ORIGIN", "CALENDAR_TEAM_ID", "CALENDAR_TEAM_OPERATOR_KEYS_BASE64", "CALENDAR_TEAM_PROVISIONING_BASE64", "CALENDAR_TEAM_ROSTER_TOKEN", "HOME_DIRECTORY_ORIGIN"}, |
| "sheets": {"HOME_DIRECTORY_ORIGIN", "SHEETS_DEK", "SHEETS_HOME_CONSUMER_ID", "SHEETS_HOME_DEK_BASE64", "SHEETS_HOME_ISSUER", "SHEETS_HOME_KEYS_BASE64", "SHEETS_INSTANCE_KEY", "SHEETS_ORIGIN", "SHEETS_TEAM_DIRECTORY_ORIGIN", "SHEETS_TEAM_ID", "SHEETS_TEAM_OPERATOR_KEYS_BASE64", "SHEETS_TEAM_PROVISIONING_BASE64", "SHEETS_TEAM_ROSTER_TOKEN"}, |
| } |
| @@ -48,7 +51,7 @@ func TestRosterRecipes(t *testing.T) { |
| } |
| } |
| for _, a := range Apps { |
| - if a.Roster != (a.Slug != "calls") { |
| + if !a.Roster { |
| t.Fatalf("%s roster mode %v", a.Slug, a.Roster) |
| } |
| } |
diff --git a/provision/review_test.go b/provision/review_test.go| index 2c83335..b7fe0de 100644 |
| --- a/provision/review_test.go |
| +++ b/provision/review_test.go |
| @@ -25,7 +25,7 @@ func TestOwnerForgottenWhileAnAppIsParked(t *testing.T) { |
| if r.State != "parked" { |
| t.Fatalf("run %s %s", r.State, r.Code) |
| } |
| - for _, app := range []string{"docs", "sheets", "slides", "calendar", "memoria"} { |
| + for _, app := range allApps { |
| if st, _, _ := h.store.Step(h.ctx(), "lagged", app, StepVerify); st.Code != "no-readiness-probe" { |
| t.Fatalf("%s verify %s %s", app, st.State, st.Code) |
| } |
| @@ -44,11 +44,14 @@ func TestOwnerForgottenWhileAnAppIsParked(t *testing.T) { |
| if h.scan(ownerCanary) { |
| t.Fatal("owner address in Alta's database files") |
| } |
| - // Calls, the one app without roster mode, finished: its allowlist |
| - // holds the owner. |
| - vars, _, _ := h.con.Env("calls", "lagged") |
| - if vars["CALLS_ALLOWED_ADDRESSES"].Value != ownerCanary { |
| - t.Fatal("calls allowlist not written") |
| + // Every app is in roster mode: no environment holds the address. |
| + for _, app := range allApps { |
| + vars, _, _ := h.con.Env(app, "lagged") |
| + for k, v := range vars { |
| + if v.Value == ownerCanary { |
| + t.Fatalf("%s %s holds the owner's address", app, k) |
| + } |
| + } |
| } |
| } |
| @@ -233,3 +236,36 @@ func TestVersionHomeWouldRefuseParksAtServing(t *testing.T) { |
| t.Fatal("a git-describe version did not activate") |
| } |
| } |
| + |
| +// With every app in roster mode no recipe holds the owner, so the seed is |
| +// the address's last use: it goes in the pass that seeds the team, before |
| +// any environment exists (here the platform walks never deliver, so every |
| +// app parks at step 7 awaiting its mail keys). |
| +func TestOwnerForgottenOnceSeeded(t *testing.T) { |
| + h := newHarness(t) |
| + h.initialized() |
| + for _, a := range Apps { |
| + if NeedsOwner(a) { |
| + t.Fatalf("%s still writes the owner's address", a.Slug) |
| + } |
| + } |
| + e := h.engine(nil) |
| + run := h.createLagged(e) |
| + _ = e.Advance(h.ctx(), run) |
| + if _, _, ok := h.home.Team("lagged"); !ok { |
| + t.Fatal("not seeded") |
| + } |
| + for _, app := range allApps { |
| + if _, done, _ := h.store.Done(h.ctx(), "lagged", app, StepEnv); done { |
| + t.Fatalf("%s environment done without platform keys", app) |
| + } |
| + } |
| + if _, held, _ := h.store.Owner(h.ctx(), "lagged"); held { |
| + t.Fatal("owner address kept after the seed, though no recipe needs it") |
| + } |
| + var n int |
| + _ = h.store.DB().QueryRow("SELECT count(*) FROM operator_requests WHERE action='credential.owner-seed'").Scan(&n) |
| + if n != 0 { |
| + t.Fatal("owner-seed request kept after the seed") |
| + } |
| +} |
diff --git a/provision/steps.go b/provision/steps.go| index 4081a25..f19da28 100644 |
| --- a/provision/steps.go |
| +++ b/provision/steps.go |
| @@ -96,6 +96,11 @@ func (e *Engine) provision(ctx context.Context, p *pass) error { |
| } |
| p.team = t |
| } |
| + // Before any app step: when no recipe holds the owner, the seed was |
| + // the address's last use, and an app that fails must not keep it. |
| + if err := e.forgetOwnerWhenWritten(ctx, p); err != nil { |
| + return err |
| + } |
| var first error |
| for _, slug := range p.run.Apps { |
| app, _ := AppBySlug(slug) |
| @@ -881,7 +886,10 @@ func (e *Engine) stepAudit(ctx context.Context, p *pass, app App) error { |
| } |
| // forgetOwnerWhenWritten deletes §4's address-bearing rows once the seed |
| -// has committed and every active app's stopgap allowlist is written. |
| +// has committed and every active app whose recipe holds the owner (a |
| +// stopgap allowlist) has its environment written. With every app in |
| +// roster mode, no recipe holds it, and the address goes as soon as the |
| +// seed commits. |
| func (e *Engine) forgetOwnerWhenWritten(ctx context.Context, p *pass) error { |
| st := e.cfg.Store |
| if _, held, _ := st.Owner(ctx, p.run.Label); !held { |
| @@ -895,7 +903,8 @@ func (e *Engine) forgetOwnerWhenWritten(ctx context.Context, p *pass) error { |
| return err |
| } |
| for app, state := range t.Apps { |
| - if state != "active" { |
| + spec, _ := AppBySlug(app) |
| + if state != "active" || !NeedsOwner(spec) { |
| continue |
| } |
| if _, ok, _ := st.Done(ctx, p.run.Label, app, StepEnv); !ok { |