feat(trigger): restrict the link to scopes - #3
Merged
Conversation
The target function is derived from the bound scope, so a link created at application level arrives without tags.scope_id and has nothing to wire. Takes effect once the registering module forwards the field; service_definition does not yet (nullplatform/tofu-modules#477).
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
specs/links/trigger.json.tplnow declaresassignable_to: "scope"instead of"any".Why
The trigger derives its target function from the bound scope:
Those values arrive as tags, and only when the link is bound to a scope. Created at application level the context has no
tags.scope_id, so there is no function to wire and the link fails. Today nothing prevents that: the user creates the link, waits, and then reads the error.connectstays on"any"— it is bound at application level and that is correct.Not effective yet
service_definitioncopies six fields from the link template and drops the rest,assignable_toamong them, so the API keeps receiving the default"any". That is what nullplatform/tofu-modules#477 fixes; until it lands and this repo's ref is bumped in the implementation, this declaration has no effect. The README says so, so the gap is not silent.