Turn two State Hub sync failures into clean outcomes.
An over-long blocked_on now returns a 422 instead of a 500, and decided decision records such as 'approved' map onto the hub's made type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 57383@bnt-lap001 Assistant-Session: ef71febe-2a37-4c34-a979-2508ca973c91
This commit is contained in:
parent
2b5d8f90f8
commit
7d992821fb
5 changed files with 79 additions and 4 deletions
|
|
@ -2,7 +2,7 @@ import uuid
|
|||
from datetime import date, datetime
|
||||
from typing import Self
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, field_validator, model_validator
|
||||
from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
|
||||
|
||||
from api.models.task import TaskPriority, TaskStatus
|
||||
from api.schemas.compat import WorkplanIdCompatMixin, WorkplanIdCreateMixin
|
||||
|
|
@ -46,7 +46,8 @@ class TaskCreate(TaskStatusMixin, TaskFlavorMixin, WorkplanIdCreateMixin):
|
|||
needs_human: bool = False
|
||||
intervention_note: str | None = None
|
||||
decision_id: str | None = None
|
||||
blocked_on: str | None = None
|
||||
# Bounded by tasks.blocked_on String(200); longer text belongs in blocking_reason.
|
||||
blocked_on: str | None = Field(default=None, max_length=200)
|
||||
wait_until: date | None = None
|
||||
parent_task_id: uuid.UUID | None = None
|
||||
|
||||
|
|
@ -69,7 +70,8 @@ class TaskUpdate(TaskStatusMixin, TaskFlavorMixin):
|
|||
needs_human: bool | None = None
|
||||
intervention_note: str | None = None
|
||||
decision_id: str | None = None
|
||||
blocked_on: str | None = None
|
||||
# Bounded by tasks.blocked_on String(200); longer text belongs in blocking_reason.
|
||||
blocked_on: str | None = Field(default=None, max_length=200)
|
||||
wait_until: date | None = None
|
||||
parent_task_id: uuid.UUID | None = None
|
||||
# Token passthrough — three tiers (highest precision wins):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue