feat(sleep): local control-panel dashboard (stacked on evidence chain)#152
Open
Alphaxalchemy wants to merge 2 commits into
Open
feat(sleep): local control-panel dashboard (stacked on evidence chain)#152Alphaxalchemy wants to merge 2 commits into
Alphaxalchemy wants to merge 2 commits into
Conversation
* skillopt_sleep/evidence.py — append-only, thread-safe, redacted evidence.jsonl per night: harvest sessions -> miner exchanges (verbatim prompt/reply) -> mined tasks with checks -> split assignment -> every replay attempt (phase-tagged, cache hits marked) -> per-task scores with failing checks named -> reflect exchanges + parsed edits -> gate trials and the final decision with its score arithmetic -> staged artifacts. Config-gated (evidence_log, default on; evidence_max_chars cap). * skillopt_sleep/prompts.py — central registry of the four LLM prompt templates (miner/attempt/judge/reflect), byte-identical defaults to the previously inlined strings; user overrides in prompts.json take effect on the next model call (mtime-checked), no restart needed. * cycle.py builds dual backends from config (optimizer_*/target_*), pre-creates the staging dir so evidence lands beside the report; staging.new_staging_dir() de-collides same-second runs; latest_staging() now skips non-adoptable (evidence-only) folders. * tests/test_sleep_evidence.py — 8 no-network stdlib tests: chain completeness, redaction/truncation/ordering, disable flag, prompt override round-trip + live effect, no-tasks-night adoption guard.
* skillopt_sleep/dashboard.py + dashboard.html — stdlib-only local web control panel (127.0.0.1) mirroring the pipeline flow: per-stage role/ model/prompt display and live editing, per-night evidentiary chain browser (reads evidence.jsonl), gate math spelled out, config editor, run/dry-run launcher, and explicit adopt. * New CLI: python -m skillopt_sleep dashboard [--port] [--no-browser]. * tests: TestDashboardApi — overview/HTML, prompt override round-trip via the API, unknown-night 404. Still pure-stdlib, loopback only.
This was referenced Jul 19, 2026
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.
Local control-panel dashboard for SkillOpt-Sleep
Stacked on the evidence-chain PR #151 — the first commit here is that PR; review only the second commit (
dashboard.py/dashboard.html/ CLI / dashboard tests) in this one. Kept separate deliberately so the observability substrate can be judged (and merged) independently of the UI that renders it.Why
The evidence PR makes every night's chain recorded; this PR makes it inspectable and steerable by a human. The originating concern was the same audit: the sleep gate is strict by design, and when it rejects a night the user had no way to see why without spelunking JSONL by hand — and no way to adjust the four prompts driving the pipeline without editing source. If the long-term goal is validating the miner and evolving the prompts (the meta-loop sketched in the evidence PR), a human needs a place to read the exchanges and try prompt variants first.
What
skillopt_sleep/dashboard.py+dashboard.html— a stdlib-only (no dependencies added) local web control panel bound to127.0.0.1, laid out to mirror the pipeline flow:evidence.jsonl— harvest, miner exchanges, mined tasks + checks, replay attempts, reflect edits;python -m skillopt_sleep dashboard [--port] [--no-browser].Tests
TestDashboardApiadded totests/test_sleep_evidence.py: overview + HTML endpoints, prompt-override round-trip through the API, unknown-night 404. Pure stdlib, loopback only. Full suite: no new failures vs pristinemain(same 11 pre-existing research-suite loader errors).Live smoke: served a real project with 16 historical nights plus a live DeepSeek night; the rejected night's full chain, the verbatim miner exchange, and the gate arithmetic all render and were verified in the browser.
Series
Part 2 of 3: #151 (evidence chain + prompt registry) → this PR → #153 (Antigravity harvest source (per the "more sources" direction of #97)).