Apply at most one idempotent write and turn the accepted and skipped counts into a commit, skip, or retry remediation action.

Lazy Init Remediation Report

LazyInitRemediationReport.cs
using System;

class Program
{
    static void Main()
    {
        int writes = ;
        int accepted = 0;
        int skipped = 0;

        for (int i = 0; i < writes; i++)
        {
            if (accepted == 0)
            {
                accepted++;
            }
            else
            {
                skipped++;
            }
        }

        string action;
        if (accepted == 0)
        {
            action = "retry";
        }
        else if (skipped > 0)
        {
            action = "skip";
        }
        else
        {
            action = "commit";
        }

        Console.WriteLine("writes=" + writes + " accepted=" + accepted + " skipped=" + skipped + " " + action);
    }
}
using System;

class Program
{
    static void Main()
    {
        int writes = ;
        int accepted = 0;
        int skipped = 0;

        for (int i = 0; i < writes; i++)
        {
            if (accepted == 0)
            {
                accepted++;
            }
            else
            {
                skipped++;
            }
        }

        string action;
        if (accepted == 0)
        {
            action = "retry";
        }
        else if (skipped > 0)
        {
            action = "skip";
        }
        else
        {
            action = "commit";
        }

        Console.WriteLine("writes=" + writes + " accepted=" + accepted + " skipped=" + skipped + " " + action);
    }
}
using System;

class Program
{
    static void Main()
    {
        int writes = ;
        int accepted = 0;
        int skipped = 0;

        for (int i = 0; i < writes; i++)
        {
            if (accepted == 0)
            {
                accepted++;
            }
            else
            {
                skipped++;
            }
        }

        string action;
        if (accepted == 0)
        {
            action = "retry";
        }
        else if (skipped > 0)
        {
            action = "skip";
        }
        else
        {
            action = "commit";
        }

        Console.WriteLine("writes=" + writes + " accepted=" + accepted + " skipped=" + skipped + " " + action);
    }
}
idempotent write Only the first write is accepted and later writes are counted as skipped, so the remediation action is reproducible without a live lazy initializer.