Class ReviewSession

java.lang.Object
ai.tabforge.workshop.orchestrator.ReviewSession

public class ReviewSession extends Object
When Claude AI periodically calls GetReportTool in order to obtain review status (and so, when GetReportTool calls
invalid reference
OrchestratorAgent#getStatus()
) the GetReportToll will return JSON filled with data from this class. An instance of this class is created in
invalid @link
{@link OrchestratorAgent#startReview())
} and is stored in an internal list of active sessions. TODO: GetReportTool description must document all possible response formats: RUNNING, AWAITING_HUMAN, COMPLETED, CANCELLED, FAILED

CERTIFICATION NOTE — Domain 1: Agentic Architecture & Orchestration (27%): Covers Task Statement 1.7: "Manage session state, resumption, and forking". ReviewSession is the live state of one review — it is created when the review starts, mutated as agents report progress, paused when escalation occurs, and finalized when the review completes. The orchestrator never loses track of where a session is — even after a human-in-the-loop pause and resumption.

  • Constructor Details

  • Method Details

    • getLatch

      public CountDownLatch getLatch()
    • setLatch

      public void setLatch(CountDownLatch latch)
      Parameters:
      latch -
      invalid reference
      OrchestratorAgent#escalate()
      (which is called in
      invalid reference
      SubAgent#execute()
      ) - will make CountDownLatch and preserve it here Will be read and released in the
      invalid reference
      OrchestratorAgent#resumeAfterEscalation()
      . It needs to be stored in the session, because that way it can be retrieved in resumeAfterEscalation() - which accept the reviewId
    • getCurrentAgentName

      public String getCurrentAgentName()
    • setCurrentAgentName

      public void setCurrentAgentName(String currentAgentName)
      Being called by
      invalid @link
      {@link OrchestratorAgent#startReview())
      } when the agent starts
      Parameters:
      currentAgentName -
    • getTotalFiles

      public int getTotalFiles()
    • setTotalFiles

      public void setTotalFiles(int totalFiles)
    • getProcessedFiles

      public int getProcessedFiles()
    • setProcessedFiles

      public void setProcessedFiles(int processedFiles)
    • getCurrentlyProcessedFile

      public String getCurrentlyProcessedFile()
    • setCurrentlyProcessedFile

      public void setCurrentlyProcessedFile(String currentlyProcessedFile)
    • getProgress

      public String getProgress()
      In the phase 1, agents (launched by
      invalid @link
      {@link OrchestratorAgent#startReview(ReviewScope))
      } will run sequentially, one after another. When Claude AI periodically calls GetReportTool in order to obtain review status (and so, when GetReportTool calls
      invalid reference
      OrchestratorAgent#getStatus()
      ) then, if the status is not ReviewReport.ReviewStatus.COMPLETED, the GetReportToll might return following JSON, filled with values from this class: Status RUNNING:
        
              {
                 "status": "RUNNING",
                 "progress": "SecurityAuditor 60% — analyzing OrderResource.java"
              }
               
      Pay attention on: "progress": "SecurityAuditor 60% — analyzing OrderResource.java" Following method returns that value
      Returns:
    • getReviewId

      public String getReviewId()
    • getScope

      public ReviewScope getScope()
    • getStatus

      public ReviewReport.ReviewStatus getStatus()
    • setStatus

      public void setStatus(ReviewReport.ReviewStatus status)
    • getReport

      public ReviewReport getReport()
    • setReport

      public void setReport(ReviewReport report)
    • getPendingEscalation

      public EscalationRequest getPendingEscalation()
    • setPendingEscalation

      public void setPendingEscalation(EscalationRequest pendingEscalation)
    • getStartedAt

      public String getStartedAt()