feat(deploymentmanager): IFlatteningPipeline.PreviewAsync — flatten a template+site without an instance row (create-page bindings)

Claude-Session: https://claude.ai/code/session_01G2GHPnbbKGvyyfbr2XBRVH
This commit is contained in:
Joseph Doherty
2026-08-21 06:04:13 -04:00
parent a7301bb638
commit 6257c9e20e
3 changed files with 195 additions and 39 deletions
@@ -39,6 +39,21 @@ public interface IFlatteningPipeline
bool validateScripts = true,
FlattenSession? session = null);
/// <summary>
/// Flattens <paramref name="templateId"/> as if an instance with no overrides and no
/// bindings existed at <paramref name="siteId"/>. Attribute list only — no validation,
/// no revision hash, nothing persisted. Used by the Create Instance page to show the
/// module groups before the instance row exists.
/// </summary>
/// <param name="templateId">Id of the template to preview.</param>
/// <param name="siteId">Id of the target site, whose data connections resolve references.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The flattened configuration of the hypothetical instance, or a failure result.</returns>
Task<Result<FlattenedConfiguration>> PreviewAsync(
int templateId,
int siteId,
CancellationToken cancellationToken = default);
/// <summary>
/// Creates a fresh <see cref="FlattenSession"/> bound to this pipeline's
/// watermark, for a caller that wants to share one across a batch of