registries

package
v0.33.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package registries is the ops-registry ingestion adapter: it parses well-known ops registry files — `domains.json` (Sneat-ops shape) and curated `ecosystem*.yaml` maps — into domain/product entities and `declared` facts.

Feature: cli/studio/index (REQ: adapter-registries)

Emitted predicates:

  • serves-status — a domain's observed HTTP status from domains.json (the `/` probe when present, else the first probed path)
  • fronts — domain → product, from a curated ecosystem map (THE canonical source); when a domain appears only in domains.json, a best-effort fallback emits domain → Cloudflare worker name instead
  • aliased-as — product → brand name
  • implemented-by — product → repo name
  • member-of — product → vertical

Registry files are discovered at the repo root and under data/ (domains.json, ecosystem*.yaml), plus any per-repo `registries:` paths configured in studio.yaml. Both parsers read a tolerant subset of the real shapes: unknown keys are ignored; a malformed file becomes a warning and skips only that file (REQ: partial-tolerance).

Domains and products are GLOBAL coordinates, so subjects and objects are emitted without the `#` repo-relative marker — the pipeline's repo-slug prefixing never applies to them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter is the ops-registry ingestion adapter.

func New

func New(extra map[string][]string) Adapter

New returns the adapter. extra is the per-repo configured registry file map (workspace.Workspace.ResolveRegistries); nil is fine.

func (Adapter) ID

func (Adapter) ID() string

ID returns the stable adapter id stamped into every emitted fact.

func (Adapter) Ingest

func (a Adapter) Ingest(repoPath string) ([]fact.Fact, []fact.Warning)

Ingest parses the registry files of the repo at repoPath. Repos without registry files yield no facts and no warnings. Ecosystem maps are parsed before domains files so their curated domain→product `fronts` facts suppress the worker-name fallback for the domains they cover.

The emitted facts are deduplicated on (subject, predicate, object, evidence_class): when two registry files agree on the same relationship — e.g. data/ecosystem.yaml and data/ecosystem-map.yaml both declaring a product's `fronts`/`aliased-as`/`member-of` — a single representative fact is kept, with the pointer of the first file in discovery order (see dedup). The fact model carries one pointer, so cross-source agreement (a confidence signal) collapses to one fact rather than N identical copies.

func (Adapter) Version

func (Adapter) Version() string

Version returns the adapter version stamped into every emitted fact.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL