Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Lifecycle events & retraction (ACDP 0.3, RFC-ACDP-0013 — promoting the RFC-ACDP-0009 §2.1 reservation).

A LifecycleEvent is a signed, append-only record in registry_state.lifecycle_events: who performed a formal state action on a context (retraction, republication), when, and optionally why. Retraction is mark-not-delete: the body of a retracted context remains permanently retrievable, byte-identical to what its producer signed; what changes is the reliance signal (status: retracted), never the record.

§Schema shape (RFC-ACDP-0013 §4)

The event OBJECT is closed (additionalProperties: false, acdp-lifecycle-event.schema.json): every member is signed where a signature is present, so an unknown member would change the preimage — it is rejected at parse time, exactly like the receipt schemas. The event_type VOCABULARY is open (registries/lifecycle-event-types.md): an unrecognized value matching the ^[a-z][a-z0-9_]*$ pattern is tolerated, preserved verbatim on re-serialization, and has no effect on retraction state (§7.3) — the same discipline as unknown Status values.

§Signing construction (RFC-ACDP-0013 §5)

Reuses RFC-ACDP-0010 §5 verbatim (the shared helper in crate::receipt): the preimage is the JCS-canonicalized event minus the signature member, hashed with SHA-256; the signature is over the ASCII bytes of the "sha256:<hex>" string — never the raw digest, never the unprefixed hex.

Structs§

LifecycleEvent
A lifecycle event (RFC-ACDP-0013 §4) — one entry of registry_state.lifecycle_events.

Enums§

LifecycleEventType
The lifecycle event kind — an open vocabulary (registries/lifecycle-event-types.md): v1 registers retracted and republished; unknown values matching the RFC-ACDP-0004 §4.1 pattern (^[a-z][a-z0-9_]*$, 1–64 chars) are tolerated with no effect on retraction state and round-trip verbatim — mirroring how Status handles unknown values. Registries MUST NOT accept unregistered values through the RFC-ACDP-0013 §6 endpoints in 0.3.0 (§7.3): openness is for future versions and consumers, not a free-form producer channel.

Constants§

MAX_REASON_CHARS
Maximum reason length (RFC-ACDP-0013 §4).

Functions§

retraction_state
Derive the retraction state of a context from its lifecycle_events (RFC-ACDP-0013 §7.1): consider only retracted/republished events; the context is retracted iff the last such event in array order is retracted. Unknown event types have no effect (§7.3); occurred_at never participates.