Skip to content

API Reference parrot.flows.dev_loop.sdd_coder.engine

github-actions[bot] edited this page Nov 5, 2026 · 4 revisions

parrot.flows.dev_loop.sdd_coder.engine

View source

SddCoderEngine — stateless-by-design orchestration kernel (FEAT-549, spec §3 M4).

Every call re-reads the per-spec index from the feature worktree. Dispatch is direct per attempt (design research S1) — NOT DevAgentPool.run_wave.

This module implements the READ side (plan, prepare_native) and the CONSOLIDATION side (merge, cleanup, orphan discovery, journal) of the engine. The DISPATCH side (run_chunk, wait, _run_attempt, _research_for, _labels_for, AttemptTelemetryCollector) is stubbed here and filled in by TASK-3121 — the signatures below are final.

Alias AttemptContext

Re-exported from parrot.flows.dev_loop.test_scope.datatypes.AttemptContext.

Alias AttemptRecord

Re-exported from parrot.flows.dev_loop.sdd_coder.models.AttemptRecord.

Alias AttemptTelemetry

Re-exported from parrot.flows.dev_loop.models.telemetry.AttemptTelemetry.

Class AttemptTelemetryCollector

Duck-typed session host (dispatchers/_shared.py:92-117 -> host.apply(action)).

Captures usage + timing per attempt. dispatch() binds this object as session_host; every dispatch event reaching the bound host is folded into a DevLoopAction and handed to apply() — only DispatchCompleted carries usage (session_state.py:476-484), so every other action kind is a no-op here.

Parameter Type Default Description
attempt int
seat RosterSeat
attempt_uid Optional[str] None
job_id Optional[str] None
execution_id Optional[str] None

Attributes:

Attribute Type Description
usage Dict[str, Any]
error_class Set by _run_attempt's except block alongside .error. Used by record() only as a fallback when on_attempt_telemetry never fired (a pre-dispatch failure), since AttemptTelemetry.error_class is normally the source of truth.
telemetry Optional[Any]
declared_files Optional[int]
declared_files_known bool

Method AttemptTelemetryCollector.on_attempt_telemetry

Receive the dispatcher's terminal telemetry (FEAT-554, spec §10 R3).

Called by LLMCodeDispatcher._emit_attempt_telemetry through the bound session host. Separate from apply() because this payload deliberately does NOT travel as a DispatchCompleted action: that projection copies only seven whitelisted usage scalars and swallows validation errors, so a per-turn series or a budget report would vanish in silence.

on_attempt_telemetry(telemetry: AttemptTelemetry) -> None

Parameter Type Default Description
telemetry AttemptTelemetry

Method AttemptTelemetryCollector.apply

Called by _apply_to_session_host for every dispatch event. Keep only usage from 'dispatch/completed'.

apply(action: Any, origin: Any = None) -> None

Parameter Type Default Description
action Any
origin Any None

Method AttemptTelemetryCollector.record

record() -> AttemptRecord

Returns: AttemptRecord

Attribute BG_WAIT_MAX_TIMEOUT_S

Type: int

Attribute BG_WAIT_MIN_TIMEOUT_S

Type: int

Attribute BG_WAIT_POLL_INTERVAL_S

Type: float

Alias BackgroundBudgetExceededError

Re-exported from parrot.flows.dev_loop.sdd_coder.background.BackgroundBudgetExceededError.

Alias BackgroundConflictError

Re-exported from parrot.flows.dev_loop.sdd_coder.background.BackgroundConflictError.

Alias BackgroundNotFoundError

Re-exported from parrot.flows.dev_loop.sdd_coder.background.BackgroundNotFoundError.

Alias BackgroundRegistration

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.BackgroundRegistration.

Alias BackgroundRegistry

Re-exported from parrot.flows.dev_loop.sdd_coder.background.BackgroundRegistry.

Alias BackgroundStatus

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.BackgroundStatus.

Alias ChunkAssigner

Re-exported from parrot.flows.dev_loop.sdd_coder.roster.ChunkAssigner.

Alias CleanupReport

Re-exported from parrot.flows.dev_loop.sdd_coder.models.CleanupReport.

Class CoderFailure

Domain failure; code ∈ ERROR_CODES (toolkit maps it to CoderResult.error).

Parameter Type Default Description
code str
message str
**details Any {}

Alias CoderFeedback

Re-exported from parrot.knowledge.wiki.ledger.coder_feedback.CoderFeedback.

Alias CoderFeedbackReceipt

Re-exported from parrot.knowledge.wiki.ledger.coder_feedback.CoderFeedbackReceipt.

Alias CoderFeedbackStore

Re-exported from parrot.knowledge.wiki.ledger.coder_feedback.CoderFeedbackStore.

Alias CoderJob

Re-exported from parrot.flows.dev_loop.sdd_coder.models.CoderJob.

Alias CoderPlan

Re-exported from parrot.flows.dev_loop.sdd_coder.models.CoderPlan.

Alias CoderReview

Re-exported from parrot.knowledge.wiki.ledger.coder_reviews.CoderReview.

Alias CoderReviewMeasurement

Re-exported from parrot.knowledge.wiki.ledger.coder_reviews.CoderReviewMeasurement.

Alias CoderReviewReport

Re-exported from parrot.knowledge.wiki.ledger.coder_reviews.CoderReviewReport.

Alias CoderReviewStore

Re-exported from parrot.knowledge.wiki.ledger.coder_reviews.CoderReviewStore.

Alias CoderSuspensionStore

Re-exported from parrot.knowledge.wiki.ledger.coder_suspensions.CoderSuspensionStore.

Alias CoderTelemetrySink

Re-exported from parrot.flows.dev_loop.sdd_coder.telemetry.CoderTelemetrySink.

Alias ComplexityAssessment

Re-exported from parrot.flows.dev_loop.sdd_coder.complexity_models.ComplexityAssessment.

Alias ComplexityBlock

Re-exported from parrot.flows.dev_loop.sdd_coder.complexity_models.ComplexityBlock.

Alias ComplexityContractError

Re-exported from parrot.flows.dev_loop.sdd_coder.complexity.ComplexityContractError.

Alias DEFAULT_LLM_TURNS_PER_FILE

Re-exported from parrot.flows.dev_loop.agent_builder.DEFAULT_LLM_TURNS_PER_FILE.

Alias DevAgentSpec

Re-exported from parrot.flows.dev_loop.models.DevAgentSpec.

Alias DevelopmentOutput

Re-exported from parrot.flows.dev_loop.models.DevelopmentOutput.

Alias DispatchCompleted

Re-exported from parrot.flows.dev_loop.session_state.DispatchCompleted.

Alias DispatchLabels

Re-exported from parrot.flows.dev_loop.models.DispatchLabels.

Alias ENV_LLM_TURNS_PER_FILE

Re-exported from parrot.flows.dev_loop.agent_builder.ENV_LLM_TURNS_PER_FILE.

Alias EventRegistry

Re-exported from parrot.core.events.lifecycle.EventRegistry.

Alias EvidenceConflictError

Re-exported from parrot.flows.dev_loop.sdd_coder.evidence.EvidenceConflictError.

Alias EvidenceCorruptionError

Re-exported from parrot.flows.dev_loop.sdd_coder.evidence.EvidenceCorruptionError.

Alias EvidenceRef

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.EvidenceRef.

Alias ExecutionEvidenceStore

Re-exported from parrot.flows.dev_loop.sdd_coder.evidence.ExecutionEvidenceStore.

Alias ExecutionPool

Re-exported from parrot.flows.dev_loop.sdd_coder.pool.ExecutionPool.

Alias ExecutionPoolView

Re-exported from parrot.flows.dev_loop.sdd_coder.models.ExecutionPoolView.

Alias ExecutionSnapshot

Re-exported from parrot.flows.dev_loop.sdd_coder.models.ExecutionSnapshot.

Attribute GIT_TIMEOUT_S

Type: float

Alias JobTable

Re-exported from parrot.flows.dev_loop.sdd_coder.jobs.JobTable.

Attribute MERGE_LOCK_TIMEOUT_S

Type: float

Alias ModelKey

Re-exported from parrot.knowledge.wiki.ledger.coder_suspensions.ModelKey.

Alias NativeObservation

Re-exported from parrot.flows.dev_loop.sdd_coder.models.NativeObservation.

Alias NativePrep

Re-exported from parrot.flows.dev_loop.sdd_coder.models.NativePrep.

Alias OrphanBranch

Re-exported from parrot.flows.dev_loop.sdd_coder.models.OrphanBranch.

Alias OutcomeRow

Re-exported from parrot.flows.dev_loop.sdd_coder.telemetry.OutcomeRow.

Alias PlannedTask

Re-exported from parrot.flows.dev_loop.sdd_coder.models.PlannedTask.

Alias ResearchOutput

Re-exported from parrot.flows.dev_loop.models.ResearchOutput.

Alias RosterConfig

Re-exported from parrot.flows.dev_loop.sdd_coder.models.RosterConfig.

Alias RosterProbe

Re-exported from parrot.flows.dev_loop.sdd_coder.roster.RosterProbe.

Alias RosterSeat

Re-exported from parrot.flows.dev_loop.sdd_coder.models.RosterSeat.

Alias SPEC_USAGE_SUBDIR

Re-exported from parrot.observability.recorders.spec_usage.SPEC_USAGE_SUBDIR.

Class SddCoderEngine

See spec §3 M4 for the method contracts.

Stateless-by-design: every call re-reads the per-spec index. The only state kept across calls is the probed roster/assigner (cached by open()), the job table, and the SubWorktreeManager instances keyed by "<TASK-NNN>.a<attempt>" — one manager per attempt so a merge only ever touches that attempt's own branch.

Parameter Type Default Description
roster RosterConfig
probe Optional[RosterProbe] None
redis_url Optional[str] None
worktree_base_path Optional[str] None
dispatcher_builder Callable[..., Any] build_dispatcher
stream_ttl_seconds int 3600
telemetry_dir Optional[str] None

Attributes:

Attribute Type Description
seats List[RosterSeat]
probe_results List[SeatProbeResult]

Method SddCoderEngine.open

Probe once; cache seats/assigner. Idempotent. Raises roster_empty when nothing is available.

NOTE: This is the legacy initialization path. For FEAT-559 execution pools, use begin_execution() instead, which reads history before probing.

open() -> None

Method SddCoderEngine.begin_execution

Begin a new execution with history-gated startup (FEAT-559 M3).

Reads durable suspension history BEFORE probing. Binds execution_id immutably to the canonical worktree path. Only one active execution may own a canonical worktree at a time.

begin_execution(feature: str, worktree: str, execution_id: str) -> 'ExecutionPoolView'

Parameter Type Default Description
feature str Feature identifier (matches per-spec index header).
worktree str Absolute path to the feature worktree.
execution_id str Caller-generated UUID for this execution.

Returns: 'ExecutionPoolView' — ExecutionPoolView with the execution's initial state.

Raises:

  • CoderFailure with codes —
  • execution_in_progress: another execution already owns this worktree
  • execution_scope_mismatch: resuming with different feature/worktree
  • execution_config_mismatch: roster changed since execution was created
  • execution_closed: trying to resume a closed execution for new work
  • suspension_history_unavailable: cannot read durable history (fallback_required)

Method SddCoderEngine.end_execution

End an execution, releasing worktree ownership.

Refuses while known attempts/reservations are in flight. Records a durable close after they settle.

end_execution(execution_id: str) -> 'ExecutionPoolView'

Parameter Type Default Description
execution_id str The execution to close.

Returns: 'ExecutionPoolView' — ExecutionPoolView with final state (status='closed').

Raises:

  • CoderFailure with codes —
  • execution_not_found: unknown execution_id
  • execution_busy: attempts/jobs still in flight

Method SddCoderEngine.bg_status

Read known state and a bounded registered log without waiting for completion (spec R8).

handle is never adopted from an unregistered value -- it only resolves against a launch THIS engine (or a prior instance sharing the SAME durable store) actually registered. Owning a handle string alone does not skip the ownership check: a handle THIS engine instance registered under a different execution_id is rejected before the registry is even consulted.

bg_status(execution_id: str, handle: str, since_revision: Optional[int] = None, tail_bytes: int = 2048) -> BackgroundStatus

Parameter Type Default Description
execution_id str The execution that must own this handle.
handle str The opaque handle emitted at registration time.
since_revision Optional[int] None When equal to the record's current revision, the log tail is omitted and changed=False.
tail_bytes int 2048 Bounded registered-log tail to read, 0..4096.

Returns: BackgroundStatus

Raises:

  • CoderFailure with codes —
  • background_status_unavailable: no durable background registry is configured for this engine, or the read exceeded its 1s I/O budget
  • execution_not_found: unknown execution_id
  • background_scope_mismatch: handle registered under a different execution_id
  • background_not_found: no registration exists for (execution_id, handle)
  • background_source_unsupported: the registration is an unsupported external ("host_bridge") source with no verified receipt bridge

Method SddCoderEngine.bg_wait

Block up to timeout_seconds for a background handle to leave pending/running.

bg_status is deliberately non-blocking, and wait() only accepts a chunk job_id -- so a caller holding a coder_run_validation handle had no sanctioned way to wait at all: a background validation is a process this server owns, it raises no host-level task notification, and the orchestrator prompt forbids shell sleep/ps loops. That left ending the turn as the only option, which stalls an unattended run until a human pokes it. This method is that missing primitive, mirroring wait()'s own bounded-blocking contract.

Ownership, scope and existence are checked BEFORE any waiting (a foreign or unknown handle fails immediately, it never blocks), and the returned snapshot is always bg_status's own authoritative one: state="finished" still reports a receipt, not success -- inspect outcome/exit_code. Expiring the budget returns the last known non-terminal snapshot; it never cancels the run, never kills the child and never resurrects a state from an absent process or an empty log.

bg_wait(execution_id: str, handle: str, timeout_seconds: int = 120, since_revision: Optional[int] = None, tail_bytes: int = 2048) -> BackgroundStatus

Parameter Type Default Description
execution_id str The execution that must own this handle.
handle str The opaque handle emitted at registration time.
timeout_seconds int 120 Blocking budget, 1..300.
since_revision Optional[int] None Forwarded to bg_status for the returned snapshot.
tail_bytes int 2048 Forwarded to bg_status, 0..4096.

Returns: BackgroundStatus

Raises:

  • CoderFailure — every code bg_status itself raises, plus invalid_arguments when timeout_seconds is out of range.

Method SddCoderEngine.run_validation

Admit only a declared, protected, idempotent validation selection (spec R8).

Delegates process ownership entirely to ValidationSupervisor.start() (protected argv, bounded log, deadline, terminal receipt); this method only establishes feature/execution ownership and validates that task_ids are actually declared in the current per-spec index before anything is admitted.

run_validation(feature: str, worktree: str, execution_id: str, task_ids: List[str], tier: Literal['task', 'merge', 'feature'], timeout_seconds: int, request_id: str, *, attempt_uid: Optional[str] = None, base_ref: Optional[str] = None) -> BackgroundRegistration

Parameter Type Default Description
feature str Feature identifier (matches per-spec index header).
worktree str Absolute path to the feature worktree.
execution_id str The execution that must own this worktree.
task_ids List[str] Declared TASK ids this validation covers.
tier Literal['task', 'merge', 'feature'] 'task' (one task, its attempt worktree, FEAT-709), 'merge' (changed-scope) or 'feature' (full applicable set).
timeout_seconds int Explicit deadline, 1..7200.
request_id str Stable id providing idempotency for a repeated call.
attempt_uid Optional[str] None Required for tier='task': the attempt being validated.
base_ref Optional[str] None Diff base for tier='task' (the fork SHA); resolved from the attempt branch when omitted.

Returns: BackgroundRegistration

Raises:

  • CoderFailure with codes —
  • worktree_outside_base / feature_not_found: from _resolve_feature
  • execution_not_found / execution_scope_mismatch: foreign/unknown execution
  • background_status_unavailable: no durable validation supervisor configured
  • validation_scope_invalid: a task_id is not declared in the index, or tier='feature' was called without the full applicable task set
  • validation_request_conflict: request_id reused with a different payload
  • invalid_arguments: a malformed request the supervisor itself rejected

Method SddCoderEngine.record_native_observation

Validate an issued native attempt and persist an observation, not acceptance.

Persists a delivery.observed WorkflowEvent (source="worker_observation") keyed to the attempt's own task_id/attempt_uid, once identity has been checked against THIS engine's own bookkeeping. A foreign execution, an attempt this execution never issued for that task, or a repeated event_id reported with different content are all rejected BEFORE anything is written (spec R3: "Rechaza identidades ajenas y payloads incompatibles repetidos"). Never releases the attempt's pool reservation and never calls merge()/_consolidate -- an observation is evidence, not acceptance (spec: "no libera reservas ... no sustituye coder_merge").

record_native_observation(feature: str, worktree: str, execution_id: str, observation: dict[str, object]) -> EvidenceRef

Parameter Type Default Description
feature str Feature identifier (matches per-spec index header).
worktree str Absolute path to the feature worktree.
execution_id str The execution that must own both the worktree and the referenced native reservation.
observation dict[str, object] Raw MCP payload; validated here against NativeObservation independently of any upstream toolkit-level schema check (this method is also called directly by tests).

Returns: EvidenceRef — The durable EvidenceRef for the appended (or already-idempotent) event.

Raises:

  • CoderFailure with codes —
  • evidence_invalid: observation fails schema validation
  • execution_not_found: unknown execution_id
  • execution_scope_mismatch: execution bound to a different feature/worktree
  • attempt_not_found: attempt_uid is not an issued native reservation for task_id
  • observation_conflict: event_id already recorded with different content
  • evidence_persistence_failed: durable evidence store unavailable or write failed

Method SddCoderEngine.task_context

Read-only snapshot of task/index/dependency/contract state (spec §3 M1b/R1b).

Delegates the actual projection to inspection.task_context once feature resolution and execution ownership are established here -- never modifies the per-spec index, never marks a task ready on trust, never duplicates check_fidelity's policy.

task_context(feature: str, worktree: str, task_id: str, execution_id: str) -> Dict[str, Any]

Parameter Type Default Description
feature str Feature identifier (matches per-spec index header).
worktree str Absolute path to the feature worktree.
task_id str The TASK id to inspect.
execution_id str The execution that must own this worktree.

Returns: Dict[str, Any] — A bounded snapshot dict (spec AC4/AC5: "16KiB"); see inspection.task_context for its exact shape.

Raises:

  • CoderFailure with codes —
  • worktree_outside_base / feature_not_found: from _resolve_feature
  • execution_not_found / execution_scope_mismatch: foreign/unknown execution
  • evidence_persistence_failed: no durable evidence store is configured
  • index_unreadable: the per-spec index is missing or unreadable
  • task_not_in_plan: task_id is not declared in the per-spec index

Method SddCoderEngine.delivery_report

Read-only projection of a task's latest execution-owned attempt (spec §3 M1b/R1b).

Delegates the actual projection to inspection.delivery_report once feature resolution and execution ownership are established here. Never runs git merge, autofix, lint, tests or a fresh validation, and never approves a delivery -- absent evidence is reported as "unknown", never fabricated as a pass.

delivery_report(feature: str, worktree: str, task_id: str, execution_id: str) -> Dict[str, Any]

Parameter Type Default Description
feature str Feature identifier (matches per-spec index header).
worktree str Absolute path to the feature worktree.
task_id str The TASK id to inspect.
execution_id str The execution that must own this worktree AND the attempt branch being reported on (a foreign execution's attempt is never adopted -- see inspection._discover_attempt_branch).

Returns: Dict[str, Any] — A bounded snapshot dict (spec AC4/AC5: "16KiB"); see inspection.delivery_report for its exact shape.

Raises:

  • CoderFailure with codes —
  • worktree_outside_base / feature_not_found: from _resolve_feature
  • execution_not_found / execution_scope_mismatch: foreign/unknown execution
  • evidence_persistence_failed: no durable evidence store is configured
  • index_unreadable: the per-spec index is missing or unreadable
  • task_not_in_plan: task_id is not declared in the per-spec index
  • branch_not_found: no execution-owned attempt branch exists for task_id

Method SddCoderEngine.plan

Compute the next wave plan for a feature.

plan(feature: str, worktree: str, *, execution_id: Optional[str] = None) -> CoderPlan

Parameter Type Default Description
feature str Feature identifier.
worktree str Absolute path to the feature worktree.
execution_id Optional[str] None Optional execution ID for FEAT-559 pools. When provided, uses the execution's private assigner and carries execution_id in the returned plan. When omitted, uses the legacy global assigner.

Returns: CoderPlan — CoderPlan with the next wave of tasks.

Method SddCoderEngine.prepare_native

Sub-worktree for a native planned task (attempt 1); branch <feature_branch>---a1[-].

FEAT-559: when execution_id is given, the native seat's model identity is admitted through the execution's pool BEFORE the worktree is created (so a suspended/excluded native seat is rejected up front, not discovered later), and a duplicate call for the same (execution, task) reuses the existing reservation/attempt instead of admitting (and worktree-creating) twice.

prepare_native(feature: str, worktree: str, task_id: str, execution_id: Optional[str] = None) -> NativePrep

Parameter Type Default Description
feature str
worktree str
task_id str
execution_id Optional[str] None

Returns: NativePrep

Method SddCoderEngine.suspend_model

Report a WORKER-observed failure for one of ITS OWN admitted attempts (spec §2 M3).

The target model is resolved SERVER-SIDE from attempt_uid via the pool's own admission record (ExecutionPool._admitted) -- the caller never names a model directly, so it cannot invent or cross-execution an arbitrary suspension target. Delegates all local-exclusion/generation/persistence mechanics to ExecutionPool.suspend() (TASK-3276) rather than duplicating them here.

Constrained to valid worker-report sources (spec: "constrain worker reports to valid native/critical-review sources"): a native attempt may report any reason; an MCP attempt may only report review_critical (any other MCP failure is the engine's own internal _classify_and_suspend, never a worker-initiated report).

suspend_model(execution_id: str, attempt_uid: str, reason: str, evidence_ref: str) -> SuspensionReceipt

Parameter Type Default Description
execution_id str The execution owning attempt_uid.
attempt_uid str The attempt that failed, as issued by prepare_native/pool.admit.
reason str One of SuspensionReason.
evidence_ref str A short reference (log path, commit sha), never a transcript.

Returns: SuspensionReceipt

Raises:

  • CoderFailure with codes —
  • execution_not_found: unknown execution_id
  • attempt_not_found: attempt_uid is not an admitted reservation in this execution
  • invalid_arguments: reason is not a valid SuspensionReason, or an MCP attempt reported a reason other than review_critical

Method SddCoderEngine.record_feedback

Persist a reviewed correction after checking its attempt/model attribution.

FEAT-559: when execution_id is given, it is attached to feedback (rejecting a caller-supplied feedback.execution_id that conflicts with it) before recording.

record_feedback(feature: str, worktree: str, feedback: CoderFeedback, execution_id: Optional[str] = None) -> CoderFeedbackReceipt

Parameter Type Default Description
feature str
worktree str
feedback CoderFeedback
execution_id Optional[str] None

Returns: CoderFeedbackReceipt

Method SddCoderEngine.record_review

Measure a reviewed delivery and validate its review-fix commits.

FEAT-559: when execution_id is given, it is attached to review (rejecting a caller-supplied review.execution_id that conflicts with it) before recording.

record_review(feature: str, worktree: str, review: CoderReview, execution_id: Optional[str] = None) -> CoderFeedbackReceipt

Parameter Type Default Description
feature str
worktree str
review CoderReview
execution_id Optional[str] None

Returns: CoderFeedbackReceipt

Method SddCoderEngine.feedback_report

Return repository-wide review-fix rates by model and exposure cohort.

feedback_report(feature: str, worktree: str) -> CoderReviewReport

Parameter Type Default Description
feature str
worktree str

Returns: CoderReviewReport

Method SddCoderEngine.merge

Consolidate the task's LATEST attempt branch (native tasks; re-merge after Sonnet fixed a conflict).

FEAT-559: when execution_id is given, only that execution's OWN managers are considered -- never another execution's, nor the legacy/no-execution scope.

merge(feature: str, worktree: str, task_id: str, execution_id: Optional[str] = None) -> TaskResult

Parameter Type Default Description
feature str
worktree str
task_id str
execution_id Optional[str] None

Returns: TaskResult

Method SddCoderEngine.cleanup

Remove finished sub-worktrees THIS execution created; never touches orphan branches it never adopted.

FEAT-559: when execution_id is given, only managers created under that exact execution scope are enumerated -- another execution's (or the legacy/ no-execution scope's) managers, native reservations and jobs are untouched, even if they belong to the same engine instance/worktree.

FEAT-584 M8/R8: also refuses (execution_busy) while THIS execution has an admitted validation that has not settled -- same gate end_execution applies, so a worktree a background validation is still reading is never removed out from under it.

cleanup(feature: str, worktree: str, keep_conflicted: bool = True, execution_id: Optional[str] = None) -> CleanupReport

Parameter Type Default Description
feature str
worktree str
keep_conflicted bool True
execution_id Optional[str] None

Returns: CleanupReport

Method SddCoderEngine.status

Get job status and flush any pending execution snapshots (TASK-3282).

Retries pending suspension persistence idempotently; exposes latest pool state and degraded persistence status if applicable.

status(job_id: str) -> CoderJob

Parameter Type Default Description
job_id str

Returns: CoderJob

Method SddCoderEngine.aclose

Unregister and flush the engine-scoped usage sink (FEAT-783 M7). Fail-open, idempotent.

aclose() -> None

Method SddCoderEngine.run_chunk

Validate, register, RETURN. Everything slow happens inside the job (S4, AC-21).

run_chunk(feature: str, worktree: str, task_ids: List[str], execution_id: Optional[str] = None) -> CoderJob

Parameter Type Default Description
feature str Feature identifier.
worktree str Absolute path to the feature worktree.
task_ids List[str] List of task IDs to dispatch.
execution_id Optional[str] None Optional execution ID for FEAT-559 pools. When provided, validates against the execution pool and carries execution ownership.

Returns: CoderJob

Raises:

  • CoderFailure with codes —
  • plan_stale: cached plan's pool_generation doesn't match current pool
  • execution_not_found: execution_id provided but no matching pool

Method SddCoderEngine.wait

wait(job_id: str, timeout_seconds: int) -> CoderJob

Parameter Type Default Description
job_id str
timeout_seconds int

Returns: CoderJob

Alias SeatBusyError

Re-exported from parrot.flows.dev_loop.sdd_coder.pool.SeatBusyError.

Alias SeatProbeResult

Re-exported from parrot.flows.dev_loop.sdd_coder.models.SeatProbeResult.

Alias SpecUsageRecorder

Re-exported from parrot.observability.recorders.spec_usage.SpecUsageRecorder.

Alias SubWorktreeManager

Re-exported from parrot.flows.dev_loop.worktree_manager.SubWorktreeManager.

Alias SubWorktreeMergeError

Re-exported from parrot.flows.dev_loop.worktree_manager.SubWorktreeMergeError.

Alias SuspensionReason

Re-exported from parrot.knowledge.wiki.ledger.coder_suspensions.SuspensionReason.

Alias SuspensionReceipt

Re-exported from parrot.knowledge.wiki.ledger.coder_suspensions.SuspensionReceipt.

Alias SuspensionRecord

Re-exported from parrot.knowledge.wiki.ledger.coder_suspensions.SuspensionRecord.

Alias TaskResult

Re-exported from parrot.flows.dev_loop.sdd_coder.models.TaskResult.

Alias TaskScheduler

Re-exported from parrot.flows.dev_loop.task_scheduler.TaskScheduler.

Alias TaskScopedBrief

Re-exported from parrot.flows.dev_loop.models.TaskScopedBrief.

Alias UsageAttribution

Re-exported from parrot.observability.attribution.UsageAttribution.

Alias UsageRecordingSubscriber

Re-exported from parrot.observability.recorders.subscriber.UsageRecordingSubscriber.

Alias VERDICT_SCHEMA

Re-exported from parrot.flows.dev_loop.test_scope.verdict.VERDICT_SCHEMA.

Alias ValidationSupervisor

Re-exported from parrot.flows.dev_loop.sdd_coder.background.ValidationSupervisor.

Alias ValidationVerdict

Re-exported from parrot.flows.dev_loop.test_scope.datatypes.ValidationVerdict.

Alias ValidationVerdictModel

Re-exported from parrot.flows.dev_loop.sdd_coder.models.ValidationVerdictModel.

Alias WorkflowEvent

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.WorkflowEvent.

Alias apply_effort_to_profile

Re-exported from parrot.flows.dev_loop.sdd_coder.effort.apply_effort_to_profile.

Alias available_seats

Re-exported from parrot.flows.dev_loop.sdd_coder.roster.available_seats.

Alias build_attempt_row

Re-exported from parrot.flows.dev_loop.sdd_coder.telemetry.build_attempt_row.

Alias build_dispatcher

Re-exported from parrot.flows.dev_loop.agent_builder.build_dispatcher.

Alias check_banned_imports

Re-exported from parrot.flows.dev_loop.sdd_coder.fidelity.check_banned_imports.

Alias check_fidelity

Re-exported from parrot.flows.dev_loop.sdd_coder.fidelity.check_fidelity.

Alias collect_complexity

Re-exported from parrot.flows.dev_loop.sdd_coder.complexity_collectors.collect_complexity.

Alias conf

Re-exported from parrot.conf.

Alias effective_key

Re-exported from parrot.flows.dev_loop.sdd_coder.pool.effective_key.

Alias eligible_seats

Re-exported from parrot.flows.dev_loop.sdd_coder.roster.eligible_seats.

Alias estimate_tokens

Re-exported from parrot.knowledge.wiki.store.estimate_tokens.

Alias evaluate_complexity

Re-exported from parrot.flows.dev_loop.sdd_coder.complexity.evaluate_complexity.

Alias get_global_registry

Re-exported from parrot.core.events.lifecycle.get_global_registry.

Alias git_env

Re-exported from parrot.flows.dev_loop.procs.git_env.

Alias is_protected_sdd_path

Re-exported from parrot.flows.dev_loop.sdd_coder.fidelity.is_protected_sdd_path.

Alias iter_index_files

Re-exported from parrot.flows.dev_loop.task_scheduler.iter_index_files.

Alias load_registry

Re-exported from parrot.flows.dev_loop.test_scope.runners.registry.load_registry.

Alias parse_task_files

Re-exported from parrot.flows.dev_loop.sdd_coder.fidelity.parse_task_files.

Alias read_spec_usage

Re-exported from parrot.observability.recorders.spec_usage.read_spec_usage.

Alias render_for_prompt

Re-exported from parrot.flows.dev_loop.test_scope.verdict.render_for_prompt.

Alias resolve_durable_root

Re-exported from parrot.flows.dev_loop.sdd_coder.telemetry.resolve_durable_root.

Alias resolve_native_effort

Re-exported from parrot.flows.dev_loop.sdd_coder.effort.resolve_native_effort.

Alias resolve_seat_effort_with_source

Re-exported from parrot.flows.dev_loop.sdd_coder.effort.resolve_seat_effort_with_source.

Alias roster_fingerprint

Re-exported from parrot.flows.dev_loop.sdd_coder.pool.roster_fingerprint.

Alias run_bounded

Re-exported from parrot.flows.dev_loop.procs.run_bounded.

Alias run_lint_pass

Re-exported from parrot.flows.dev_loop.sdd_coder.lint.run_lint_pass.

Alias scaled_max_turns

Re-exported from parrot.flows.dev_loop.agent_builder.scaled_max_turns.

Alias usage_attribution

Re-exported from parrot.observability.context.usage_attribution.

Alias validate_complexity_snapshot

Re-exported from parrot.flows.dev_loop.sdd_coder.complexity_collectors.validate_complexity_snapshot.

Alias verdict_to_json

Re-exported from parrot.flows.dev_loop.test_scope.verdict.verdict_to_json.

Alias write_attempt_context

Re-exported from parrot.flows.dev_loop.test_scope.context.write_attempt_context.

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