pub struct PromotionEnvelope {
pub envelope_version: String,
pub prompt: EnvelopeRule,
pub policy: EnvelopeRule,
pub memory_set: EnvelopeRule,
pub tool_permission: EnvelopeRule,
pub tool_contract: EnvelopeRule,
pub model_settings: EnvelopeRule,
pub memory_configuration: EnvelopeRule,
pub middleware_composition: EnvelopeRule,
}Expand description
The declared, per-deployment promotion envelope: per candidate kind,
what may promote automatically, what requires review, and what
canaries. Versioned (envelope_version) because the envelope is the
standing approval — a journaled promotion names the envelope version
it cleared, so the audit reads the declaration that was in force, not
a later edit.
R0.11 (wave 1) grows the envelope additively for the registry kinds:
the four new fields default to EnvelopeRule::Approval and are
absent from the wire at that default, so R0.8-era envelopes keep
deserializing and their serialization stays byte-stable — the
established contract-evolution rule. Approval is the honest default
for the new kinds: a schema tightening or an ordering change is a
contract judgment, not a metric, and a fabricated auto bar is worse
than an honest approval (the design’s governance wiring).
Fields§
§envelope_version: StringThe deployment-declared envelope version.
prompt: EnvelopeRuleThe rule for prompt candidates.
policy: EnvelopeRuleThe rule for policy candidates.
memory_set: EnvelopeRuleThe rule for memory_set candidates.
tool_permission: EnvelopeRuleThe rule for tool_permission candidates.
tool_contract: EnvelopeRuleThe rule for tool_contract candidates (R0.11; defaults to
approval, absent from the wire at the default).
model_settings: EnvelopeRuleThe rule for model_settings candidates (R0.11; same evolution
rule as tool_contract).
memory_configuration: EnvelopeRuleThe rule for memory_configuration candidates (R0.11; same
evolution rule as tool_contract).
middleware_composition: EnvelopeRuleThe rule for middleware_composition candidates (R0.11; same
evolution rule as tool_contract).
Implementations§
Source§impl PromotionEnvelope
impl PromotionEnvelope
Sourcepub fn r08_default() -> Self
pub fn r08_default() -> Self
The R0.8 default (design open question 6): memory_set candidates
at run and agent scope with a clean verdict may auto-promote;
prompt, policy, and tool_permission always require an
approval token this release. The R0.11 stance extends it: the
registry kinds (tool contracts, model settings, memory
configurations, middleware compositions) default to approval —
a schema or ordering change is a contract judgment, and a
fabricated metric is worse than an honest approval.
Sourcepub fn rule_for(&self, kind: CandidateKind) -> &EnvelopeRule
pub fn rule_for(&self, kind: CandidateKind) -> &EnvelopeRule
The rule for kind.