Skip to content

debugviewer: ELK layout, light-theme node palette, live-inference probe - #2

Merged
moonexpr merged 3 commits into
betafrom
topic/debugviewer-elk-live-theme
Jul 8, 2026
Merged

moonexpr merged 3 commits into
betafrom
topic/debugviewer-elk-live-theme

Conversation

@moonexpr

@moonexpr moonexpr commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Debug-viewer (tools/debugviewer/) improvements, operator-directed.

Changes

  • ELK layout. Replaced the hand-rolled longest-path layout with elkjs' layered engine. The bundle is vendored under static/vendor/ and served gzipped (Content-Encoding: gzip, ~456KB) with an immutable cache; the longest-path layout is kept as a fallback if the bundle fails to load.
  • Light-theme node palette. The graph node fills/strokes now resolve from CSS custom properties with [data-theme="light"] variants, so toggling the theme rethemes the graph with no redraw (and run-state highlighting survives a toggle).
  • Collapsible panels. "attributes" and "mocked session" are collapsible and default-collapsed; the inspector title shows an action's I/O wiring line (e.g. procedure: [job] → [purpose, work_unit] (shared: none)).
  • Probe input styling fix. Overrode Cirrus's five-:not() input rule (specificity 0,5,1) that was clobbering the probe fields.
  • Live-inference probe toggle. A • live toggle (glows red when active) makes the probe build the workflow's production factory (ArchitectFactory) with ctx.dry_run off, so kind:inference actions call the real model. Offline services + an isolated temp shelf root keep it side-effect-free, and PIPELINE_DRY_RUN is captured/restored around the run. Mock stays the default.

Verification

  • node --check on the inlined viewer JS; ast.parse on server.py.
  • elkjs lays out the real 50-node baseworkflow graph (49 forward edges routed, 3 loop-backs excluded).
  • Probe mock (source=mock) unchanged; probe live actually calls the model (source=architect-agent); env var restored after both.
  • gzip static route returns gzip bytes with the right headers.

moonexpr added 3 commits July 8, 2026 15:53
…ce probe

- Replace the hand-rolled longest-path layout with elkjs' layered engine
  (vendored + gzip-served; longest-path retained as a load-failure fallback).
- Move the graph node palette into CSS custom properties with light-theme
  variants, so toggling the theme rethemes the graph with no redraw.
- Collapsible, default-collapsed "attributes" and "mocked session" panels;
  inspector title now shows an action's I/O wiring line.
- Fix probe input styling clobbered by Cirrus's high-specificity input rule.
- Add a mock/live probe toggle: live builds the workflow's production factory
  (ArchitectFactory) with ctx.dry_run off so kind:inference actions call the
  real model, while offline services + an isolated temp shelf root keep it
  side-effect-free. PIPELINE_DRY_RUN is captured and restored around the run.
Inputs need not be in the issue format. The seed layer content-classifies the
front door and the build phase honours a no-GitHub-issue run.

- seed.py: a bare prompt seeds title/goal and is handled interactively; repo+issue
  -> github; structured -> job. Additive, backward-compatible with explicit sources.
- oneshot_feed.py: accept {prompt} tasks, build+pass the seed request, drop the
  synthetic GitHub issue (the negative id stays a LOCAL work-id for clone/branch
  naming only), add --provision to create+seed a target repo before the clone.
- admin.py: honour the negative/empty issue marker — publish still deploys and
  consolidate_pr still opens ONE PR, but the issue-keyed label state machine and
  the Closes #<n> trailer are skipped (no GitHub issue to mutate).
- action.py: dump the leaf-exception traceback under -v/DISPATCH_DEBUG and fold the
  exception message into the Error detail (a bare "raised JSONDecodeError" hid the
  origin).
- app/scripts/demo/: provision-from-template.sh (minimal self-contained Next.js dog
  blog, stubbed interactive components) + dogblog-oneshot.json demo task.
…live toggle

Cross-process live tracking — the viewer could only watch runs in its own
process (in-process bus). Now:
- foundation/trace.py: a FileObserver that writes a per-run JSONL sidecar
  (meta/enter/leave/event/status) via the engine's Observer hook, so events
  carry the same state.id the graph nodes key on.
- baseworkflow.run_live attaches it when $DISPATCH_LIVE_TRACE[_DIR] is set
  (opt-in, passive, never overrides a caller observer).
- viewer: bus.py tails a sidecar into a Run; GET /api/sessions/live lists
  them and POST /api/sessions/attach streams one through the existing SSE
  path; a "live runs" list in the sessions panel attaches + lights up nodes
  (auto-switching to the run's workflow so ids map).

Also, in the probe (uncommitted since the ELK commit):
- Inspector no longer pre-announces declared "writes"; after a probe it shows
  the actual before/after diff of deliverables + shared, highlighted per shelf
  and tagged new/changed (server snapshots both shelves around the run).
- The mock/live control is a single "• live" toggle that glows red when active.
@moonexpr
moonexpr merged commit 075587b into beta Jul 8, 2026
2 checks passed
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