| new file mode 100644 |
| index 000000000..c0b219953 |
| --- /dev/null |
| +++ b/internal/provision/platform_mail_submission_census_test.go |
| @@ -0,0 +1,47 @@ |
| +package provision |
| + |
| +// platformMailSubmissionWriteCensusInventory is the platform mail submission |
| +// review (plan docs/superpowers/plans/2026-11-13-platform-mail-submission.md, |
| +// Task 1) of the record-write census, layered on |
| +// staticSiteGeo962WriteCensusInventory. |
| +// |
| +// Four units are re-digested; no record write is added and no class or kind |
| +// changes. Each one reads a sender's pause through EffectivePause (the new |
| +// Pause field on the sender record, else the legacy Provisioned.Active and |
| +// PauseKind) instead of Provisioned.Active directly, to decide whether a key |
| +// it mints starts active (decision 8). Their writes are the same Put of the |
| +// same app sender, as before: |
| +// - claimUnserializedEnable: the carried pause state of a re-walk, and a |
| +// first enable of a sender that is already paused, come from |
| +// EffectivePause. reference / id:Put, as before. |
| +// - claimUnserializedRotate: the new key's active state is "not paused" by |
| +// EffectivePause. reference / id:Put, as before. |
| +// - claimUnserializedCreateStandalone: likewise for a standalone's key. |
| +// reference / id:Put, as before. |
| +// - claimUnserializedEnableEnvironment: a fresh owned environment's key |
| +// follows the app's pause by EffectivePause. reference / id:Put, as |
| +// before. |
| +func platformMailSubmissionWriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), staticSiteGeo962WriteCensusInventory()...) |
| + repins := []censusEntry{ |
| + {"internal/mail/walk.go", "claimUnserializedEnable", "reference", "id:Put", "d1846550f43f9150ea6205f5c2f0c9c257964796a6242736bfed0b976a9c6475"}, |
| + {"internal/mail/walk.go", "claimUnserializedRotate", "reference", "id:Put", "77f02ea1bdece0db273af097dc73ac3713642ebbbaadd79a44c55e57b04cbb53"}, |
| + {"internal/mail/walk.go", "claimUnserializedCreateStandalone", "reference", "id:Put", "92114b16fe724b555700d14630ed86dd5fb6e67ec6ac1f2616baeb51ffb09542"}, |
| + {"internal/mail/walk_environment.go", "claimUnserializedEnableEnvironment", "reference", "id:Put", "6fe09f592c6a52faa7b5182eedbfd37fcc4a231490385ee6f9f41f7849b818de"}, |
| + } |
| + for _, r := range repins { |
| + found := false |
| + for i, e := range entries { |
| + if e.File == r.File && e.Unit == r.Unit { |
| + if e.Class != r.Class || e.Kinds != r.Kinds { |
| + panic("platform-mail-submission census: classification changed for " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], found = r, true |
| + } |
| + } |
| + if !found { |
| + panic("platform-mail-submission census: re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return entries |
| +} |