Repository navigation
Expose action declaration APIs on Snapshot - #547
Conversation
Olive Review: ✅ ApprovedPosted by: GitHub @olive-agent[bot] Review SummaryThe change makes Snapshot the primary API for declaring actions and updates documentation and helper receivers accordingly. ActionBuilder remains a superinterface for compatibility but is deprecated, guiding callers toward Snapshot. Unique current findings: 0. Selected preexisting concerns: 0. 📣 Human Attention
Component Walkthrough
PR Inbox Meta{
"changeComplexity": "complex",
"hasHumanAttention": true
} |
| * | ||
| * @param transition A function that is invoked when [Action] emits an [Event]. | ||
| */ | ||
| override fun <Event> events( |
There was a problem hiding this comment.
Adding copies of these from ActionBuilder as that interface will be removed.
JaCoCo Code Coverage 93.04% ✅
Generated by 🚫 Danger |
|
olive review |
📊 Benchmark Comparison ReportSummary
|
| Benchmark | Baseline | Current | Change |
|---|---|---|---|
| com.instacart.formula.benchmarks.ChildrenInitializationBenchmark.initializeNewChildren (childrenCount=100) | 6.624 ± 0.213 us/op | 11.48 ± 0.262 us/op | +73.3% 🔴 |
| com.instacart.formula.benchmarks.CallbackInitializationBenchmark.initializeNewCallbacks (callbackCount=50) | 3.791 ± 0.385 us/op | 6.213 ± 0.971 us/op | +63.9% 🔴 |
| com.instacart.formula.benchmarks.GlobalEffectQueueBenchmark.measure10Effects | 0.422 ± 0.012 us/op | 0.66 ± 0.037 us/op | +56.4% 🔴 |
| com.instacart.formula.benchmarks.ChildrenCountBenchmark.stateChanges (childrenCount=100) | 10.356 ± 0.112 us/op | 15.859 ± 0.197 us/op | +53.1% 🔴 |
| com.instacart.formula.benchmarks.ChildrenInitializationBenchmark.initializeNewChildren (childrenCount=25) | 2.333 ± 0.33 us/op | 3.572 ± 0.308 us/op | +53.1% 🔴 |
| com.instacart.formula.benchmarks.ChildrenCountBenchmark.stateChanges (childrenCount=25) | 9.48 ± 0.193 us/op | 14.292 ± 0.155 us/op | +50.8% 🔴 |
| com.instacart.formula.benchmarks.ActionInitializationBenchmark.initializeNewActions (actionCount=1) | 0.503 ± 0.052 us/op | 0.753 ± 0.108 us/op | +49.7% 🔴 |
| com.instacart.formula.benchmarks.TransitionBenchmark.transitions (depth=10) | 9.408 ± 0.056 us/op | 14.056 ± 0.077 us/op | +49.4% 🔴 |
| com.instacart.formula.benchmarks.ChildrenCountBenchmark.stateChanges (childrenCount=1) | 9.347 ± 0.501 us/op | 13.952 ± 0.114 us/op | +49.3% 🔴 |
| com.instacart.formula.benchmarks.TransitionBenchmark.transitions (depth=0) | 9.222 ± 0.082 us/op | 13.729 ± 0.167 us/op | +48.9% 🔴 |
| com.instacart.formula.benchmarks.ActionInitializationBenchmark.initializeNewActions (actionCount=100) | 7.388 ± 0.187 us/op | 10.954 ± 0.224 us/op | +48.3% 🔴 |
| com.instacart.formula.benchmarks.CallbackOverheadBenchmark.transitions (callbackCount=10) | 9.737 ± 0.132 us/op | 14.381 ± 0.181 us/op | +47.7% 🔴 |
| com.instacart.formula.benchmarks.ActionCountBenchmark.stateChanges (actionCount=25) | 9.622 ± 0.223 us/op | 14.2 ± 0.092 us/op | +47.6% 🔴 |
| com.instacart.formula.benchmarks.ActionCountBenchmark.stateChanges (actionCount=1) | 9.509 ± 0.144 us/op | 13.975 ± 0.243 us/op | +47.0% 🔴 |
| com.instacart.formula.benchmarks.CallbackOverheadBenchmark.transitions (callbackCount=50) | 10.98 ± 0.352 us/op | 16.125 ± 1.068 us/op | +46.9% 🔴 |
| com.instacart.formula.benchmarks.ChildrenInitializationBenchmark.initializeNewChildren (childrenCount=1) | 0.492 ± 0.093 us/op | 0.721 ± 0.095 us/op | +46.6% 🔴 |
| com.instacart.formula.benchmarks.ActionCountBenchmark.stateChanges (actionCount=100) | 10.362 ± 0.705 us/op | 15.11 ± 0.126 us/op | +45.8% 🔴 |
| com.instacart.formula.benchmarks.GlobalEffectQueueBenchmark.measure1Effect | 0.036 ± 0.0 us/op | 0.053 ± 0.001 us/op | +45.4% 🔴 |
| com.instacart.formula.benchmarks.CallbackInitializationBenchmark.initializeNewCallbacks (callbackCount=10) | 1.241 ± 0.162 us/op | 1.786 ± 0.285 us/op | +43.8% 🔴 |
| com.instacart.formula.benchmarks.GlobalEffectQueueBenchmark.measure100Effects | 6.005 ± 0.26 us/op | 8.638 ± 0.068 us/op | +43.8% 🔴 |
| com.instacart.formula.benchmarks.TransitionBenchmark.transitions (depth=20) | 10.166 ± 1.368 us/op | 14.579 ± 0.135 us/op | +43.4% 🔴 |
| com.instacart.formula.benchmarks.ActionInitializationBenchmark.initializeNewActions (actionCount=25) | 2.426 ± 0.196 us/op | 3.268 ± 0.135 us/op | +34.7% 🔴 |
| com.instacart.formula.benchmarks.TransitionQueueBenchmark.measure10000 | 0.316 ± 0.019 us/op | 0.355 ± 0.012 us/op | +12.6% 🔴 |
| com.instacart.formula.benchmarks.TransitionQueueBenchmark.measure1 | 0.303 ± 0.004 us/op | 0.341 ± 0.007 us/op | +12.6% 🔴 |
No significant changes (1 benchmarks)
| Benchmark | Baseline | Current | Change |
|---|---|---|---|
| com.instacart.formula.benchmarks.TransitionQueueBenchmark.measure100 | 0.317 ± 0.03 us/op | 0.347 ± 0.008 us/op | +9.4% |
Regressions: ±10% with non-overlapping confidence intervals. Improvements: ±10% change only.
Generated by 🚫 Danger
Jawnnypoo
left a comment
There was a problem hiding this comment.
surprised no samples were updated for the site or the README, maybe nothing applicable there?
Summary
Snapshot.Snapshot.ActionBuilderin favor ofSnapshot; retain it as a superinterface for now.Validation
./gradlew build