Skip to content

Commit fcfa52e

Browse files
committed
Add commercial evidence run approval checklist
1 parent 5d1691b commit fcfa52e

7 files changed

Lines changed: 199 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The first production milestone is M3UA over a transport abstraction. SCCP, TCAP,
7676
| Commercial evidence artifact intake | Phase 38 foundation-complete: artifact intake target identity, artifact source registration, SHA-256 digest coverage, redaction review, completeness evaluation, dossier reporting, promotion handoff, execution-to-dossier bridge, status reporting, and final validation are available, binding a stable intake id, reviewer identity, UTC receipt time, run-scoped dossier root, concrete source paths, unique retained dossier paths, retained digests, trace-bearing artifact approvals, explicit intake blockers, retained Markdown summary, digest-covered handoff, end-to-end intake assembly, and intake readiness status to a governed execution run; real artifact files are still required before commercial publication |
7777
| Commercial evidence file verification | Phase 39 foundation-complete: retained file evidence item verification, retained file manifest coverage, file verification blocker reporting, retention ledger modeling, integrity sealing, publication attachment planning, verified promotion gating, command planning, status reporting, final validation, and documentation alignment are available, checking file existence, non-empty size, SHA-256 validity, digest match, UTC observation time, unique retained paths, promotion-required handoff coverage, explicit verification blockers, reviewer identity, immutable retention, UTC retention windows, minimum duration, deterministic aggregate ledger digests, sealed ledger attachment coverage, trace-bearing redaction approval, commercial readiness report presence, explicit promotion approval, workflow-ready verification command order, and readiness status separation; real retained file evidence remains required before commercial publication |
7878
| Commercial evidence filesystem execution | Phase 40 foundation-complete: filesystem observation, manifest execution, verification report execution, artifact writing, ledger execution, seal execution, publication attachment execution, promotion execution, command materialization, status reporting, documentation, and final validation are complete, reading retained files from disk, computing real SHA-256 digests, reporting file existence and size, supporting retained-path-to-local-path overrides, building retained file manifests from real observations, exposing blocker-aware retained file reports from filesystem evidence, writing retained Markdown/TSV verification artifacts, creating retention ledgers from filesystem-backed reports, sealing those ledgers with deterministic aggregate SHA-256 digests, creating release dossier attachments with redaction approval gates, evaluating reviewer-approved promotion gates, and writing ordered execution scripts; commercial publication still requires a real approved commercial run |
79-
| Approved commercial run publication handoff | Phase 41 in progress: approved run target identity is available, binding package version, source commit, operator identity, UTC run timing, retained artifact root, and filesystem-backed promotion execution; approval checklist, reviewer manifest, report writing, promotion package, publication handoff, blocker gate, audit trail, command materialization, status reporting, and final validation remain |
79+
| Approved commercial run publication handoff | Phase 41 in progress: approved run target identity and approval checklist are available, binding package version, source commit, operator identity, UTC run timing, retained artifact root, filesystem-backed promotion execution, verified report, ready ledger/seal/attachments, redaction approval, promotion approval, and reviewer approval records; reviewer manifest, report writing, promotion package, publication handoff, blocker gate, audit trail, command materialization, status reporting, and final validation remain |
8080

8181
## Requirements
8282

docs/PHASE41_APPROVED_COMMERCIAL_RUN_PUBLICATION_HANDOFF.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ Public APIs use domain names such as `SigtranCommercialEvidenceApprovedRunTarget
1717

1818
This unit establishes the identity that later approval, audit, and publication handoff artifacts reference.
1919

20+
## Unit 2 - Approval Checklist
21+
22+
`SigtranCommercialEvidenceRunApprovalChecklist` records required approval criteria before reviewer manifest creation:
23+
24+
- Run target identity is ready.
25+
- Filesystem-backed promotion execution is ready.
26+
- File verification report is verified.
27+
- Retention ledger and integrity seal are ready.
28+
- Publication attachments are ready.
29+
- Trace-bearing artifacts have approved redaction state.
30+
- Promotion gate and reviewer approval are present.
31+
32+
This unit turns commercial run approval into an explicit checklist with blocker identifiers rather than an implicit yes/no flag.
33+
2034
## Validation
2135

2236
Each unit in this phase is validated with:

docs/PHASE41_SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Phase 41 prepares the SDK to move from filesystem-backed evidence verification i
55
## Completed Capabilities
66

77
- Approved run target that binds package version, source commit, operator identity, UTC run timing, retained artifact root, and filesystem-backed promotion execution.
8+
- Approval checklist that requires verified filesystem promotion, ready report/ledger/seal/attachments, redaction approval, promotion approval, and reviewer approval records.
89

910
## Readiness Position
1011

11-
The phase is in progress. Approved run target identity is available. Approval checklist, reviewer manifest, report writing, promotion package, publication handoff, blocker gate, audit trail, command materialization, status reporting, documentation, and final validation remain.
12+
The phase is in progress. Approved run target identity and approval checklist are available. Reviewer manifest, report writing, promotion package, publication handoff, blocker gate, audit trail, command materialization, status reporting, documentation, and final validation remain.

docs/PHASE_INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ This index is the complete phase map for Sigtran.NET. It links each phase to the
4545
| 38 | Commercial evidence artifact intake | [Phase 38 Commercial Evidence Artifact Intake](PHASE38_COMMERCIAL_EVIDENCE_ARTIFACT_INTAKE.md), [Phase 38 Summary](PHASE38_SUMMARY.md) | Foundation complete; real artifact files still required |
4646
| 39 | Commercial evidence file verification | [Phase 39 Commercial Evidence File Verification](PHASE39_COMMERCIAL_EVIDENCE_FILE_VERIFICATION.md), [Phase 39 Summary](PHASE39_SUMMARY.md) | Foundation complete; real retained file evidence required |
4747
| 40 | Commercial evidence filesystem execution | [Phase 40 Commercial Evidence Filesystem Execution](PHASE40_COMMERCIAL_EVIDENCE_FILESYSTEM_EXECUTION.md), [Phase 40 Summary](PHASE40_SUMMARY.md) | Foundation complete; commercial publication requires real approved retained run |
48-
| 41 | Approved commercial run publication handoff | [Phase 41 Approved Commercial Run Publication Handoff](PHASE41_APPROVED_COMMERCIAL_RUN_PUBLICATION_HANDOFF.md), [Phase 41 Summary](PHASE41_SUMMARY.md) | In progress; approved run target complete |
48+
| 41 | Approved commercial run publication handoff | [Phase 41 Approved Commercial Run Publication Handoff](PHASE41_APPROVED_COMMERCIAL_RUN_PUBLICATION_HANDOFF.md), [Phase 41 Summary](PHASE41_SUMMARY.md) | In progress; approval checklist complete |
4949

5050
## Current Commercial Gate
5151

docs/SDK_ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Status: Phase 40 is foundation-complete. Filesystem observation reads retained f
363363
- Record approval checklist, reviewer approvals, retained reports, promotion package, publication handoff, blocker gates, and audit trail.
364364
- Keep approval handoff separate from commercial publication: the SDK can prepare approval records, but publication remains blocked until a real approved run is retained.
365365

366-
Status: Phase 41 is in progress. Approved run target identity now binds package version, source commit, operator identity, UTC run timing, retained artifact root, and filesystem-backed promotion execution. Approval checklist, reviewer manifest, report writing, promotion package, publication handoff, blocker gate, audit trail, command materialization, status reporting, and final validation remain in progress.
366+
Status: Phase 41 is in progress. Approved run target identity now binds package version, source commit, operator identity, UTC run timing, retained artifact root, and filesystem-backed promotion execution. Approval checklist now requires verified filesystem promotion, ready report/ledger/seal/attachments, approved trace redaction, promotion approval, and reviewer approval records. Reviewer manifest, report writing, promotion package, publication handoff, blocker gate, audit trail, command materialization, status reporting, and final validation remain in progress.
367367

368368
## Recommended First Deliverable
369369

src/Sigtran.NET.Tests/Program.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@
316316
Run("SIGTRAN commercial evidence filesystem command materializer writes execution script", SigtranCommercialEvidenceFileSystemCommandMaterializerWritesExecutionScript);
317317
Run("SIGTRAN commercial evidence filesystem execution status summarizes final validation", SigtranCommercialEvidenceFileSystemExecutionStatusSummarizesFinalValidation);
318318
Run("SIGTRAN commercial evidence approved run target binds filesystem promotion", SigtranCommercialEvidenceApprovedRunTargetBindsFileSystemPromotion);
319+
Run("SIGTRAN commercial evidence run approval checklist requires reviewer approval", SigtranCommercialEvidenceRunApprovalChecklistRequiresReviewerApproval);
319320
Run("SIGTRAN status capabilities use domain documentation labels", SigtranStatusCapabilitiesUseDomainDocumentationLabels);
320321
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
321322
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
@@ -5506,6 +5507,49 @@ static void SigtranCommercialEvidenceApprovedRunTargetBindsFileSystemPromotion()
55065507
}
55075508
}
55085509

5510+
static void SigtranCommercialEvidenceRunApprovalChecklistRequiresReviewerApproval()
5511+
{
5512+
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
5513+
Directory.CreateDirectory(tempRoot);
5514+
5515+
try
5516+
{
5517+
SigtranCommercialEvidenceApprovedRunTarget target = CreateReadyCommercialEvidenceApprovedRunTarget(tempRoot);
5518+
5519+
SigtranCommercialEvidenceRunApprovalChecklist checklist = SigtranCommercialEvidenceRunApprovalChecklists.CreateDefault(target);
5520+
SigtranCommercialEvidenceRunApprovalChecklist blocked = SigtranCommercialEvidenceRunApprovalChecklists.CreateDefault(
5521+
target,
5522+
reviewerApprovalRecorded: false);
5523+
5524+
Assert(checklist.IsReady, checklist.Describe());
5525+
Assert(checklist.AllRequiredItemsSatisfied, "approval checklist should satisfy all required items");
5526+
Assert(checklist.UsesUniqueItemIds, "approval checklist should use unique item ids");
5527+
Assert(checklist.IncludesReviewerApproval, "approval checklist should include reviewer approval");
5528+
Assert(checklist.IncludesRedactionProtection, "approval checklist should include redaction protection");
5529+
Assert(!blocked.IsReady, "missing reviewer approval should block checklist readiness");
5530+
Assert(blocked.GetUnsatisfiedRequiredItemIds().Contains("reviewer-approval-recorded"), "approval checklist should expose missing reviewer approval");
5531+
}
5532+
finally
5533+
{
5534+
DeleteTempEvidenceRoot(tempRoot);
5535+
}
5536+
}
5537+
5538+
static SigtranCommercialEvidenceApprovedRunTarget CreateReadyCommercialEvidenceApprovedRunTarget(string tempRoot)
5539+
{
5540+
DateTimeOffset startedAt = DateTimeOffset.UtcNow.AddMinutes(-5);
5541+
5542+
return SigtranCommercialEvidenceApprovedRunTargets.Create(
5543+
"commercial-run-20260622-001",
5544+
"1.0.0-rc.1",
5545+
"abcdef123456",
5546+
tempRoot,
5547+
"release-operator",
5548+
startedAt,
5549+
DateTimeOffset.UtcNow,
5550+
CreateReadyCommercialEvidenceFileSystemPromotionExecution(tempRoot));
5551+
}
5552+
55095553
static SigtranCommercialEvidenceFileSystemPromotionExecution CreateReadyCommercialEvidenceFileSystemPromotionExecution(string tempRoot)
55105554
{
55115555
return SigtranCommercialEvidenceFileSystemPromotions.Evaluate(
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
namespace Sigtran.NET.Core.Utilities;
2+
3+
/// <summary>
4+
/// Describes one commercial evidence run approval checklist item.
5+
/// </summary>
6+
public sealed class SigtranCommercialEvidenceRunApprovalChecklistItem
7+
{
8+
/// <summary>Creates a commercial evidence run approval checklist item.</summary>
9+
/// <param name="id">The stable checklist item identifier.</param>
10+
/// <param name="description">The checklist item description.</param>
11+
/// <param name="required">Whether the item is required for approval.</param>
12+
/// <param name="satisfied">Whether the item is satisfied.</param>
13+
public SigtranCommercialEvidenceRunApprovalChecklistItem(
14+
string id,
15+
string description,
16+
bool required,
17+
bool satisfied)
18+
{
19+
Id = string.IsNullOrWhiteSpace(id) ? throw new ArgumentException("Checklist item id is required.", nameof(id)) : id;
20+
Description = string.IsNullOrWhiteSpace(description) ? throw new ArgumentException("Checklist item description is required.", nameof(description)) : description;
21+
Required = required;
22+
Satisfied = satisfied;
23+
}
24+
25+
/// <summary>The stable checklist item identifier.</summary>
26+
public string Id { get; }
27+
28+
/// <summary>The checklist item description.</summary>
29+
public string Description { get; }
30+
31+
/// <summary>Whether the item is required for approval.</summary>
32+
public bool Required { get; }
33+
34+
/// <summary>Whether the item is satisfied.</summary>
35+
public bool Satisfied { get; }
36+
37+
/// <summary>Whether the item allows approval to proceed.</summary>
38+
public bool AllowsApproval => !Required || Satisfied;
39+
}
40+
41+
/// <summary>
42+
/// Describes the approval checklist for a commercial evidence run.
43+
/// </summary>
44+
public sealed class SigtranCommercialEvidenceRunApprovalChecklist
45+
{
46+
/// <summary>Creates a commercial evidence run approval checklist.</summary>
47+
/// <param name="target">The commercial evidence run approval target.</param>
48+
/// <param name="items">The checklist items.</param>
49+
public SigtranCommercialEvidenceRunApprovalChecklist(
50+
SigtranCommercialEvidenceApprovedRunTarget target,
51+
IReadOnlyList<SigtranCommercialEvidenceRunApprovalChecklistItem> items)
52+
{
53+
Target = target ?? throw new ArgumentNullException(nameof(target));
54+
ArgumentNullException.ThrowIfNull(items);
55+
Items = items.Count == 0 ? throw new ArgumentException("At least one checklist item is required.", nameof(items)) : items.ToArray();
56+
}
57+
58+
/// <summary>The commercial evidence run approval target.</summary>
59+
public SigtranCommercialEvidenceApprovedRunTarget Target { get; }
60+
61+
/// <summary>The checklist items.</summary>
62+
public IReadOnlyList<SigtranCommercialEvidenceRunApprovalChecklistItem> Items { get; }
63+
64+
/// <summary>Whether every required checklist item is satisfied.</summary>
65+
public bool AllRequiredItemsSatisfied => Items
66+
.Where(static item => item.Required)
67+
.All(static item => item.Satisfied);
68+
69+
/// <summary>Whether checklist item identifiers are unique.</summary>
70+
public bool UsesUniqueItemIds => Items
71+
.Select(static item => item.Id)
72+
.Distinct(StringComparer.OrdinalIgnoreCase)
73+
.Count() == Items.Count;
74+
75+
/// <summary>Whether the checklist explicitly covers reviewer approval.</summary>
76+
public bool IncludesReviewerApproval => Items.Any(static item => string.Equals(item.Id, "reviewer-approval-recorded", StringComparison.OrdinalIgnoreCase));
77+
78+
/// <summary>Whether the checklist explicitly covers redaction protection.</summary>
79+
public bool IncludesRedactionProtection => Items.Any(static item => string.Equals(item.Id, "trace-redaction-approved", StringComparison.OrdinalIgnoreCase));
80+
81+
/// <summary>Whether the checklist is ready for reviewer manifest creation.</summary>
82+
public bool IsReady => Target.IsReadyForApproval
83+
&& UsesUniqueItemIds
84+
&& IncludesReviewerApproval
85+
&& IncludesRedactionProtection
86+
&& AllRequiredItemsSatisfied;
87+
88+
/// <summary>Returns the unsatisfied required checklist item identifiers.</summary>
89+
/// <returns>The unsatisfied required checklist item identifiers.</returns>
90+
public IReadOnlyList<string> GetUnsatisfiedRequiredItemIds()
91+
{
92+
return Items
93+
.Where(static item => item.Required && !item.Satisfied)
94+
.Select(static item => item.Id)
95+
.ToArray();
96+
}
97+
98+
/// <summary>Formats a compact approval checklist summary.</summary>
99+
/// <returns>The approval checklist summary.</returns>
100+
public string Describe()
101+
{
102+
return $"commercialEvidenceRunApprovalChecklistReady={IsReady} items={Items.Count} unsatisfied={GetUnsatisfiedRequiredItemIds().Count}";
103+
}
104+
}
105+
106+
/// <summary>
107+
/// Provides commercial evidence run approval checklist helpers.
108+
/// </summary>
109+
public static class SigtranCommercialEvidenceRunApprovalChecklists
110+
{
111+
/// <summary>Creates the default approval checklist for a commercial evidence run.</summary>
112+
/// <param name="target">The commercial evidence run approval target.</param>
113+
/// <param name="reviewerApprovalRecorded">Whether reviewer approval has been recorded.</param>
114+
/// <returns>The commercial evidence run approval checklist.</returns>
115+
public static SigtranCommercialEvidenceRunApprovalChecklist CreateDefault(
116+
SigtranCommercialEvidenceApprovedRunTarget target,
117+
bool reviewerApprovalRecorded = true)
118+
{
119+
ArgumentNullException.ThrowIfNull(target);
120+
SigtranCommercialEvidenceFileSystemPromotionExecution promotion = target.PromotionExecution;
121+
122+
return new(
123+
target,
124+
[
125+
new("run-target-ready", "Run target identity, timing, source commit, and promotion execution are ready.", required: true, target.IsReadyForApproval),
126+
new("filesystem-promotion-ready", "Filesystem-backed evidence promotion is ready.", required: true, promotion.IsReady),
127+
new("verification-report-verified", "The filesystem-backed file verification report is verified.", required: true, promotion.AttachmentExecution.SealExecution.LedgerExecution.Ledger.Report.IsVerified),
128+
new("retention-ledger-ready", "The retention ledger is ready.", required: true, promotion.AttachmentExecution.SealExecution.LedgerExecution.Ledger.IsReady),
129+
new("integrity-seal-ready", "The integrity seal is ready.", required: true, promotion.AttachmentExecution.SealExecution.Seal.IsReady),
130+
new("publication-attachments-ready", "Publication attachments are ready.", required: true, promotion.AttachmentExecution.AttachmentManifest.IsReady),
131+
new("trace-redaction-approved", "Trace-bearing publication attachments have approved redaction state.", required: true, promotion.AttachmentExecution.ProtectsTraceBearingArtifacts),
132+
new("promotion-gate-approved", "The filesystem-backed promotion gate is explicitly approved.", required: true, promotion.PromotionApproved),
133+
new("reviewer-approval-recorded", "A reviewer approval record is present.", required: true, reviewerApprovalRecorded)
134+
]);
135+
}
136+
}

0 commit comments

Comments
 (0)