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 Type
    Method
    Description
    default void
    Tear down anything prepare() created (e.g.
    default Optional<ai.pipestream.data.v1.PipeDoc>
    corpusDoc(int index)
    The scaffold-supplied corpus doc at 1-based index; empty when out of range.
    default String
    Display name of the scaffold-supplied corpus (e.g.
    default OptionalInt
    Number of docs in the scaffold-supplied corpus; empty = use the fixture-jar dataset.
    default Map<String,Object>
    What the scaffold provisioned, for display/logging.
    The module/step this scaffold targets (e.g.
    default void
    Provision external state (vector sets, fresh index, …).
    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, …).
  • 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 PipeStream shaped as the step expects
    • cleanup

      default void cleanup()
      Tear down anything prepare() created (e.g. drop the fresh index).
    • info

      default Map<String,Object> info()
      What the scaffold provisioned, for display/logging.
      Returns:
      a map describing what the scaffold provisioned; empty by default
    • corpusSize

      default OptionalInt 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

      default Optional<ai.pipestream.data.v1.PipeDoc> corpusDoc(int index)
      The scaffold-supplied corpus doc at 1-based index; empty when out of range. Only meaningful when corpusSize() 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

      default String corpusName()
      Display name of the scaffold-supplied corpus (e.g. the source jar).
      Returns:
      the corpus display name, or null when there is no scaffold-supplied corpus