Files
executor-config/tools/mailbox/send-mailbox-message/v2-vs-v1-diff.md
T
coreci-cairo 1f07737bf5 executor-config: replace v1 send-mailbox-message.sh with v2 (production, zero placeholders)
Per CEO approval 2026-10-04. Option (a): overwrite v1 with v2.

Changes:
* send-mailbox-message.sh - production implementation with zero
  placeholders. Real rail callbacks via urllib.request POST to
  submit_request. EXECUTOR_API_KEY in Authorization header only.
* delivery-pack.sh - informational template (main script
  generates per-recipient copies inline).
* SKILL.md - v2 spec (what's new + what's the same).
* v2-vs-v1-diff.md - side-by-side diff.
* README.md - bundle index.

Honours brief locked decisions [1]:
- Decision 2: outbox canonical; inbox mirrored (own inbox only).
- Decision 6: mailbox writes AUTO_RUN per recipient.
- Decision 7: append-only inheritance; this skill is additive.
- Decision 8: naming convention coreci-<role> validated at parse.
- Decision 9: extend, don't duplicate.

Does NOT (per brief):
- Edit coreci/agent-definitions/ (read-only per Rule #7).
- Implement deny_read_targets (xfail; out of scope).
- Classify mailbox writes as NEEDS_APPROVAL.
- Write to anyone else's outbox/.
- Provide cross-repo atomicity (per-recipient only).
2026-10-04 18:07:31 +00:00

2.6 KiB

v2 vs v1: what changed

Aspect v1 (reference) v2 (production)
__SENDER_AGENT__ placeholder derived from CRED_GITEA_USER (decision 8 [1])
__SENDER_REPO__ placeholder derived from sender agent key: <key>/home
__RID_PLACEHOLDER_<r>__ placeholder real urllib.request POST to submit_request
Credential in delivery pack conceptual rides the rail envelope (credentials.gitea)
Auth header placeholder Authorization: Bearer $EXECUTOR_API_KEY (header only)
Gate rejection behaviour exits without commit same; no placeholders remain
Recipient slug validation absent regex ^[a-z][a-z0-9-]*$ + ≤ 40 chars (decision 3 [1])
Recipient ACL validation gate only gate + parser pre-check (fail-fast on bad input)
Dry-run supported same
Multi-recipient fan-out conceptual urllib.request per recipient, JSON accumulator
Output JSON shape conceptual matches v1 spec; deliveries is real [{recipient, request_id, status}]

What stayed the same

  • Compliance gates (dlp / classification / recipient_acl) and their front-matter audit destination (decision 1c) [1].
  • Per-recipient atomicity (own-home delivery; not cross-repo).
  • Reply-is-ack back-channel (decision 3c) [1].
  • Filename convention per decision 3 [1].
  • Lifecycle states per decision 5 [1].

What's new in v2

  • Zero placeholders. The script is canonical: drop into coreci/executor-config/tools/mailbox/send-mailbox-message.sh and it runs as-is.
  • Real rail callbacks. Each per-recipient delivery is a real POST to submit_request with the executor API key in the Authorization header only (not in the body, not embedded in the pack content).
  • Strict input validation. Bad slugs and bad recipients fail fast (exit 64) before any gate runs.
  • Composite delivery-pack template. Generated per recipient via shell variable expansion; the template lives inline in the main script as a heredoc for reviewer accessibility.

What v2 still does NOT do (per brief) [1]

  • Does not edit coreci/agent-definitions/ (read-only).
  • Does not implement deny_read_targets (xfail; out of scope).
  • Does not classify mailbox writes as NEEDS_APPROVAL.
  • Does not write to anyone else's outbox/.
  • Does not provide cross-repo atomicity (per-recipient only).

Open items (deferred to v2.x)

  • Multi-line body (currently assumes single-line --body). Use --body "$(cat message.md)" for now.
  • Attachment support (not in scope; would need a separate skill).
  • Encrypted body (not in scope; assume plaintext for now).