Contención: toda salida a terceros pasa a borrador + identidad versionada #18

Open
cayce wants to merge 0 commits from containment-outbox into main
Owner

Punto 8 de la fase de contención. outbox.mjs con gate fail-closed en todos los caminos de salida (publish_note, 4 posts de core, menciones, promo social, mail). Identidad exportada verbatim a prompts/cayce-identity.md (5 bloques, verificación byte-identical). Reversible con CAYCE_PUBLISH_MODE=live.

Punto 8 de la fase de contención. outbox.mjs con gate fail-closed en todos los caminos de salida (publish_note, 4 posts de core, menciones, promo social, mail). Identidad exportada verbatim a prompts/cayce-identity.md (5 bloques, verificación byte-identical). Reversible con CAYCE_PUBLISH_MODE=live.
cayce added 1 commit 2026-10-31 16:44:58 +00:00
Problem: Cayce publishes straight to relays with no approval gate —
cayce-initiative publish_note, core.mjs digest/opinion/reflection/events,
mention auto-replies, social promo (Facebook/Instagram via sfeed), and
mail — while the operator believed approvals existed (they never did;
ADR-0005 Telegram queue was never implemented).

Mechanism (outbox.mjs, deployed to all runtimes):
- CAYCE_PUBLISH_MODE=draft (default): gateOutbound() stages EVERY outbound
  artifact into outbound_drafts (entity DB) with identity_path +
  identity_hash (sha256 of prompts/cayce-identity.md) before anything
  else happens. Fail-closed: if staging fails, the event is discarded,
  never published.
- CAYCE_PUBLISH_MODE=live: original behavior, unchanged (reversible with
  one line per service .env).
- Chokepoint: the nostr daemon /publish endpoint gates ALL callers
  (initiative publish_note, core.mjs ×4, banner kind 0); the daemon own
  mention-reply path gates too, storing original_event for context;
  startup profile publish gates as well. DM-to-supervisor (/dm) is
  internal and stays live.

Identity (point 8b):
- prompts/cayce-identity.md: the 5 hardcoded voice blocks extracted
  VERBATIM (verified byte-identical by runtime test) with block markers.
- core.mjs / editorials.mjs now load their voice blocks from this file
  (loadIdentityBlock); identity hash recorded on every draft.
- runtime/ holds the versioned copies of the previously-unversioned
  runtime scripts + deploy.sh installer.

No timers enabled or disabled. No production data modified.
Some required checks failed
ci / lint-test-leaks (pull_request) Canceled after 0s
This branch is already included in the target branch. There is nothing to merge.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin containment-outbox:containment-outbox
git checkout containment-outbox
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cayce/cayce-ops#18