Commit dc670b2
feat: runtime execution trace bitmask tracking with manifest view (#119)
* Initial plan
* feat: add execution trace bitmask to core engine
- Add bitIndex to TraversalEntry for bitmask encoding
- Add buildTraversalManifest (alias for enumerateTraversalIds)
- Add decodeExecutionTrace to decode bitmask back to entries
- Add buildTraceBitsMap for runtime wire→bit lookup
- Add traceBits/traceMask to TreeContext interface
- Inject trace recording in resolveWires (primary/fallback/catch/then/else)
- Add executionTrace to ExecuteBridgeResult
- Propagate trace mask through shadow trees
- All existing tests pass (133 execute-bridge + 64 resilience + 14 traversal)
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* test: add comprehensive tests for execution trace feature
- Test buildTraversalManifest alias and bitIndex assignment
- Test decodeExecutionTrace with empty/single/multiple/round-trip
- Test end-to-end trace collection: primary, fallback, catch, then/else, const
- All 27 tests pass
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* feat: add execution trace and manifest view to playground
- Add executionTrace to RunResult type in engine
- Pipe executionTrace through runBridgeStandalone
- Add getTraversalManifest and decodeExecutionTrace helpers to engine
- Show execution trace badge (hex) in ResultView
- Add Manifest tab to Bridge DSL panel header
- ManifestView shows all traversal entries with kind badges
- Active paths highlighted with ring + dot based on execution trace
- Works across mobile and desktop layouts
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* refactor: address code review feedback
- Rename dslTab → activeDslTab for clarity
- Rename fi → fallbackIndex in applyFallbackGates loop
- Add comment explaining bitmask check in decodeExecutionTrace
- Add INVARIANT comment for traceMask/traceBits coupling
- Document bitIndex assignment lifecycle in enumerateTraversalIds
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* feat: BigInt trace mask, manifest grouping/filtering, scroll fix
- Switch traceMask from number to bigint for unlimited entry support
- Update all recording helpers to use BigInt bitwise ops
- Update decodeExecutionTrace, ExecuteBridgeResult, TreeContext
- Update playground engine, ResultView, Playground types
- ManifestView: group entries by wire, show group headers for alternatives
- ManifestView: add "Show alternatives only" toggle filter
- ManifestView: fix scrolling with h-full / max-h-[60vh]
- Update tests to use bigint assertions
- All 1143 tests pass
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* fix: add aria-label to manifest group count for accessibility
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* feat: source descriptions, alias labels, empty-array grouping, always-on toggle
- Add `description` field to TraversalEntry with human-readable source info
(e.g., "api.username", "|| \"Anonymous\"", "catch continue", "= \"SBB\"")
- Fix alias wires showing as `*` — use `to.field` for `__local` module targets
- Fix empty-array entries grouped under same `*` — assign unique wireIndex per scope
- Handle map resolves tool, input, context, pipe, and alias refs to handle aliases
- Filter toggle always visible regardless of whether alternatives exist
- Consistent group headers shown for all entries (not just alternatives)
- Empty-array entries show iterator variable in description (e.g., "c[] empty")
- All 1143 tests pass
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
* UI tweaks
* LSP for dead code in playground
* Docs
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
Co-authored-by: Aarne Laur <aarne.laur@gmail.com>1 parent f1aefca commit dc670b2
19 files changed
Lines changed: 1413 additions & 116 deletions
File tree
- .changeset
- packages
- bridge-compiler/src
- bridge-core
- src
- test
- bridge-parser/src/parser
- bridge/test
- docs-site/src/content/docs/advanced
- playground/src
- codemirror
- components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
338 | 340 | | |
339 | 341 | | |
340 | 342 | | |
341 | | - | |
| 343 | + | |
342 | 344 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
148 | 161 | | |
149 | 162 | | |
150 | 163 | | |
| |||
726 | 739 | | |
727 | 740 | | |
728 | 741 | | |
| 742 | + | |
| 743 | + | |
729 | 744 | | |
730 | 745 | | |
731 | 746 | | |
| |||
761 | 776 | | |
762 | 777 | | |
763 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
764 | 796 | | |
765 | 797 | | |
766 | 798 | | |
| |||
0 commit comments