feat: non-deterministic function detection and temporal improvements#376
feat: non-deterministic function detection and temporal improvements#376
Conversation
- Add `non_deterministic` field to GraphFn for tracking functions with non-deterministic output (rand, randomUUID, timestamp, etc.) - Extend cypher_fn! macro with non-deterministic function variants - Add plan_is_non_deterministic() to walk execution plans and detect non-deterministic function usage (used for effects replication decisions) - Add zero-arg temporal overloads: date(), localtime(), localdatetime() - Add .transaction() temporal variants using Runtime::transaction_timestamp - Add transaction_timestamp field to Runtime struct Split from #359.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 36 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #376 +/- ##
==========================================
- Coverage 84.15% 83.90% -0.26%
==========================================
Files 110 110
Lines 28963 29077 +114
==========================================
+ Hits 24375 24397 +22
- Misses 4588 4680 +92
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Split from #359.
non_deterministicfield toGraphFnstruct for tracking functions with non-deterministic outputcypher_fn!macro with variants for non-deterministic functionsplan_is_non_deterministic()— walks execution plan tree to detect non-deterministic function calls (needed by effects replication to decide whether to use effects or full re-execution)date(),localtime(),localdatetime()returning current time.transaction()temporal variants usingRuntime::transaction_timestampfor consistent values within a transactionrand(),randomUUID(),timestamp()and temporal functions as non-deterministicTest plan
cargo checkpassesplan_is_non_deterministic()correctly identifies plans with rand/timestamp calls