Class HealingLocatorProposalService

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

public final class HealingLocatorProposalService extends Object
Creates reviewable locator patch proposals from verified SHAFT Heal reports.

This service never edits source. Its structured patch is intended for a separate explicitly invoked DoctorRepairService proposal.

  • Constructor Details

    • HealingLocatorProposalService

      public HealingLocatorProposalService()
  • Method Details

    • propose

      Creates and persists a proposal-only artifact.
      Parameters:
      request - explicit proposal request
      Returns:
      reviewable proposal and structured Doctor patch
    • proposeAdvisory

      public HealingLocatorProposal proposeAdvisory(HealingLocatorProposalRequest request)
      Creates and persists an advisory-only, unconfirmed review proposal from a low-trust SHAFT Heal ladder outcome (issue #4194).

      Unlike propose(HealingLocatorProposalRequest), this never requires a confirmed RECOVERED decision or a passed action outcome -- a BELOW_THRESHOLD decision is exactly the "low trust" signal this exists for. The resulting patch only adds a review comment near the original locator; it never replaces or otherwise edits the locator itself, matching issue #2885's closed acceptance criteria that runtime healing never silently modifies source.

      Parameters:
      request - explicit proposal request
      Returns:
      reviewable advisory proposal and structured Doctor patch
    • isSourceCurrent

      public boolean isSourceCurrent(Path repositoryRoot, HealingLocatorProposal proposal)
      Verifies that the mapped source has not changed since proposal creation.
      Parameters:
      repositoryRoot - approved repository root
      proposal - persisted proposal
      Returns:
      true only when the source checksum still matches