feat(iskra): wire OpenClaw mail consumer — close Iskra value loop (read+reply) #235

Closed
opened 2026-05-12 07:58:23 +02:00 by pdurlej · 2 comments
Owner

Why this helps Iskra

Iskra's #1 promised value is: "reads my email + replies as me, with context." Per state/L3/OPEN_LOOPS.md (Apr 12 audit), mail infra is 60% done — gateway on RS2000 is healthy, but VPS 1000 OpenClaw isn't consuming. The user-facing reply action doesn't exist yet. Every day this stays open is a day where Iskra is technically alive but practically silent on her highest-value job.

This is operator-emotional priority. Not architectural.


Context (from state/L3/OPEN_LOOPS.mdunresolved_active cluster "Mail infra '60% done'")

Three concrete gaps surfaced in 3 independent threads (Apr 4, Apr 12, repeatedly):

  1. OPENCLAW_MAIL_OPENCLAW_DISPATCH_URL and _TOKEN empty (commit 617b59fa, Apr 12) — RS2000 mail-infra-x4 gateway is healthy and dispatching, but VPS1000 OpenClaw side has no consumer URL/token configured.
  2. dispatch_openclaw_intake not configured — action-plane partially inactive on the OpenClaw side; no handler picks up the dispatched messages.
  3. No first-class reply action (commit a931c692) — even when intake works, there's no symmetric outbound path. Iskra can read, can't respond.
  4. Telemetry gap: lastInboundAt / lastOutboundAt null on Signal/Matrix despite running=true. We can't see if anything is moving.

These have been open since early April. Three threads, never closed.


Acceptance criteria

  • Discovery (Codex first task): SSH to VPS1000, confirm current state of OPENCLAW_MAIL_OPENCLAW_DISPATCH_URL / _TOKEN in OpenClaw runtime env (~openclaw/.openclaw/runtime.env or extension config). Write findings to state/reports/2026-05-12-mail-infra-recon.md BEFORE writing code.
  • Configure dispatch endpoint: VPS1000 OpenClaw consumes mail events from RS2000 mail-infra-x4 gateway. Token/URL set via existing secrets pattern (Bitwarden or runtime.env, NOT plaintext in module.yaml).
  • Implement dispatch_openclaw_intake handler: incoming mail → OpenClaw conversation thread or Signal handoff per existing channel routing patterns.
  • First-class reply action: outbound mail via mail-infra-x4 gateway with In-Reply-To + References headers preserved.
  • Telemetry fix: lastInboundAt / lastOutboundAt populated on Signal + Matrix integrations once mail handler activates.
  • Operator validation: send test email to Piotr's tracked address → Iskra reads → Iskra replies via voice approval (per existing assistant.send UX pattern). Document in runbooks/iskra-mail-loop.md.

Codex Packet (read this carefully — anti-drift fences below)

Scope: ONLY mail-infra glue between RS2000 mail-infra-x4 and VPS1000 OpenClaw. NO new mail provider integrations. NO refactor of existing mail-infra-x4 module on RS2000 (it's healthy per evidence).

Files likely touched:

  • modules/openclaw-mail-infra/module.yaml (verify it exists; create if not, follow v2 schema)
  • modules/openclaw-mail-infra/runbook.md
  • New runbook: runbooks/iskra-mail-loop.md
  • Recon report: state/reports/2026-05-12-mail-infra-recon.md (READ-ONLY discovery first; no code changes until this lands)

Sequence:

  1. Recon-only PR: file under state/reports/. Codex may execute SSH probes (read-only) per existing AGENTS.md guidance for VPS1000 inventory. NO mutation.
  2. Operator review of recon report — decide go/no-go on config approach (Bitwarden vs runtime.env, etc.). Recon must surface the tradeoffs.
  3. Config + handler PR — only after operator approval. Smallest coherent unit per class/security-sensitive discipline.
  4. Telemetry + reply action PR — final piece, after Phase 3 of this issue lands.

Non-goals (DON'T do this)

  • Adding new mail providers (Fastmail JMAP, etc.) — that's Issue #69 territory on iskra-openclaw repo, not here.
  • Restructuring mail-infra-x4 on RS2000 — out of scope, it's healthy.
  • Voice-note-to-mail-draft — adjacent feature, separate issue if needed.
  • Building a "mail dashboard" UI — Iskra's surface is Signal/Matrix, not a new UI.
  • Plaintext secrets in module.yaml. Hard fail per policies/sacred-paths.yaml + safety.py.

References

  • state/L3/OPEN_LOOPS.md — "Mail infra '60% done'" cluster
  • Commits cited: 617b59fa (Apr 12), a931c692 (Apr 12), 44684022 (Apr 5)
  • AGENTS.md §security-sensitive class
  • REVIEW.md — security-sensitive PRs require tier/full canary

Filed by claude (Prof Kong intermezzo, 2026-05-12 morning) under operator's "platform w twoje ręce" mandate. Pan Herbatka primary on this repo; coordinate via STATUS_NOW.md.

## Why this helps Iskra Iskra's #1 promised value is: *"reads my email + replies as me, with context."* Per `state/L3/OPEN_LOOPS.md` (Apr 12 audit), mail infra is **60% done** — gateway on RS2000 is healthy, but VPS 1000 OpenClaw isn't consuming. **The user-facing reply action doesn't exist yet.** Every day this stays open is a day where Iskra is technically alive but practically silent on her highest-value job. This is operator-emotional priority. Not architectural. --- ## Context (from `state/L3/OPEN_LOOPS.md` — `unresolved_active` cluster "Mail infra '60% done'") Three concrete gaps surfaced in **3 independent threads** (Apr 4, Apr 12, repeatedly): 1. **`OPENCLAW_MAIL_OPENCLAW_DISPATCH_URL` and `_TOKEN` empty** (commit `617b59fa`, Apr 12) — RS2000 mail-infra-x4 gateway is healthy and dispatching, but VPS1000 OpenClaw side has no consumer URL/token configured. 2. **`dispatch_openclaw_intake` not configured** — action-plane partially inactive on the OpenClaw side; no handler picks up the dispatched messages. 3. **No first-class `reply` action** (commit `a931c692`) — even when intake works, there's no symmetric outbound path. Iskra can read, can't respond. 4. **Telemetry gap**: `lastInboundAt` / `lastOutboundAt` null on Signal/Matrix despite `running=true`. We can't see if anything is moving. These have been open since early April. Three threads, never closed. --- ## Acceptance criteria - [ ] **Discovery (Codex first task)**: SSH to VPS1000, confirm current state of `OPENCLAW_MAIL_OPENCLAW_DISPATCH_URL` / `_TOKEN` in OpenClaw runtime env (`~openclaw/.openclaw/runtime.env` or extension config). Write findings to `state/reports/2026-05-12-mail-infra-recon.md` BEFORE writing code. - [ ] **Configure dispatch endpoint**: VPS1000 OpenClaw consumes mail events from RS2000 mail-infra-x4 gateway. Token/URL set via existing secrets pattern (Bitwarden or `runtime.env`, **NOT** plaintext in `module.yaml`). - [ ] **Implement `dispatch_openclaw_intake` handler**: incoming mail → OpenClaw conversation thread or Signal handoff per existing channel routing patterns. - [ ] **First-class `reply` action**: outbound mail via mail-infra-x4 gateway with `In-Reply-To` + `References` headers preserved. - [ ] **Telemetry fix**: `lastInboundAt` / `lastOutboundAt` populated on Signal + Matrix integrations once mail handler activates. - [ ] **Operator validation**: send test email to Piotr's tracked address → Iskra reads → Iskra replies via voice approval (per existing `assistant.send` UX pattern). Document in `runbooks/iskra-mail-loop.md`. --- ## Codex Packet (read this carefully — anti-drift fences below) **Scope**: ONLY mail-infra glue between RS2000 mail-infra-x4 and VPS1000 OpenClaw. NO new mail provider integrations. NO refactor of existing mail-infra-x4 module on RS2000 (it's healthy per evidence). **Files likely touched**: - `modules/openclaw-mail-infra/module.yaml` (verify it exists; create if not, follow v2 schema) - `modules/openclaw-mail-infra/runbook.md` - New runbook: `runbooks/iskra-mail-loop.md` - Recon report: `state/reports/2026-05-12-mail-infra-recon.md` (READ-ONLY discovery first; no code changes until this lands) **Sequence**: 1. **Recon-only PR**: file under `state/reports/`. Codex may execute SSH probes (read-only) per existing AGENTS.md guidance for VPS1000 inventory. NO mutation. 2. **Operator review of recon report** — decide go/no-go on config approach (Bitwarden vs runtime.env, etc.). Recon must surface the tradeoffs. 3. **Config + handler PR** — only after operator approval. Smallest coherent unit per `class/security-sensitive` discipline. 4. **Telemetry + reply action PR** — final piece, after Phase 3 of this issue lands. --- ## Non-goals (DON'T do this) - ❌ Adding new mail providers (Fastmail JMAP, etc.) — that's Issue #69 territory on iskra-openclaw repo, not here. - ❌ Restructuring mail-infra-x4 on RS2000 — out of scope, it's healthy. - ❌ Voice-note-to-mail-draft — adjacent feature, separate issue if needed. - ❌ Building a "mail dashboard" UI — Iskra's surface is Signal/Matrix, not a new UI. - ❌ Plaintext secrets in `module.yaml`. **Hard fail** per `policies/sacred-paths.yaml` + safety.py. --- ## References - `state/L3/OPEN_LOOPS.md` — "Mail infra '60% done'" cluster - Commits cited: `617b59fa` (Apr 12), `a931c692` (Apr 12), `44684022` (Apr 5) - AGENTS.md §security-sensitive class - REVIEW.md — security-sensitive PRs require `tier/full` canary --- *Filed by claude (Prof Kong intermezzo, 2026-05-12 morning) under operator's "platform w twoje ręce" mandate. Pan Herbatka primary on this repo; coordinate via STATUS_NOW.md.*
Collaborator

M08 triage result: hold for now. Iskra's metadata-only domain reply recommends #131/#236/#568 first; mail loop remains high value, but needs tighter live scope/evidence before execution. No runtime mutation was performed.

M08 triage result: hold for now. Iskra's metadata-only domain reply recommends #131/#236/#568 first; mail loop remains high value, but needs tighter live scope/evidence before execution. No runtime mutation was performed.
Collaborator

Mail loop closeout reframe from Codex.

This issue should no longer be treated as the old standalone iskra-mail-consumer-v0 wiring task. That path is now historical/superseded. The current closeout model is:

  1. Gmail header radar: Iskra may see only headers/metadata, with sensitive subject denylist hiding subject/sender when needed.
  2. Missive explicit escalation: an operator @iskra comment grants exactly one conversation for body read/comment handling.
  3. Fastmail DMZ: selected/forwarded mail becomes an action workspace where Iskra can classify and draft, but cannot send without promote/approve.

Current PR chain:

  • platform #716 maps the canonical mail loops and marks the old spec as superseded.
  • iskra-openclaw #417 exposes Gmail metadata radar capability.
  • iskra-openclaw #418 locks Missive grant boundaries.
  • iskra-openclaw #419 reanimates Fastmail DMZ contracts, tests, skill, scripts, and systemd templates without runtime deploy.

Do not close #235 yet. Close only after operator smoke proves: Iskra helps with mail without reading everything and without autonomous send.

Mail loop closeout reframe from Codex. This issue should no longer be treated as the old standalone `iskra-mail-consumer-v0` wiring task. That path is now historical/superseded. The current closeout model is: 1. Gmail header radar: Iskra may see only headers/metadata, with sensitive subject denylist hiding subject/sender when needed. 2. Missive explicit escalation: an operator `@iskra` comment grants exactly one conversation for body read/comment handling. 3. Fastmail DMZ: selected/forwarded mail becomes an action workspace where Iskra can classify and draft, but cannot send without promote/approve. Current PR chain: - platform #716 maps the canonical mail loops and marks the old spec as superseded. - iskra-openclaw #417 exposes Gmail metadata radar capability. - iskra-openclaw #418 locks Missive grant boundaries. - iskra-openclaw #419 reanimates Fastmail DMZ contracts, tests, skill, scripts, and systemd templates without runtime deploy. Do not close #235 yet. Close only after operator smoke proves: Iskra helps with mail without reading everything and without autonomous send.
Sign in to join this conversation.
No labels
W6d-automerge-calibration
agent/claude-code
agent/codex
agent/hermes
agent/iskra
agent/ollama
agent/patchwarden
automerge-candidate
class/security-sensitive
cutover-gate
dependency/blocked
dependency/blocks-others
dependency/cross-repo
dependency/needs-confirmation
domain:agents
domain:ci
domain:docs
domain:forgejo
domain:infra
domain:memory
domain:runtime
domain:signal
domain:ux
flow/architecture
flow/blocked
flow/deployed
flow/done
flow/implementation
flow/intake
flow/maintained
flow/observed
flow/ready
flow/refining
flow/retired
flow/review
iterating
judge/codex-candidate
judge/hermes-candidate
judge/low-confidence
judge/needs-refinement
judge/operator-needed
judge/p0
judge/p1
judge/p2
judge/p3
judge/park
judge/patchwarden-candidate
judge/stale-priority
kind/adr
kind/bug
kind/chore
kind/feature
kind/infra
kind/ops
kind/refactor
kind/research
large-impact
merge/auto
merge/manual
merge/manual-dependency-conflict
merge/manual-failing-tests
merge/manual-merge-conflict
merge/manual-missing-review
merge/manual-operator-preference
merge/manual-red-zone
merge/manual-security-sensitive
merge/manual-unclear-scope
merge/manual-unknown
meta
mode:operator-only
mode:patchwarden-iskra-approved
mode:safe-auto
needs-operator-decision
needs-triage
not-ready
observed/erroring
observed/needs-followup
observed/pending
observed/retire-candidate
observed/unused
observed/used
operator-emotional
owner-attention
phase/02
phase/03
priority:p0
priority:p1
priority:p2
priority:p3
proposed
ready-for-agent
ready-for-operator
recovery
review:claude-reviewed
review:codex-reviewed
review:dziadek-reviewed
review:needs-human
risk/exposure
risk/process
risk/product
risk/runtime
safety:external-write
safety:no-prod-mutation
safety:prod-impact
safety:secret-touch
size/large
size/medium
size/small
size/tiny
size/unknown
source/adr
source/agent-generated
source/manual
source/operator-chat
source/voice-note
status:blocked
status:codex-ready
status:merged:pending-evidence
status:needs-evidence
status:operator-needed
status:parked
tier/full
tier/lite
tier/stacked
tier:0-platform-substrate
tier:1-iskra-value-layer
tier:2-tools-products-modules
type:bug
type:chore
type:docs
type:feat
type:policy
type:research
No project
No assignees
2 participants
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
pdurlej/platform#235
No description provided.