Skip to content

Tighten attribute data-layer API to force writes through Slot[T] #2779

Description

@elevran

What would you like to be added:

Tighten the attribute data-layer API so producers are forced to write through Slot[T] (typed-attribute-slots, #2352) instead of the still-public AttributeMap.Put(dk, val any).

Why is this needed:

Slot[T] (#2352) pins a value's type at the write site so a producer/consumer mismatch fails at the assignment boundary instead of at some downstream reader. But Put on AttributeMap is still public, so today the type check is advisory only: a producer can bypass the slot entirely and write straight to the map. Tightening the API closes that loophole and makes Slot[T] the only way to publish an attribute.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions