feat(vtags): decode VirtualTag Historize from artifact, byte-parity with composer (H5b, stillpending §1)
This commit is contained in:
@@ -523,6 +523,14 @@ public static class DeploymentArtifact
|
||||
var source = scriptId is not null && scriptSourceById.TryGetValue(scriptId, out var src)
|
||||
? src : string.Empty;
|
||||
|
||||
// Historize: the artifact carries a Pascal-case "Historize" bool (ConfigComposer serialises
|
||||
// the whole VirtualTag entity with DefaultIgnoreCondition.Never). Robust parse — default
|
||||
// false; only honoured when the JSON value is an actual boolean — so absent/non-bool ⇒ false,
|
||||
// byte-parity with Phase7Composer's entity-default-false behaviour.
|
||||
var historize = el.TryGetProperty("Historize", out var hEl)
|
||||
&& (hEl.ValueKind == JsonValueKind.True || hEl.ValueKind == JsonValueKind.False)
|
||||
&& hEl.GetBoolean();
|
||||
|
||||
// Substitute the {{equip}} token with the owning equipment's tag base BEFORE extracting
|
||||
// refs, so both Expression and DependencyRefs are machine-specific — byte-parity with
|
||||
// Phase7Composer.Compose.
|
||||
@@ -536,7 +544,8 @@ public static class DeploymentArtifact
|
||||
Name: name!,
|
||||
DataType: dataType ?? "BaseDataType",
|
||||
Expression: expanded,
|
||||
DependencyRefs: EquipmentScriptPaths.ExtractDependencyRefs(expanded)));
|
||||
DependencyRefs: EquipmentScriptPaths.ExtractDependencyRefs(expanded),
|
||||
Historize: historize));
|
||||
}
|
||||
|
||||
result.Sort((a, b) =>
|
||||
|
||||
Reference in New Issue
Block a user