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 TypeMethodDescriptionvoidapply(WorkspaceContext ctx) Apply reconciliation.detect(WorkspaceContext ctx) 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-Dprefix) that opts out of this reconciler's apply pass.default StringpinFlag()The Maven property name (without the-Dprefix) 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 inscaffold-draftoutput.- Returns:
- the dimension label, e.g. "Denormalized YAML fields"
-
optOutFlag
String optOutFlag()The Maven property name (without the-Dprefix) that opts out of this reconciler's apply pass. Setting the property to"false"skips this dimension on a givenscaffold-publishinvocation.- Returns:
- the opt-out flag name, e.g.
"updateFields"
-
pinFlag
The Maven property name (without the-Dprefix) 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) returnnull.- 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
Apply reconciliation. Caller is responsible for checkingReconcilerOptions.isOptedOut(String)before invoking; implementations may also re-check defensively.- Parameters:
ctx- the workspace context
-