mixle.substrate.governance moduleΒΆ
Promotion gates for shared substrate knowledge.
Teams can publish items into shared scopes, while curated scopes can require an
explicit approval step. propose() marks an item as pending promotion,
approve() promotes it when the approver is authorized for the target
scope, reject() records a refusal, and pending() lists items awaiting
review.
Approved promotion delegates the scope change to
publish(), preserving the same provenance trail as
ordinary sharing.
- class Governance(approvers=<factory>)[source]
Bases:
objectWho may approve promotions into which scope β the org-governance ACL.
- propose(substrate, ids, *, to, by=None)[source]
Mark items as pending promotion to scope
to(they are NOT yet visible there). Returns the ids.
- pending(substrate, *, to=None)[source]
Items awaiting approval (optionally only those proposed to scope
to).
- approve(substrate, item_id, *, by, governance, to=None)[source]
Promote a pending item into its proposed scope β IFF
bymay approve for that scope (the gate).On success the item is published into the target scope (via P1
publish(), so it inherits the versioned/audited share) and its proposal is marked approved with the approver id. Returns False (no change) if the item has no pending proposal orbylacks approval rights.