Skip to content

Relationship scope completion ignores the selected control specification #1511

Closed

Description

@doublewhy

Problem

Validation bounds a participant relationship's scope_refs twice. Each ref must be an operating scope that both endpoints hold, and when the relationship names a control_specification_ref, every ref must also be inside the scope of that mixed-control policy's active controller states for the relationship's direction (_participant_relation_control and _participant_relation_control_scope, raes/validator/_participant_relationships.py:40-58 and :82-91 on dev a4357f9a). A ref outside it fails with "control_specification_ref must cover the selected relationship scope".

#1446 (for #1339) makes completion apply the first bound: scope_refs completes only the operating scopes that both endpoints hold, and authority_basis_refs only the source's authority anchors (_ENDPOINT_BOUNDED_REFINEMENTS, raes/language_service.py:57-62 at the PR head 3da60398). Completion does not apply the second bound, as the #1446 body notes. For a relationship with a control_specification_ref, completion therefore offers scopes that validation then rejects.

Scope

  • When a relationship names a control_specification_ref that resolves to a mixed-control policy, limit scope_refs completion to the scopes that validation accepts for it, using the same controller-state selection as the validator.
  • Keep the endpoint bound when no control specification is selected or it does not resolve.

Done when

  • Every scope_refs candidate that completion offers for a relationship with a resolvable control_specification_ref validates.
  • A test shows a scope that both endpoints hold but the control specification does not cover is not offered.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions