Repository navigation
An inserted structure's activator reads the inserted Parameter - #652
Merged
Merged
Conversation
Deploying cozy-loop-studio with
|
| Latest commit: |
752d831
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://55da8f68.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://activator-ref-insert-extract.cozy-loop-studio.pages.dev |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #619 (item 2 only; items 3, 4, 1 and 5 stay for their own scopes).
What was wrong
An activator can compare with a Parameter (
>= @p,< @p - 1, docs/parameter-activator.md §PA4). Structure insert re-issues every node id, and rewrites the@idin a Register expression and in a@paramflow, but it left the activator's@idas it was:p, the activator read that node, not the inserted Parameter;p, it read no node.Extract (Save selected structure…) let such an activator through without its Parameter, while it refuses a Register or a flow that does the same.
Found while fixing, not in the #619 text: a selection holding the activator and its Parameter was written as a version 1 file when nothing else in it needed version 2. In version 1
>= @pis not a Parameter reference (§PA4), so the insert could not re-issue it either, and the run did not open the gate.The change (
src/model/moduleGraph.ts)@idis read with the engine's ownparseActivatorExprat the module's version and written back as the Inspector writes it,op @newId [± n]. A literal comparison is unchanged. An@idthat is not a module node (a hand-made file) refuses the insert, as for a Register.m_act → m_th).Tests (
src/model/moduleGraph.test.ts), written firstOn main's code, 6 of the 9 new tests fail. The literal test and the two controls pass.
m_th(100): expr>= @m_th>= @<inserted id>>= @m_th/ 0< @m_th - 2< @<inserted id> - 2elsewhere>= 3dangling=m_act → m_th>= @m_th/ 0@m_th + 1The run checks step the engine (
step) once on the inserted graph. The Source behind the activator moves 1 only when the activator reads the inserted Parameter (5 against a Pool of 10). The host's ownm_this 100.Checks
npx tsc -b: clean.npm run lint: 88 warnings, the baseline.check:*scripts: pass.What it touches