Repository navigation
Workbench: Internal Data API + System DAG view (closes #306, #314) - #322
Merged
Merged
Conversation
5 tasks done
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.
Summary
One PR covering both umbrella issues:
Both umbrellas closed with detailed summaries on the issues themselves; remaining sub-issues (#318 polish, #320 compound expand, #321 visual regression) tracked separately.
The DAG view sits on top of the new Internal Data API — the data plumbing and the consumer were built together on this branch, and the DAG view's three implementation phases are the API's first major consumer beyond the existing profiler. Single PR keeps the two halves reviewable as one unit.
What landed — Internal Data API (#306)
v1
/api/sessions/{id}/topology,/track/...,/aggregate. JSON wire.X-Workbench-Api,X-Workbench-Wire) with soft-launch tolerance.useSelectionStore(typed dimension slots + URL sync),useHoverStore(volatile, cross-panel hover for system + phase)./streamunified endpoint with selective subscription.SessionLifecyclefield migration (Loading / Ready / Closed).v2 — engine instrumentation phases that landed
predecessors/successors).SystemTickSummary[]cache section (v12+) with(durationUs, startUs, endUs, readyUs, entitiesProcessed, workersTouched, chunksProcessed, skipReasonCode, flags).readyUscapture (folded into the same section).QueueTickEndinstant event (kind 244) →QueueTickSummariescache section.PostTickSummarycache section.What landed — System DAG view (#314)
?help overlays on both panels. Phase-flow arrows in lanes layouts. Phase-coloured backdrop in compact/circular layouts. Theme-aware hover indicators.ViewportPortalintegration so all lane decorations pan/zoom with nodes.Bug fixes during the work
DagSchedulerchunk-exception wedge. A throwing chunk left the scheduler in a tight CPU spin (FindReadySystemkept returning the failed system; workers walked intoProcessPipeline → break → repeat). Fixed viaDrainFailedSystemChunks— failure path drains remaining chunks atomically soOnSystemCompletefires.QueueTickEnd(kind 244) misclassified as a span. Decoder was reading 25 payload bytes as a fake span header → garbage timings → ~30 phantom nested spans on the TickDriver track per tick. Fixed viaIsSpancarve-out (C# + TS mirror), proper instant decoder, missing label entries.Design doc updates
claude/design/workbench/modules/09-system-dag.md— new "Implementation status" block, every section reconciled with shipped state, architecture diagram redrawn to show CP as its own panel.claude/design/workbench/10-internal-data-api.md— every v2 phase + missing-data row marked with current status.Test plan
dotnet test test/Typhon.Engine.Tests/Typhon.Engine.Tests.csproj -c Debug— should pass 3,786 (the newParallelQueryException_TickCompletes_NoFullCpuWedgetest inExceptionHandlingTests.cscovers the chunk-exception wedge fix; without the fix it times out at 2 s).dotnet test test/Typhon.Workbench.Tests/Typhon.Workbench.Tests.csproj.cd tools/Typhon.Workbench/ClientApp && npx vitest run— should pass 381 (24 incriticalPath.test.tsincluding the 1024×200 perf test)./wb-dev start, open an AntHill trace, verify the DAG renders in all four layouts, snapshot the last 600 ticks, open the Critical Path panel, exercise single ↔ aggregate ↔ full-Gantt ↔ metronome toggles, hover a phase stripe to confirm cross-panel highlight, click a phase-fence wait to confirm straggler jump.DrainFailedSystemChunksfix).🤖 Generated with Claude Code