Documentation
¶
Overview ¶
Package catalog owns Starport's immutable view of Starmap facts and the separately versioned runtime availability used to derive routable models.
Index ¶
- Constants
- Variables
- func ProviderFromModelID(modelID string) string
- func SafeFreshness(freshness runtime.Freshness) string
- func SafeHealth(health runtime.Health) string
- func SafeSourceKind(kind runtime.SourceKind) string
- func SplitModelID(modelID string) (provider, model string, ok bool)
- type AcquisitionReport
- type AcquisitionResolver
- type AdapterAvailability
- type AdminStatus
- type Candidate
- type ControlPlane
- func (p *ControlPlane) Activate(state starmap.CatalogState) error
- func (p *ControlPlane) Current() *RoutableSnapshot
- func (p *ControlPlane) PublishAvailability(snapshot availability.Snapshot) error
- func (p *ControlPlane) Refresh() error
- func (p *ControlPlane) RemoveAdapter(providerID catalogs.ProviderID) error
- func (p *ControlPlane) ReplaceAdapters(adapters []AdapterAvailability) error
- func (p *ControlPlane) ReplaceRuntime(state starmap.CatalogState, adapters []AdapterAvailability) (*RoutableSnapshot, error)
- func (p *ControlPlane) SetAdapter(adapter AdapterAvailability) error
- func (p *ControlPlane) ValidateRuntime(state starmap.CatalogState, adapters []AdapterAvailability) error
- type Counts
- type DeploymentLookup
- type Diff
- type FreshnessReport
- type FreshnessService
- type GenerationIndexEntry
- type GenerationRef
- type GenerationStore
- func (s *GenerationStore) Commit(ctx context.Context, generation catalogs.Generation, ...) error
- func (s *GenerationStore) Current(ctx context.Context) (catalogs.Generation, error)
- func (s *GenerationStore) Get(ctx context.Context, generationID string) (catalogs.Generation, error)
- func (s *GenerationStore) History(ctx context.Context) ([]GenerationIndexEntry, error)
- type Hop
- type LeaseStore
- func (l *LeaseStore) AcquireLease(ctx context.Context, holder string, ttl time.Duration) (runtime.Lease, error)
- func (l *LeaseStore) CurrentEpoch(ctx context.Context) (uint64, error)
- func (l *LeaseStore) Release(ctx context.Context, lease runtime.Lease) error
- func (l *LeaseStore) Renew(ctx context.Context, lease runtime.Lease, ttl time.Duration) (runtime.Lease, error)
- type OfferingChange
- type OfferingRoutability
- type Operation
- type OperationKind
- type OperationOption
- type OperationReason
- type OperationResult
- type OperationState
- type OperationWork
- type Operations
- type PriceChange
- type Provenance
- type RefreshReport
- type Rejection
- type RoutableSnapshot
- func (s *RoutableSnapshot) AvailabilityRevision() uint64
- func (s *RoutableSnapshot) Catalog() *catalogs.Catalog
- func (s *RoutableSnapshot) CatalogSequence() uint64
- func (s *RoutableSnapshot) Definition(id catalogs.ModelDefinitionID) (catalogs.ModelDefinition, error)
- func (s *RoutableSnapshot) Definitions() []catalogs.ModelDefinition
- func (s *RoutableSnapshot) GeneratedAt() time.Time
- func (s *RoutableSnapshot) GenerationID() string
- func (s *RoutableSnapshot) LowestPagePrice(operation catalogs.ProviderOperation) (float64, bool)
- func (s *RoutableSnapshot) LowestSearchUnitPrice(modelID string) (float64, bool)
- func (s *RoutableSnapshot) Names(modelID string) bool
- func (s *RoutableSnapshot) Offering(route Route) (catalogs.ProviderOffering, error)
- func (s *RoutableSnapshot) OfferingRoutability() []OfferingRoutability
- func (s *RoutableSnapshot) PagePriceFor(modelID string, operation catalogs.ProviderOperation) (float64, bool)
- func (s *RoutableSnapshot) PayloadChecksum() string
- func (s *RoutableSnapshot) ResolveOperation(modelID string, operation catalogs.ProviderOperation) (Route, bool)
- func (s *RoutableSnapshot) ResolveRoute(modelID string) (Route, bool)
- func (s *RoutableSnapshot) Routes() []Route
- func (s *RoutableSnapshot) RoutesForDefinition(definitionID catalogs.ModelDefinitionID) []Route
- func (s *RoutableSnapshot) RoutesForProvider(providerID catalogs.ProviderID) []Route
- type Route
- type RouteExclusion
- type RouteValidation
- type RouteValidationState
- type Runtime
- func (r *Runtime) Accept(ctx context.Context, candidate Candidate) error
- func (r *Runtime) AcceptedGeneration(ctx context.Context) (catalogs.Generation, error)
- func (r *Runtime) Close(ctx context.Context) error
- func (r *Runtime) ControlPlane() *ControlPlane
- func (r *Runtime) CurrentCandidate(ctx context.Context) (Candidate, error)
- func (r *Runtime) Refresh(ctx context.Context) (runtime.RefreshReport, error)
- func (r *Runtime) RefreshCandidate(ctx context.Context, timeout time.Duration) (Candidate, error)
- func (r *Runtime) Reject(candidate Candidate, failure error)
- func (r *Runtime) RouteValidation() RouteValidation
- func (r *Runtime) Start(ctx context.Context) error
- func (r *Runtime) Status() runtime.Status
- func (r *Runtime) Updates() <-chan Candidate
- type RuntimeReport
- type Settings
- type SnapshotMetadata
- type SnapshotSource
- type Source
- type SourceObservation
- type Summary
- type UpstreamProvenance
- type ValidationSummary
Constants ¶
const DefaultRetained = 64
DefaultRetained is how many closed operations the registry keeps. An operator reads the recent history of catalog work, and an unbounded history would grow with every refresh a scheduler starts.
Variables ¶
var ( // ErrCatalogSourceRequired reports a missing Starmap catalog source. ErrCatalogSourceRequired = errors.New("catalog source is required") // ErrCatalogRequired means that a Starmap state has no immutable catalog. ErrCatalogRequired = errors.New("catalog state must contain a catalog") // ErrModelNotCatalogued reports a model name the retained generation does // not hold. It is separate from an unreachable model because the two have // different answers: a name the catalog never held is the caller's to // correct, and a catalogued model with no reachable provider is the // gateway's to report. ErrModelNotCatalogued = errors.New("model is not in the catalog") // ErrCatalogGenerationRequired means that a Starmap state has no generation identity. ErrCatalogGenerationRequired = errors.New("catalog state must contain a generation ID") // ErrMissingPagePrice reports an offering that serves document recognition // and states no price per page. // // Recognition is the one operation whose unit is neither a token nor a // request, so a token price says nothing about what a page costs. An // offering the gateway cannot price is one it would serve for free against // real provider time, and a spend limit set on that account would never // fire. Planning drops the operation instead of guessing a price. ErrMissingPagePrice = errors.New("offering serves document recognition with no page price") // ErrRerankUnpriced reports an offering that serves reranking and states // no price in the unit it bills. // // Providers disagree on that unit. Cohere bills a search unit, which is one // query against a bounded document count, and Voyage bills the tokens it // reads. The offering names its own basis, so an offering that names one // and publishes no price for it is a catalog defect rather than a known // gap. Planning drops the operation, which keeps a silent zero out of the // account's spend total. ErrRerankUnpriced = errors.New("offering serves reranking with no price in the unit it bills") )
var ErrOperationNotFound = errors.New("catalog operation is not found")
ErrOperationNotFound reports an operation identifier the registry does not hold. A closed operation the registry pruned reads the same way.
var ErrRouteValidationFailed = errors.New("catalog candidate failed route validation")
ErrRouteValidationFailed marks a candidate that did not become routable. Composition wraps the validation failure with it, so the operation registry and the admin surface name the cause without reading the failure text.
var ErrStaleLeaseEpoch = errors.New("catalog candidate carries a stale lease epoch")
ErrStaleLeaseEpoch matches a candidate the lease fence refused.
Functions ¶
func ProviderFromModelID ¶
ProviderFromModelID returns the adapter ID named by a provider-scoped model ID.
func SafeFreshness ¶ added in v1.2.1
SafeFreshness maps one freshness grade onto the closed vocabulary.
func SafeHealth ¶ added in v1.2.1
SafeHealth maps one health value onto the closed vocabulary.
func SafeSourceKind ¶ added in v1.2.1
func SafeSourceKind(kind runtime.SourceKind) string
SafeSourceKind maps one source kind onto the closed vocabulary. A kind outside the set reads as "unknown", so a metric label and a reader response never carry a value the deployment invented.
func SplitModelID ¶
SplitModelID splits one provider-scoped model ID.
Types ¶
type AcquisitionReport ¶ added in v1.2.1
type AcquisitionReport struct {
// Enabled reports whether this instance observes providers itself.
Enabled bool `json:"enabled"`
// Health is the state of the last acquisition run.
Health string `json:"health"`
// AgeSeconds is the age of the last acquisition success.
AgeSeconds int64 `json:"age_seconds"`
// Freshness grades that age.
Freshness string `json:"freshness"`
}
AcquisitionReport is the state of provider acquisition on this instance. It stays separate from source health, because an instance reads a source and observes providers as two independent pieces of work.
type AcquisitionResolver ¶ added in v1.2.1
type AcquisitionResolver struct {
// contains filtered or unexported fields
}
AcquisitionResolver resolves one catalog-acquisition credential from the deployment lookup alone.
Catalog acquisition is deployment work, never account work. An account credential pays a provider for that account's inference, and a shared credential the operator grants pays for a group of accounts. Neither one belongs to the process that reads a provider catalog, so this resolver holds exactly one field: the deployment lookup. It can reach no keyring, no account store, and no BYOK record, because it does not hold one.
func NewAcquisitionResolver ¶ added in v1.2.1
func NewAcquisitionResolver(lookup DeploymentLookup) *AcquisitionResolver
NewAcquisitionResolver returns the deployment acquisition resolver. A nil lookup resolves nothing, so every provider becomes ineligible instead of silently reading another credential plane.
func (*AcquisitionResolver) ResolveCatalog ¶ added in v1.2.1
func (r *AcquisitionResolver) ResolveCatalog( _ context.Context, provider *catalogs.Provider, ) (sources.ProviderCredentialMaterial, error)
ResolveCatalog selects the first catalog-acquisition profile whose required fields the deployment supplies. It returns a typed error when the deployment supplies none, and the provider then stays out of the observation run.
type AdapterAvailability ¶
type AdapterAvailability struct {
ProviderID catalogs.ProviderID
Registered bool
Operations []catalogs.ProviderOperation
EndpointTypes []catalogs.EndpointType
}
AdapterAvailability is runtime state for one compiled provider adapter. It is not a catalog fact and does not contain operator credential state.
type AdminStatus ¶ added in v1.2.1
type AdminStatus struct {
// Runtime is the state of the connected Starmap runtime.
Runtime RuntimeReport `json:"runtime"`
// RouteValidation reports candidate, accepted, rejected, and pending as
// distinct values.
RouteValidation RouteValidation `json:"route_validation"`
// SourceHealth is what this instance observed while it read its source.
SourceHealth string `json:"source_health"`
// UpstreamHealth is the health the upstream reported about itself.
UpstreamHealth string `json:"upstream_health"`
// Acquisition is the state of provider acquisition on this instance.
Acquisition AcquisitionReport `json:"acquisition"`
// Freshness grades the three independent ages.
Freshness FreshnessReport `json:"freshness"`
// Provenance carries the effective and the upstream provenance.
Provenance Provenance `json:"provenance"`
// Catalog is how much the accepted head holds.
Catalog Counts `json:"catalog"`
// Snapshot is the manifest detail of the accepted head: its validation
// result, its degradation reasons, and the sources that fed it.
Snapshot SnapshotMetadata `json:"snapshot,omitzero"`
// NextUpdateAt is when this instance next reads its source.
NextUpdateAt time.Time `json:"next_update_at,omitzero"`
// Operations is the recent catalog work, newest first.
Operations []Operation `json:"operations"`
}
AdminStatus is the operator view of the catalog runtime. Every concept is a separate value: a degraded upstream never hides a healthy transfer, and a rejected candidate never hides the accepted head that still routes.
func NewAdminStatus ¶ added in v1.2.1
func NewAdminStatus( status runtime.Status, validation RouteValidation, acquisitionEnabled bool, counts Counts, snapshot SnapshotMetadata, nextUpdateAt time.Time, operations []Operation, ) AdminStatus
NewAdminStatus projects one connected runtime status onto the operator view. The caller supplies what the runtime does not know: the validation record, whether this instance acquires, how much the accepted head holds, when the next source read happens, and the recent operations.
func (AdminStatus) Summary ¶ added in v1.2.1
func (s AdminStatus) Summary() Summary
Summary projects the allowlisted reader view of the admin status. Every vocabulary value passes through the closed-set maps, so a value the runtime did not produce reads as "unknown" rather than reaching a reader.
type Candidate ¶ added in v1.2.1
type Candidate struct {
// State is the effective generation the connected runtime published.
State starmap.CatalogState
// Epoch is the lease epoch the candidate was produced under. Zero means
// the deployment shares no lease, and every candidate then passes the
// fence.
Epoch uint64
}
Candidate is one effective catalog generation offered for acceptance, together with the lease epoch the run that produced it started under.
The epoch travels with the candidate because acceptance happens after route validation, which takes time. An instance that loses the lease during that work must not advance the shared accepted head, and the epoch is what says so.
type ControlPlane ¶
type ControlPlane struct {
// contains filtered or unexported fields
}
ControlPlane atomically publishes one routable view derived from an immutable Starmap generation and separately versioned runtime availability.
func Open ¶
func Open(source Source) (*ControlPlane, error)
Open creates the catalog control plane from the source's current atomic state.
func (*ControlPlane) Activate ¶
func (p *ControlPlane) Activate(state starmap.CatalogState) error
Activate validates and atomically publishes one complete catalog generation. Retained older snapshots remain valid and do not observe the new generation.
func (*ControlPlane) Current ¶
func (p *ControlPlane) Current() *RoutableSnapshot
Current returns the current immutable routable snapshot in O(1).
func (*ControlPlane) PublishAvailability ¶
func (p *ControlPlane) PublishAvailability(snapshot availability.Snapshot) error
PublishAvailability applies one availability-owner generation to the derived routable projection. It does not own availability state transitions.
func (*ControlPlane) Refresh ¶
func (p *ControlPlane) Refresh() error
Refresh atomically activates the source's current catalog generation.
func (*ControlPlane) RemoveAdapter ¶
func (p *ControlPlane) RemoveAdapter(providerID catalogs.ProviderID) error
RemoveAdapter removes one runtime adapter and atomically republishes the view.
func (*ControlPlane) ReplaceAdapters ¶
func (p *ControlPlane) ReplaceAdapters(adapters []AdapterAvailability) error
ReplaceAdapters replaces the complete runtime adapter set in one publication.
func (*ControlPlane) ReplaceRuntime ¶ added in v1.0.2
func (p *ControlPlane) ReplaceRuntime( state starmap.CatalogState, adapters []AdapterAvailability, ) (*RoutableSnapshot, error)
ReplaceRuntime atomically publishes one catalog state and complete adapter set. Retained snapshots remain immutable.
func (*ControlPlane) SetAdapter ¶
func (p *ControlPlane) SetAdapter(adapter AdapterAvailability) error
SetAdapter updates one runtime adapter and atomically republishes the derived view.
func (*ControlPlane) ValidateRuntime ¶ added in v1.0.2
func (p *ControlPlane) ValidateRuntime( state starmap.CatalogState, adapters []AdapterAvailability, ) error
ValidateRuntime proves that one catalog state and complete adapter set can produce a routable snapshot without changing published state.
type Counts ¶ added in v1.2.1
type Counts struct {
// Providers is the number of providers the accepted head carries.
Providers int `json:"providers"`
// Models is the number of routable models the accepted head carries.
Models int `json:"models"`
}
Counts is how much the accepted head holds.
type DeploymentLookup ¶ added in v1.2.1
DeploymentLookup reads one deployment environment name. It is the only credential source catalog acquisition reads.
type Diff ¶ added in v1.1.0
type Diff struct {
Available bool `json:"available"`
Reason string `json:"reason,omitempty"`
FromGenerationID string `json:"from_generation_id,omitempty"`
ToGenerationID string `json:"to_generation_id,omitempty"`
FromGeneratedAt time.Time `json:"from_generated_at,omitzero"`
ToGeneratedAt time.Time `json:"to_generated_at,omitzero"`
SemanticallyEqual bool `json:"semantically_equal"`
ModelsAdded []string `json:"models_added,omitempty"`
ModelsRemoved []string `json:"models_removed,omitempty"`
OfferingsAdded []OfferingChange `json:"offerings_added,omitempty"`
OfferingsRemoved []OfferingChange `json:"offerings_removed,omitempty"`
PriceChanges []PriceChange `json:"price_changes,omitempty"`
}
Diff compares the previous accepted generation against the current one. When only one generation is recorded, Available is false and Reason says why — that is a normal state, not an error.
type FreshnessReport ¶ added in v1.2.1
type FreshnessReport struct {
// Catalog grades the age of the served generation.
Catalog string `json:"catalog"`
// CatalogAgeSeconds is that age.
CatalogAgeSeconds int64 `json:"catalog_age_seconds"`
// Channel grades the age of the propagated origin publication.
Channel string `json:"channel"`
// ChannelAgeSeconds is that age.
ChannelAgeSeconds int64 `json:"channel_age_seconds"`
// SourceCheck grades the age of the last upstream check.
SourceCheck string `json:"source_check"`
// SourceCheckAgeSeconds is that age.
SourceCheckAgeSeconds int64 `json:"source_check_age_seconds"`
}
FreshnessReport grades three independent ages: the served generation, the propagated origin publication, and the last source check.
type FreshnessService ¶ added in v1.1.0
type FreshnessService struct {
// contains filtered or unexported fields
}
FreshnessService reads catalog freshness from the active snapshot and the durable generation store. It never mutates either.
func NewFreshnessService ¶ added in v1.1.0
func NewFreshnessService(snapshots SnapshotSource, generations *GenerationStore) *FreshnessService
NewFreshnessService creates the freshness read service.
func (*FreshnessService) Changes ¶ added in v1.1.0
func (s *FreshnessService) Changes(ctx context.Context) (Diff, error)
Changes diffs the previous accepted generation against the current one.
func (*FreshnessService) Metadata ¶ added in v1.1.0
func (s *FreshnessService) Metadata(ctx context.Context) (SnapshotMetadata, error)
Metadata reports the active snapshot's identity, age, and manifest facts.
type GenerationIndexEntry ¶ added in v1.1.0
type GenerationIndexEntry struct {
GenerationID string `json:"generation_id"`
GeneratedAt time.Time `json:"generated_at"`
PayloadChecksum string `json:"payload_checksum"`
SemanticChecksum string `json:"semantic_checksum,omitempty"`
}
GenerationIndexEntry records one accepted generation in acceptance order. The semantic checksum excludes provenance, so the diff service can skip provenance-only churn without decoding payloads.
type GenerationRef ¶ added in v1.2.1
type GenerationRef struct {
// GenerationID identifies the generation.
GenerationID string `json:"generation_id,omitempty"`
// PayloadChecksum is the digest of the generation payload.
PayloadChecksum string `json:"payload_checksum,omitempty"`
// GeneratedAt is when the generation was built.
GeneratedAt time.Time `json:"generated_at,omitzero"`
// LeaseEpoch is the runtime lease epoch the generation was produced
// under. Zero means the deployment shares no lease.
LeaseEpoch uint64 `json:"lease_epoch,omitempty"`
}
GenerationRef names one catalog generation without disclosing its content.
type GenerationStore ¶
type GenerationStore struct {
// contains filtered or unexported fields
}
GenerationStore adapts Starport's configured KV store to Starmap's durable immutable-generation contract.
func NewGenerationStore ¶
func NewGenerationStore(store storage.KVStore) (*GenerationStore, error)
NewGenerationStore creates a durable Starmap generation store.
func (*GenerationStore) Commit ¶
func (s *GenerationStore) Commit( ctx context.Context, generation catalogs.Generation, expectedGenerationID string, ) error
Commit stores one immutable generation, then selects it with compare-and-swap.
func (*GenerationStore) Current ¶
func (s *GenerationStore) Current(ctx context.Context) (catalogs.Generation, error)
Current returns the atomically selected generation.
func (*GenerationStore) Get ¶
func (s *GenerationStore) Get(ctx context.Context, generationID string) (catalogs.Generation, error)
Get returns one immutable generation by ID.
func (*GenerationStore) History ¶ added in v1.1.0
func (s *GenerationStore) History(ctx context.Context) ([]GenerationIndexEntry, error)
History returns accepted generations in acceptance order, oldest first. A store without an index (the remote head store) reports no history.
type Hop ¶ added in v1.2.1
type Hop struct {
// Identity is the safe identity of the hop.
Identity string `json:"identity,omitempty"`
// Health is the health that hop reported about itself.
Health string `json:"health"`
// PublishedAt is when that hop published.
PublishedAt time.Time `json:"published_at,omitzero"`
// ObservedAt is when this instance observed the hop.
ObservedAt time.Time `json:"observed_at,omitzero"`
}
Hop is one sanitized upstream publication step.
type LeaseStore ¶ added in v1.2.1
type LeaseStore struct {
// contains filtered or unexported fields
}
LeaseStore is the catalog runtime lease over Starport's shared storage. It gives this deployment the epoch that fences an accepted head: an acceptance that started under an older epoch belongs to an instance that has since lost the lease, and shared storage must refuse it.
func NewLeaseStore ¶ added in v1.2.1
func NewLeaseStore(store storage.KVStore) (*LeaseStore, error)
NewLeaseStore returns the catalog runtime lease over shared storage.
func (*LeaseStore) AcquireLease ¶ added in v1.2.1
func (l *LeaseStore) AcquireLease( ctx context.Context, holder string, ttl time.Duration, ) (runtime.Lease, error)
AcquireLease takes the lease for one holder. A live lease another holder owns returns a conflict, which names a non-owner state and never a failure. Every fresh acquisition raises the epoch, so an older epoch is stale.
func (*LeaseStore) CurrentEpoch ¶ added in v1.2.1
func (l *LeaseStore) CurrentEpoch(ctx context.Context) (uint64, error)
CurrentEpoch returns the epoch of the lease shared storage holds. A store that holds no lease reports epoch zero, and every candidate then passes the fence.
type OfferingChange ¶ added in v1.1.0
type OfferingChange struct {
Provider string `json:"provider"`
ProviderModelID string `json:"provider_model_id"`
DefinitionID string `json:"definition_id"`
}
OfferingChange identifies one provider offering added or removed between two accepted generations.
type OfferingRoutability ¶ added in v1.1.0
type OfferingRoutability struct {
ProviderID catalogs.ProviderID
ProviderModelID catalogs.ProviderModelID
Routable bool
Exclusion RouteExclusion
}
OfferingRoutability is the planning verdict for one exact catalog offering. The verdict set is total: every offering in the generation carries one, so a caller can tell an advertised offering apart from a reachable one.
type Operation ¶ added in v1.2.1
type Operation struct {
// ID identifies the operation on the admin surface.
ID string `json:"id"`
// Kind names the work.
Kind OperationKind `json:"kind"`
// State is where the operation stands.
State OperationState `json:"state"`
// Reason is the safe cause of a closed operation.
Reason OperationReason `json:"reason,omitempty"`
// AcceptedAt is when the registry took the request.
AcceptedAt time.Time `json:"accepted_at"`
// StartedAt is when the work began.
StartedAt time.Time `json:"started_at,omitzero"`
// CompletedAt is when the work closed.
CompletedAt time.Time `json:"completed_at,omitzero"`
// GenerationID is the generation the work produced, when it produced one.
GenerationID string `json:"generation_id,omitempty"`
// Changed reports whether the work moved the accepted head.
Changed bool `json:"changed"`
}
Operation is one unit of catalog work an operator asked for or a schedule started. It names what the work is, where it stands, and why it closed. It never carries the text of a failure.
type OperationKind ¶ added in v1.2.1
type OperationKind string
OperationKind names the work an operation performs. The set is closed, so an audit subject and a metric label read from a fixed vocabulary.
const KindCatalogUpdate OperationKind = "catalog_update"
KindCatalogUpdate is the one kind this gateway runs: read the source, observe the providers, and offer the result for acceptance.
type OperationOption ¶ added in v1.2.1
type OperationOption func(*Operations)
OperationOption configures the registry.
func WithOperationTimeout ¶ added in v1.2.1
func WithOperationTimeout(timeout time.Duration) OperationOption
WithOperationTimeout bounds one operation. The deployment refresh timeout supplies it, and zero adds no cap: the transfer bounds end a transfer that stops making progress, and the cancel route and Close end a run an operator no longer wants.
func WithRetainedOperations ¶ added in v1.2.1
func WithRetainedOperations(retained int) OperationOption
WithRetainedOperations sets how many closed operations the registry keeps.
type OperationReason ¶ added in v1.2.1
type OperationReason string
OperationReason is the safe cause of a closed operation. The set is closed, because this value reaches a log line, a metric label, and an operator response, and a provider message must reach none of them.
const ( // ReasonNone is the reason of an operation that did not fail. ReasonNone OperationReason = "" // usable. ReasonSourceUnavailable OperationReason = "source_unavailable" // ReasonTimedOut means the operation reached its bound. ReasonTimedOut OperationReason = "timed_out" // ReasonCanceled means an operator or a shutdown ended the operation. ReasonCanceled OperationReason = "canceled" // ReasonStaleLeaseEpoch means the instance lost the runtime lease while // it validated the candidate. ReasonStaleLeaseEpoch OperationReason = "stale_lease_epoch" // ReasonRouteValidationFailed means the candidate did not become // routable. ReasonRouteValidationFailed OperationReason = "route_validation_failed" // ReasonAcceptedHeadConflict means another instance moved the accepted // head first. ReasonAcceptedHeadConflict OperationReason = "accepted_head_conflict" ReasonCatalogUnavailable OperationReason = "catalog_unavailable" // ReasonInternalError is the reason of a failure with no safe cause of // its own. It never carries the failure text. ReasonInternalError OperationReason = "internal_error" )
func ClassifyOperationFailure ¶ added in v1.2.1
func ClassifyOperationFailure(err error) OperationReason
ClassifyOperationFailure maps one failure onto the closed reason set. A cause the set does not name reads as an internal error, so no provider or source text reaches a log line, a metric label, or an operator response.
type OperationResult ¶ added in v1.2.1
type OperationResult struct {
// GenerationID is the generation the work produced.
GenerationID string
// Changed reports whether the work moved the accepted head.
Changed bool
}
OperationResult is what one unit of catalog work produced.
type OperationState ¶ added in v1.2.1
type OperationState string
OperationState names where one operation stands. The set is closed.
const ( // OperationAccepted means the registry took the request and no run // started yet. OperationAccepted OperationState = "accepted" // OperationRunning means the work is in flight. OperationRunning OperationState = "running" // OperationSucceeded means the work finished with no failure. OperationSucceeded OperationState = "succeeded" // OperationFailed means the work ended with a failure. OperationFailed OperationState = "failed" // OperationCanceled means an operator or a shutdown ended the work. OperationCanceled OperationState = "canceled" )
type OperationWork ¶ added in v1.2.1
type OperationWork func(context.Context) (OperationResult, error)
OperationWork is one unit of catalog work. The context it receives ends when the operation is canceled or reaches its bound.
type Operations ¶ added in v1.2.1
type Operations struct {
// contains filtered or unexported fields
}
Operations is the registry of catalog operations. It keeps one open operation per kind, so overlapping refresh requests join the run in flight rather than starting a second one.
func NewOperations ¶ added in v1.2.1
func NewOperations(options ...OperationOption) *Operations
NewOperations creates the catalog operation registry.
func (*Operations) Cancel ¶ added in v1.2.1
func (o *Operations) Cancel(id string) (Operation, error)
Cancel ends one open operation. Canceling a closed operation returns it unchanged, so a repeated cancel is a success that changes nothing.
func (*Operations) Close ¶ added in v1.2.1
func (o *Operations) Close()
Close ends every open operation and waits for the work to stop.
func (*Operations) Get ¶ added in v1.2.1
func (o *Operations) Get(id string) (Operation, error)
Get returns one operation by identifier.
func (*Operations) List ¶ added in v1.2.1
func (o *Operations) List() []Operation
List returns every held operation, newest first.
func (*Operations) Submit ¶ added in v1.2.1
func (o *Operations) Submit(kind OperationKind, work OperationWork) (Operation, bool)
Submit accepts one unit of work and returns the operation that carries it.
A kind that already has an open operation joins that operation: the caller reads the identifier of the run in flight and no second run starts. The second return value reports the join, so a caller can say which answer it gave.
The work runs on a background context. A request that ends does not end the operation it started, because the operator asked for the work and not for the response.
type PriceChange ¶ added in v1.1.0
type PriceChange struct {
Provider string `json:"provider"`
ProviderModelID string `json:"provider_model_id"`
DefinitionID string `json:"definition_id"`
Field string `json:"field"`
PreviousPer1M float64 `json:"previous_per_1m"`
CurrentPer1M float64 `json:"current_per_1m"`
}
PriceChange reports one token-price movement on an offering present in both generations. Values are USD per one million tokens.
type Provenance ¶ added in v1.2.1
type Provenance struct {
// Effective is the accepted head this gateway routes on. It stays where
// it stands when a newer candidate fails route validation.
Effective GenerationRef `json:"effective,omitzero"`
// Upstream is the publication the source reported.
Upstream UpstreamProvenance `json:"upstream"`
}
Provenance carries both provenances of the served catalog: the generation this runtime composed and the upstream publication it came from.
type RefreshReport ¶ added in v1.1.0
type RefreshReport struct {
PreviousGenerationID string `json:"previous_generation_id"`
GenerationID string `json:"generation_id"`
GeneratedAt time.Time `json:"generated_at"`
Changed bool `json:"changed"`
}
RefreshReport summarizes one forced catalog acquisition.
type Rejection ¶ added in v1.2.1
type Rejection struct {
// Generation names the refused candidate.
Generation GenerationRef `json:"generation,omitzero"`
// Reason is the safe cause. It never carries a failure text.
Reason OperationReason `json:"reason,omitempty"`
// At is when the refusal happened.
At time.Time `json:"at,omitzero"`
}
Rejection is the newest candidate this instance refused, with the safe cause of the refusal.
type RoutableSnapshot ¶
type RoutableSnapshot struct {
// contains filtered or unexported fields
}
RoutableSnapshot projects one Starmap generation and one runtime availability revision into an immutable route set.
func (*RoutableSnapshot) AvailabilityRevision ¶
func (s *RoutableSnapshot) AvailabilityRevision() uint64
AvailabilityRevision returns the runtime availability revision.
func (*RoutableSnapshot) Catalog ¶
func (s *RoutableSnapshot) Catalog() *catalogs.Catalog
Catalog returns the retained immutable Starmap catalog. Starmap guarantees that published catalogs are safe to share and retain across goroutines.
func (*RoutableSnapshot) CatalogSequence ¶
func (s *RoutableSnapshot) CatalogSequence() uint64
CatalogSequence returns the source's monotonic generation sequence.
func (*RoutableSnapshot) Definition ¶
func (s *RoutableSnapshot) Definition( id catalogs.ModelDefinitionID, ) (catalogs.ModelDefinition, error)
Definition returns one caller-owned definition from this exact generation.
func (*RoutableSnapshot) Definitions ¶
func (s *RoutableSnapshot) Definitions() []catalogs.ModelDefinition
Definitions returns caller-owned Starmap definitions that have a routable offering.
func (*RoutableSnapshot) GeneratedAt ¶
func (s *RoutableSnapshot) GeneratedAt() time.Time
GeneratedAt returns the Starmap generation timestamp.
func (*RoutableSnapshot) GenerationID ¶
func (s *RoutableSnapshot) GenerationID() string
GenerationID returns the Starmap generation used to derive this snapshot.
func (*RoutableSnapshot) LowestPagePrice ¶ added in v1.1.0
func (s *RoutableSnapshot) LowestPagePrice(operation catalogs.ProviderOperation) (float64, bool)
LowestPagePrice returns the cheapest page price this generation publishes for one operation.
It answers the question a caller has before a route exists: what is the least this document can cost to read? The planner picks the offering afterwards, so no exact price is knowable yet, and the cheapest one is the only bound that refuses no work the account could have paid for.
func (*RoutableSnapshot) LowestSearchUnitPrice ¶ added in v1.1.0
func (s *RoutableSnapshot) LowestSearchUnitPrice(modelID string) (float64, bool)
LowestSearchUnitPrice returns the cheapest search unit price this generation publishes for one model's rerank offerings.
It answers the question a spend budget has before a route exists: what is the least this rerank call can cost? The planner picks the offering afterwards, so no exact price is knowable yet, and the cheapest one is the only bound that refuses no work the account could have paid for. An offering that bills tokens rather than search units states no floor at all before the provider has read the documents, so it answers nothing and the budget refuses nothing.
func (*RoutableSnapshot) Names ¶ added in v1.1.0
func (s *RoutableSnapshot) Names(modelID string) bool
Names reports whether this generation holds one model name at all. It reads every offering the generation carries and not the routable subset, because a name whose provider has no credential today is still a name the catalog holds. A caller that used the routable set here would answer a configuration gap with "no such model" and send an operator looking for a typo.
It accepts the same two spellings ResolveRoute accepts: a provider-scoped route ID and a canonical definition ID.
func (*RoutableSnapshot) Offering ¶
func (s *RoutableSnapshot) Offering(route Route) (catalogs.ProviderOffering, error)
Offering returns one caller-owned offering from this exact generation.
func (*RoutableSnapshot) OfferingRoutability ¶ added in v1.1.0
func (s *RoutableSnapshot) OfferingRoutability() []OfferingRoutability
OfferingRoutability returns the planning verdict for every offering in the generation, routable or not, sorted by provider and provider model ID.
func (*RoutableSnapshot) PagePriceFor ¶ added in v1.1.0
func (s *RoutableSnapshot) PagePriceFor( modelID string, operation catalogs.ProviderOperation, ) (float64, bool)
PagePriceFor returns what one model charges to read one page of a document, in USD. A page is the unit recognition is billed in, and no token price converts into it.
func (*RoutableSnapshot) PayloadChecksum ¶ added in v1.0.2
func (s *RoutableSnapshot) PayloadChecksum() string
PayloadChecksum returns the checksum bound to the Starmap generation.
func (*RoutableSnapshot) ResolveOperation ¶
func (s *RoutableSnapshot) ResolveOperation( modelID string, operation catalogs.ProviderOperation, ) (Route, bool)
ResolveOperation resolves only routes that support one exact operation.
func (*RoutableSnapshot) ResolveRoute ¶
func (s *RoutableSnapshot) ResolveRoute(modelID string) (Route, bool)
ResolveRoute resolves a provider-scoped route ID or a canonical definition ID to the first stable routable offering.
func (*RoutableSnapshot) Routes ¶
func (s *RoutableSnapshot) Routes() []Route
Routes returns a caller-owned copy of the routable offering identities.
func (*RoutableSnapshot) RoutesForDefinition ¶
func (s *RoutableSnapshot) RoutesForDefinition(definitionID catalogs.ModelDefinitionID) []Route
RoutesForDefinition returns routable offerings for one canonical model.
func (*RoutableSnapshot) RoutesForProvider ¶
func (s *RoutableSnapshot) RoutesForProvider(providerID catalogs.ProviderID) []Route
RoutesForProvider returns routable offerings for one provider in stable order.
type Route ¶
type Route struct {
CatalogGenerationID string
DefinitionID catalogs.ModelDefinitionID
ProviderID catalogs.ProviderID
ProviderModelID catalogs.ProviderModelID
Operations []catalogs.ProviderOperation
Endpoints []catalogs.ProviderOfferingEndpoint
PromptCache *bool
}
Route is one immutable, generation-bound provider offering identity.
func (Route) Endpoint ¶
func (r Route) Endpoint(operation catalogs.ProviderOperation) (catalogs.ProviderOfferingEndpoint, bool)
Endpoint returns the exact Starmap endpoint for a supported operation.
func (Route) Key ¶
func (r Route) Key() catalogs.OfferingKey
Key returns the exact Starmap provider offering identity.
func (Route) Supports ¶
func (r Route) Supports(operation catalogs.ProviderOperation) bool
Supports reports whether the catalog offering and compiled adapter both support the operation.
func (Route) SupportsPromptCache ¶
SupportsPromptCache reports exact offering support. Unknown is not support.
type RouteExclusion ¶ added in v1.1.0
type RouteExclusion string
RouteExclusion names the derivation filter that kept one catalog offering out of the routable set. It is the route planner's own vocabulary. A caller that reports operator state maps it into its own reason words.
const ( // RouteExclusionNone marks an offering that planning kept. RouteExclusionNone RouteExclusion = "" // RouteExclusionAdapterNotReady reports that the provider has no adapter // able to carry a request, so none of its offerings can be reached. RouteExclusionAdapterNotReady RouteExclusion = "adapter_not_ready" // RouteExclusionCatalogRetired reports a retired offering lifecycle. RouteExclusionCatalogRetired RouteExclusion = "catalog_retired" RouteExclusionCatalogUnavailable RouteExclusion = "catalog_unavailable" // currently withholds this offering. RouteExclusionOfferingUnavailable RouteExclusion = "offering_unavailable" // RouteExclusionOperationUnsupported reports that the offering and the // adapter share no operation with a usable endpoint. The offering exists in // the catalog and is healthy, and no request can reach it. RouteExclusionOperationUnsupported RouteExclusion = "operation_unsupported" // RouteExclusionOperationUnpriced reports that every operation the offering // and the adapter share is one the gateway cannot bill. It is a separate // verdict from operation_unsupported because the fix is a catalog price, // not a compiled adapter. RouteExclusionOperationUnpriced RouteExclusion = "operation_unpriced" )
Route exclusions are a closed set, ordered the way the derivation applies them. An offering carries the first exclusion that rejected it.
type RouteValidation ¶ added in v1.2.1
type RouteValidation struct {
// State is where the newest candidate stands.
State RouteValidationState `json:"state"`
// Candidate is the newest generation the connected runtime published.
Candidate GenerationRef `json:"candidate,omitzero"`
// Accepted is the generation that routes every request now.
Accepted GenerationRef `json:"accepted,omitzero"`
// Rejected is the newest candidate this instance refused.
Rejected Rejection `json:"rejected,omitzero"`
}
RouteValidation reports the four states of the candidate-to-accepted transaction as separate values: what the source offered, what routes now, what this instance refused, and where the newest candidate stands.
type RouteValidationState ¶ added in v1.2.1
type RouteValidationState string
RouteValidationState says where the newest candidate stands between the source and the routable head. The set is closed.
const ( // RouteValidationUnknown means this instance observed no candidate yet. RouteValidationUnknown RouteValidationState = "unknown" // RouteValidationPending means a candidate is ahead of the accepted head // and validation has not finished. RouteValidationPending RouteValidationState = "pending" // RouteValidationAccepted means the newest candidate became the accepted // head. RouteValidationAccepted RouteValidationState = "accepted" // RouteValidationRejected means the newest candidate did not become // routable, and the accepted head still serves every request. RouteValidationRejected RouteValidationState = "rejected" )
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns one Starmap connected runtime, Starport's accepted catalog head, and the routable control plane derived from that head.
One runtime reads one source. The local-or-remote choice is gone: a deployment names a source kind, and the same composition serves every kind. Starmap publishes an effective generation into the candidate store; Starport then validates the candidate and advances its own accepted head, so a candidate that fails route validation never routes a request.
func OpenRuntime ¶
func OpenRuntime( ctx context.Context, store storage.KVStore, settings Settings, lookup DeploymentLookup, ) (*Runtime, error)
OpenRuntime composes one connected Starmap runtime over Starport's durable storage. It starts the source and acquisition schedules and returns.
The deployment lookup is the only credential plane catalog acquisition reads, so an inference credential can reach no provider observation.
func (*Runtime) Accept ¶ added in v1.2.1
Accept advances the accepted head to one validated candidate.
The transaction has three parts, in this order. The lease epoch fences the write, so a run that lost the lease writes nothing. The candidate must move the head forward, so a stale or contradictory generation is refused. The write itself is a compare-and-swap against the head the caller read, so two instances that reach this point together produce exactly one advance.
Repeating a candidate that the head already carries is a success that writes nothing. Shared storage stays idempotent for a retry after a partial failure.
func (*Runtime) AcceptedGeneration ¶ added in v1.2.1
AcceptedGeneration returns the head Starport accepted. A deployment that accepted nothing yet reports the not-found error.
func (*Runtime) Close ¶ added in v1.2.1
Close stops the forwarding work and closes the connected runtime.
func (*Runtime) ControlPlane ¶
func (r *Runtime) ControlPlane() *ControlPlane
ControlPlane returns Starport's generation-consistent catalog projection. It reads the accepted head alone.
func (*Runtime) CurrentCandidate ¶ added in v1.2.1
CurrentCandidate returns the effective state the connected runtime serves now, with the lease epoch that fences its acceptance.
func (*Runtime) Refresh ¶
Refresh reads the source and observes every eligible provider. Overlapping callers join one run, because the connected runtime keeps refresh single-flight and returns the report of the run in flight.
func (*Runtime) RefreshCandidate ¶ added in v1.1.0
func (r *Runtime) RefreshCandidate( ctx context.Context, timeout time.Duration, ) (Candidate, error)
RefreshCandidate refreshes the connected runtime and returns the effective state the refresh produced, with the lease epoch that fences its acceptance.
A timeout of zero adds no cap. The transfer bounds already end a transfer that stops making progress, so an added cap would cut a transfer the transfer policy still allows.
func (*Runtime) Reject ¶ added in v1.2.1
Reject records one candidate this instance refused, with the safe cause of the refusal. The accepted head does not move.
func (*Runtime) RouteValidation ¶ added in v1.2.1
func (r *Runtime) RouteValidation() RouteValidation
RouteValidation reports where the newest candidate stands between the source and the routable head.
func (*Runtime) Start ¶ added in v1.2.1
Start begins forwarding every new candidate the connected runtime publishes.
type RuntimeReport ¶ added in v1.2.1
type RuntimeReport struct {
// Usable reports whether the runtime serves a catalog now.
Usable bool `json:"usable"`
// SourceKind names the selected source. It reads from the closed source
// vocabulary.
SourceKind string `json:"source_kind"`
// Fallback reports whether the runtime serves the embedded catalog
// because no upstream generation is active.
Fallback bool `json:"fallback"`
// FallbackReason names why the runtime fell back. It reads from the
// closed fallback vocabulary.
FallbackReason string `json:"fallback_reason,omitempty"`
// Lease reports the runtime lease state.
Lease string `json:"lease,omitempty"`
// LastRunID identifies the last refresh run.
LastRunID string `json:"last_run_id,omitempty"`
// StartedAt is when the runtime opened.
StartedAt time.Time `json:"started_at,omitzero"`
// ObservedAt is when the runtime built this report.
ObservedAt time.Time `json:"observed_at,omitzero"`
}
RuntimeReport is the state of the connected Starmap runtime.
type Settings ¶ added in v1.2.1
type Settings struct {
// Source selects the catalog source kind.
Source string
// SourceURL is the safe source endpoint or the file identity.
SourceURL string
// SourceAPIKey authenticates this instance to an upstream deployment.
SourceAPIKey string
// SourceRepository names the signed publication repository.
SourceRepository string
// SourceChannel names the publication channel.
SourceChannel string
// SourceSignerWorkflow names the workflow that signed a publication.
SourceSignerWorkflow string
// SourceToken reads a GitHub release.
SourceToken string
// SourcePollInterval bounds how often the source is asked.
SourcePollInterval time.Duration
// SourceStartupPolicy decides what startup does without a source answer.
SourceStartupPolicy string
// SourceMaxAge is the oldest publication this instance accepts.
SourceMaxAge time.Duration
// SourceMaxHops bounds the publication chain.
SourceMaxHops int
// AcquisitionEnabled decides whether this instance observes providers.
AcquisitionEnabled bool
// AcquisitionInterval is the period between provider observations.
AcquisitionInterval time.Duration
// WorkspacePath is the local catalog workspace directory. It holds the
// catalog files an operator supplies and nothing this process owns.
WorkspacePath string
// StateDirectory is where this process keeps the state the connected
// runtime retains: the layer store, the instance identity seed, and the
// source discovery record. It belongs to one process on one machine.
StateDirectory string
// ListenAddress is the host and port this gateway serves. It joins the
// identity seed and the host name in the instance identity, so two
// processes on one host hold two identities and the runtime lease fences
// one holder.
ListenAddress string
// StartupSpread spreads the first source read across a fleet.
StartupSpread time.Duration
// TransferIdleTimeout ends a transfer that stops making progress.
TransferIdleTimeout time.Duration
// TransferMaxDuration bounds one complete transfer.
TransferMaxDuration time.Duration
// RefreshTimeout is an added cap on one refresh run.
RefreshTimeout time.Duration
}
Settings are the catalog settings one connected runtime reads. They mirror the canonical Starmap settings contract with plain Go types, so the configuration package names no Starmap option and this package alone owns the translation.
type SnapshotMetadata ¶ added in v1.1.0
type SnapshotMetadata struct {
GenerationID string `json:"generation_id"`
GeneratedAt time.Time `json:"generated_at"`
AgeSeconds int64 `json:"age_seconds"`
CatalogSequence uint64 `json:"catalog_sequence"`
AvailabilityRevision uint64 `json:"availability_revision"`
PayloadChecksum string `json:"payload_checksum"`
ManifestAvailable bool `json:"manifest_available"`
SchemaVersion uint64 `json:"schema_version,omitempty"`
PayloadSizeBytes int64 `json:"payload_size_bytes,omitempty"`
Completeness string `json:"completeness,omitempty"`
Degraded bool `json:"degraded"`
DegradationReasons []string `json:"degradation_reasons,omitempty"`
Validation ValidationSummary `json:"validation,omitzero"`
SourceObservations []SourceObservation `json:"source_observations,omitempty"`
SyncRunID string `json:"sync_run_id,omitempty"`
}
SnapshotMetadata is the freshness surface of the active catalog snapshot. The scalar identity always comes from the snapshot itself. Manifest detail comes from the stored generation record; when that record is missing the metadata says so instead of silently omitting fields.
type SnapshotSource ¶ added in v1.1.0
type SnapshotSource interface {
Current() *RoutableSnapshot
}
SnapshotSource supplies the active routable snapshot.
type Source ¶
type Source interface {
CurrentCatalogState() starmap.CatalogState
}
Source supplies one atomic Starmap catalog and generation pair.
type SourceObservation ¶ added in v1.1.0
type SourceObservation struct {
Source string `json:"source"`
ObservedAt time.Time `json:"observed_at"`
Completeness string `json:"completeness"`
Status string `json:"status"`
}
SourceObservation reports one acquisition source that fed the generation.
type Summary ¶ added in v1.2.1
type Summary struct {
// GenerationID identifies the served catalog generation.
GenerationID string `json:"generation_id"`
// GeneratedAt is when the served generation was built.
GeneratedAt time.Time `json:"generated_at,omitzero"`
// AgeSeconds is the age of the served generation.
AgeSeconds int64 `json:"age_seconds"`
// Usable reports whether the gateway routes on a catalog now.
Usable bool `json:"usable"`
// Freshness grades the age of the served generation.
Freshness string `json:"freshness"`
// SourceKind names the selected source from the closed vocabulary.
SourceKind string `json:"source_kind"`
// Fallback reports whether the gateway serves the embedded baseline.
Fallback bool `json:"fallback"`
// Providers is how many providers the served catalog carries.
Providers int `json:"providers"`
// Models is how many routable models the served catalog carries.
Models int `json:"models"`
// NextUpdateAt is when this instance next reads its source.
NextUpdateAt time.Time `json:"next_update_at,omitzero"`
}
Summary is the allowlisted catalog view of a reader that holds no admin scope. It is an allowlist and not a redaction: a field reaches it only because this projection names it, so a new operational value on the admin status never appears here by accident.
It carries no source address, no source identity, no publication chain, no lease, no run identifier, no failure reason, and no operation.
type UpstreamProvenance ¶ added in v1.2.1
type UpstreamProvenance struct {
// SourceIdentity is the safe identity of the selected source.
SourceIdentity string `json:"source_identity,omitempty"`
// SourceKind names the selected source.
SourceKind string `json:"source_kind"`
// ChannelUpdatedAt is the origin publication time the chain propagated.
ChannelUpdatedAt time.Time `json:"channel_updated_at,omitzero"`
// Chain is the sanitized publication chain, nearest hop first.
Chain []Hop `json:"chain,omitempty"`
}
UpstreamProvenance is what the source said about the generation it published. It stays separate from the effective provenance, because this runtime composes its own generation over the one it received.
type ValidationSummary ¶ added in v1.1.0
type ValidationSummary struct {
Status string `json:"status"`
ErrorCount int `json:"error_count"`
WarningCount int `json:"warning_count"`
ValidatedAt time.Time `json:"validated_at"`
}
ValidationSummary condenses the generation validation report for operators.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package logos serves the bundled catalog identity marks.
|
Package logos serves the bundled catalog identity marks. |
|
Package view owns the console- and API-facing projections of one routable catalog snapshot.
|
Package view owns the console- and API-facing projections of one routable catalog snapshot. |