Craggy
← All repos

Artifact Services

A streaming Go library for immutable content, artifact snapshots, typed objects, and provenance. Small interfaces keep physical storage separate from content identity, typed meaning, and revision histories. Context carries cancellation and shared observation across operations.

View on GitHub
git clone https://github.com/craggy-io/artifact-services.git

All seven layers have Go implementations with explicit resource and backend limits. Objects, lineage and assertions sit over artifacts; artifacts builds on CAS, which builds on storage. Optional adapters add wiring, run coordination, typed access, tree I/O, GC, journal watching and read-only SQL. See the layer guides for supported subsets and verification evidence for qualification limits.

Features

Layer architecture

Artifact Services architecture: Objects and Lineage are peers over Artifacts, followed by CAS and Storage; shared context and observability span every layer.

Solid arrows point to domain dependencies; the shared context band spans all layers. Higher-level coordination composes Objects publication and lineage recording, without making either peer depend on the other for storage. Objects owns schema and selector semantics; lineage carries generic references and mapping evidence. Catalog discovery finds snapshots; Objects adapters query their content.

Layer Responsibilities Guide
Storage Immutable keyed blobs, streaming I/O and atomic publication. Storage
Observability Context scopes, progress, semantic counters and internal-work filtering. Observability
CAS Content identity, deduplication and verified streaming reads. CAS
Artifacts Immutable manifests, file access and catalog discovery. Artifacts
Objects Runtime schemas, typed validation and content-query adapters. Objects
Lineage Generic activities, independent revisions and row/column provenance. Lineage
Assertions Typed statements about stored things, current views and writer authority. Assertions

Start with the documentation index, the runnable storage/observation example, or the runnable end-to-end walkthrough.

For coding-agent integration and repository development guidance, see AGENTS.md.

Development

Requires Go 1.27 or newer. The core has no external dependencies; adapters/sqlindex is a separate module with its own.

go test ./...
go test -race ./...
go vet ./...
go build ./...

See verification and measurements for crash qualification, Windows failure coverage, the opt-in large trials, and their limitations.