Skip to content

Ship recurring Gmail drafts as the first complete delegation proof #130

Description

@George-RD

Why

Gmail remains the right first vertical proof because the selected-thread read, draft generation, exact preview, digest-bound approval, and real draft write already exist. It is not the architecture. This issue starts only after the protocol-neutral contracts and execution/scope/control/evaluation foundations are complete.

The proof must demonstrate OpenSpine's product promise end to end:

one bounded task → repeated exact approvals → truthful responsibility proposal → reviewed activation → less interruption on matching work → clear fallback and control.

It must create a real Gmail draft on the reusable path. A proposal message or standing-rule row alone is not the proof.

Preconditions

Requires:

Issue #118 should make the first task easy to reach for users, but its full onboarding polish is not a code prerequisite for this runtime proof.

Selected responsibility

Initial reviewed scope should be deliberately narrow and understandable. The design should default to:

  • one configured Gmail connector instance;
  • one owner mailbox;
  • one bound counterparty/relationship;
  • the existing selected-thread reply-draft workflow;
  • draft creation only;
  • conservative quota/rate and lapse-after-unused expiry;
  • no final send;
  • no dark-window Allow in the first proof unless Define the protocol-neutral responsibility contract above standing rules #126 separately settles and permits it.

Whether a new thread with the same bound relationship matches must be an explicit reviewed scope choice, not an implementation accident.

End-to-end sequence

  1. The owner selects a Gmail thread through the existing trusted selection path.
  2. Lyra reads only that thread, drafts a reply, and shows the exact payload and target.
  3. The owner approves the exact draft; the shared executor creates it.
  4. A later approval in the same kernel-resolved context class creates sufficient repeated-approval evidence.
  5. The miner proposes a reusable responsibility with the real evidence summary, exact scope, effect, budget, expiry, and blocked actions.
  6. The exact proposal is structurally judged and replayed/simulated against its positive evidence and changed-context cases; stored verdicts bind the proposal/runtime compatibility.
  7. The owner may approve, reject, or request a narrower immutable version.
  8. On a later matching task, the normal grant still marks draft creation approval-required; scoped standing-rule mediation reserves budget and the same executor creates the draft without another per-instance approval.
  9. Lyra sends a concise receipt naming the responsibility/version, target, and remaining budget.
  10. Changed scope, budget saturation, pause, expiry, drift, policy change, or revocation restores ordinary approval/denial before any effect.

Required owner-path tests

Positive path

  • two distinct exact approvals in the same context class produce one reviewable candidate;
  • proposal-specific structural/replay verdicts pass and bind the exact reviewed version;
  • approval activates the exact reviewed version;
  • the next matching task creates one real Gmail draft without a per-instance approval;
  • the task grant remains the only live authority object;
  • the receipt is concise, truthful, and audit-linked.

Scope fallback

  • different Gmail account/connector instance;
  • different mailbox;
  • different bound counterparty;
  • changed recipient after preview;
  • target/counterparty becomes unresolved or erased;
  • foreign/expired/used selection token;
  • scope descriptor/version drift;
  • ambiguous overlap with another scoped rule.

Each must require normal approval or deny before reservation/effect.

Budget and lifecycle fallback

  • quota exhausted;
  • rate exhausted;
  • pause;
  • expiry;
  • drift/needs-review;
  • revoke;
  • active policy change;
  • connector removal/reconfiguration;
  • stale evaluation verdict after a compatibility epoch changes.

Each must avoid unintended effect and produce the correct short exception surface.

Effect correctness

  • same executor under per-instance and standing-rule admission;
  • double-tap/replay remains idempotent;
  • target/payload mutation fails;
  • confirmed pre-effect connector failure releases budget;
  • delivery unknown fences retry and retains truthful budget/audit state;
  • audit failure prevents or truthfully fences the effect according to existing ordering.

Owner-surface correctness

  • Telegram and terminal can review/decide the same responsibility;
  • Reject activates nothing;
  • narrow/amend creates a new version and new evaluation binding;
  • Pause/Resume/Revoke act immediately and are replay-safe;
  • no internal ontology is required to make the correct decision;
  • review text says only what the actual evidence/verdicts prove.

Documentation truth gate

Only after the complete positive owner path passes may the capability map move generic progressive delegation to Wired into Lyra. Documentation must say:

  • progressive delegation is the capability;
  • recurring Gmail draft is the first proof;
  • only the reviewed Gmail scope is shipped;
  • other protocols require their own connector/action conformance and owner-path proof;
  • email send remains denied.

Done when

  • A real reusable Gmail draft is created through the same executor as exact approval.
  • Every listed changed-context and lifecycle case falls back before effect.
  • Owner controls and receipts work through the generic review model.
  • Proposal-specific evaluation is real, stored, truthful, and compatibility-bound.
  • The complete path has named owner-facing tests used by the checked capability map.
  • README/site/roadmap distinguish the generic capability from the first Gmail proof.

Relationship

Parent: #123.

Requires: #126, #127, #128, #129, and #133.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions