Skip to content

API Reference parrot.e2e.cli

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.e2e.cli

View source

Deterministic E2E gate CLI: run/verify/up/status/logs/down (FEAT-581, M3).

Implements the spec §2 "New Public Interfaces" CLI contract on top of the already-frozen M2/M3 building blocks (:func:parrot.e2e.runner.run_plan, :func:parrot.e2e.evidence.verify_evidence, :class:parrot.e2e.supervisor. E2ESupervisor, :mod:parrot.e2e.state, :mod:parrot.e2e.watchdog). This module owns exactly the process-boundary/CLI concerns those modules deliberately leave open: worktree discovery, owner-identity defaults, argv parsing, JSON-on-stdout / diagnostics-on-stderr framing, exit-code mapping and up's detached daemon.

e2e (this module's :class:click.Group) is registered lazily by core's LazyGroup (packages/ai-parrot/src/parrot/cli/__init__.py); it is never imported at core CLI import time, so a checkout without ai-parrot-server installed still runs every other parrot subcommand.

Every worktree-scoped operation resolves "this worktree" by walking up from the current working directory to the nearest .git entry (a plain directory checkout or a linked worktree's .git file both count) — consistent with :mod:parrot.e2e.state's own sdd/state/e2e/<run_id>.json convention, and never an arbitrary path supplied by CLI input.

up's frozen collaborator, :meth:parrot.e2e.supervisor.E2ESupervisor. start, does not accept a caller-chosen run_id — it always mints its own (<target_id>-<12 hex chars>). This module's own --run-id flag is therefore deliberately reinterpreted as an invocation ticket ID: a stable name for the small JSON handoff file the detached daemon writes once start() returns (success or failure), which this command polls to learn the real, supervisor-minted RunState.run_id it must report back and which status/logs/down are then invoked against. This ticket file lives under artifacts/logs/e2e/_up_tickets/ — never inside :mod:parrot.e2e.state's own sdd/state/e2e/ directory, so it can never be mistaken for a persisted :class:~parrot.e2e.models.RunState by status/down --all/down --stale (which only ever iterate that directory via :func:parrot.e2e.state.list_run_ids).

Function e2e

Deterministic E2E gate: run, verify, up, status, logs, down (FEAT-581).

e2e() -> None

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally