feat(modelchecker): expose action returns on Link + add no-state-retu…#355
Merged
Conversation
…rns flag
Builds on the prior CloneWithRefs fix by giving downstream consumers
(graph, MBT, explorer) a forward-compatible way to read action return
values from the per-transition Link rather than per-state Process.Returns.
Producer-side additions:
- New Link.Returns starlark.StringDict field, populated in processNode
alongside Labels/Messages and propagated by Attach/Duplicate to outbound
links.
- proto/graph.proto Link gets `repeated NameValue returns = 10` so the
per-transition returns are serialized into adjacency-list .pb files.
Sorted by name in returnsToNameValues for deterministic output.
- GenerateDotFile renders the return value on the edge label as
`\n returns: {...}`.
Migration flag:
- New --experimental_no_state_returns (off by default). When on, suppresses
Process.Returns from HashCode, MarshalJSON, and the dot-file state label.
Returns remain populated during execution (functions/invariants still
read them) and remain visible on Link.Returns. Use this to verify
downstream consumers have migrated; planned to become the default once
they have.
Drive-by reverts unrelated to Returns work:
- main.go: dotfile threshold local change 500 -> 250 (local-only bump
that caused 11-07 and 13-02-01 reference baselines to drift).
- processor.go: printPeakSummary now suppressed under the default queue
mode and only prints under --experimental_processed_queue. The metric
is only meaningful for old-vs-new dedup comparison; printing it in the
default path drifted every reference baseline by one line.
Verified: all 94 reference specs + 10 lovable specs pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
…rns flag
Builds on the prior CloneWithRefs fix by giving downstream consumers (graph, MBT, explorer) a forward-compatible way to read action return values from the per-transition Link rather than per-state Process.Returns.
Producer-side additions:
repeated NameValue returns = 10so the per-transition returns are serialized into adjacency-list .pb files. Sorted by name in returnsToNameValues for deterministic output.\n returns: {...}.Migration flag:
Drive-by reverts unrelated to Returns work:
Verified: all 94 reference specs + 10 lovable specs pass.