feat(console): localhost operator console over bundles, runs, and skill lineage - #133
Merged
Conversation
…ll lineage The thin operator surface for governing production workflows without the terminal: `openadapt-flow console` serves a loopback-only (127.0.0.1, hardcoded) FastAPI app + single-file UI that PROJECTS the artifacts the engine already writes — no new engine semantics anywhere. - Workflow list: every bundle under a root, with sealed compiler version / content digest / certification status / PHI + encryption flags, joined to its newest run. - Workflow detail: compiled steps (risk, identity armed/unarmed + reason, effect contracts, postconditions, confidence), identity coverage and effect-contract coverage over irreversible steps (honest n/a when a bundle has no consequential step), lint findings, sealed certification + live evaluate_policy violations, and step-level diffs between any two bundles. All numbers come from the SAME policy helpers the lint/certify verbs use. - Run history + detail: per-step timeline with identity verdicts, effect verdicts, resolution rung, and inline before/after screenshots (served traversal-safe from the run dir); the structured HALT observation (reason, PHI-scrubbed observed texts, completed pre-context); durable pause/approval records and checkpoint listing. - Skill libraries: per-skill version lineage (active/candidate/superseded/ rolled_back, scores, provenance). - Governance actions are the EXISTING verbs only: approve/resume/certify shell out to the CLI; promote/rollback call the same SkillLibrary entry points the teach pipeline uses; teach (needs a fix demonstration) is rendered as the exact command to copy, never faked. The server starts READ-ONLY — every mutating endpoint refuses with 403 + the exact command unless --allow-actions, and the UI shows the command before any confirm. Degrades gracefully: encrypted/corrupt bundles stay listed with a load error, reports predating a field render without it. Tests: 28 route/behavior tests over real Workflow.save/RunReport.save/ CheckpointStore/SkillLibrary artifacts, incl. a loopback uvicorn boot smoke test; ruff + mypy clean. New optional extra: openadapt-flow[console] (fastapi + uvicorn); uvicorn added to dev for the smoke test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Captured headless (chromium) against `openadapt-flow console` serving a MockMed triage fixture: workflow inventory, coverage + live certification, bundle diff, run history, halt evidence with inline screenshots, durable pause, and skill-library lineage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Hatchling ships package data by default, so the explicit force-include of openadapt_flow/console/static/ collided with the default inclusion and failed the wheel build with a duplicate-path error. Wheel verified to contain the static UI without it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
abrichr
marked this pull request as draft
July 17, 2026 22:36
abrichr
marked this pull request as ready for review
July 18, 2026 17:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
openadapt-flow console— the thin operator console: a localhost-only web UI for the one operator who governs production workflows. It is a read-first projection of artifacts the engine already writes (bundle dirs,report.jsonrun dirs, durable pause/approval records,skills.jsonlibraries) plus governance actions wired only to existing verbs. No new engine semantics anywhere.Surface decision (extend #1008 / revive openadapt-console / new module?)
New module in openadapt-flow (
openadapt_flow/console/), for three reasons:openadapt panel) fronts the legacy record→train→eval pipeline in the OpenAdapt repo — none of flow's bundle/run/certification model exists there, and the PR is currently conflicting. Its pattern (FastAPI + loopback + a small SPA + a lazy CLI verb) is deliberately mirrored here; its code is the wrong substrate.Workflow.load,RunReport,CheckpointStore,SkillLibrary,evaluate_policy,lint_workflow, the identity/effect policy helpers) and FastAPI is an established in-repo pattern (services/vlm_service). This ships in one PR with zero cloud coupling.Screens (real capture from a live fixture session)
Workflow inventory — version, certification, PHI/encryption flags, last run:

Workflow detail — identity-armed coverage, effect-contract coverage over irreversible steps, live

evaluate_policyviolations, compiled steps, lint, diff picker, actions with exact commands:Bundle-to-bundle diff:

Run history and a halted run with inline evidence (halt reason, PHI-scrubbed observed texts, step screenshots) plus the exact


teachcommand to copy:Durably paused run — escalation record, checkpoints, and confirm-gated

approve/resume:Skill-library lineage with governed promote / rollback:

Governance posture
127.0.0.1(no flag).--allow-actionsopts in, and the UI always shows the command before a confirm.approve/resume/certifyshell out to the CLI (module-invoked, no shell);promote/rollbackcall the sameSkillLibrary.promote/.quarantineentry points the teach pipeline uses;teachneeds a fix demonstration, so it is render-only — never faked.load_error; effect coverage reports honestn/a(not a fabricated 100%) when a bundle has no irreversible step; missing certification renders thecertifycommand instead of a fake verdict.Tests
tests/test_console.py: 28 tests over realWorkflow.save/RunReport.save/CheckpointStore/SkillLibraryartifacts — projections, coverage numbers vs the policy helpers, diff, halt/pause evidence, artifact traversal refusal, read-only 403-with-command, teach-never-executes, approve subprocess argv, promote/rollback round-trip, and a loopback uvicorn boot smoke test. Local: full fast suite 1862 passed, 16 skipped; ruff check + format and mypy clean.Packaging: new optional extra
openadapt-flow[console](fastapi + uvicorn); uvicorn added to dev for the smoke test; static UI force-included in the wheel.Not in scope (deliberately)
runis rendered for the deployment terminal).Step.effects— when richer coverage fields land in reports (effect-kit work), the same cards can consume them.🤖 Generated with Claude Code