Canonical unit-day artifacts
The artifact API is an explicit publication/adoption boundary. Namespace authorization belongs to the store; callers supply trusted context and pinned generation references. Context, catalog, and digest helpers are available from the artifact contract modules.
| Model | Purpose |
|---|---|
UnitDayArtifactRef | Pins an immutable artifact generation. |
ArtifactRelationRef | Binds a relation and its digests to that generation. |
MeasureManifest | Records measure provenance and freshness. |
ArtifactContext | Binds canonical context JSON (format 2, hash-only source recipes, no source SQL) to its SHA-256 digest (encoding integrity, not authenticity). Format 1 is retired; republish. |
UnitDayArtifactManifest | Captures the complete artifact manifest. |
ExtensionRefBase | Carries relation, definition, and source digests. |
BreakoutDimensionExtension | Describes a pre-exposure breakout dimension. |
FactorDimensionExtension | Describes a pre-exposure factor dimension. |
ClusterIdentityExtension | Identifies the clustering relation. |
CupedPreperiodExtension | Supplies a pre-period measure. |
AssignmentCountsExtension | Captures assignment population counts. |
TriggerPopulationExtension | Captures the trigger population relation. |
EncouragementUptakeExtension | Captures encouragement uptake data. |
SiteVolumeExtension | Records site-level measure volume and freshness. |
UnitCovariateExtension | Carries one declared numeric per-unit covariate. |
UnitCovariateLevelExtension | Carries one declared categorical per-unit covariate, including nulls. |
ArtifactExtensionCatalogEntry | Stores a canonical extension definition and source recipe. |
ArtifactExtensionRef | Tagged union of the ten concrete extension references. |
ArtifactExtensionRequest | Tagged union of the ten concrete extension requests. |
These are Pydantic models and tagged unions importable from increment; see
increment.semantics.artifact for full field detail.
RelationLocator
Section titled “RelationLocator”RelationLocatorA namespace-qualified relation name; never a backend SQL fragment.
RelationRole
Section titled “RelationRole”RelationRoleNo docstring.
BaseRelations
Section titled “BaseRelations”BaseRelationsRequired base artifact relations bound to one artifact generation.
Construct it with exposure and measure-stat relation references, usually through the artifact publication loader.
Freshness
Section titled “Freshness”FreshnessNo docstring.
SimpleMetricMeasure
Section titled “SimpleMetricMeasure”SimpleMetricMeasureNo docstring.
RatioMetricMeasure
Section titled “RatioMetricMeasure”RatioMetricMeasureNo docstring.
MetricMeasure
Section titled “MetricMeasure”MetricMeasureNo docstring.
Artifact extensions
Section titled “Artifact extensions”Extension references and descriptors define the supported dimensions, assignment, uptake, and site-volume extensions.
Artifact requests
Section titled “Artifact requests”Requests validate caller-supplied extension definitions before publication.
ExtensionRequestBase
Section titled “ExtensionRequestBase”ExtensionRequestBaseNo docstring.
BreakoutDimensionRequest
Section titled “BreakoutDimensionRequest”BreakoutDimensionRequestNo docstring.
FactorDimensionRequest
Section titled “FactorDimensionRequest”FactorDimensionRequestNo docstring.
ClusterIdentityRequest
Section titled “ClusterIdentityRequest”ClusterIdentityRequestNo docstring.
CupedPreperiodRequest
Section titled “CupedPreperiodRequest”CupedPreperiodRequestNo docstring.
AssignmentCountsRequest
Section titled “AssignmentCountsRequest”AssignmentCountsRequestNo docstring.
TriggerPopulationRequest
Section titled “TriggerPopulationRequest”TriggerPopulationRequestNo docstring.
EncouragementUptakeRequest
Section titled “EncouragementUptakeRequest”EncouragementUptakeRequestNo docstring.
SiteVolumeRequest
Section titled “SiteVolumeRequest”SiteVolumeRequestNo docstring.
UnitCovariateRequest
Section titled “UnitCovariateRequest”UnitCovariateRequestNo docstring.
UnitCovariateLevelRequest
Section titled “UnitCovariateLevelRequest”UnitCovariateLevelRequestNo docstring.
Artifact publication and storage
Section titled “Artifact publication and storage”Publication handles connect validated context to immutable snapshots in the authorized artifact store.
ArtifactPublication
Section titled “ArtifactPublication”ArtifactPublicationIsolated create-only generation handle.
ArtifactSnapshot
Section titled “ArtifactSnapshot”ArtifactSnapshotImmutable, generation-scoped read handle.
ArtifactStore
Section titled “ArtifactStore”ArtifactStoreNamespace-scoped publication/snapshot lifecycle contract.
compile_unit_day_artifact_context
Section titled “compile_unit_day_artifact_context”compile_unit_day_artifact_context(experiment_name, definitions, on_mixed_assignment, encouragement_uptake, site_volume_coverage)Compile a deterministic, non-executable context from an already-loaded Definitions model.
A naive window edge is wall-clock time at its experiment’s day_boundary and binds the
equivalent UTC instant; any other naive datetime is read as UTC.
Source SQL never enters the context: source recipes are represented by tagged hashes.
unit_day_artifact_extension_catalog
Section titled “unit_day_artifact_extension_catalog”unit_day_artifact_extension_catalog(context)Validate and expose the immutable extension catalog in a context.
Digests and hashing
Section titled “Digests and hashing”Canonical byte encodings and SHA-256 helpers make artifact identity deterministic across publication and request boundaries.
ArtifactDigestError
Section titled “ArtifactDigestError”ArtifactDigestErrorPublic coded refusal raised by canonical digest operations.
DigestType
Section titled “DigestType”DigestTypeNo docstring.
FieldSpec
Section titled “FieldSpec”FieldSpec(name, type_tag, nullable)No docstring.
RelationDigests
Section titled “RelationDigests”RelationDigests(role, schema_sha256, content_sha256, row_count, schema_bytes, rows_bytes, digest_format)No docstring.
canonical_schema_bytes
Section titled “canonical_schema_bytes”canonical_schema_bytes(schema)No docstring.
canonical_row_bytes
Section titled “canonical_row_bytes”canonical_row_bytes(schema, row)No docstring.
canonical_rows_bytes
Section titled “canonical_rows_bytes”canonical_rows_bytes(schema, rows, primary_key)No docstring.
canonical_json_bytes
Section titled “canonical_json_bytes”canonical_json_bytes(value)No docstring.
schema_sha256
Section titled “schema_sha256”schema_sha256(role, schema)No docstring.
content_sha256
Section titled “content_sha256”content_sha256(role, schema, rows, primary_key)No docstring.
digest_relation
Section titled “digest_relation”digest_relation(role, schema, rows, primary_key)No docstring.
manifest_sha256
Section titled “manifest_sha256”manifest_sha256(manifest)No docstring.
context_sha256
Section titled “context_sha256”context_sha256(context)No docstring.
request_sha256
Section titled “request_sha256”request_sha256(request)No docstring.
extension_definition_sha256
Section titled “extension_definition_sha256”extension_definition_sha256(kind, canonical_definition_json)No docstring.
extension_source_provenance_sha256
Section titled “extension_source_provenance_sha256”extension_source_provenance_sha256(kind, canonical_source_recipe_json)No docstring.