Class InvestigationAction

java.lang.Object
io.jenkins.plugins.changeinvestigator.InvestigationAction
All Implemented Interfaces:
Action, ModelObject, RunAction2, org.kohsuke.stapler.StaplerProxy

public class InvestigationAction extends Object implements RunAction2, org.kohsuke.stapler.StaplerProxy
The "Build Change Investigation" action attached to failed/unstable/aborted builds.

Deterministic evidence is collected once, at build completion, and never requires an AI call. aiAssessment starts null ("not yet run") and is only populated by an explicit manual request or an opted-in Slack investigation. Simply viewing a build page never causes an outbound AI request. The result is cached on the action (and persisted with the build) so revisiting the page does not re-trigger analysis.

  • Constructor Details

  • Method Details

    • getTarget

      public Object getTarget()
      Validate page requests before Jelly rendering, without exposing a state-changing web method.
      Specified by:
      getTarget in interface org.kohsuke.stapler.StaplerProxy
    • getView

      public InvestigationCase getView()
    • getComparisonBuilds

      public List<Run<?,?>> getComparisonBuilds()
    • onAttached

      public void onAttached(Run<?,?> r)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> r)
      Specified by:
      onLoad in interface RunAction2
    • getRun

      public Run<?,?> getRun()
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getEvidence

      public BuildInvestigationEvidence getEvidence()
    • getAiReferences

      public List<String> getAiReferences()
    • getAiPresentation

      public InvestigationAction.AiPresentation getAiPresentation()
    • getAiScope

      public String getAiScope()
      Historical assessments describe the original full corpus until explicitly rerun.
    • getAiAssessment

      public AiAssessment getAiAssessment()
    • isAiAnalysisRunning

      public boolean isAiAnalysisRunning()
      Whether an explicitly requested analysis is running; observing this never starts a request.
    • hasAiAssessment

      public boolean hasAiAssessment()
    • isAiEnabledGlobally

      public boolean isAiEnabledGlobally()
    • canRunAi

      public boolean canRunAi()
    • startSlackAiAnalysis

      public boolean startSlackAiAnalysis()
      Starts or joins one analysis for an opted-in Slack investigation; never called by page rendering.
    • doRunAi

      @POST public void doRunAi(org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException
      Explicit manual analysis may rerun a completed assessment, but joins existing work for the same scope.
      Throws:
      IOException