dispatch: seed the routing smoke's mail legs into Stalwart; make wake intake work #35

Merged
founder merged 1 commit from claude/routing-smoke-seed-stalwart into main 2026-08-16 06:18:24 +00:00
Owner

Picks up key-store/dispatch#2 (ba409a1b) and wires the forge side.

Why: the identity-routing smoke's four mail legs (mail-trusted-billing-cfo, mail-trusted-billing-assistant, mail-trusted-security, mail-review-billing) have never passed since dispatch c4a5029 made /webhook/forwardemail wake the Stalwart mirror + a targeted agent-dispatcher mail --once --message-id intake instead of enqueueing the payload — the synthetic message never existed in Stalwart, so every redmine-dispatcher-smoke run timed out with status=missing. On top of that, Stalwart 0.15 answers SEARCH HEADER Message-ID with an empty result, so the wake's targeted intake never found real mail either (mail only flowed through the 15-minute unseen sweep); dispatch#2 falls back to a client-side header match.

What:

  • nixos/keystore-forge.nix: redmine-dispatcher-smoke gets KEYSTORE_ROUTING_SMOKE_MAIL_ACCOUNTS derived from forwardEmailMirrorMailboxes (agent=agent:…,billing=billing:/run/agenix/billingPassword,contact=manager:…,founder=founder:…,privacy=manager:…,security=security-agent:/run/agenix/securityAgentPassword) — the same alias → account mapping the key-store-forwardemail-wake@ unit uses, so the two cannot drift — plus KEYSTORE_ROUTING_SMOKE_IMAP_ADDR from the dispatcher's mail.imapAddr.
  • nixos/hosts/keystore-forge/common.nix: pointer comment at the smoke invocation.
  • flake.nix/flake.lock: dispatch_srcba409a1b. go.mod unchanged, vendorHash unchanged.

Verified nix eval .#nixosConfigurations.keystore-forge.config.systemd.services.redmine-dispatcher-smoke.environment produces the mapping above; the seeding function was exercised against the forge Stalwart (993 IMAPS and 143 STARTTLS, idempotent re-run, probe message removed afterwards).

Deploy the forge, then systemctl start redmine-dispatcher-smoke should print ok for all four mail legs.

🤖 Generated with Claude Code

Picks up [key-store/dispatch#2](https://git.key.store/key-store/dispatch/pulls/2) (`ba409a1b`) and wires the forge side. **Why:** the identity-routing smoke's four mail legs (`mail-trusted-billing-cfo`, `mail-trusted-billing-assistant`, `mail-trusted-security`, `mail-review-billing`) have never passed since dispatch c4a5029 made `/webhook/forwardemail` wake the Stalwart mirror + a targeted `agent-dispatcher mail --once --message-id` intake instead of enqueueing the payload — the synthetic message never existed in Stalwart, so every `redmine-dispatcher-smoke` run timed out with `status=missing`. On top of that, Stalwart 0.15 answers `SEARCH HEADER Message-ID` with an empty result, so the wake's targeted intake never found *real* mail either (mail only flowed through the 15-minute unseen sweep); dispatch#2 falls back to a client-side header match. **What:** - `nixos/keystore-forge.nix`: `redmine-dispatcher-smoke` gets `KEYSTORE_ROUTING_SMOKE_MAIL_ACCOUNTS` derived from `forwardEmailMirrorMailboxes` (`agent=agent:…,billing=billing:/run/agenix/billingPassword,contact=manager:…,founder=founder:…,privacy=manager:…,security=security-agent:/run/agenix/securityAgentPassword`) — the same alias → account mapping the `key-store-forwardemail-wake@` unit uses, so the two cannot drift — plus `KEYSTORE_ROUTING_SMOKE_IMAP_ADDR` from the dispatcher's `mail.imapAddr`. - `nixos/hosts/keystore-forge/common.nix`: pointer comment at the smoke invocation. - `flake.nix`/`flake.lock`: `dispatch_src` → `ba409a1b`. `go.mod` unchanged, vendorHash unchanged. Verified `nix eval .#nixosConfigurations.keystore-forge.config.systemd.services.redmine-dispatcher-smoke.environment` produces the mapping above; the seeding function was exercised against the forge Stalwart (993 IMAPS and 143 STARTTLS, idempotent re-run, probe message removed afterwards). Deploy the forge, then `systemctl start redmine-dispatcher-smoke` should print `ok` for all four mail legs. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dispatch: seed the routing smoke's mail legs into Stalwart; make wake intake work
Some checks failed
Build: SQLite SEE / Redacted SEE compile (pull_request) Successful in 5s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 20s
Build: KaiOS / Build (KaiOS) (pull_request) Has been cancelled
Build: Linux / Build (Linux x86_64) (pull_request) Has been cancelled
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been cancelled
Build: Web / Build (Web) (pull_request) Has been cancelled
Build: Apple / Build (visionOS) (pull_request) Has been cancelled
Build: Apple / Build (iOS) (pull_request) Has been cancelled
Build: Apple / Build (macOS) (pull_request) Has been cancelled
8e020f663c
key-store/dispatch#2 (ba409a1b): the identity-routing smoke's four mail legs
have never passed since the Forward Email webhook started waking the Stalwart
mirror instead of enqueueing (c4a5029) — the synthetic message never existed
in Stalwart, so the wake's targeted intake found nothing and every run timed
out with status=missing. On top of that, Stalwart answers SEARCH HEADER
Message-ID with an empty result, so the targeted intake never found real mail
either; it now falls back to matching the header client-side.

The smoke now APPENDs each synthetic message into the target account's INBOX
over IMAP before posting the webhook. Hand it the alias -> account:password
mapping derived from forwardEmailMirrorMailboxes (the same one the
key-store-forwardemail-wake@ unit uses) plus the dispatcher's IMAP address via
the redmine-dispatcher-smoke unit environment, and bump dispatch_src to
ba409a1b. go.mod is unchanged, so the vendorHash stays.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
founder force-pushed claude/routing-smoke-seed-stalwart from 8e020f663c
Some checks failed
Build: SQLite SEE / Redacted SEE compile (pull_request) Successful in 5s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 20s
Build: KaiOS / Build (KaiOS) (pull_request) Has been cancelled
Build: Linux / Build (Linux x86_64) (pull_request) Has been cancelled
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been cancelled
Build: Web / Build (Web) (pull_request) Has been cancelled
Build: Apple / Build (visionOS) (pull_request) Has been cancelled
Build: Apple / Build (iOS) (pull_request) Has been cancelled
Build: Apple / Build (macOS) (pull_request) Has been cancelled
to dc4c9e4772
Some checks failed
Build: SQLite SEE / Redacted SEE compile (pull_request) Successful in 6s
Build: Apple / Check (SwiftLint) (pull_request) Successful in 16s
Namespace: Build Images / Refresh macOS runner lane (push) Successful in 7s
Release: If Needed / Check (Release Needed) (push) Successful in 7s
Build: Apple / Check (SwiftLint) (push) Successful in 19s
Build: Apple / Build (visionOS) (pull_request) Successful in 23s
Build: SQLite SEE / Redacted SEE compile (push) Successful in 31s
Build: Apple / Build (iOS) (pull_request) Successful in 32s
Build: Apple / Build (iOS) (push) Successful in 28s
Namespace: Build Images / Refresh Linux runner image (push) Successful in 59s
Build: Apple / Build (visionOS) (push) Successful in 25s
Release: Signing Preflight / Release (Signing Preflight) (push) Successful in 1m8s
Build: Apple / Build (macOS) (pull_request) Successful in 1m49s
Build: Apple / Build (macOS) (push) Successful in 1m56s
Deploy: API / Deploy (API) (push) Successful in 3m6s
Build: Web / Build (Web) (pull_request) Has started running
Deploy: Web / Deploy (Web) (push) Has been cancelled
Build: Web / Build (Web) (push) Has been cancelled
Build: KaiOS / Build (KaiOS) (push) Has been cancelled
Build: KaiOS / Build (KaiOS) (pull_request) Failing after 33s
Build: Linux / Build (Linux x86_64) (push) Failing after 16m1s
Build: Linux / Build (keystore-forge x86_64) (push) Has been skipped
Build: Linux / Build (Linux x86_64) (pull_request) Failing after 52s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
2026-08-16 06:18:12 +00:00
Compare
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
key-store/key.store!35
No description provided.