feat(generator): desugar signal completion predicates into IR waits - #37
Merged
Conversation
Add a wait_for {signal: name} form and a step-level then: post-condition. Both reference a corpus signal (the SEP-0007 state-signal subset: a named boolean over a component's presence or a view's route) and desugar into an ordinary waitFor step -- a component ref becomes a present-wait on the component's selectors, a view ref a route-wait. Resolution runs against the whole corpus (Corpus.ResolveSignal), so a post-condition may name a subject in the destination view, outside the tool's ensure_view scope (the common click-continue -> wait-for-next-view case).
then: expands to the action step followed by the signal wait, inheriting the step's when so an optional step and its post-condition skip together. A step then completes only once a named signal holds, not merely when the action dispatched -- the fix for a click that reports done while accomplishing nothing.
Runtime is unchanged: the desugared steps are the query/route waits it already runs. Pins the sightmap library to the state-signals branch build for Corpus.Signals/ResolveSignal; bump to the released version once that lands.
Signed-off-by: Joel Webber <joel@fullstory.com>
Signed-off-by: Joel Webber <joel@fullstory.com>
joelgwebber
added a commit
that referenced
this pull request
Sep 11, 2026
PR #37 landed the signal-completion-predicates feature but kept generator/go.mod pinned to the state-signals branch build (v0.31.3-0.20260910214719-f6ac005ba83a). Now that sightmap v0.32.0 is released with Corpus.Signals / Corpus.ResolveSignal, replace the pseudo-version with the release tag. go build + go test ./... green. Signed-off-by: Joel Webber <joel@fullstory.com>
joelgwebber
added a commit
that referenced
this pull request
Sep 11, 2026
) * feat(generator): desugar signal completion predicates into IR waits Add a wait_for {signal: name} form and a step-level then: post-condition. Both reference a corpus signal (the SEP-0007 state-signal subset: a named boolean over a component's presence or a view's route) and desugar into an ordinary waitFor step -- a component ref becomes a present-wait on the component's selectors, a view ref a route-wait. Resolution runs against the whole corpus (Corpus.ResolveSignal), so a post-condition may name a subject in the destination view, outside the tool's ensure_view scope (the common click-continue -> wait-for-next-view case). then: expands to the action step followed by the signal wait, inheriting the step's when so an optional step and its post-condition skip together. A step then completes only once a named signal holds, not merely when the action dispatched -- the fix for a click that reports done while accomplishing nothing. Runtime is unchanged: the desugared steps are the query/route waits it already runs. Pins the sightmap library to the state-signals branch build for Corpus.Signals/ResolveSignal; bump to the released version once that lands. Signed-off-by: Joel Webber <joel@fullstory.com> * chore: add changeset for signal completion predicates Signed-off-by: Joel Webber <joel@fullstory.com> --------- Signed-off-by: Joel Webber <joel@fullstory.com>
joelgwebber
added a commit
that referenced
this pull request
Sep 11, 2026
PR #37 landed the signal-completion-predicates feature but kept generator/go.mod pinned to the state-signals branch build (v0.31.3-0.20260910214719-f6ac005ba83a). Now that sightmap v0.32.0 is released with Corpus.Signals / Corpus.ResolveSignal, replace the pseudo-version with the release tag. go build + go test ./... green. Signed-off-by: Joel Webber <joel@fullstory.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.
What
Desugar signal completion predicates into IR waits in the generator.
wait_for {signal: name}form and a step-levelthen:post-condition.waitForstep — a component ref becomes a present-wait on its selectors, a view ref a route-wait.Corpus.ResolveSignal), so a post-condition may name a subject in the destination view, outside the tool'sensure_viewscope (the common click-continue → wait-for-next-view case).then:completes only once the named signal holds, not merely when the action dispatched — the fix for a click that reports done while accomplishing nothing.generator/go.modcurrently pins the sightmap library to the state-signals branch build (forCorpus.Signals/Corpus.ResolveSignal). Bump it to the released sightmap version before merging — now unblocked by the latest sightmap release.Rebased on
main;go test ./...is green including the newsignal_wait_test.