storetest

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package storetest runs the same optimization storage checks against each backend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivationRecovery

func ActivationRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ActivationRecovery executes a stored activation after reopening its database, then verifies that a disabled generation and its idempotency survive another reopen.

func ActiveTeamRecovery

func ActiveTeamRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ActiveTeamRecovery checks reviewed execution after both stores are reopened.

func ControllerAdoption

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

ControllerAdoption checks explicit review and separation from execution routes.

func ControllerAdoptionArtifactDenial

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

ControllerAdoptionArtifactDenial requires live child artifacts at the service boundary.

func ControllerAdoptionRecovery

func ControllerAdoptionRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ControllerAdoptionRecovery preserves controller routes and retry keys across reopen.

func ControllerComparisonFixture

ControllerComparisonFixture records a paired stream using the supplied frozen plans and evaluator, so adapter tests exercise the same transactional fixtures.

func ControllerDecisionArtifacts

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

ControllerDecisionArtifacts checks child retention before decision and review.

func ControllerDecisionRecovery

func ControllerDecisionRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ControllerDecisionRecovery keeps the exact comparison through parent takeover.

func ControllerDecisionWorker

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

ControllerDecisionWorker verifies comparison isolation and authority at commit preparation.

func ControllerDecisions

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

ControllerDecisions preserves child execution provenance in parent decisions.

func CreationCommandRecovery

func CreationCommandRecovery(t *testing.T, factory func(*testing.T, func() time.Time) store.Store)

CreationCommandRecovery verifies receipt recovery on a reopened native store.

func DiscoveryInheritance

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

DiscoveryInheritance checks arm isolation and frozen earlier-task learning.

func DiscoveryInheritanceRecovery

func DiscoveryInheritanceRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

DiscoveryInheritanceRecovery retains the exact earlier-task references across reopen.

func DiscoveryLearning

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

DiscoveryLearning checks provisional reflection persistence before holdout exposure.

func DiscoveryLearningRecovery

func DiscoveryLearningRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

DiscoveryLearningRecovery verifies that reflection acknowledgement survives restart and lease takeover without rewriting content or duplicating its audit.

func DiscoveryReflection

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

DiscoveryReflection checks metered early reflection and ambiguous-answer recovery.

func DiscoveryReflectionRecovery

func DiscoveryReflectionRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

DiscoveryReflectionRecovery preserves outcomes and unknown calls across restart.

func Fixture

func Fixture(t *testing.T, project string) optimization.ExperimentBundle

Fixture creates a populated draft bundle for shared backend checks.

func ImprovementRecovery

func ImprovementRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ImprovementRecovery verifies family accounting after closing and reopening storage.

func ImprovementValidationRecovery

func ImprovementValidationRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ImprovementValidationRecovery resumes the exact paired stream after reopening storage.

func ImprovementWorker

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

ImprovementWorker checks ordered child creation and restartable parent scheduling.

func ImprovementWorkerLoop

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

ImprovementWorkerLoop exercises both arms through real controller and trial handlers.

func ImprovementWorkerRecovery

func ImprovementWorkerRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ImprovementWorkerRecovery closes storage during discovery and after holdout allocation.

func IndependentScopes

func IndependentScopes(t *testing.T, s store.Store)

IndependentScopes checks that one store instance allows another scope to commit while a transaction is held. Use it for database backends that support independent writers; SQLite deliberately has a database-wide write lock.

func LeaseTakeoverAcrossProcesses

func LeaseTakeoverAcrossProcesses(t *testing.T, database func(*testing.T) string, factory ProcessFactory)

LeaseTakeoverAcrossProcesses checks fencing through a fresh test process. database runs only in the parent; factory opens the supplied database in either process.

func LessonCommandRecovery

func LessonCommandRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

LessonCommandRecovery checks durable operator receipts after closing the store.

func OperatorActivationRecovery

func OperatorActivationRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

OperatorActivationRecovery retries transport commands after reopening each committed generation. Old receipts cannot overwrite the current route.

func OperatorCommandRecovery

func OperatorCommandRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

OperatorCommandRecovery proves that a lost command response can be retried after reopening storage without a second transition or audit event.

func OrchestrationFixture

func OrchestrationFixture(t *testing.T, model llm.Client) (optimization.ExperimentBundle, *engine.Engine, *rootsqlite.Store, func() *rootsqlite.Store)

OrchestrationFixture prepares a real parallel team in a disposable runtime store. It is shared test infrastructure, not a qualified isolation provider.

func ParallelRecovery

func ParallelRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

ParallelRecovery reopens a database after a mixed batch result, takes over its lease, and inspects the remote attempt without repeating either dispatch.

func PublicationRecovery

func PublicationRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

PublicationRecovery checks persisted claim takeover and acknowledgement after closing and reopening a database. Open must return the same durable database.

func PublishedLesson

func PublishedLesson(t *testing.T, factory Factory) (store.Store, context.Context, optimization.PublicationRequest)

PublishedLesson creates an accepted reflection with durable decision evidence and a pending outbox record. Adapters can reuse the storage conformance fixture.

func PublishedLessonFixture

func PublishedLessonFixture(t *testing.T, factory Factory) (store.Store, context.Context, optimization.PublicationRequest)

PublishedLessonFixture creates local lesson evidence and its pending outbox. It does not contact or qualify a remote knowledge provider.

func RetainControllerBaseline

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

RetainControllerBaseline reviews the parent without retaining its execution baseline.

func RetainRecovery

func RetainRecovery(t *testing.T, open func(*testing.T, func() time.Time) store.Store)

RetainRecovery verifies that the review and its retry identity survive reopening.

func ReviewedActivationFixture

func ReviewedActivationFixture(t *testing.T, factory Factory) (store.Store, context.Context, optimization.ActivationChange)

ReviewedActivationFixture saves a complete recommendation for transport tests. Its deterministic evidence is not a live-provider qualification.

func Run

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

Run checks store semantics with populated records and exact identity assertions.

Types

type Factory

type Factory func(*testing.T, func() time.Time) store.Store

Factory returns an empty backend and registers its cleanup with the test.

type ProcessFactory

type ProcessFactory func(*testing.T, string, func() time.Time) store.Store

ProcessFactory opens an existing database with a trusted test clock.

Jump to

Keyboard shortcuts

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