mail/from-carlos-patch
Squashed from mail/from-carlos-patch into main.
13 files changed,
+272
−20
.rastrillo/budgets.txt+1 −1AGENTS.md+7 −4cmd/equipo/main.go+5 −5docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+1 −0go.mod+1 −1go.sum+2 −2internal/equipo/config.go+10 −1internal/equipo/copy.go+1 −1internal/equipo/mailer.go+32 −0internal/equipo/mailer_test.go+200 −0internal/equipo/static/tokens.css+7 −2internal/equipotest/upgrade_test.go+2 −2internal/plan3test/plan3_release_test.go+3 −1
CI passed — run details
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index cd84f0e1..2cf51764 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -14,7 +14,7 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr |
| time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI. |
| time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage. |
| -size internal/equipo 21124 - Shared web views; persisted approval navigation and visible access continuations. Measured 21124 source lines. |
| +size internal/equipo 21165 - Shared web views; persisted approval navigation, visible access continuations and the CARLOS mail submission boot. Measured 21165 source lines. |
| size internal/wire 6544 - Shared protocol types and the optional card approval-visit flag. Runner protocol stays 26; measured 6544 source lines. |
| size internal/equipotest - 13400 Task 21 repairs historical migration and conversation fixtures after Plan 3. Measured 13024 test lines; the 300s time ceiling is unchanged. |
| time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded); |
diff --git a/AGENTS.md b/AGENTS.md| index 41193d59..a3a9a576 100644 |
| --- a/AGENTS.md |
| +++ b/AGENTS.md |
| @@ -23,13 +23,16 @@ precedence over generic workflows. |
| ## Boot and interface |
| -Require `EQUIPO_ORIGIN` and `EQUIPO_INSTANCE_KEY`. Require both |
| -`CARLOS_SMTP_HOST` and `CARLOS_SMTP_FROM` unless local logged mail is explicitly |
| -enabled with `EQUIPO_ALLOW_LOGGED_MAIL=1`. Logged mail is loopback-only. |
| +Require `EQUIPO_ORIGIN` and `EQUIPO_INSTANCE_KEY`. Require a mail channel: |
| +CARLOS mail submission (`CARLOS_MAIL=submit`, set only by the CARLOS agent), or |
| +both `CARLOS_SMTP_HOST` and `CARLOS_SMTP_FROM`, unless local logged mail is |
| +explicitly enabled with `EQUIPO_ALLOW_LOGGED_MAIL=1`. Logged mail is |
| +allowed only on loopback or a staging origin. Build the sender with `equipo.Mailer` (`mail.FromCarlos`) only on |
| +the serve path, never in a seed or one-shot, which has no control socket. |
| `EQUIPO_OWNERS` is enforced by bootstrap only when the database has no team. |
| Never log credentials or sign-in links in production. |
| -Use Rastrillo v0.30.1 APIs from the pinned module cache. Resolve activation, |
| +Use Rastrillo v0.30.3 APIs from the pinned module cache. Resolve activation, |
| open one database, construct the app, clear `opts.DBPath`, then serve. |
| The database closes on shutdown and on failed app construction. |
diff --git a/cmd/equipo/main.go b/cmd/equipo/main.go| index 50a0588b..5f3930a7 100644 |
| --- a/cmd/equipo/main.go |
| +++ b/cmd/equipo/main.go |
| @@ -10,7 +10,6 @@ import ( |
| "amadan.net/rastrillo/rastrillo" |
| "amadan.net/rastrillo/rastrillo/db" |
| - "amadan.net/rastrillo/rastrillo/mail" |
| "amadan.net/oficina/equipo/internal/equipo" |
| ) |
| @@ -30,6 +29,11 @@ func run(logger *slog.Logger, started time.Time) error { |
| if err != nil { |
| return err |
| } |
| + // Before the database opens, so a half-set submission refuses first. |
| + mailer, err := equipo.Mailer(cfg, logger) |
| + if err != nil { |
| + return err |
| + } |
| opts, err := rastrillo.Resolve(rastrillo.Options{DBPath: cfg.DatabaseName, Logger: logger}) |
| if err != nil { |
| return err |
| @@ -53,10 +57,6 @@ func run(logger *slog.Logger, started time.Time) error { |
| return err |
| } |
| defer execution.Close() |
| - mailer := mail.FromEnv("CARLOS", logger) |
| - if cfg.AllowLoggedMail { |
| - mailer = mail.Logged(logger) |
| - } |
| mux, err := equipo.AppWithExecution(d, cfg, mailer, logger, execution) |
| if err != nil { |
| return err |
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index 08e1144d..2dd2264b 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -6723,6 +6723,7 @@ records remain unchanged. |
| | `docs/api/equipo-v1.md / Talk to the Assistant: connect cards` | A `connect` card asks you to connect something the Assistant needs, such as your Oficina apps: it has no options and one link, which you open in your browser to connect. It is answered by connecting, not through the API, and is `resolved` once you have. The Oficina apps' card link has `rel: "oficina_connect"`: call `POST /api/v1/assistant/oficina/connect` with `{"return_to":"<address on your origin>"}` and send the browser to the `url` it returns. The return address must be on an origin in `EQUIPO_ASSISTANT_HOSTS`, or the answer is `422 invalid_input`. After the consent page the browser comes back to it with `oficina_state` and `oficina_code`, which you pass to `POST /api/v1/assistant/oficina/connect/finish` as `{"state":"…","code":"…"}` with the same person's bearer, within two minutes. The answer is `200` with `status` `connected`, `denied`, `expired` or `unavailable`, or `403 forbidden` when the consent was started by someone else. When the consent fails, the browser comes back with `oficina` set to `denied`, `expired` or `unavailable` instead. | API doc: the new sentence on connect cards in the card paragraph (oficina, 2026-11-16) | API; COPY APPROVED (Paul, 2026-11-16, copy-review arfnqquz6wks4vdyxptv6ditju, unchanged) | |
| | `access.waiting` | Waiting for your approval on Amadan… | Copy specialist | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-17) | |
| | `access.reopen` | Open Amadan again | Copy specialist | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-17) | |
| +| `copyMissingSMTP` | A configured mail sender is required. Enable CARLOS mail submission or configure CARLOS_SMTP_HOST and CARLOS_SMTP_FROM, unless local logged mail is enabled. | boot error when Equipo has no mail channel: neither CARLOS mail submission nor CARLOS_SMTP_HOST and CARLOS_SMTP_FROM (mail submission, 2026-11-17; Luna, codex gpt-5.6-luna, house rules) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-17) | |
| ## Task 21 |
diff --git a/go.mod b/go.mod| index 1701c213..3be3dda5 100644 |
| --- a/go.mod |
| +++ b/go.mod |
| @@ -3,7 +3,7 @@ module amadan.net/oficina/equipo |
| go 1.26.0 |
| require ( |
| - amadan.net/rastrillo/rastrillo v0.30.1 |
| + amadan.net/rastrillo/rastrillo v0.30.3 |
| github.com/chromedp/cdproto v0.158.6 |
| github.com/chromedp/chromedp v0.21.0 |
| github.com/go-chi/chi/v5 v5.3.2 |
diff --git a/go.sum b/go.sum| index 6d2e0789..0ec0efee 100644 |
| --- a/go.sum |
| +++ b/go.sum |
| @@ -4,8 +4,8 @@ amadan.net/oficina/home/connect v0.0.0-20261114000742-e9829fda431e h1:7Yl4BgKcmo |
| amadan.net/oficina/home/connect v0.0.0-20261114000742-e9829fda431e/go.mod h1:7tsJ//7X4o5QkD068WoUGVDxj/e3ygZ2adF+PHhvBxE= |
| amadan.net/oficina/home/handoff v0.0.0-20261114000742-e9829fda431e h1:ce4x6+UxI/uKeGZrLfaPm6FyDAgqcSinl+8HBUw9dsI= |
| amadan.net/oficina/home/handoff v0.0.0-20261114000742-e9829fda431e/go.mod h1:YISpzFJ+iMgrM0rUL032OSzsAQbP4/nozvXLCCOcn1k= |
| -amadan.net/rastrillo/rastrillo v0.30.1 h1:MleTrteqqnGGeCZBqQSzZAhAfqQ3B0tZahZ+0wXhzXc= |
| -amadan.net/rastrillo/rastrillo v0.30.1/go.mod h1:K7Clrt14+25ruVupgRjlIhH2GQp/OdL9VoD8xPmkt0w= |
| +amadan.net/rastrillo/rastrillo v0.30.3 h1:PEZ/Og0ZF9OjIaqwYCxrRLXis1K3MRTA2lDaseeIP1s= |
| +amadan.net/rastrillo/rastrillo v0.30.3/go.mod h1:K7Clrt14+25ruVupgRjlIhH2GQp/OdL9VoD8xPmkt0w= |
| amadan.net/rastrillo/rastrillo/money v0.1.0 h1:MxU4oqNrW8abxRTkgZBv24OYNpFnvonajNqeLIzmmaM= |
| amadan.net/rastrillo/rastrillo/money v0.1.0/go.mod h1:cmgkjBEIQh1pFSYvQk0UU6oPYS8kSDypdT9+t4Flx0U= |
| github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk= |
diff --git a/internal/equipo/config.go b/internal/equipo/config.go| index 3ce88767..7c6cecdf 100644 |
| --- a/internal/equipo/config.go |
| +++ b/internal/equipo/config.go |
| @@ -20,6 +20,10 @@ type Config struct { |
| InstanceKey string |
| Owners []string |
| AllowLoggedMail bool |
| + // MailConfigured is true when the platform gave Equipo a way to |
| + // send: CARLOS mail submission (CARLOS_MAIL=submit) or SMTP |
| + // (CARLOS_SMTP_HOST and CARLOS_SMTP_FROM). Mailer builds the sender. |
| + MailConfigured bool |
| // DatabaseName: a new name is a fresh database (scripts/cutover-thin.sh). |
| DatabaseName string |
| // TestPeople are address suffixes of test identities |
| @@ -86,9 +90,14 @@ func LoadConfig(getenv func(string) string) (Config, error) { |
| if err := cfg.validate(); err != nil { |
| return Config{}, err |
| } |
| + // Mail is either channel mail.FromCarlos takes: CARLOS mail |
| + // submission, which the agent turns on with CARLOS_MAIL=submit, or |
| + // CARLOS_SMTP_*. With neither, every sign-in link would go to the log. |
| + submit := getenv("CARLOS_MAIL") == "submit" |
| host := strings.TrimSpace(getenv("CARLOS_SMTP_HOST")) |
| from := strings.TrimSpace(getenv("CARLOS_SMTP_FROM")) |
| - if (host == "" || from == "") && !cfg.AllowLoggedMail { |
| + cfg.MailConfigured = submit || (host != "" && from != "") |
| + if !cfg.MailConfigured && !cfg.AllowLoggedMail { |
| //lint:ignore ST1005 User-facing errors preserve the reviewed sentences in copy.go. |
| return Config{}, errors.New(copyMissingSMTP) |
| } |
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go| index 863706e9..89a79cf5 100644 |
| --- a/internal/equipo/copy.go |
| +++ b/internal/equipo/copy.go |
| @@ -30,7 +30,7 @@ const ( |
| copyMissingKey = "EQUIPO_INSTANCE_KEY is required." |
| copyInvalidOrigin = "EQUIPO_ORIGIN must be an HTTPS address, or an HTTP address on loopback." |
| copyLoggedMailPublic = "EQUIPO_ALLOW_LOGGED_MAIL is only allowed on loopback." |
| - copyMissingSMTP = "CARLOS_SMTP_HOST and CARLOS_SMTP_FROM are required unless local logged mail is enabled." |
| + copyMissingSMTP = "A configured mail sender is required. Enable CARLOS mail submission or configure CARLOS_SMTP_HOST and CARLOS_SMTP_FROM, unless local logged mail is enabled." // COPY ACCEPTED BY DELEGATION (Luna, 2026-11-17) |
| copyMissingMailer = "A mail sender is required." |
| copyUnconfiguredMailer = "A configured mail sender is required." |
| copyForbidden = "You do not have access to this page. Ask an owner for access." |
diff --git a/internal/equipo/mailer.go b/internal/equipo/mailer.go| new file mode 100644 |
| index 00000000..09bc0748 |
| --- /dev/null |
| +++ b/internal/equipo/mailer.go |
| @@ -0,0 +1,32 @@ |
| +package equipo |
| + |
| +import ( |
| + "log/slog" |
| + |
| + "amadan.net/rastrillo/rastrillo/mail" |
| +) |
| + |
| +// Mailer builds the sign-in sender. Call it only where Equipo serves (main's |
| +// run): a CARLOS seed or one-shot runs with no control socket, and the agent |
| +// strips CARLOS_MAIL from it, so mail.FromCarlos there would refuse once the |
| +// app is switched to submission. The runner and tool proxy binaries never |
| +// send mail. |
| +// |
| +// EQUIPO_ALLOW_LOGGED_MAIL keeps its rule: when LoadConfig admitted it |
| +// (loopback or a staging origin), every message is logged, whatever channel |
| +// is configured. Otherwise mail.FromCarlos picks submission when |
| +// CARLOS_MAIL=submit, else CARLOS_SMTP_*, and refuses with neither, or with |
| +// submission half set up (no socket, token or CARLOS_MAIL_FROM). It reads |
| +// the process environment, as mail.FromCarlos does, so cfg must come from |
| +// LoadConfig(os.Getenv). |
| +func Mailer(cfg Config, logger *slog.Logger) (mail.Sender, error) { |
| + if cfg.AllowLoggedMail { |
| + return mail.Logged(logger), nil |
| + } |
| + if !cfg.MailConfigured { |
| + // LoadConfig refuses this; a hand-built Config gets a sender |
| + // RouterWithStore refuses in turn (copyUnconfiguredMailer). |
| + return mail.FromEnv("CARLOS", logger), nil |
| + } |
| + return mail.FromCarlos("CARLOS", logger) |
| +} |
diff --git a/internal/equipo/mailer_test.go b/internal/equipo/mailer_test.go| new file mode 100644 |
| index 00000000..e152111e |
| --- /dev/null |
| +++ b/internal/equipo/mailer_test.go |
| @@ -0,0 +1,200 @@ |
| +package equipo |
| + |
| +import ( |
| + "context" |
| + "encoding/json" |
| + "io" |
| + "log/slog" |
| + "net" |
| + "net/http" |
| + "os" |
| + "path/filepath" |
| + "testing" |
| + "time" |
| + |
| + "amadan.net/rastrillo/rastrillo/mail" |
| +) |
| + |
| +// mailEnv is every variable the boot's mail choice reads, so each case |
| +// starts from none of them whatever the test process inherited. |
| +var mailEnv = []string{"CARLOS_MAIL", "CARLOS_CONTROL_SOCKET", |
| + "CARLOS_ADMIN_TOKEN", "CARLOS_MAIL_FROM", "CARLOS_SMTP_HOST", |
| + "CARLOS_SMTP_PORT", "CARLOS_SMTP_FROM", "CARLOS_SMTP_USER", |
| + "CARLOS_SMTP_PASS", "EQUIPO_ALLOW_LOGGED_MAIL"} |
| + |
| +// bootMail is main's mail path: LoadConfig, then Mailer, against the |
| +// process environment, which is what mail.FromCarlos reads. The origin |
| +// is public unless env names another. |
| +func bootMail(t *testing.T, env map[string]string) (mail.Sender, error) { |
| + t.Helper() |
| + for _, key := range mailEnv { |
| + t.Setenv(key, "") |
| + } |
| + t.Setenv("EQUIPO_ORIGIN", "https://equipo.example.com") |
| + t.Setenv("EQUIPO_INSTANCE_KEY", "test-instance-key") |
| + for key, value := range env { |
| + t.Setenv(key, value) |
| + } |
| + cfg, err := LoadConfig(os.Getenv) |
| + if err != nil { |
| + return nil, err |
| + } |
| + return Mailer(cfg, slog.New(slog.DiscardHandler)) |
| +} |
| + |
| +type mailCall struct { |
| + method, path, auth string |
| + body struct { |
| + From string `json:"from"` |
| + To []string `json:"to"` |
| + Raw string `json:"raw"` |
| + } |
| +} |
| + |
| +// mailVerb is the agent's control socket, answering POST /v1/mail. |
| +func mailVerb(t *testing.T) (string, chan mailCall) { |
| + t.Helper() |
| + // A short directory: a unix socket path has a 104-byte limit. |
| + dir, err := os.MkdirTemp("/tmp", "equipo-mail") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(func() { os.RemoveAll(dir) }) |
| + socket := filepath.Join(dir, "control.sock") |
| + listener, err := net.Listen("unix", socket) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + calls := make(chan mailCall, 8) |
| + server := &http.Server{Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| + call := mailCall{method: r.Method, path: r.URL.Path, auth: r.Header.Get("Authorization")} |
| + raw, _ := io.ReadAll(r.Body) |
| + _ = json.Unmarshal(raw, &call.body) |
| + calls <- call |
| + w.Write([]byte(`{"message_id":"m-1"}`)) |
| + })} |
| + go server.Serve(listener) |
| + t.Cleanup(func() { server.Close() }) |
| + return socket, calls |
| +} |
| + |
| +func TestMailBootsOnSubmissionAndSendsThroughTheSocket(t *testing.T) { |
| + socket, calls := mailVerb(t) |
| + sender, err := bootMail(t, map[string]string{ |
| + "CARLOS_MAIL": "submit", "CARLOS_CONTROL_SOCKET": socket, |
| + "CARLOS_ADMIN_TOKEN": "admin-token", |
| + "CARLOS_MAIL_FROM": "noreply@equipo.example.com"}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if !mail.IsConfigured(sender) { |
| + t.Fatal("submission booted a sender that only logs") |
| + } |
| + if err := sender.Send(context.Background(), "ana@example.com", "Sign in", "link"); err != nil { |
| + t.Fatal(err) |
| + } |
| + var call mailCall |
| + select { |
| + case call = <-calls: |
| + case <-time.After(5 * time.Second): |
| + t.Fatal("no request reached the control socket") |
| + } |
| + if call.method+" "+call.path != "POST /v1/mail" { |
| + t.Fatalf("the sign-in went to %s %s, not the mail verb", call.method, call.path) |
| + } |
| + if call.auth != "Bearer admin-token" { |
| + t.Fatalf("Authorization %q", call.auth) |
| + } |
| + if call.body.From != "noreply@equipo.example.com" || len(call.body.To) != 1 || call.body.To[0] != "ana@example.com" || call.body.Raw == "" { |
| + t.Fatalf("submission body %+v", call.body) |
| + } |
| +} |
| + |
| +func TestMailBootsOnSMTPAlone(t *testing.T) { |
| + sender, err := bootMail(t, map[string]string{ |
| + "CARLOS_SMTP_HOST": "email-smtp.eu-west-1.amazonaws.com", |
| + "CARLOS_SMTP_FROM": "noreply@equipo.example.com"}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if !mail.IsConfigured(sender) { |
| + t.Fatal("SMTP is configured but the sender only logs") |
| + } |
| +} |
| + |
| +// CARLOS_MAIL set to anything but "submit" is not submission: Equipo boots |
| +// on SMTP, as mail.FromCarlos sends over it. |
| +func TestMailBootsOnSMTPWhenCarlosMailIsNotSubmit(t *testing.T) { |
| + sender, err := bootMail(t, map[string]string{"CARLOS_MAIL": "smtp", |
| + "CARLOS_SMTP_HOST": "email-smtp.eu-west-1.amazonaws.com", |
| + "CARLOS_SMTP_FROM": "noreply@equipo.example.com"}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if !mail.IsConfigured(sender) { |
| + t.Fatal("SMTP is configured but the sender only logs") |
| + } |
| +} |
| + |
| +func TestMailRefusesWithNeitherChannel(t *testing.T) { |
| + for name, env := range map[string]map[string]string{ |
| + "nothing": nil, |
| + "SMTP host only": {"CARLOS_SMTP_HOST": "smtp.example.com"}, |
| + "CARLOS_MAIL not submit": {"CARLOS_MAIL": "smtp", "CARLOS_MAIL_FROM": "noreply@equipo.example.com"}, |
| + "a From with no switch on": {"CARLOS_MAIL_FROM": "noreply@equipo.example.com"}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + _, err := bootMail(t, env) |
| + if err == nil || err.Error() != copyMissingSMTP { |
| + t.Fatalf("booted with no mail: %v", err) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +func TestMailRefusesHalfASubmission(t *testing.T) { |
| + socket, _ := mailVerb(t) |
| + for name, env := range map[string]map[string]string{ |
| + "no socket": {"CARLOS_ADMIN_TOKEN": "t", "CARLOS_MAIL_FROM": "noreply@equipo.example.com"}, |
| + "no token": {"CARLOS_CONTROL_SOCKET": socket, "CARLOS_MAIL_FROM": "noreply@equipo.example.com"}, |
| + "no From": {"CARLOS_CONTROL_SOCKET": socket, "CARLOS_ADMIN_TOKEN": "t"}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + env["CARLOS_MAIL"] = "submit" |
| + // SMTP beside it does not rescue a broken submission. |
| + env["CARLOS_SMTP_HOST"] = "smtp.example.com" |
| + env["CARLOS_SMTP_FROM"] = "noreply@equipo.example.com" |
| + if _, err := bootMail(t, env); err == nil { |
| + t.Fatal("booted with half a submission") |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// EQUIPO_ALLOW_LOGGED_MAIL keeps its rules: loopback (or staging) only, and |
| +// where admitted every message is logged, whatever channel is set. |
| +func TestMailLoggedAllowanceUnchanged(t *testing.T) { |
| + socket, _ := mailVerb(t) |
| + for name, env := range map[string]map[string]string{ |
| + "no channel": {}, |
| + "SMTP": {"CARLOS_SMTP_HOST": "smtp.example.com", "CARLOS_SMTP_FROM": "noreply@equipo.example.com"}, |
| + "submission": {"CARLOS_MAIL": "submit", "CARLOS_CONTROL_SOCKET": socket, "CARLOS_ADMIN_TOKEN": "t", "CARLOS_MAIL_FROM": "noreply@equipo.example.com"}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + env["EQUIPO_ORIGIN"] = "http://127.0.0.1:8080" |
| + env["EQUIPO_ALLOW_LOGGED_MAIL"] = "1" |
| + sender, err := bootMail(t, env) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if mail.IsConfigured(sender) { |
| + t.Fatal("logged mail built a real sender") |
| + } |
| + }) |
| + } |
| + _, err := bootMail(t, map[string]string{"EQUIPO_ALLOW_LOGGED_MAIL": "1", |
| + "CARLOS_MAIL": "submit", "CARLOS_CONTROL_SOCKET": socket, "CARLOS_ADMIN_TOKEN": "t", "CARLOS_MAIL_FROM": "noreply@equipo.example.com"}) |
| + if err == nil || err.Error() != copyLoggedMailPublic { |
| + t.Fatalf("logged mail on a public origin: %v", err) |
| + } |
| +} |
diff --git a/internal/equipo/static/tokens.css b/internal/equipo/static/tokens.css| index fb0ee032..41885552 100644 |
| --- a/internal/equipo/static/tokens.css |
| +++ b/internal/equipo/static/tokens.css |
| @@ -2923,8 +2923,13 @@ dialog.rst-modal-panel, dialog[rst-modal-panel] { block-size: auto; color: inher |
| the gate that missed it asked where the person sat inside the rail |
| — a question that stayed true while the rail hung off the screen. |
| TestTheConsoleRailFitsTheViewport asks the other question, and |
| - carries a control page that must answer it the other way. */ |
| - .rst-shell-console > .rst-shell__rail > .rst-shell__nav, [rst-shell-console] > [rst-shell-rail] > [rst-shell-nav] { box-sizing: border-box; inset-block-start: var(--rst-sp-4); max-block-size: calc(100dvh - 2 * var(--rst-sp-4)); overflow-y: auto; position: sticky; } |
| + carries a control page that must answer it the other way. |
| + THE RING. overflow-y: auto clips the nav at its padding box on |
| + both axes, which cut the current item's ring and contact shadow |
| + off at the nav's edges. The 5px of padding is room for the shadow |
| + at any light position, and the negative margin, inset and cap give |
| + it back so nothing moves (TestTheConsoleRailDrawsTheCurrentItemWhole). */ |
| + .rst-shell-console > .rst-shell__rail > .rst-shell__nav, [rst-shell-console] > [rst-shell-rail] > [rst-shell-nav] { box-sizing: border-box; inset-block-start: calc(var(--rst-sp-4) - 5px); margin-block: -5px; margin-inline: -5px; max-block-size: calc(100dvh - 2 * var(--rst-sp-4) + 10px); overflow-y: auto; padding-block: 5px; padding-inline: 5px; position: sticky; } |
| } |
| /* The topbar's narrow menu is a floating card: it overlays the page and |
diff --git a/internal/equipotest/upgrade_test.go b/internal/equipotest/upgrade_test.go| index 45c64e1a..6284493c 100644 |
| --- a/internal/equipotest/upgrade_test.go |
| +++ b/internal/equipotest/upgrade_test.go |
| @@ -47,8 +47,8 @@ func TestRastrilloUpgradeContract(t *testing.T) { |
| } |
| for _, dep := range info.Deps { |
| if dep.Path == "amadan.net/rastrillo/rastrillo" { |
| - if dep.Version != "v0.30.1" || dep.Replace != nil { |
| - t.Errorf("linked Rastrillo = %+v, want v0.30.1 without replacement", dep) |
| + if dep.Version != "v0.30.3" || dep.Replace != nil { |
| + t.Errorf("linked Rastrillo = %+v, want v0.30.3 without replacement", dep) |
| } |
| return |
| } |
diff --git a/internal/plan3test/plan3_release_test.go b/internal/plan3test/plan3_release_test.go| index 4eaa948b..bca7fccf 100644 |
| --- a/internal/plan3test/plan3_release_test.go |
| +++ b/internal/plan3test/plan3_release_test.go |
| @@ -184,8 +184,10 @@ func plan3CopyInventory(t *testing.T) { |
| acceptedAccess := slices.Contains([]string{"access.waiting", "access.reopen", "access.not_owned", "access.already", "access.unconfirmed", "access.missing", "access.uncheckable", "access.authority", "access.confirm_namespace", "access.namespace", "access.granted_note", "access.title", "access.confirm", "access.ask", "access.approve", "access.aside", "access.reason", "access.role", "access.confirmation", "access.filing", "access.pending", "access.approved", "access.declined", "access.expired", "access.limited", "access.failed", "access.operator", "access.continue"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-17)") |
| acceptedPlacementEdges := slices.Contains([]string{"placement.late_push", "placement.late_report"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-17)") |
| acceptedReportActions := slices.Contains([]string{"roster.talk", "roster.round_busy", "roster.round_done", "roster.merge_busy", "roster.merge_done"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15)") |
| + // Luna's delegated pass on the boot refusal for CARLOS mail submission. |
| + acceptedMail := key == "copyMissingSMTP" && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-17)") |
| acceptedCopy := strings.TrimSuffix(cells[3], " |") == "COPY ACCEPTED BY DELEGATION (Copy, record-bound) sha256:"+copydesk.Hash(rows[key]) |
| - if !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina { |
| + if !acceptedMail && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina { |
| t.Fatal("entry has no copy review status or applicable acceptance", key) |
| } |
| } |