FE-740: Add Read Arcs#8774
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
PR SummaryMedium Risk Overview Core model, Zod schemas, and The editor surfaces read arcs in arc/transition properties, list badges, and canvas styling (distinct dash from inhibitor). User docs and AI prompts describe read vs consume semantics. Tests cover mutations, import/clipboard, enablement, firing, full-frame execution, Monte Carlo, and LSP completions. Reviewed by Cursor Bugbot for commit 59cbd83. Bugbot is set up for automated code reviews on this repo. Configure here. |
🤖 Augment PR SummarySummary: Adds Read Arcs to Petrinaut SDCPNs: input arcs that require and expose tokens to transition code but do not consume them on firing. Changes:
Technical Notes: Adds targeted unit tests covering schema preservation, enablement logic, lambda/kernel inputs, and non-consuming behavior for read arcs. 🤖 Was this summary useful? React with 👍 or 👎 |
🌟 What is the purpose of this PR?
This PR introduces Read Arcs in Petrinaut.
Read Arcs work like a normal Arc, but they are read-only. They can be used to read data from an Arc without modifying it.
They are almost syntactic sugar for a self-loop (same Place as input and output of transition with same token), but they are convenient in the sense that prevent the user from accidentally modifying the data they are trying to read.
Change in runtime behaviour
Currently, for simulating the same behaviour you could use this self-loop pattern.
Though given the tokens of Reader A would be consumed temporarily in the frame during which the transition would be happening, Reader B would not be able to consume it until the next frame.
With Read Arcs, both these transitions would be triggered in the same frame.
Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🛡 What tests cover this?
❓ How to test this?