feat: runtime execution trace bitmask tracking with manifest view#119
feat: runtime execution trace bitmask tracking with manifest view#119aarne merged 11 commits intotraversal_id_doingfrom
Conversation
🦋 Changeset detectedLatest commit: 0ad7859 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- 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>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bridge | 0ad7859 | Commit Preview URL Branch Preview URL |
Mar 09 2026, 11:35 AM |
- 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>
- 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>
- 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>
|
Good work ... small additions look at http://localhost:4321/playground#sbb-train-search which is a bit more complicated bridge
use BigInt or a Bit Vector Array to enable scaling |
- 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>
Co-authored-by: aarne <82001+aarne@users.noreply.github.com>
All three items addressed in 1. Manifest scrolling — Fixed with 2. Filter & group alternatives — Entries are grouped by wire target. Groups with alternatives (fallback/catch/ternary) show a bordered container with the target path as header and the options space below. "Show alternatives only" toggle hides always-on single-path groups. For SBB Train Search this reduces from 22 → 5 groups. 3. BigInt trace mask — Replaced Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
http://localhost:4321/playground#alias the manifest show duplicate ===== actually for all labels we should be able to show the the primary = api.username ===== we have 2 ways to show the paths in ui ... always use the same element with ID as group header and variants below variant always allow to switch on and off the filter for alternatives ... the ui is too smart right now ... lets users switch even if it means the next view will be empty ===== http://localhost:4321/playground#sbb-train-search o <- api.connections[] as c { grouping them under the same |
…-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>
|
All items addressed in Alias Source descriptions — Added
Empty-array grouping — Each array scope gets a unique negative Filter toggle — Always visible. Shows "No entries match" message if filtered view is empty. SBB (alternatives only — 4/23 groups): Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
* feat(bridge-core): add enumerateTraversalIds for bridge traversal path enumeration (#117) * Initial plan * feat(bridge-core): add enumerateTraversalIds function Enumerates all possible traversal paths through a Bridge. Each entry represents a unique code path determined by the wire structure (fallback chains, catch gates, array scopes, ternary branches). Useful for complexity assessment and future integration into the execution engine for monitoring. Co-authored-by: aarne <82001+aarne@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: aarne <82001+aarne@users.noreply.github.com> * 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> * Rename * feat: add SocialIcons component and update social links in config --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: aarne <82001+aarne@users.noreply.github.com>



Track which traversal paths a request takes through a bridge at runtime, encoding decisions as a compact bitmask. Adds static manifest building, runtime collection, decode API, and playground visualization.
Core API
buildTraversalManifest(bridge)— returnsTraversalEntry[]withbitIndexanddescriptionon each entrydecodeExecutionTrace(manifest, trace)— decodes bitmask back to active entriesexecutionTraceadded toExecuteBridgeResult— always populated byexecuteBridge()TraversalEntry descriptions
Each
TraversalEntryincludes a human-readabledescriptionfield showing the source reference, value, or control keyword:api.username,departure.delay|| "Anonymous",?? api.username,|| journey.categorycatch "UNKNOWN",catch continue 3= "SBB"? api.yes,: api.noc[] empty,s[] emptyHandle alias resolution covers tool, input, context, pipe, and alias (
__local) refs.Runtime collection
traceBits/traceMaskonTreeContext—Map<Wire, TraceWireBits>+ boxed[bigint]bigintfor unlimited scaling — no bit-count limit per bridgeresolveWires: primary, fallback, catch, then/elseMap.get+ one bitwise OR per wire decisionPlayground
*)c[] empty,s[] empty)Alias example — proper labels with source descriptions:
SBB Train Search — separate empty-array groups, source descriptions:
SBB filtered to alternatives only (4/23 groups):
String Transform — trace badge:
Limitations
executionTrace: 0n(not instrumented)✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.