You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scope. Étendre work_order pour porter les sorties d'agents.
Colonnes à ajouter.
Colonne
Type
Default
Rôle
rca_summary
text
null
RCA produit par Investigator
recommended_actions
jsonb
null
Actions structurées (steps)
generated_by_agent
boolean
false
Distinguer manuels vs agents
trigger_anomaly_time
timestamptz
null
Timestamp anomalie source
Note sur status. La contrainte actuelle est CHECK (status IN ('open','in_progress','completed','cancelled')). Le flow agent
introduit 'detected' (Sentinel) et 'analyzed' (post-Investigator).
Note
Decided — étendre le CHECK.
Migration 007 :
ALTERTABLE work_order DROP CONSTRAINT work_order_status_check;
ALTERTABLE work_order ADD CONSTRAINT work_order_status_check
CHECK (status IN ('detected','analyzed','open','in_progress','completed','cancelled'));
Flow : detected (Sentinel) → analyzed (Investigator a posé rca_summary) → open (Work Order Generator a posé recommended_actions) → in_progress → completed. Frontend filtre/colore par statut.
Note
Milestone: M1 — Data Layer
Planning doc:
docs/planning/M1-data-layer/issues.mdScope. Étendre
work_orderpour porter les sorties d'agents.Colonnes à ajouter.
rca_summarytextnullrecommended_actionsjsonbnullgenerated_by_agentbooleanfalsetrigger_anomaly_timetimestamptznullNote sur
status. La contrainte actuelle estCHECK (status IN ('open','in_progress','completed','cancelled')). Le flow agentintroduit
'detected'(Sentinel) et'analyzed'(post-Investigator).Note
Decided — étendre le CHECK.
Migration 007 :
Flow :
detected(Sentinel) →analyzed(Investigator a posérca_summary) →open(Work Order Generator a posérecommended_actions) →in_progress→completed. Frontend filtre/colore par statut.Acceptance.
status='detected'acceptéWorkOrderCreatePydantic mis à jour pour accepter ces champs (issue M1.6 — M1.6 — Mettre à jourWorkOrderCreate/WorkOrderUpdatePydantic #7, out of scope here)Work order status state machine
stateDiagram-v2 [*] --> detected: Sentinel detects anomaly detected --> analyzed: Investigator emits rca_summary analyzed --> open: Work Order Generator emits recommended_actions open --> in_progress: operator picks up in_progress --> completed: technician closes open --> cancelled: operator dismisses in_progress --> cancelled: operator dismisses completed --> [*] cancelled --> [*]Important
The CHECK constraint must include all six states. Frontend uses the same enum
for filters and badge colours (see
M9.1).