symfonic.memory.layers.procedural.lifecycle¶
lifecycle ¶
One fail-closed lifecycle projection for persisted procedures.
Procedure rows have existed in two shapes: native procedural writes store
lifecycle keys at the top level, while capability records carry producer
metadata under record_metadata. Readers and the janitor must resolve those
shapes the same way. Missing lifecycle evidence is a draft, never approval.
normalise_procedure_lifecycle ¶
Return a producer-safe procedural property bag.
Generic capability writers persist producer vocabulary below
record_metadata. A producer may describe a proposed status there, but
it must not turn that description into an active procedure before the
procedural review domain has made a transition. Preserve all unrelated
semantic metadata and force the only safe admission state.
This intentionally does not touch rows which already carry a native review seal: it is a write-boundary admission function, not a migration rewrite for durable historical procedures.
Source code in src/symfonic/memory/layers/procedural/lifecycle.py
procedure_authority_class ¶
Classify lifecycle provenance without upgrading old rows.
sealed_terminal is authority minted by the review domain. A terminal
row marked by the compatibility writer is an automatic row and can be
compacted with another such replay. An unmarked old terminal is
historical_terminal: it remains evidence and is never silently
reclassified. All other producer drafts are either explicitly automatic
Phase-12 output or manual drafts, which must not be deleted under a
terminal merely because their text happens to match.
procedure_drafts_have_mixed_authority ¶
procedure_has_human_review ¶
Whether the review domain, rather than a producer, sealed this row.
procedure_has_review ¶
Whether the review domain sealed a terminal transition.
Producer metadata is never trusted as review authority: store_skill
strips this reserved field before persistence. The two values here are
minted only by locked review transitions in ProceduralLayer.
Source code in src/symfonic/memory/layers/procedural/lifecycle.py
procedure_is_legacy_reviewed ¶
Whether a historic terminal row lacks the native review seal.
Old rows can contain an approved or rejected lifecycle but cannot prove who wrote it. Deduplication retains those rows rather than inferring a seal and deleting or demoting history during a native cleanup pass.
Source code in src/symfonic/memory/layers/procedural/lifecycle.py
procedure_is_sealed_terminal ¶
A terminal human/policy decision cannot be replaced by generic writes.
Source code in src/symfonic/memory/layers/procedural/lifecycle.py
procedure_lifecycle ¶
Return (status, active) using top-level then nested metadata.
Only an explicitly approved procedure can be active. Malformed or partial rows therefore fail closed as well.
Source code in src/symfonic/memory/layers/procedural/lifecycle.py
procedure_lifecycle_declared ¶
Whether a row supplies lifecycle evidence in either supported shape.