Record Class PipelineContext

java.lang.Object
java.lang.Record
com.tnsai.quality.security.harness.PipelineContext
Record Components:
projectId - stable id for the project being reviewed; the state store uses this as the key under data/<projectId>/
projectRoot - absolute path to the codebase
matchers - registered matchers, in registration order
agents - registered agents, in registration order; first agent is the default process backend, second (when present) is used by revalidate
stateStore - persistence layer
config - free-form key/values forwarded to stages ("include-globs", "exclude-globs", "max-files")

public record PipelineContext(String projectId, Path projectRoot, List<MatcherSpi> matchers, List<ReviewAgentSpi> agents, PipelineStateStore stateStore, Map<String,String> config) extends Record
Read-only context passed to every PipelineStage (TNS-291).

Holds the configuration the CodeReviewPipeline was built with — matchers, agents, state store, project root — so stages don't each take a long parameter list.

Since:
0.10.0 (TNS-291)
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • projectId

      public String projectId()
      Returns the value of the projectId record component.
      Returns:
      the value of the projectId record component
    • projectRoot

      public Path projectRoot()
      Returns the value of the projectRoot record component.
      Returns:
      the value of the projectRoot record component
    • matchers

      public List<MatcherSpi> matchers()
      Returns the value of the matchers record component.
      Returns:
      the value of the matchers record component
    • agents

      public List<ReviewAgentSpi> agents()
      Returns the value of the agents record component.
      Returns:
      the value of the agents record component
    • stateStore

      public PipelineStateStore stateStore()
      Returns the value of the stateStore record component.
      Returns:
      the value of the stateStore record component
    • config

      public Map<String,String> config()
      Returns the value of the config record component.
      Returns:
      the value of the config record component