Skip to content

Scopes from different IntEnums compare equal by value #572

Closed

Description

@lesnik512

This was generated by AI during a pre-4.0 audit of main at 9cd88e7.

Observation (reproduced)

IntEnum members of different enums compare and hash by value. A provider with a custom Tenancy.TENANT = 2 scope resolves and caches in a Scope.SESSION container, and validate() passes (container.py:125 and the container.scope == scope checks in the templates).

Question

Is mixing scope enums in one tree supported? If not, reject at construction/registration (provider scope type must match the tree's scope enum). If yes, compare by identity plus enum type. Needs a decision; see docs/providers/scopes.md custom scope section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-humanRequires human implementation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions