fix(site-runtime): resolve SiteRuntime-017..019 — isolated attribute snapshot for child actors, corrected dispatcher doc, remove dead lifecycle handlers
This commit is contained in:
@@ -48,6 +48,15 @@ public class ScriptActor : ReceiveActor, IWithTimers
|
||||
private bool _lastExpressionResult;
|
||||
private readonly Dictionary<string, object?> _attributeSnapshot = new();
|
||||
|
||||
/// <summary>
|
||||
/// SiteRuntime-017: the exact dictionary instance this actor was seeded from
|
||||
/// at construction. The Instance Actor must pass a private snapshot here, not
|
||||
/// its live <c>_attributes</c> field — sharing the live dictionary lets this
|
||||
/// constructor enumerate it while the Instance Actor mutates it on another
|
||||
/// thread. Exposed for regression coverage of that isolation contract.
|
||||
/// </summary>
|
||||
internal IReadOnlyDictionary<string, object?>? SeedAttributesReference { get; }
|
||||
|
||||
public ITimerScheduler Timers { get; set; } = null!;
|
||||
|
||||
public ScriptActor(
|
||||
@@ -80,6 +89,7 @@ public class ScriptActor : ReceiveActor, IWithTimers
|
||||
// Seed the trigger-expression attribute snapshot from the instance's
|
||||
// initial attribute set so static attributes (which never re-emit an
|
||||
// AttributeValueChanged after deploy) evaluate correctly at startup.
|
||||
SeedAttributesReference = initialAttributes;
|
||||
if (initialAttributes != null)
|
||||
{
|
||||
foreach (var kvp in initialAttributes)
|
||||
|
||||
Reference in New Issue
Block a user