Skip to content

Allow mixing ?? with || in wire definitions in any order#96

Merged
aarne merged 2 commits intomainfrom
wire_fix99
Mar 5, 2026
Merged

Allow mixing ?? with || in wire definitions in any order#96
aarne merged 2 commits intomainfrom
wire_fix99

Conversation

@aarne
Copy link
Contributor

@aarne aarne commented Mar 5, 2026

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Mar 5, 2026

🦋 Changeset detected

Latest commit: 347824d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@stackables/bridge-core Minor
@stackables/bridge-parser Minor
@stackables/bridge-compiler Minor
@stackables/bridge Minor
@stackables/bridge-graphql Patch

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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 5, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bridge 347824d Commit Preview URL

Branch Preview URL
Mar 05 2026, 08:28 PM

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

🐰 Bencher Report

Branchwire_fix99
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
compiled: absolute baseline (passthrough, no tools)📈 view plot
🚷 view threshold
0.00 ns
(-0.53%)Baseline: 0.00 ns
0.00 ns
(91.66%)
compiled: array + tool-per-element 10📈 view plot
🚷 view threshold
0.01 ns
(-0.47%)Baseline: 0.01 ns
0.01 ns
(93.59%)
compiled: array + tool-per-element 100📈 view plot
🚷 view threshold
0.03 ns
(-1.39%)Baseline: 0.03 ns
0.04 ns
(93.01%)
compiled: chained 3-tool fan-out📈 view plot
🚷 view threshold
0.00 ns
(+0.33%)Baseline: 0.00 ns
0.00 ns
(93.66%)
compiled: flat array 10 items📈 view plot
🚷 view threshold
0.00 ns
(-0.68%)Baseline: 0.01 ns
0.01 ns
(92.83%)
compiled: flat array 100 items📈 view plot
🚷 view threshold
0.01 ns
(+0.11%)Baseline: 0.01 ns
0.01 ns
(94.61%)
compiled: flat array 1000 items📈 view plot
🚷 view threshold
0.07 ns
(+0.48%)Baseline: 0.07 ns
0.07 ns
(95.82%)
compiled: nested array 10x10📈 view plot
🚷 view threshold
0.02 ns
(+0.58%)Baseline: 0.02 ns
0.02 ns
(94.80%)
compiled: nested array 20x10📈 view plot
🚷 view threshold
0.03 ns
(+0.11%)Baseline: 0.03 ns
0.04 ns
(94.82%)
compiled: nested array 5x5📈 view plot
🚷 view threshold
0.01 ns
(+0.21%)Baseline: 0.01 ns
0.01 ns
(94.42%)
compiled: short-circuit (overdefinition bypass)📈 view plot
🚷 view threshold
0.00 ns
(-0.98%)Baseline: 0.00 ns
0.00 ns
(91.38%)
compiled: simple chain (1 tool)📈 view plot
🚷 view threshold
0.00 ns
(-0.37%)Baseline: 0.00 ns
0.00 ns
(91.82%)
exec: absolute baseline (passthrough, no tools)📈 view plot
🚷 view threshold
0.00 ns
(+4.71%)Baseline: 0.00 ns
0.00 ns
(85.28%)
exec: array + tool-per-element 10📈 view plot
🚷 view threshold
0.08 ns
(+2.31%)Baseline: 0.08 ns
0.10 ns
(76.87%)
exec: array + tool-per-element 100📈 view plot
🚷 view threshold
0.68 ns
(+0.88%)Baseline: 0.68 ns
0.93 ns
(73.70%)
exec: chained 3-tool fan-out📈 view plot
🚷 view threshold
0.02 ns
(+12.25%)Baseline: 0.01 ns
0.02 ns
(82.82%)
exec: flat array 10 items📈 view plot
🚷 view threshold
0.01 ns
(-8.96%)Baseline: 0.02 ns
0.04 ns
(40.29%)
exec: flat array 100 items📈 view plot
🚷 view threshold
0.07 ns
(-23.29%)Baseline: 0.10 ns
0.32 ns
(23.53%)
exec: flat array 1000 items📈 view plot
🚷 view threshold
0.67 ns
(-31.72%)Baseline: 0.98 ns
3.84 ns
(17.42%)
exec: nested array 10x10📈 view plot
🚷 view threshold
0.12 ns
(-17.69%)Baseline: 0.15 ns
0.39 ns
(31.10%)
exec: nested array 20x10📈 view plot
🚷 view threshold
0.23 ns
(-19.37%)Baseline: 0.29 ns
0.79 ns
(29.36%)
exec: nested array 5x5📈 view plot
🚷 view threshold
0.05 ns
(-8.88%)Baseline: 0.05 ns
0.11 ns
(44.12%)
exec: short-circuit (overdefinition bypass)📈 view plot
🚷 view threshold
0.00 ns
(+5.48%)Baseline: 0.00 ns
0.00 ns
(92.84%)
exec: simple chain (1 tool)📈 view plot
🚷 view threshold
0.01 ns
(+10.11%)Baseline: 0.01 ns
0.01 ns
(84.88%)
parse: large bridge (20 handles x 5 wires)📈 view plot
🚷 view threshold
1.10 ns
(+11.38%)Baseline: 0.99 ns
1.36 ns
(80.79%)
parse: simple bridge📈 view plot
🚷 view threshold
0.04 ns
(+19.62%)Baseline: 0.03 ns
0.05 ns
(83.86%)
🐰 View full continuous benchmarking report in Bencher

* Initial plan

* Migrate Wire type to unified fallbacks array, update runtime and gate tests

Co-authored-by: aarne <82001+aarne@users.noreply.github.com>

* Update resilience test assertions to use new fallbacks: WireFallback[] pattern

Replace old separate falsyFallback, falsyFallbackRefs properties with the
unified fallbacks array in test assertions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Refactor parser to use unified fallbacks: WireFallback[] pattern

Replace all separate falsyFallback*/nullishFallback* properties across
~13 locations in parser.ts with a single fallbacks: WireFallback[] array.
Also update bridge-format.ts serializer and export WireFallback from
bridge-core.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Migrate codegen from separate falsy/nullish properties to unified fallbacks array

Update bridge-compiler codegen.ts and related test files to use the new
Wire.fallbacks?: WireFallback[] property instead of the old separate
falsyFallback/nullishFallback/falsyControl/nullishControl/falsyFallbackRefs/
nullishFallbackRefs properties.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Add mixed wire chain tests, playground example, and changeset

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>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aarne aarne merged commit 7384d3f into main Mar 5, 2026
8 checks passed
@aarne aarne deleted the wire_fix99 branch March 5, 2026 20:29
@github-actions github-actions bot mentioned this pull request Mar 5, 2026
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