Skip to content

Catalog: the live resource model of a run #908

Open
1 of 1 issue completed
Open

Description

@David-Noble-at-work

Epic: #444 — The resource model.

The catalog is the live model a run consults. ResourceCatalog (pkg/op/resource_catalog.go) is one per graph, cloned per run, and answers the run's questions while it runs: who exists, who made what, what state each entry is in, and which generation of a URI is current.

What it holds

Its doors

Discover interns what a run found, with no producer. GetOrCreate interns what a run made, stamped with the caller. Shadow appends a new generation at an occupied URI. MarkGone retires one. Resolve, Lookup, Current, State, VerifyExistence answer questions. Clone gives a run its own copy. The catalog records faithfully which door a provider walks through; a provider that walks through the wrong one puts a false fact in the live model (devlore-cli#907).

Boundary with the ledger

The catalog is the live thing; the ledger (its sibling feature) is the record the run leaves of it. Snapshot is the seam: the catalog projects itself into the record once, at the end of Run. Nothing in the catalog reads the record except Rehydrate on resume.

Documents

Kind Document
Design docs/architecture/4-resource-management.md §3, §4, §5

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions