Class RevalidateStage

java.lang.Object
com.tnsai.quality.security.harness.RevalidateStage
All Implemented Interfaces:
PipelineStage

public final class RevalidateStage extends Object implements PipelineStage
The revalidate stage (TNS-291). Runs the second registered ReviewAgentSpi (when present) over files that already have findings from the first agent — cross-checking to drop false positives and add findings the first agent missed.

Decision rules per file:

  • If the second agent confirms a CWE the first found at overlapping lines, keep the first agent's finding.
  • If the second agent returns no findings at all, drop every agent-only finding from the first agent for that file (matcher-only findings are kept — those came from static analysis).
  • Findings the second agent reports but the first didn't are added (tagged with the second agent's id).

No-op when fewer than 2 agents are registered.

Since:
0.10.0 (TNS-291)
  • Constructor Details

    • RevalidateStage

      public RevalidateStage()
  • Method Details

    • id

      public String id()
      Description copied from interface: PipelineStage
      Stable id, e.g. "scan", "process".
      Specified by:
      id in interface PipelineStage
    • execute

      public StageResult execute(PipelineContext ctx)
      Description copied from interface: PipelineStage
      Execute the stage. Reads from / writes to ctx.stateStore().

      Stages SHOULD respect Thread.interrupted() — long-running stages (process, revalidate) check periodically so the pipeline can be cancelled cleanly.

      Specified by:
      execute in interface PipelineStage