chore(automation): tighten run.py + envelope.py docstrings

Re-apply the trim style after the prior refactor commit re-introduced
a multi-line docstring on AutomationRun.

- AutomationRun: drop the four-line docstring explaining where
  per-step session ids live; move the note to a single-line inline
  comment right above ``step_results`` where it's actionable.
- AutomationDefinition: drop the design-plan cross-reference; the
  module docstring already establishes what the file is.

No behaviour change.
This commit is contained in:
CREDO23 2026-05-27 11:45:04 +02:00
parent 35117a952d
commit a4fbfd8c0d
2 changed files with 4 additions and 7 deletions

View file

@ -1,9 +1,4 @@
"""``automation_runs`` table — immutable per-fire execution record.
Per-step metadata (incl. any LangGraph session id for an ``agent_task`` step)
lives inside ``step_results[i]``, since a single run may contain zero, one,
or N agent steps.
"""
"""``automation_runs`` table — immutable per-fire execution record."""
from __future__ import annotations
@ -51,6 +46,8 @@ class AutomationRun(BaseModel, TimestampMixin):
trigger_payload = Column(JSONB, nullable=True)
resolved_inputs = Column(JSONB, nullable=False, server_default="{}")
# one entry per executed step; agent_task entries carry their own
# `agent_session_id` (LangGraph thread reference) inside this JSONB
step_results = Column(JSONB, nullable=False, server_default="[]")
output = Column(JSONB, nullable=True)
artifacts = Column(JSONB, nullable=False, server_default="[]")

View file

@ -12,7 +12,7 @@ from .trigger_spec import TriggerSpec
class AutomationDefinition(BaseModel):
"""Top-level shape of an automation. See automation-design-plan.md §5."""
"""Top-level shape of an automation."""
model_config = ConfigDict(extra="forbid")