Engine v0.2: flow graph, datapoint states, gates, modes, overrides, deviations (RBT-WP-0007)
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 4s
Work Records / validate (push) Successful in 12s

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:
tegwick 2026-09-29 11:34:07 +02:00
parent 3fc279a6ed
commit 60d983769f
13 changed files with 1017 additions and 22 deletions

View file

@ -35,9 +35,10 @@ def test_showcase_v02_is_valid_and_loads_through_pack_load():
assert pk.spec == "runbook-pack/v0.2"
def test_v02_packs_cannot_be_run_yet():
with pytest.raises(R.RunError, match="cannot be run yet"):
R.create(P.load(FILE), "tester")
def test_v02_packs_run_through_run_create():
import uuid
r = R.create(P.load(FILE), "tester", {"logdir": f"/tmp/rtut-{uuid.uuid4().hex[:8]}"})
assert r.data["spec"] == "runbook-run/v0.2" and r.data["mode"] == "manual"
CASES = [
@ -104,3 +105,8 @@ def test_legacy_v02_needs_only_schema():
d = {"spec": "runbook-pack/v0.2", "id": "x.y", "title": "Legacy x", "owner": "o",
"exercise_status": "unexercised", "engine": "legacy-command", "legacy": {"command": ["true"]}}
assert v2.validate(d) == []
def test_gate_cannot_confirm_a_datapoint_it_requires():
out = errs(lambda d: next(x for x in d["datapoints"] if x["id"] == "lamp_lit").update(confirmed_by="lamp-check"))
assert any("circular" in e for e in out), out