contracttest

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package contracttest contains the database-neutral CoreStore release gate. Every relational adapter must run this exact suite against its real engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, factory Factory)

Run executes the same observable causal contract for every adapter.

func RunAdaptiveSeeds

func RunAdaptiveSeeds(t *testing.T, factory IndexedFactory)

RunAdaptiveSeeds tests the same real causal transitions in both databases.

func RunConstitution

func RunConstitution(t *testing.T, factory IndexedFactory)

RunConstitution pins source identity and the current-window readonly baseline.

func RunEpisodeEvidence

func RunEpisodeEvidence(t *testing.T, factory IndexedFactory)

RunEpisodeEvidence executes the shared, real-database contract for bounded Episode evidence. The Index is intentionally untrusted and in-memory; every asserted fact and snapshot comes from the relational Store under test.

func RunLiveAdaptiveWorker

func RunLiveAdaptiveWorker(t *testing.T, factory IndexedFactory, audit func(*testing.T, ledger.Scope) map[string]int)

RunLiveAdaptiveWorker crosses the production inference transport, Python Worker and configured live model. It never supplies deterministic model text. The ordinary contract factories own disposable migrated databases. Its explicit 330-second test envelope does not validate memoryd's stock two-minute scheduler deadline.

func RunLiveConstitutionHarnesses

func RunLiveConstitutionHarnesses(t *testing.T, factory IndexedFactory)

RunLiveConstitutionHarnesses is opt-in because integration normally precedes SDK dependency installation/build. It uses only the factory's disposable DB.

Types

type Factory

type Factory func(*testing.T) storage.CoreStore

Factory returns a Store connected to a fresh isolated database namespace. Run owns Close; the adapter wrapper owns namespace cleanup.

type IndexedFactory

type IndexedFactory func(*testing.T, memoryindex.Index) storage.CoreStore

IndexedFactory returns a Store wired to the supplied disposable projection. The relational adapter must still rehydrate every returned ref canonically.

Jump to

Keyboard shortcuts

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