ALLM.Pipeline.Artifacts.Memory (allm_pipeline v0.1.0)

Copy Markdown View Source

In-VM ALLM.Pipeline.Artifacts adapter — artifacts live in an Agent and die with it.

For tests and throwaway experiments: it needs no DynamoDB, no filesystem and no configuration, so a suite that only cares that an artifact round-trips can configure it and stop depending on docker-compose.

URLs are memory://<id>.

Lifecycle

The Agent is started on demand and named after this module, matching ALLM.Pipeline.LLMCallLog — the package declares no supervision tree (this repo's mix.exs has no mod:), so there is nothing to start it under. It is process-global, therefore shared across concurrent tests: ids collide across tests unless each generates its own, and gc/1 with no options purges everything. Call gc/1 in a setup block rather than assuming a clean slate.

There is no size ceiling — put/4 never returns {:error, :too_large} — so a payload the DynamoDB adapter would refuse is stored here without comment. That is deliberate (an in-memory store has no item limit to enforce), but it means this adapter cannot exercise ArtifactStore's oversize routing.

Summary

Functions

Drop everything stored at or before opts[:older_than] (default: now), and return how many entries went. With no options this empties the store, which is what a test setup wants.

Functions

gc(opts \\ [])

@spec gc(keyword()) :: {:ok, non_neg_integer()}

Drop everything stored at or before opts[:older_than] (default: now), and return how many entries went. With no options this empties the store, which is what a test setup wants.