Rename open to stalled and autopilot to auto-confirm; add pushed state; declare idempotency; propose maturity and projects model (RBT-WP-0008)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 295952@bnt-lap001 Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
This commit is contained in:
parent
f39d5cec3c
commit
f5619e1a52
19 changed files with 429 additions and 105 deletions
14
rtut/flow.py
14
rtut/flow.py
|
|
@ -67,3 +67,17 @@ class Flow:
|
|||
for a in self.ancestors(id_):
|
||||
refs += self.stages[a].get("requires", [])
|
||||
return [r for r in (self.resolve(x) for x in refs) if r]
|
||||
|
||||
|
||||
def pack_idempotency(data: dict) -> str:
|
||||
"""Derived characteristic of the whole runbook: idempotent, non-idempotent, conditional or unknown."""
|
||||
fl = Flow(data)
|
||||
vals = []
|
||||
for s in fl.steps.values():
|
||||
parts = s.get("one_of") or [s]
|
||||
vals += [p.get("idempotent", s.get("idempotent", "unknown")) for p in parts]
|
||||
if not vals or "unknown" in vals:
|
||||
return "unknown"
|
||||
if "non-idempotent" in vals:
|
||||
return "non-idempotent"
|
||||
return "conditional" if "conditional" in vals else "idempotent"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue