< Summary - Heimdall API

Information
Class: ArturRios.Heimdall.Command.Input.ReapplyErasuresCommand
Assembly: ArturRios.Heimdall.Command
File(s): /home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/ReapplyErasuresCommand.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 39
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 3
Fully covered methods: 3
Total methods: 3
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_SubjectIds()100%11100%
get_ActingPersonId()100%11100%
get_ActingRole()100%11100%

File(s)

/home/runner/work/heimdall-api/heimdall-api/src/Application/ArturRios.Heimdall.Command/Input/ReapplyErasuresCommand.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using ArturRios.Heimdall.Shared.Security;
 3using ArturRios.Mediator.Command;
 4
 5namespace ArturRios.Heimdall.Command.Input;
 6
 7/// <summary>
 8///     Re-applies erasure to identities that came back in a database restore (NFR-25).
 9/// </summary>
 10/// <remarks>
 11///     <para>
 12///         <b>Why this has to exist at all.</b> An erasure that the next restore silently undoes is
 13///         not an erasure. Backups are full copies and are never edited — editing one destroys the
 14///         integrity that is its purpose — so a restore reinstates whatever the database held when
 15///         the backup was taken, erased people included.
 16///     </para>
 17///     <para>
 18///         <b>Why the scheduled pass is not enough on its own.</b> Where the backup was taken
 19///         <em>after</em> the subject asked, the restored row still carries its deletion and
 20///         deadline, and NFR-20's pass completes the erasure again by itself. Where the backup
 21///         predates the request, the row comes back with no trace of it ever having been made, and
 22///         nothing inside the database knows to act. This is the only case that needs a list from
 23///         outside, and it is the case this command exists for.
 24///     </para>
 25/// </remarks>
 26public class ReapplyErasuresCommand : BaseCommand, IActorScoped
 27{
 28    /// <summary>
 29    ///     Public identifiers of the identities to erase, taken from the erasure ledger the restore
 30    ///     runbook keeps outside the database.
 31    /// </summary>
 3032    public IEnumerable<Guid> SubjectIds { get; set; } = [];
 33
 34    [JsonIgnore]
 135    public Guid ActingPersonId { get; set; }
 36
 37    [JsonIgnore]
 1038    public int ActingRole { get; set; }
 39}