CRUMB a card from devarno-cloud

Unit Lifecycle States

stratt intermediate 5 min read

ELI5

Each unit walks a one-way street from draft to tombstoned. Only stable units can be imported by other stable units, and once a unit is tombstoned it can never come back — even with the same slug.

Technical Deep Dive

State Machine (AC-01)

stateDiagram-v2
[*] --> DRAFT
DRAFT --> REVIEW
REVIEW --> APPROVED
APPROVED --> PUBLISHED
PUBLISHED --> ACTIVE
ACTIVE --> DEPRECATED
PUBLISHED --> DEPRECATED
DEPRECATED --> ARCHIVED
ARCHIVED --> TOMBSTONED
TOMBSTONED --> [*]
DRAFT --> TAMPERED
PUBLISHED --> TAMPERED
ACTIVE --> TAMPERED

Transition Rules

From → ToAuthorityNotes
draft → reviewauthorsemver stays 0.x.x
review → approvedgaterequires CI green
approved → publishedgatefirst non-0.x.x semver
published → deprecatedauthorstarts 90-day grace
deprecated → archivedschedulerafter grace; no new imports
archived → tombstonedadminterminal, irreversible
any → tamperedsystemfingerprint mismatch

The allowlist lives in packages/schema/src/lifecycle.ts.

Draft Isolation (FM-07)

A unit at published or higher cannot import a unit at draft. The validator walks imports[], dereferences each via the DAG, and rejects the publish if any transitive import is a draft. This is what keeps 0.x.x experimentation out of stable consumers.

CRDT Interaction

status merges via highest_restriction_wins (see stratt-008). Concurrent edits cannot un-deprecate a unit — published ⊔ deprecated = deprecated.

Key Terms

  • Grace period → 90 days between deprecated and archived during which imports still resolve.
  • Tombstoned → terminal state; the slug cannot be reused.
  • Tampered → the fault state entered when a recomputed fingerprint disagrees with the stored one.

Q&A

Q: Can a tombstoned unit’s slug be reused? A: No. The registry retains the slug to prevent silent identity reuse.

Q: What happens to chains importing a unit that just became tampered? A: They surface FM-04 at the next verify; the chain is blocked from publishing until the import is repaired or replaced.

Examples

A unit at 0.4.1 (DRAFT) is bumped to 1.0.0 only on the approved → published transition; the gate refuses to publish anything still on a 0.x.x semver.

neighbors on the map