Skip to content

feat(viewer): revive episteme viewer as the live local governance dashboard (Event 174) - #158

Merged
junjslee merged 2 commits into
masterfrom
feat/event174-viewer-revival
Jul 20, 2026
Merged

junjslee merged 2 commits into
masterfrom
feat/event174-viewer-revival

Conversation

@junjslee

Copy link
Copy Markdown
Owner

What

Operator-ratified interface (A+B; Tauri .app deferred until after A ships, signed .pkg gated on the distribution/GTM decision): episteme viewer becomes 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 own count_pending semantics — 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.
  • DOC ADVISORY feed — workflow_guard now 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.
  • UX — episteme viewer auto-opens the browser (--no-open); single-file dashboard, zero deps, 3s poll, light/dark. Menu-bar glance: tools/xbar/episteme.30s.sh over status --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 --check clean; no new docs (ceiling stays 32/32).

…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.
@vercel

vercel Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
episteme Ready Ready Preview, Comment Jul 20, 2026 11:09pm

… 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.
@junjslee
junjslee merged commit 8ee2205 into master Jul 20, 2026
5 checks passed
@junjslee
junjslee deleted the feat/event174-viewer-revival branch July 20, 2026 23:10

This branch was successfully deployed

1 active deployment
Preview — 9ae4b230 Deployed Jul 20, 2026 by vercel[bot]
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