Record Class DoctorRepairRequest
java.lang.Object
java.lang.Record
com.shaft.doctor.repair.DoctorRepairRequest
- Record Components:
repositoryRoot- approved Git repository rootbaseSha- exact commit used to create the isolated worktreediagnosisPath- Doctor diagnosis or combined report JSONevidenceBundlePath- optional Doctor evidence bundle JSONissueReference- issue number, URL, or session identifierallowedPaths- repository-relative files or directories that may changepatches- structured file patches; shell commands are not acceptedvalidationCommands- approved Maven validation commandsnetworkValidationApproved- whether Maven validation may use the networkoutputDirectory- proposal manifests and temporary worktreesmaxPatchBytes- maximum aggregate UTF-8 patch contentcommandTimeout- maximum duration for each validation command
public record DoctorRepairRequest(Path repositoryRoot, String baseSha, Path diagnosisPath, Path evidenceBundlePath, String issueReference, List<String> allowedPaths, List<DoctorRepairRequest.FilePatch> patches, List<DoctorRepairRequest.ValidationCommand> validationCommands, boolean networkValidationApproved, Path outputDirectory, long maxPatchBytes, Duration commandTimeout)
extends Record
Explicit policy for creating an isolated Doctor repair proposal.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordStructured file replacement applied only inside the isolated worktree.static final recordTokenized Maven command; no shell parsing or interpolation is performed. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DurationConservative default validation timeout.static final longConservative default aggregate patch limit. -
Constructor Summary
ConstructorsConstructorDescriptionDoctorRepairRequest(Path repositoryRoot, String baseSha, Path diagnosisPath, Path evidenceBundlePath, String issueReference, List<String> allowedPaths, List<DoctorRepairRequest.FilePatch> patches, List<DoctorRepairRequest.ValidationCommand> validationCommands, boolean networkValidationApproved, Path outputDirectory, long maxPatchBytes, Duration commandTimeout) Creates a validated immutable request. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedPathsrecord component.baseSha()Returns the value of thebaseSharecord component.Returns the value of thecommandTimeoutrecord component.Returns the value of thediagnosisPathrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidenceBundlePathrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theissueReferencerecord component.longReturns the value of themaxPatchBytesrecord component.booleanReturns the value of thenetworkValidationApprovedrecord component.Returns the value of theoutputDirectoryrecord component.patches()Returns the value of thepatchesrecord component.Returns the value of therepositoryRootrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevalidationCommandsrecord component.
-
Field Details
-
DEFAULT_MAX_PATCH_BYTES
public static final long DEFAULT_MAX_PATCH_BYTESConservative default aggregate patch limit.- See Also:
-
DEFAULT_COMMAND_TIMEOUT
Conservative default validation timeout.
-
-
Constructor Details
-
DoctorRepairRequest
public DoctorRepairRequest(Path repositoryRoot, String baseSha, Path diagnosisPath, Path evidenceBundlePath, String issueReference, List<String> allowedPaths, List<DoctorRepairRequest.FilePatch> patches, List<DoctorRepairRequest.ValidationCommand> validationCommands, boolean networkValidationApproved, Path outputDirectory, long maxPatchBytes, Duration commandTimeout) Creates a validated immutable request.
-
-
Method Details
-
toString
-
hashCode
-
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
repositoryRoot
Returns the value of therepositoryRootrecord component.- Returns:
- the value of the
repositoryRootrecord component
-
baseSha
-
diagnosisPath
Returns the value of thediagnosisPathrecord component.- Returns:
- the value of the
diagnosisPathrecord component
-
evidenceBundlePath
Returns the value of theevidenceBundlePathrecord component.- Returns:
- the value of the
evidenceBundlePathrecord component
-
issueReference
Returns the value of theissueReferencerecord component.- Returns:
- the value of the
issueReferencerecord component
-
allowedPaths
Returns the value of theallowedPathsrecord component.- Returns:
- the value of the
allowedPathsrecord component
-
patches
-
validationCommands
Returns the value of thevalidationCommandsrecord component.- Returns:
- the value of the
validationCommandsrecord component
-
networkValidationApproved
public boolean networkValidationApproved()Returns the value of thenetworkValidationApprovedrecord component.- Returns:
- the value of the
networkValidationApprovedrecord component
-
outputDirectory
Returns the value of theoutputDirectoryrecord component.- Returns:
- the value of the
outputDirectoryrecord component
-
maxPatchBytes
public long maxPatchBytes()Returns the value of themaxPatchBytesrecord component.- Returns:
- the value of the
maxPatchBytesrecord component
-
commandTimeout
Returns the value of thecommandTimeoutrecord component.- Returns:
- the value of the
commandTimeoutrecord component
-