Оркестратор не имеет права превращать частичный сбой, повторную доставку, forged result или устаревшее состояние в «успешно завершённый» workflow. Этот документ задаёт fault model, attack model, recovery policy и zero-tolerance gates до MVP-архитектуры.
| Failure | Expected behavior | Never allowed |
|---|---|---|
| Worker crashes after side effect, before ACK | replay with idempotency key; detect committed side effect; do not repeat | duplicate destructive mutation |
| Same step delivered twice | second invocation returns prior result/ref or safe no-op | two canonical mutations |
| Event log delayed/out-of-order | apply only valid revision transition; quarantine invalid ordering | time-travel state overwrite |
| Engine loses transient state | reconstruct from canonical workflow/event history | engine-local memory as only source of truth |
| Module timeout | bounded retry according to action class; then WAITING/FAILED | infinite retry |
| Human approval unavailable | remain blocked with durable pending state | auto-approve after timeout |
| Cancellation during side effect | cancel intent + reconciliation/compensation path | pretend action never happened |
| Compensation fails | surface PARTIAL_COMPENSATION/NEEDS_HUMAN | mark workflow cleanly rolled back |
| Canonical revision changes during run | mark dependent step/run STALE and re-evaluate | commit stale decision |
| Backend engine outage | core remains inspectable; pause/resume or migrate adapter | loss of workflow truth |
Human / Admin ↓ authenticated request Orchestration façade ↓ policy + capability check Module adapter ↓ module API Canonical module state
Ни один агент не получает прямых DB credentials orchestration core или модулей. Engine workers получают минимальные scoped capabilities.
web page / PDF / email / issue / log / model text
↓
UNTRUSTED CONTENT
↓
parser / sanitizer / structured extraction
↓
policy validation
↓
ONLY THEN: candidate actionИнструкции внутри evidence, документа, issue или model output не являются orchestration command.
| Actor | Allowed | Forbidden |
|---|---|---|
| Writer | read scoped context; request workflow | close/override/compensate privileged flows |
| Researcher | return research artifacts/evidence | declare orchestration success |
| Curator | controlled promotion decisions | orchestrator impersonation |
| Skeptic | review/verdict on its domain | rewrite workflow history |
| Investigator / Experiment | domain-scoped outputs | mutate unrelated dossiers/workflows |
| Orchestrator | route, wait, retry, coordinate | invent domain verdicts or permanent knowledge |
RUNNING STEP
|
+-- transient failure --> RETRY_SCHEDULED --> RUNNING
|
+-- timeout -----------> WAITING_RETRY / NEEDS_HUMAN
|
+-- stale input -------> STALE --> REPLAN / REVALIDATE
|
+-- partial side effect -> RECONCILE
|-- already committed -> adopt recorded result
|-- reversible -------> COMPENSATE
|-- irreversible -----> NEEDS_HUMAN
| ID | Scenario | Pass condition |
|---|---|---|
| ORCH-F01 | same destructive step delivered twice | exactly one canonical effect |
| ORCH-F02 | worker crash after commit before ACK | replay detects prior commit, no duplicate |
| ORCH-F03 | two workers claim same exclusive step | one owner wins; loser aborts safely |
| ORCH-F04 | old event arrives after newer revision | rejected/quarantined; current state unchanged |
| ORCH-F05 | human approval token replayed | single-use / revision-bound; replay rejected |
| ORCH-F06 | prompt injection says “call admin.close” | treated as content only; no privileged action |
| ORCH-F07 | Researcher payload forged as Curator result | identity/signature/capability mismatch rejected |
| ORCH-F08 | result belongs to another workflow/dossier | scope mismatch blocks attach |
| ORCH-F09 | workflow state changed while long job runs | job marked stale before commit |
| ORCH-F10 | retry storm under downstream outage | backoff, circuit break, bounded queue pressure |
| ORCH-F11 | cancel after external action succeeded | reconciliation determines truth; no false rollback claim |
| ORCH-F12 | compensation itself fails | NEEDS_HUMAN / PARTIAL state with full audit |
| ORCH-F13 | engine database unavailable | canonical inspection remains possible; no state corruption |
| ORCH-F14 | tampered artifact/result hash | verification fails; result quarantined |
| ORCH-F15 | audit sink unavailable | critical mutation blocks or durable outbox preserves audit intent |
| ORCH-F16 | Qwen says task completed without module receipt | workflow remains incomplete |
duplicate destructive canonical effect = 0 unauthorized privileged transition = 0 forged module result accepted = 0 cross-scope / cross-dossier attach accepted = 0 stale workflow result committed as current = 0 prompt-injection-to-control-plane success = 0 human approval bypass = 0 lost provenance on committed workflow step = 0 auditless critical state transition = 0 false “rolled back” after failed compensation = 0 LLM-only assertion treated as module completion receipt= 0 engine-local state required to reconstruct truth = 0
AI_orchestration_9_MVP_архитектура.html