Skip to content

feat(vigil): interactive TUI wiring (slice 3 of 5) - #817

Draft
allen-munsch wants to merge 1 commit into
vigil/02-core-runtimefrom
vigil/03-tui-wiring
Draft

feat(vigil): interactive TUI wiring (slice 3 of 5)#817
allen-munsch wants to merge 1 commit into
vigil/02-core-runtimefrom
vigil/03-tui-wiring

Conversation

@allen-munsch

Copy link
Copy Markdown
Collaborator

Slice 3 of 5 in the vigil decomposition (stack #812, stacked on vigil/02-core-runtime).

Wires the slice-2 runtime into the interactive TUI loop behind the opt-in vigil feature. No dependency changes; Cargo.lock is untouched.

What this does

  • run_interactive gains the four vigil receivers (wake / observance / ctl / hook) and drains plugin hook dispatch requests every iteration, so on-vigil-event / on-vigil-reap hooks fire even when a rite fails, a vigil is paused, or a dispatch happens from commands mode.
  • A vigil-wake select! arm observes a reap, stores pending-observance metadata, and launches the agent turn; the post-turn handler (VigilBits) then dispatches on-vigil-observance with :response and :exit and releases the in-flight flag.
  • decide_post_done_action gains a VigilSleep outcome so an active vigil suppresses loop/followup auto-restart. This is cfg-gated and is a no-op when the feature is off.
  • Left panel: PanelMode::Vigil, VigilStatusRow, VigilLeftPanel widget, Scene.left_panel_mode + vigil_data, /panel vigils, and /vigil subcommands (add / start / stop / status / rest / pause / resume / remove), with live status polling through VigilCtl::StatusReq.
  • Idle poll slows from 20Hz to 1Hz while a vigil is active.

Testing

  • Unit tests: test_post_done_action (including VigilSleep ordering), panel_data::duration_short_*, and the full scene::tests set all pass.
  • Local CI reproduction: cargo fmt --check, the clippy matrix (--all-targets -- -D warnings for default, windows-default, sandbox-microvm, all-features), and the build matrix (10 configs with RUSTFLAGS="-D warnings") are all green. Feature-OFF (windows-default / no-plugin) stays warning-clean.
  • cargo test --bin dirge --all-features: 6041 pass; 13 failures are all pre-existing sandbox::microvm / e2e_microvm_attach container-build tests, unrelated to this slice.

Known gaps

  • on-vigil-observance dispatch assumes the plugin feature is present when vigil is; without it the hook is silently skipped (same as the slice-2 headless path).
  • The status-poll oneshot round-trip is awaited at the top of each UI iteration; under a slow keeper this could add latency, though the keeper answers StatusReq synchronously.
  • No interactive TUI smoke test covers the full wake→turn→observe cycle yet; that lands with the slice-5 e2e fixtures.

Wire the vigil runtime (slice 2) into the interactive TUI loop behind the
opt-in vigil feature.

- run_interactive gains vigil wake/observance/ctl/hook receivers and
  drains plugin hook dispatch requests each iteration; idle poll slows
  from 20Hz to 1Hz while a vigil is active.
- Vigil-wake select! arm observes a reap and launches the agent turn;
  post-turn dispatch fires on-vigil-observance via VigilBits and releases
  the in-flight flag.
- decide_post_done_action gains a VigilSleep outcome so an active vigil
  suppresses loop/followup auto-restart (cfg-gated, no behavior change
  when vigil is off).
- Left panel: PanelMode::Vigil, VigilStatusRow, VigilLeftPanel widget,
  Scene.left_panel_mode + vigil_data, /panel vigils, /vigil subcommands
  (add/start/stop/status/rest/pause/resume/remove), and live status
  polling through VigilCtl::StatusReq.

Feature-OFF builds stay warning-clean (windows-default/no-plugin clippy
and build matrix verified locally).
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