Class ModuleTestingSidecarResource

java.lang.Object
ai.pipestream.module.pipelineprobe.ModuleTestingSidecarResource

@Path("/test-sidecar/v1") @Produces("application/json") public class ModuleTestingSidecarResource extends Object
REST resource for the module-testing-sidecar harness.

Pipeline runs use PipelineCrawlerResource (POST /test-sidecar/v1/pipeline-crawl). OpenSearch indexing tests use OpenSearchIndexingTestsResource.

Blocking gRPC stubs on virtual threads — no Mutiny. The legacy E2E orchestration service and its SSE endpoints have been removed; see docs/sidecar-ui-tabs.md.

  • Constructor Details

    • ModuleTestingSidecarResource

      public ModuleTestingSidecarResource()
      Creates the sidecar REST resource. Instances are managed by the JAX-RS runtime.
  • Method Details

    • getLastError

      @GET @Path("/debug/last-error") public Map<String,Object> getLastError()
      Returns the most recently recorded error for quick diagnosis, or a placeholder message when none has been recorded.
      Returns:
      the last recorded error as a map, or a map with a "No errors recorded" message
    • listTestGraphsForCleanup

      @GET @Path("/cleanup/test-graphs") public Map<String,Object> listTestGraphsForCleanup()
      Lists the ids of test graphs that are eligible for cleanup.
      Returns:
      a map with the count of test graph ids and the graph_ids list
    • deleteAllTestGraphs

      @POST @Path("/cleanup/test-graphs") public Map<String,Object> deleteAllTestGraphs()
      Deletes all test graphs and returns a summary of the operation.
      Returns:
      a map reporting the deleted and failed graph ids and counts, the number of clusters whose leases were released, and the total duration in milliseconds
    • listLeakedCrawlRuns

      @GET @Path("/cleanup/crawl-runs") public Map<String,Object> listLeakedCrawlRuns()
      Leaked pipeline-crawl sweep: dry-run report of every resource the pipeline-crawl-* naming convention owns — accounts, drives, datasources, graphs, index plans + indices — left behind by runs that predate per-run ninja cleanup (or whose sidecar died mid-run).
      Returns:
      a map with dry_run set to true and the leaked-run audit
    • sweepLeakedCrawlRuns

      @POST @Path("/cleanup/crawl-runs") public Map<String,Object> sweepLeakedCrawlRuns()
      Execute the leaked pipeline-crawl sweep. Refuses while a crawl is live.
      Returns:
      a map with dry_run set to false, the sweep audit, and the total duration_ms
    • listSamples

      @GET @Path("/samples") public List<Map<String,Object>> listSamples()
      Sample document catalog for future corpus / single-doc pipeline presets.
      Returns:
      one info map per known SampleDocument
    • mapValidationErrors

      public jakarta.ws.rs.core.Response mapValidationErrors(IllegalArgumentException e)
      Maps validation failures to HTTP 400.
      Parameters:
      e - the validation error
      Returns:
      a 400 response carrying the error message