namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;

/// <summary>
///     Opts a tag-definition record into auto-retry on <see cref="IWritable.WriteAsync"/> failures.
///     Absence of this attribute means writes are <b>not</b> retried — a timed-out write may have
///     already succeeded at the device, and replaying pulses, alarm acks, counter increments, or
///     recipe-step advances can duplicate irreversible field actions.
/// </summary>
/// <remarks>
///     Applied to tag-definition POCOs
///     (e.g. <c>ModbusTagDefinition</c>, <c>S7TagDefinition</c>, OPC UA client tag rows) at the
///     property or record level. <b>Reserved for the per-tag opt-in; NOT yet consulted</b> (R2-02/S-8) —
///     the dispatch site (<c>DriverInstanceActor.HandleWriteAsync</c>) currently treats every write as
///     non-idempotent, so no tag retries a write today. Threading tag-definition metadata to the dispatch
///     seam is the documented forward path; when it ships, the <c>CapabilityInvoker</c> non-idempotent arm
///     and the parser's Write/AlarmAcknowledge no-retry clamp are the two sites that relax.
/// </remarks>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)]
public sealed class WriteIdempotentAttribute : Attribute
{
}
