Interface Reconciler

All Known Implementing Classes:
AlignmentReconciler, FieldNormalizationReconciler, ParentVersionReconciler, ScaffoldConventionReconciler

public interface Reconciler
One dimension of workspace-state reconciliation under the convergence pattern (ws:scaffold-{draft,publish}, #393).

Each reconciler owns a single conceptual dimension of workspace state (denormalized field sync, parent version, inter-subproject alignment, branch reconciliation, missing-clone detection, etc.) and has two operations: detect(WorkspaceContext) (read-only, used by scaffold-draft) and apply(WorkspaceContext) (mutating, used by scaffold-publish).

The pattern intentionally subsumes what were previously standalone Maven goals: each retired goal's logic becomes one Reconciler implementation, and scaffold-publish iterates the ReconcilerRegistry to apply them in order.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Apply reconciliation.
    Inspect the workspace and report any drift this reconciler would correct.
    Human-readable name of the dimension this reconciler owns.
    The Maven property name (without the -D prefix) that opts out of this reconciler's apply pass.
    default String
    The Maven property name (without the -D prefix) that pins this reconciler to a specific value, overriding the default "move to latest" behavior.
  • Method Details

    • dimension

      String dimension()
      Human-readable name of the dimension this reconciler owns. Used as the heading in scaffold-draft output.
      Returns:
      the dimension label, e.g. "Denormalized YAML fields"
    • optOutFlag

      String optOutFlag()
      The Maven property name (without the -D prefix) that opts out of this reconciler's apply pass. Setting the property to "false" skips this dimension on a given scaffold-publish invocation.
      Returns:
      the opt-out flag name, e.g. "updateFields"
    • pinFlag

      default String pinFlag()
      The Maven property name (without the -D prefix) that pins this reconciler to a specific value, overriding the default "move to latest" behavior. Reconcilers that do not support pinning (e.g., pure normalizers like field-sync) return null.
      Returns:
      the pin flag name, or null if pinning is not supported
    • detect

      Inspect the workspace and report any drift this reconciler would correct. Read-only — must not mutate the workspace.
      Parameters:
      ctx - the workspace context
      Returns:
      drift report; DriftReport.noDrift(String) if nothing to do
    • apply

      void apply(WorkspaceContext ctx)
      Apply reconciliation. Caller is responsible for checking ReconcilerOptions.isOptedOut(String) before invoking; implementations may also re-check defensively.
      Parameters:
      ctx - the workspace context