BeadOwnershipPredicate class

The bead-shaped ownership gate (ADR-0006 Decision 1; ADR-0000 A32) — the dispatch-side analog of the substation-ownership check grid_engine's convergence path applies to convergence beads.

M2's OwnsSubstations reads convergence.metadata.rig, a key gc stamps only into convergence beads, so it is structurally uncallable on a plain ready work Bead (readyBeads returns List<Bead>). The dogfood dispatcher and the StationBeadWriter chokepoint both need to classify ownership of a plain bead, so this predicate derives the bead's rig from the same axis the dogfood rig uses — the issue-id PREFIX (primary, ADR-0006 ratified) and, optionally, metadata.rig (belt-and-suspenders).

The shared artifact with the M2 actuator is the rig allow-set Set<String>, not this object (ADR-0000 A32): the SAME Set<String> instance feeds both OwnsSubstations(Convergence) (actuation) and this predicate (dispatch + the write chokepoint), so the two gates cannot drift. The dogfood seeds it {tgdog} (A35).

Fail-closed. A bead with no owned prefix and no owned metadata.rig is not owned — never dispatched, never mutated. The empty allow-set owns nothing.

Constructors

BeadOwnershipPredicate(Iterable<String> substations, {bool requireSubstationMarker = false})
Builds a predicate over substations — the shared allow-set. Each entry is both a rig name (matched against metadata.rig) and an issue-id prefix. Prefix ownership matches only at the complete <substation>- boundary; when configured names overlap, the longest complete match wins. Thus the dogfood rig tgdog accepts both metadata.rig == "tgdog" and an id like tgdog-abc123, while swift-infer accepts swift-infer-097.

Properties

hashCode int
The hash code for this object.
no setterinherited
requireSubstationMarker bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
substations Set<String>
The shared rig allow-set (read-only view) — exposed so the dispatcher and the chokepoint can be constructed from the identical instance.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
owns(Bead bead) bool
Whether the_grid owns bead — may dispatch against it and mutate it.
ownsTarget({required String id, Map<String, dynamic> metadata = const {}}) bool
Whether the_grid owns a bead with the given id and metadata, without a full Bead in hand — the form the chokepoint uses on a freshly minted session bead it is about to write (it knows the id + the metadata it is stamping).
substationOf(Bead bead) String?
The bead's rig as derived from its axes (the owned prefix if any, else the metadata.rig marker) — for diagnostics / logging.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

markerOf(Map<String, dynamic> metadata) String?
The explicit metadata.rig marker (the alternative axis), or null.
ownedPrefixOf(String id, Iterable<String> knownPrefixes) String?
Resolves id to the longest prefix in knownPrefixes that matches at a complete <prefix>- boundary with a non-empty suffix.