fix(transport): script-artifact change publisher covers Add resolutions — delete-then-reimport no longer starves non-self-healing subscribers (plan R2-05 T5)
This commit is contained in:
@@ -1767,12 +1767,15 @@ public sealed class BundleImporter : IBundleImporter
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Publishes one <see cref="ScriptArtifactsChanged"/> per script-bearing
|
||||
/// artifact kind (ApiMethod / SharedScript / Template) whose resolution was an
|
||||
/// Overwrite or Rename, using the post-resolution (renamed) names. Adds are
|
||||
/// excluded — nothing is cached under a brand-new name yet. Over-approximation is
|
||||
/// safe (an Overwrite that actually fell through to Add just triggers a harmless
|
||||
/// consumer re-check), which matches the bus's advisory, at-least-once contract.
|
||||
/// Fully guarded: never throws (it runs after the transaction has committed).
|
||||
/// artifact kind (ApiMethod / SharedScript / Template) for every non-Skip
|
||||
/// resolution — Overwrite, Rename, AND Add — using the post-resolution (renamed)
|
||||
/// names. An Add is NOT "nothing cached yet": an artifact deleted on the target and
|
||||
/// re-imported as Add under the same name can still have a stale
|
||||
/// compiled-handler/<c>_knownBadMethods</c> entry on any node, so it must notify too.
|
||||
/// Over-approximation stays safe (the bus is advisory, at-least-once; consumers
|
||||
/// self-heal), which matches its stated contract. Only Skip resolutions are excluded
|
||||
/// (nothing was written). Fully guarded: never throws (it runs after the transaction
|
||||
/// has committed).
|
||||
/// </summary>
|
||||
private void PublishScriptArtifactChanges(IReadOnlyList<ImportResolution> resolutions)
|
||||
{
|
||||
@@ -1799,7 +1802,7 @@ public sealed class BundleImporter : IBundleImporter
|
||||
{
|
||||
var names = all
|
||||
.Where(r => string.Equals(r.EntityType, entityType, StringComparison.Ordinal)
|
||||
&& (r.Action is ResolutionAction.Overwrite or ResolutionAction.Rename))
|
||||
&& r.Action is not ResolutionAction.Skip)
|
||||
.Select(r => r.Action == ResolutionAction.Rename ? r.RenameTo ?? r.Name : r.Name)
|
||||
.Distinct(StringComparer.Ordinal)
|
||||
.ToList();
|
||||
|
||||
Reference in New Issue
Block a user