Enum Class Severity

java.lang.Object
java.lang.Enum<Severity>
ai.tabforge.workshop.model.Severity
All Implemented Interfaces:
Serializable, Comparable<Severity>, Constable

public enum Severity extends Enum<Severity>
Risk level of a finding discovered by a sub-agent.

Analogy: like Java compiler diagnostics — ERROR stops the build, WARNING is reported but does not stop it, NOTE is purely advisory. Workshop uses the same three-tier model but for architectural risk, not syntax errors.

CERTIFICATION NOTE — Domain 1: Agentic Architecture & Orchestration (27%): Severity is what the OrchestratorAgent inspects after every sub-agent completes. It drives the routing decision: continue autonomously (WARNING/INFO) or pause and involve a human (CRITICAL). Without a severity model, the orchestrator cannot make that routing decision.

CERTIFICATION NOTE — Domain 5: Context Management & Reliability (15%): Severity drives the human-in-the-loop escalation logic in OrchestratorAgent#escalate(). The rule: CRITICAL + confidence ≥ 0.70 pauses the autonomous review and surfaces a decision to the developer. This is the "circuit breaker" pattern tested in the exam.

  • Enum Constant Details

    • CRITICAL

      public static final Severity CRITICAL
      A finding that must be resolved before the code is safe to merge. Triggers human-in-the-loop escalation in OrchestratorAgent#escalate() when confidence ≥ 0.70.

      Examples: SQL injection via JPQL string concatenation, missing @RolesAllowed on a financial endpoint, @TransactionAttribute(REQUIRES_NEW) causing silent data loss.

    • WARNING

      public static final Severity WARNING
      A finding that should be fixed but does not require immediate human decision. Included in the final ReviewReport without pausing the review.

      Examples: @PermitAll on a non-public operation, missing input validation on a @PathParam, N+1 query pattern in a hot code path.

    • INFO

      public static final Severity INFO
      An advisory note — improvement opportunity with no immediate risk. Never blocks the review. Shown at the bottom of the report.

      Also used as the downgraded severity when a CRITICAL or WARNING finding has confidence below 0.70 — the agent is not confident enough to assert a higher severity.

      Examples: suboptimal EJB lifecycle choice, minor layer boundary inconsistency, documentation gap in a public API.

  • Method Details

    • values

      public static Severity[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Severity valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null