Skip to content

feat(automations): implement lookbook V2 scheduler and run ledger - #1521

Closed
ScriptedAlchemy wants to merge 3 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/automations-lookbook-v2-abee
Closed

ScriptedAlchemy wants to merge 3 commits into
codex/tracedecay-total-redesign-plan-reopenedfrom
cursor/automations-lookbook-v2-abee

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements the lookbook V2 Automations plate (mockups/ui-concept-v2/09-automations/final/01-scheduler-run-ledger.md) into the shipping dashboard/ on the feat: TraceDecay V2 delivery (PR8–PR13) + daemon performance, memory, and reliability overhaul #707 tip.
  • Scheduler bay, KPI window tallies, managed jobs (scheduler tasks + user jobs), skills, automatic fact outcomes and the durable run ledger, all read from the daemon's automation authorities, with a run inspector that previews on hover/focus and pins on click.
  • Extends the /api/automation/runs row with task_key, error_classification, error_retryable and backend_attempt_count (all already on the ledger record) so the browser can join and type without inventing.

Automations loaded, 1440 dark
Selected run with inspector, artifacts and daemon verdict

Motivation

Channel 09 was a stack of cards. The approved plate asks for one auditable ledger: configuration and observation kept distinct, every aggregate declaring its window, artifact presence and integrity independent, and no control that lacks a real mutation path.

Changes

  • dashboard/src/workspaces/automations/
    • AutomationsPage.tsx — composition, five independent reads in labelled bays, transient/pinned inspection state, Escape clears.
    • SchedulerBay.tsx — status word read as configuration (configured is never running); observed scheduler run named separately from the newest last_scheduler_run; real pause/resume pair gated on scope writability; per-task due/skip/last-run table; LedgerReadouts KPI bar over exactly the loaded page.
    • RunLedger.tsx — newest-first table: UTC start, task key, measured duration or typed absence, outcome + tallies, fact receipts joined on run_id, artifact count with integrity read from the artifacts query cache only (unchecked · inspect run until inspected; no artifact to verify for none).
    • RunInspector.tsx — run / scheduler task / user job / fact receipt detail; artifacts fetched only on inspection, daemon verdict verbatim, payload fetched only when an artifact is chosen and identity-guarded.
    • AutomationLedgers.tsx — user jobs joined on exact user_job:<id>, skills with provenance, receipts table.
    • LedgerTable.tsx — table grammar: fixed column shares that wrap rather than clip, InspectRow (hover/focus inspect, click select, roving arrows, 44px hit), ToneWord (word + solid/hatched/dashed lamp), Absent.
    • ledger.ts + ledger.test.ts — pure model: typed-state tones, scheduler reading, UTC/duration formatting, window tallies, exact-identity joins, artifact helpers.
    • RunHistory.tsx kept for the Knowledge curation console (its only remaining consumer); shared artifact logic moved into ledger.ts.
  • dashboard/src/data/query/automation.ts — run row schema gains the four fields; jobs/skills schemas read the struct fields the routes already serialize; SchedulerLastRunSchema reads the unknown last-run record.
  • crates/tracedecay-dashboard-api/src/automation_run_api.rsrun_history_row emits the four fields; unit tests for present and absent cases.
  • dashboard/stories/fixtures/data.ts — wire-true automation fixtures (task_key, delivery.mode, receipts filed under a served run, a running and a skipped row, per-run artifact list + payload, stateless pause/resume answers).
  • dashboard/audit-baselines/automations__*.png — re-baselined for the redesigned surface.
  • mockups/ui-concept-v2/09-automations/README.md — production-authority file list updated.

Test plan

  • cargo test -p tracedecay-dashboard-api --lib automation_run_api — 2 passed; rustfmt --check clean
  • dashboard: npx tsc --noEmit, npx vitest run — 162 files / 1490 tests pass; npm run build clean
  • DOM journey tests: hover preview → leave yields → click pins → Escape clears; keyboard focus preview + arrow roving; artifacts fetched only on inspection; verdict verbatim in inspector and ledger row; payload identity guard; transport faults on each of the five reads keep the other four honest and the KPI bar prints dashes
  • Browser journey on the built bundle in headless Chromium with the story fixtures routed at the network layer (report attached as automations_journey_report.json): initial no selection → hover preview (row not selected) → pointer leaves table → empty → click → selected, aria-pressed=true, exactly one /runs/{id}/artifacts read, verdict ledger publication mismatch in inspector and row → choose traces → exactly one /artifacts/traces read, payload rendered → keyboard: focus → preview, ArrowDown moves to next row, Enter → selected, Escape → empty and no pressed row → task / job / receipt inspection → Pause → one POST /scheduler/pause, status word becomes paused from the daemon's answer → all /api/** 503: five error chips, zero empty-state sentences, six dashes
  • Touch targets: 0 of 32 controls under 44×44 at 1440 and 320. Reflow: no clipped content from this workspace at 1440/768/320 (the four 320 offenders are the shell status strip, unchanged here)
  • npm run visual:audit -- --diff: six automations plates drift (redesign) with zero Plan 11 failures; the 12 failures reported are Brain/Loom, pre-existing

Checklist

  • CHANGELOG.md updated (under [Unreleased] if no version bump)
  • No secrets, credentials, or .env files included
  • Breaking changes documented — none; /api/automation/runs rows gain four keys, the dashboard's strict row schema is updated in the same change

Gaps (typed absences the daemon does not yet serve)

  • Next-due timestamps: the status route serves a due flag per tick, not an earliest/latest due time; the bay says so.
  • Scheduler liveness: no heartbeat route; configured is presented as configuration and the only runtime evidence is the last scheduler-triggered ledger record per task.
  • Built-in task schedules: live in the automation configuration authority (/api/plugins/holographic/curation/config), not the status route; not read here.
  • Retry / Cancel / Run now: POST /api/automation/jobs/{id}/run answers 202 accepted (an acceptance ticket, not a durable receipt) and there is no cancel/retry route, so no such control is drawn.
  • Attempt lineage: only backend_attempt_count is projected; the per-attempt backend_attempts records remain behind the artifact routes.
  • Aggregates are over the loaded ledger page (newest ≤ 50, bounded when has_more), never the whole ledger — no route tallies it.
  • Fixture 404s: the story fixture layer always answers 200, so an unknown run's artifact route renders as unsupported schema in the audit rather than the daemon's real 404 error.
  • Knowledge curation console still embeds the disclosure-style RunHistory; adopting the ledger + inspector there is a channel-07 decision.
  • Real daemon: the journey ran against the built bundle with fixture-served /api/**; an enrolled daemon profile was not available on this VM, so live ledger identity and the real pause receipt are unverified here.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Rebuild channel 09 on the daemon's automation authorities: scheduler
configuration reading with the real pause/resume control, per-task due
and skip readings with the observed last scheduler run, user jobs joined
to the ledger on their exact task_key, managed skills with provenance,
automatic fact receipts filed under their run, and the durable run
ledger with a run inspector. Hover and focus preview an identity, click
pins it, Escape clears it; artifacts and the daemon's chain-integrity
verdict are read only once a run is inspected.

The run row now carries task_key, error_classification, error_retryable
and backend_attempt_count from the ledger record so the dashboard can
join and type without inventing either.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3cdd02e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

cursoragent and others added 2 commits September 17, 2026 02:52
Give every ledger table fixed column shares so identifiers wrap inside
their column instead of pushing trailing columns out of the panel, and
drop the clipping and no-wrap rules so no cell hides content at 768 or
320. Merge the artifact count and integrity verdict into one column and
stack the last-run outcome over its stamp.

Add per-run artifact list and payload fixtures plus stateless pause and
resume answers so the story surface exercises the verdict and control
paths, and point the concept README at the new module set.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Integrated directly on the #707 branch at 9ed3058 and verified with the full dashboard suite, dashboard typecheck, contract drift check, and affected Rust compile.

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.

2 participants