Skip to content

orchestrator: Add CheckpointWalk, the concrete BootWatch - #471

Draft
chrysh wants to merge 1 commit into
OpenPRoT:mainfrom
9elements:add-checkpoint-walk
Draft

chrysh wants to merge 1 commit into
OpenPRoT:mainfrom
9elements:add-checkpoint-walk

Conversation

@chrysh

@chrysh chrysh commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds CheckpointWalk<R, G>, the concrete BootWatch that walks a device's
    BootCheckpoints in declaration order, polling an EvidenceReader at each
    step and judging per-checkpoint windows against caller-injected now_millis.
  • Refactors QEMU runtime itest scenarios 1-2 to use CheckpointWalk directly,
    separating walk judgment from BootWatchdogs scheduling.
  • Adds a GPIO wiring example to BootCheckpoint's doc comment in the config
    crate.

Read errors are silence (Booting), lapsed windows are timeouts with no
last-chance read. 17 host unit tests cover happy path, timeout, device faults,
read errors, arm/re-arm, deadline arithmetic, and construction rejection.

Test plan

  • bazel test //services/orchestrator/adapters/walk:orchestrator_checkpoint_walk_test (17 host tests)
  • bazel test //services/orchestrator/config:orchestrator_config_test
  • bazel test --config=virt_ast10x0 //target/ast10x0/tests/orchestrator/runtime:runtime_test (5 QEMU scenarios)
  • bazel test --config=virt_ast10x0 //target/ast10x0/tests/orchestrator/runtime:no_panics_test

CheckpointWalk<R, G> walks a device's BootCheckpoints in declaration
order, polling an EvidenceReader at each step and judging per-checkpoint
windows against caller-injected now_millis. Read errors are treated as
silence (Booting), lapsed windows are timeouts with no last-chance read.

The QEMU runtime itest (scenarios 1-2) now uses CheckpointWalk directly
instead of the hand-rolled checkpoint loop, separating walk judgment from
BootWatchdogs scheduling. Scenarios 3-5 (BootWatchdogs multiplexing and
commit watchdog) are unchanged.

The config crate's BootCheckpoint type gets a wiring example showing
three GPIO checkpoints with pin bindings.

Assisted-by: Claude (anthropic.com)
chrysh added a commit to 9elements/openprot that referenced this pull request Sep 17, 2026
BmcBootReader dispatches BmcSignal::Bl1 to a GpioBootMonitor bound at
bring-up to pin 42 (bank EH, bit 10, active-high). BMC_DEVICE holds the
device table constant: one checkpoint, 500 ms window.

The crate is host-testable against a mock GPIO port; 3 tests cover
Booted/Booting dispatch and the device-table shape. The platform driver
constructs the reader and hands it to CheckpointWalk at wiring time.

Depends on OpenPRoT#471 (CheckpointWalk).

Assisted-by: Claude (anthropic.com)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant