Interface StepScaffold
- All Known Implementing Classes:
ChunkerScaffold, OpenSearchSinkScaffold, ParserScaffold, PassthroughScaffold
public interface StepScaffold
Per-step integration scaffolding for module perf / isolation tests.
Each pipeline step needs different setup before its process() will
do real work when driven directly through the door (bypassing the engine that
normally supplies it): the chunker needs vector-set directives stamped on the
doc; opensearch-sink needs vector sets + a fresh index provisioned and the
resulting plan ids handed back via context_params; embedder /
semantic-graph just need their already-shaped input.
A scaffold encapsulates that: prepare() provisions external state
once per session, wrap(PipeDoc) turns a corpus doc into the exact
PipeStream the step expects, and cleanup() tears down. This
is the lightweight alternative to a full e2e — just the integration setup the
one step under test requires.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidcleanup()Tear down anythingprepare()created (e.g.default Optional<ai.pipestream.data.v1.PipeDoc> corpusDoc(int index) The scaffold-supplied corpus doc at 1-basedindex; empty when out of range.default StringDisplay name of the scaffold-supplied corpus (e.g.default OptionalIntNumber of docs in the scaffold-supplied corpus; empty = use the fixture-jar dataset.info()What the scaffold provisioned, for display/logging.module()The module/step this scaffold targets (e.g.default voidprepare()Provision external state (vector sets, fresh index, …).ai.pipestream.data.v1.PipeStreamwrap(ai.pipestream.data.v1.PipeDoc doc) Turn a corpus doc into the step's expected input PipeStream (directives, context_params, …).
-
Method Details
-
module
String module()The module/step this scaffold targets (e.g."chunker").- Returns:
- the module/step name this scaffold targets
-
prepare
default void prepare()Provision external state (vector sets, fresh index, …). Called once per session. -
wrap
ai.pipestream.data.v1.PipeStream wrap(ai.pipestream.data.v1.PipeDoc doc) Turn a corpus doc into the step's expected input PipeStream (directives, context_params, …).- Parameters:
doc- the corpus document to wrap- Returns:
- the
PipeStreamshaped as the step expects
-
cleanup
default void cleanup()Tear down anythingprepare()created (e.g. drop the fresh index). -
info
-
corpusSize
Number of docs in the scaffold-supplied corpus; empty = use the fixture-jar dataset.- Returns:
- the scaffold-supplied corpus size, or empty to use the fixture-jar dataset
-
corpusDoc
The scaffold-supplied corpus doc at 1-basedindex; empty when out of range. Only meaningful whencorpusSize()is present.- Parameters:
index- the 1-based index of the corpus doc to fetch- Returns:
- the corpus doc at
index, or empty when out of range
-
corpusName
Display name of the scaffold-supplied corpus (e.g. the source jar).- Returns:
- the corpus display name, or
nullwhen there is no scaffold-supplied corpus
-