Skip to content

Introduce a capability-negotiated Coven launch adapter without persisting prompts #279

Description

@BunsDev

Outcome

Route Psyche Build provider launches through Coven as a bounded, compatibility-negotiated product adapter without exposing composer prompts in process arguments, persisted pane launch metadata, or unsupported provider choices.

Control metadata

Current gap

PR #277 replaces direct Codex, Claude, Copilot, and Grok launches with coven run <provider> -- <prompt>. That establishes the desired runtime direction, but the current slice also:

  • places the full composer prompt in thread.launch.args, which is retained in the in-memory/persisted launch model and exposed through process argv;
  • makes every provider launch depend on any discovered coven executable without negotiating a compatible CLI/profile version;
  • renders provider options without querying Coven's installed/available adapter capabilities;
  • treats PTY creation as launch success even when Coven may immediately reject an unavailable harness or incompatible command;
  • removes the direct-provider path without an explicit migration, fallback, or rollback contract;
  • includes unrelated Git-inspection test hardening in the same PR.

Required design

  • Define the product-to-Coven launch contract and immutable compatibility/canary version.
  • Add a machine-readable Coven capability query for supported harness IDs and launch features.
  • Show only capabilities confirmed by the selected Coven executable/profile.
  • Transport prompts through a bounded private channel that does not place raw prompt text in process argv or durable pane launch metadata.
  • Persist only a prompt reference/digest and canonical Coven session identity where needed for recovery.
  • Distinguish spawned, accepted, running, terminal failure, and recovery_required; PTY creation alone is not execution acceptance.
  • Preserve project/worktree scope and canonical runtime receipts.
  • Define behavior when Coven is missing, too old, unavailable, revoked, or lacks the requested adapter.
  • Define a reversible migration from direct provider launch behavior.
  • Split unrelated Git-inspection test changes into their own focused PR.

Authority boundary

Psyche Build selects a project/worktree and requests a launch. Coven owns runtime/session execution and adapter capability. Neither executable discovery, UI selection, tmux/PTY identity, nor a provider-local session ID proves protocol identity or authority. This issue does not claim Psyche conformance; the immutable protocol profile remains gated by #253 and upstream Psyche publication/ownership decisions.

Acceptance criteria

  • No raw composer prompt appears in thread.launch.args, persisted workspace/session metadata, process listings, diagnostics, or support bundles.
  • A pinned compatibility test proves Psyche Build against the exact Coven launch profile it consumes.
  • Unsupported or incompatible providers are absent or explicitly unavailable before prompt submission.
  • An immediately rejected launch does not clear the composer or report success.
  • Restart/reconnect can recover the canonical Coven session without replaying the prompt.
  • Missing/revoked runtime authority fails closed with actionable recovery.
  • Focused exact-head CI and current review findings are complete before merge.

Non-goals

  • Making Psyche Build the runtime authority.
  • Reimplementing Coven's adapter registry.
  • Treating executable presence as compatibility.
  • Keeping prompts in argv merely because the interactive CLI supports positional prompt text.
  • Blocking current stabilization, diagnostics, or iOS delivery on this P2 convergence slice.

Evidence

Link the approved design, Coven capability/profile artifact, focused implementation PRs, prompt-leak regression tests, exact-head CI, rollback proof, and a live reference launch with canonical Coven session/receipt identity.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions