Mail readiness compares the DKIM key character-for-character; a mangled record is its own state #415
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#415
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal/mailreadiness/net.go(matchToken) verifies a DKIM record by the substringv=dkim1— it never looks at thep=key bytes. ADR 0115's mail-readiness contract says the records are verified, and CONTEXT.md's mail readiness promises the operator the same; the code checks presence of the record class, not its value.Why this is live, not prospective: registrar zone-edit pipelines mangle values invisibly — the mauke fleet's cPanel registrar form-decoded
+to space inside the published DKIM key (8 places), Gmail wentdkim=neutral (invalid public key), and nothing bounced because SPF still aligned DMARC. Outbound reputation decayed silently for weeks while every presence check stayed green. An OurCloud operator publishing records by hand at such a registrar reproduces this exactly, and our readiness screen tells them it's fine. Seedocs/GOTCHAS.md#9.Acceptance criteria
p=value against the key OurCloud generated, character-for-character (whitespace inside the served value is a mismatch, not noise).+→space mangling detected as mangled (not missing); record absent still reports not-found.Source: the clan-community (mauke reference fleet) lessons review,
docs/research/2026-08-10-clan-community-lessons.md(lands on main this sitting), lesson 5.Landed on
mainin551d78a.Mail readiness no longer trusts record presence alone.
internal/mailreadinessnow runs a three-way per-record verdict (classifyTXT): found / absent / mangled.dkimKeyextracts the served key; whitespace inside it is a mismatch, not noise) — the exact+→space corruption of GOTCHAS #9 is caught.p=, so it stays token-based until the generated public key is wired in — flagged as a follow-up in the commit body).records-mangled(StateRecordsMangled), distinct fromrecords-not-verifiedbecause the remedy differs (re-publish the value verbatim, not add it); it takes precedence because a mangled record fails silently.recordMangledGuidancecarries the re-publish remedy. Operator copy added to CONTEXT.md vocabulary,health.go/monitor.gosummaries, and the dashboardMailReadinessStateunion.Tests (
internal/mailreadiness/net_test.go): intact key passes;+→space detected as mangled (not missing); record absent still reports not-found; DKIM token fallback when no expectedp=; SPF/DMARC value compare; and theAssessfold torecords-mangledwith the named leg + remedy. All 15 package tests green;go build ./...clean; pre-push go-ci gate passed. GOTCHAS #9 already cited #415.sh -cover ssh — the remote shell re-parses the words,sh -c gitprints usage and the flip faults (Retry then faults at the mv) #2188sh -cover ssh — the remote shell re-parses the words,sh -c gitprints usage and the flip faults (Retry then faults at the mv) #2188