SEIF Docs

Context Build Registry

IMPLEMENTED in 0.4.0: a self-hostable, authenticated /v1 control plane (contract context-registry.v2), also started automatically by the Workstation's Deploy surface in local-personal mode. Distributions: context-control-plane-<version>-{macos-arm64,linux-x64,linux-arm64}.tar.gz (Linux server). No SEIF source repositories or global Node installation are required.

SEIF_REGISTRY_TOKEN=… ./registry --data ./registry-data --port 4320                 # local, one Admin
./registry --data ./registry-data --port 4320 --config registry.json                # team
./registry --data ./registry-data --backup ./backup-2026-10-09                      # online consistent backup
./registry --data ./registry-data --gc [--apply] [--grace-ms 3600000]               # unreferenced-object report / removal
{"members":[{"id":"developer","org":"example","role":"Developer","tokenRef":"env:TEAM_DEVELOPER_TOKEN","projects":["cp-…"]},{"id":"reviewer","org":"example","role":"Reviewer","tokenRef":"env:TEAM_REVIEWER_TOKEN"}],
 "trustedKeys":{"ci-signer":"-----BEGIN PUBLIC KEY-----\n…"},
 "providerSecretRefs":["env:CONTEXT_PROVIDER_*"],
 "providerDatabaseRoots":["/srv/context-provider-data"]}

Config holds references and public keys, never bearer values or private keys. Configured members are reconciled on startup and every configuration change (members, trust roots, secret allowlist, provider database roots) is audited as registry.configure. Applications and CI use service identities issued through the API.

Model

Registration verifies the artifact (definition digest, every material digest, identity, contract, complete envelope, secret scan) and recomputes Context Tests; it never implies promotion. A Build ref cannot be reassigned. Approval, promotion, deployment, observed health, bindings and break-glass are separate append-only records with compare-and-swap on the current promotion and binding revision. See Promotion, Deployment Bindings, Deployment, Authorization model (generated endpoint matrix).

Storage (schema v3)

  • SQLite WAL for records, credentials (digests only), indexed catalogues, trace read models, content-budget accounting and persisted checkpoint schedules. Migration from v1/v2 preserves records and artifact identity; newer schemas are refused. See Reliability.
  • Content-addressed objects per organization (cas/<org>/sha256/…): one immutable object per distinct material and one manifest object per Build. Objects are written before the record commits, linked atomically, re-verified on every read; the complete artifact is reconstructed byte-identically and its digest checked. Measured: 1000 Builds of the reference project use 3.4× less artifact storage than 0.3.0; 200 Builds of a documentation-heavy project 30.9× less (laptop measurement, see scale.json).
  • Trace read models: layer, material (digest and locator), source and provider dimensions over a tenant-scoped term dictionary; covering-index queries at 100k traces with p95 below 0.1 ms on an Apple M4. Read models follow retention (cascade on delete) and are not authority: the canonical envelope is.
  • GC is a reachability scan over Build object references with a grace window; referenced objects are never removed. Builds themselves are never deleted.
  • Backup: --backup takes a SQLite snapshot (VACUUM INTO), then copies exactly the immutable objects that snapshot references, so the pair is consistent while the Registry keeps running. Restoring is starting a Registry on the backup directory. This is a single-host consistent snapshot, not a distributed transaction.

API conventions

All endpoints require Authorization: Bearer <credential>; bodies are JSON. Errors carry error.code, a safe message and the request id: 401 authentication, 403 authorization or separation of duties, 404 absent or other tenant, 409 stale state, 410 retired deployment, 422 semantic gate, 503 no active deployment / runtime unavailable, 504 runtime timeout. Lists are newest first with limit (1–200) and opaque nextCursor. No browser-origin access.

FUTURE: HA, distributed database and object-store adapters, SSO federation, hosted operation.