Rename open to stalled and autopilot to auto-confirm; add pushed state; declare idempotency; propose maturity and projects model (RBT-WP-0008)
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Work Records / validate (push) Successful in 14s

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 12:19:58 +02:00
parent f39d5cec3c
commit f5619e1a52
19 changed files with 429 additions and 105 deletions

View file

@ -159,7 +159,7 @@ priority: high
state_hub_task_id: "99320417-8261-556b-8932-4947cfd8ce11"
```
Unblocked: RBT-WP-0007 T06-T07 are finished. Choose manual or autopilot per run (with timeout and
Unblocked: RBT-WP-0007 T06-T07 are finished. Choose manual or auto-confirm per run (with timeout and
push-through controls). In manual mode, an override dialog lists unmet preconditions and
the downstream risk before continuing; deviations show in the overview.

View file

@ -78,7 +78,7 @@ 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 autopilot
## Operating modes: manual and auto-confirm
```task
id: RBT-WP-0007-T06
@ -88,8 +88,8 @@ 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. Autopilot: the engine confirms
when all preconditions are met. `autopilot: manual-only` steps and irreversible steps
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
@ -103,7 +103,7 @@ 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`. Autopilot timeouts
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.
@ -111,7 +111,7 @@ any deviation is flagged and can never exercise a pack.
`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, autopilot confirm / stop / push-through,
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).

View file

@ -0,0 +1,103 @@
---
id: RBT-WP-0008
type: workplan
title: "Runbook maturity, projects and idempotency"
domain: infotech
repo: runbook-tutorials
status: active
flavor: implementation
owner: claude
topic_slug: stack
created: "2026-09-29"
updated: "2026-09-29"
depends_on: [RBT-WP-0007]
---
## Goal
Separate what a runbook is (characteristics), how far it can be trusted (maturity, earned and bound to a
pack revision), and what state an environment is in (projects). Replaces the environment-dependent
`exercise_status`. Model and candidate terminology: `docs/maturity-and-projects.md`.
## Decide the terminology and model
```task
id: RBT-WP-0008-T01
status: progress
priority: high
```
Review `docs/maturity-and-projects.md` with Bernd: names (project or target, environment class), maturity
ladder and thresholds, project states, where project files live, retry policy for non-idempotent steps.
## Idempotency as a declared characteristic
```task
id: RBT-WP-0008-T02
status: done
priority: high
```
Done 2026-09-29: `idempotent: idempotent | non-idempotent | conditional` (+ `idempotent_note`) per step in the v0.2
schema, validator rule for `conditional`, derived runbook value (`flow.pack_idempotency`), declared honestly in the
showcase. Values are words because YAML reads unquoted yes/no as booleans. Follow-ups: show it in the UI, and use
it for the retry policy (T07).
## Bind runs to a pack revision
```task
id: RBT-WP-0008-T03
status: wait
priority: high
```
Record a digest of the pack directory in every run so maturity and project state can be tied to the revision used,
and expire when it changes.
## Derive maturity from run history
```task
id: RBT-WP-0008-T04
status: wait
priority: high
```
`draft`, `reviewed`, `rehearsed`, `proven`, `stale`, derived from clean runs (no deviations) in rehearsal and other
environments, replacing `exercise_status` and the "Record pack as exercised" click.
## Project specification and shared datapoints
```task
id: RBT-WP-0008-T05
status: wait
priority: high
```
`project.yaml`: environment class, shared non-secret datapoints provided as defaults to member runbooks, member
runbooks and ordering. Validator, and runs that belong to a project.
## Project state
```task
id: RBT-WP-0008-T06
status: wait
priority: medium
```
Derive `planned`, `applying`, `applied`, `stale` (later `drifted`) from each member's latest run at the current revision.
## Retry policy for non-idempotent steps
```task
id: RBT-WP-0008-T07
status: wait
priority: medium
```
Retrying a failed non-idempotent step requires the operator to confirm the earlier attempt did not partly apply.
## Acceptance Criteria
- "Exercised" has a precise, environment-aware meaning; a production project is never called "exercised".
- Maturity is derived from runs, bound to a revision, and expires when the pack changes.
- A value shared by several runbooks is entered once, in the project.