Class DoctorRepairService

java.lang.Object
com.shaft.doctor.repair.DoctorRepairService

public final class DoctorRepairService extends Object
Creates reviewed repairs in isolated Git worktrees and publishes only explicitly approved draft pull requests.
  • Constructor Details

    • DoctorRepairService

      public DoctorRepairService()
      Creates the default repair service.
  • Method Details

    • propose

      public RepairProposal propose(DoctorRepairRequest request)
      Creates and validates a reviewable proposal without changing the caller's current branch or tracked files and without writing to GitHub.
      Parameters:
      request - explicit repair and validation policy
      Returns:
      persisted proposal, complete diff, and approval token
    • publishDraft

      Commits, pushes, and opens or reuses a draft pull request only after a separate explicit approval action.
      Parameters:
      request - publication approval and optional failed-validation override
      Returns:
      draft publication details
    • cancel

      public void cancel(Path manifestPath, String approvalToken)
      Cancels an unpublished proposal and removes its isolated worktree.
      Parameters:
      manifestPath - proposal manifest
      approvalToken - proposal approval token