carlos / platform Public

feat/mail-submission-followups

Mail submission follow-ups

Paul approved this on 2026-11-17 ("Yes to CARLOS change"). It follows platform mail submission (9eec0236).

What changes

  1. carlos deploy --mail submit and carlos canary [deploy] --mail submit. Until now only carlos ship had the flag, but the Oficina apps deploy with deploy. Both commands reuse ship's code: - validShipMail refuses a bad value before the console is asked anything. Deploy joins it to the existing --swap check, and canary to the name check, so the root package gets no new log.Fatal site. - apiSession.shipMail sends the declaration in the existing ship request, so checkMailEcho (shipMailNoEcho) applies. - The console door refuses a rootfs release that declares --mail (deploy and canary only ship binaries and static sites). It also refuses a re-ship of a version whose declaration differs, with a 409.

The deploy usage line moves to a deployUsage const. runDeploy drops from 331 to 329 code lines, and the code-health record is lowered to match.

The canary usage text, the docs and a code comment said promotion into a canary is "never refused". That was untrue once email submission is on, so all three are qualified.

  1. <stem>_MAIL_FROM and CARLOS_MAIL are platform-managed (internal/console/teamenv.go, platformManagedKeys): - The From name comes from mail.MailFromName, the same derivation the delivery uses. - A team's config write refuses these names, just as it refuses the <P>_SMTP_* five. - Adopt and fork leave them out. mintOwnedEnvironment (DeliverMailFromIn) still delivers a switched app's From afterwards.

Tests (each was red without its change)

  • TestDeployAndCanaryCarryTheMailDeclaration (new) runs the built binary against a real console. It checks the bad value, the stored declaration, the console's 409 on a re-ship, and the missing echo with nothing promoted.
  • TestTeamPlatformManagedKeysRefused, TestEnvironmentAdoptAndRelease and TestEnvironmentFork now cover the new names.
  • TestSwitchedAdoptAndForkLeaveTheFromToThePlatform (new) checks that adopt and fork strip both names on a switched app and the platform's From is then delivered.

Generated files

  • testdata/clireg-golden.jsonl: re-recorded in the Linux container (Go 1.26.10). Only the deploy and canary cases change.
  • make parity-doc: no change.
  • Code-health record: runDeploy 331 -> 329.

Copy

docs/superpowers/plans/mail-submission-followups-copy.json holds MSF-C1 to C7. Luna reviewed them in two rounds under Paul's 2026-10-25 delegation. Her rewrites (C3, C4, C6, C7) are applied verbatim, and she raised no flags. TestApprovedMailSubmissionFollowupsCopy pins the record.

Reviews

  • Census, Astra round 1 at 99c49f86a: APPROVE (runDeploy, envelope .). The P3 is fixed.
  • Census, Astra scoped check at df0785194: CHECK PASSED. The P3 is fixed in 3f7edfec9 (claim text only).
  • Both verdicts are recorded on #280.
  • Branch review, Opus round 1: READY. P3s 1 and 2 are fixed. P3 3 (a zero-arg --mail test) is left as a follow-up.
  • Findings: docs/superpowers/reviews/FINDINGS-mail-submission-followups.md.

CI

The first run, at aedbb2073, failed on internal/activator TestPoolWithdrawalLogsProofAttempt/success. The branch does not touch that package, and the test passes 20/20 in isolation, so this was a load flake.

Commits 9
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity