runbook-tutorials/workplans/archived/260929-RBT-WP-0007-engine-v0-2-graph-datapoints-and-gates.md
tegwick 8eaf0c77b0
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s
Tests / tests (push) Failing after 35s
Work Records / validate (push) Successful in 12s
Archive the finished runbook-tutorials workplans
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
2026-09-29 21:48:05 +02:00

3.6 KiB

id type title domain repo status flavor owner topic_slug created updated depends_on state_hub_workstream_id
RBT-WP-0007 workplan Engine v0.2: graph, datapoint states and gates infotech runbook-tutorials finished implementation claude stack 2026-09-29 2026-09-29
RBT-WP-0002
0ce4d5fd-6eac-5f9a-a170-8231a551f66a

Goal

Make the engine understand the v0.2 model so a renderer can show a questionnaire flow, a dimension view and an overview from the same run data.

id: RBT-WP-0007-T01
status: done
priority: high
state_hub_task_id: "55dd86f9-5f89-59a2-8a0a-85fbedd95483"

Compute ready items from requires and one_of; recommended next = first ready in canonical order; explain what a blocked item waits for.

Datapoint states

id: RBT-WP-0007-T02
status: done
priority: high
state_hub_task_id: "571e8685-6eeb-54ce-bb1a-4616ea951f81"

nil/set/err/ok per datapoint in the run record, with validation, dimension tags, and how ok is reached (check or recorded manual confirmation).

Gates and waivers

id: RBT-WP-0007-T03
status: done
priority: high
state_hub_task_id: "707cca55-24a1-5355-8722-10740c5a2862"

Evaluate gate checks (same confirmation rule as step verify), block dependents and stage exit, record waivers with who, when and why.

Run record v0.2

id: RBT-WP-0007-T04
status: done
priority: medium
state_hub_task_id: "73307bb9-2739-563b-92c7-a034a360b444"

runbook-run/v0.2 with datapoints, gates, waivers; v0.1 records still load.

Confirmation policy

id: RBT-WP-0007-T05
status: done
priority: medium
state_hub_task_id: "0933ff4a-8478-50d9-aa99-991948bc2379"

Derive confirm button versus typed phrase from reversible; enforce the phrase in the engine so no renderer can skip it.

Operating modes: manual and auto-confirm

id: RBT-WP-0007-T06
status: done
priority: high
state_hub_task_id: "1656597c-3748-5480-b136-e2872436bab4"

A run has a mode (docs/pack-spec-v0.2.md). Manual: the operator confirms; every check, gate and precondition is shown with its state. Auto-confirm: the engine confirms when all preconditions are met. auto_confirm: manual-only steps and irreversible steps are never auto-confirmed without a recorded pre-authorization.

Overrides, waivers, push-through and the deviation record

id: RBT-WP-0007-T07
status: done
priority: high
state_hub_task_id: "0ef958ef-88b6-565b-8797-df730cf11ad3"

Override in manual mode when preconditions are unmet: name the unmet items and the declared downstream_risk, require explicit confirmation and a reason, record a deviation. Waivers only where a gate declares waivable. Auto-confirm timeouts (stop or push-through) record a deviation and, for push-through, move on. A run with any deviation is flagged and can never exercise a pack.

Delivered 2026-09-29

rtut/flow.py and rtut/run2.py, documented in docs/run-spec.md (run record v0.2) and covered by tests/test_run2.py (25 tests: readiness and recommendation, parallel items, alternatives, datapoint states, gates, overrides, waivers, confirmation phrase, auto-confirm confirm / stop / push-through, manual-only and pre-authorization, read-only finished runs). Two spec corrections came out of it: a gate cannot require a datapoint it is itself confirmed_by (validator rule), and run.finalize also requires gates passed or waived. Not done here: any UI or CLI for v0.2 runs (RBT-WP-0004).

Acceptance Criteria

  • The old console's stages, gates and datapoints can be expressed and computed without special cases.
  • A v0.1 pack behaves exactly as before.