feat(transport): export site/instance selection end-to-end via CLI + ManagementActor (M8 B4)

This commit is contained in:
Joseph Doherty
2026-06-18 06:14:39 -04:00
parent d7dae24355
commit bdbf5cdab0
16 changed files with 450 additions and 12 deletions
@@ -196,6 +196,23 @@ public sealed class DependencyResolver
// in `sites` after closure expansion, so ordering + dependsOn edges resolve names.
var siteIdentifierById = sites.Values.ToDictionary(s => s.Id, s => s.SiteIdentifier);
// I1: when an instance/data-connection is selected directly with
// IncludeDependencies=false, its owning site is not packed (so it never
// lands in `sites`) and the manifest dep-edge would degrade to the raw id
// (Site:<rawId>) via SiteIdentifierOf's fallback. Resolve the identifier
// for any referenced-but-unpacked owning site so the manifest reads
// Site:<identifier> regardless of the deps flag — readability only, the
// site row itself stays out of the bundle.
var referencedSiteIds = instances.Values.Select(i => i.SiteId)
.Concat(dataConnections.Values.Select(c => c.SiteId))
.Distinct()
.Where(id => !siteIdentifierById.ContainsKey(id));
foreach (var siteId in referencedSiteIds)
{
var site = await _siteRepository.GetSiteByIdAsync(siteId, ct).ConfigureAwait(false);
if (site is not null) siteIdentifierById[site.Id] = site.SiteIdentifier;
}
var orderedSites = sites.Values
.OrderBy(s => s.SiteIdentifier, StringComparer.Ordinal)
.ToList();