Repository navigation
feat(viewer): revive episteme viewer as the live local governance dashboard (Event 174) - #158
Merged
Merged
Conversation
…hboard (Event 174)
The localhost server existed with working JSON APIs but no index.html — the
root returned an 'index.html missing' stub. Revival, not accretion: the
operator-ratified interface (A+B of three options; Tauri .app deferred until
after A ships, signed .pkg gated on the distribution/GTM decision).
- viewer/live.py: bounded readers over the two state roots — global panel
(gate ops 24h + verdicts from audit.jsonl tail, spot-check PENDING via the
queue's own count_pending semantics with raw-lines fallback honestly
labeled, framework counts, noise watch) and project panel (surface
freshness, E173 doc-map shape, living-doc staleness by the banner's rules,
git branch). Tail reads byte-capped: cost never scales with history.
- viewer/server.py: /api/live/{global,project,advisories}; the project root
is the git top-level the viewer was LAUNCHED in, not the episteme checkout;
index.html ships (single file, zero deps, 3s poll, light/dark).
- workflow_guard.py: each targeted DOC ADVISORY also appends one JSONL record
to .episteme/state/doc_advisories.jsonl (size-capped rewrite rotation,
footprint rule, failure-silent) — the 'watch docs being tracked as code
changes' feed the dashboard renders. A log, not a queue: nothing drains it.
- episteme viewer auto-opens the browser (--no-open to suppress);
tools/xbar/episteme.30s.sh menu-bar glance over status --json.
Live-verified on real state: / 4ms, /api/live/global 6ms, project 24ms;
advisory feed already carried this event's own edits. Suite 1804+91.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… naive timestamps, warn on non-loopback bind Adversarial review, three confirmed findings: 1. gate_verdicts_24h read decision/verdict — fields the canonical audit writer never emits (it writes status/action); the panel would have rendered unknown:N forever. The first test pinned the same invented schema, so it proved nothing — both now use the real field names, plus a real-corpus drift guard that fails if the breakdown ever collapses to all-unknown again. 2. A zone-less surface timestamp made now-ts raise TypeError, 500 the route, and (via the client's fan-out fetch) blank ALL panels. _parse_ts coerces naive→UTC; the client moved to allSettled so one failing panel degrades alone; regression test pins the no-raise contract. 3. Non-loopback bind serves core_question, absolute paths, and edit activity unauthenticated — serve() now prints an explicit warning, and auto-open targets 127.0.0.1 when bound to 0.0.0.0/:: (browsers cannot connect to a wildcard address). Also: xbar branch-name directive-injection stripped; renderFeed hardened against records missing docs. Suite 1806+91.
This branch was successfully deployed
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
Operator-ratified interface (A+B; Tauri .app deferred until after A ships, signed .pkg gated on the distribution/GTM decision):
episteme viewerbecomes the real-time local console it always claimed to be — the server had working JSON APIs but no index.html (the root returned a 'missing' stub).viewer/live.py— bounded readers over the two state roots: global panel (gate ops 24h + verdicts, spot-check pending via the queue's owncount_pendingsemantics — raw line count only as an honestly-labeled fallback, framework counts, noise watch) and project panel (surface freshness, E173 doc-map shape, living-doc staleness by the banner's rules, branch). Tail reads byte-capped — cost never scales with history./api/live/{global,project,advisories}— the project root is the git top-level the viewer was launched in, so it dashboards whatever governed project you're standing in.workflow_guardnow appends each targeted advisory to.episteme/state/doc_advisories.jsonl(size-capped rotation, footprint rule, failure-silent; a log, not a queue). This is the 'watch docs being tracked as code changes' observable, rendered live.episteme viewerauto-opens the browser (--no-open); single-file dashboard, zero deps, 3s poll, light/dark. Menu-bar glance:tools/xbar/episteme.30s.shoverstatus --json.Verification
Suite 1804 + 91 (baseline 1789; +15: tail-read bounds, reader degradation, advisory-log shape/rotation/footprint, hook-to-feed end-to-end, real-server HTTP tests on an ephemeral port). Live smoke on real state:
/4ms · global 6ms · project 24ms; the feed already carried this event's own edits during implementation.docs lint/docs index --checkclean; no new docs (ceiling stays 32/32).