Skip to content

Commit ac2011a

Browse files
committed
Add commercial evidence publication handoff
1 parent 99621bb commit ac2011a

7 files changed

Lines changed: 150 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, approval checklist, reviewer approval manifest, approval report writing, and promotion package 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, release/security/operations reviewer approvals, UTC approval timestamps, checklist digest coverage, retained Markdown report output, report SHA-256 digest coverage, and approved package references for approval report, integrity seal, publication attachments, and promotion gate artifacts; 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, approval checklist, reviewer approval manifest, approval report writing, promotion package, and publication handoff 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, release/security/operations reviewer approvals, UTC approval timestamps, checklist digest coverage, retained Markdown report output, report SHA-256 digest coverage, approved package references, requested publication channel, requester identity, UTC handoff time, explicit publish intent, and channel version policy; 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ This unit turns approval data into a retained report artifact that later promoti
6868

6969
This unit gives the publication handoff a single approved package contract instead of relying on loose references.
7070

71+
## Unit 6 - Publication Handoff
72+
73+
`SigtranCommercialEvidencePublicationHandoff` connects an approved run promotion package to publication channel intent:
74+
75+
- Requested publication channel.
76+
- Requester identity.
77+
- UTC handoff creation time.
78+
- Explicit publish request flag.
79+
- Channel acceptance of package version.
80+
- Commercial readiness requirement visibility.
81+
82+
This unit keeps RC and stable publication boundaries explicit before a final publication gate evaluates the handoff.
83+
7184
## Validation
7285

7386
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
@@ -9,7 +9,8 @@ Phase 41 prepares the SDK to move from filesystem-backed evidence verification i
99
- Reviewer approval manifest that records release, security, and operations approvals with UTC timestamps and a deterministic checklist digest.
1010
- Approval report writer that renders retained Markdown approval reports with SHA-256 digest coverage.
1111
- Approved run promotion package that collects approval report, integrity seal, publication attachments, and promotion gate artifact references with required digest coverage.
12+
- Publication handoff that connects an approved promotion package to channel policy, requester identity, UTC handoff time, and explicit publish intent.
1213

1314
## Readiness Position
1415

15-
The phase is in progress. Approved run target identity, approval checklist, reviewer approval manifest, approval report writing, and promotion package are available. Publication handoff, blocker gate, audit trail, command materialization, status reporting, documentation, and final validation remain.
16+
The phase is in progress. Approved run target identity, approval checklist, reviewer approval manifest, approval report writing, promotion package, and publication handoff are available. 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; promotion package 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; publication handoff 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 now requires verified filesystem promotion, ready report/ledger/seal/attachments, approved trace redaction, promotion approval, and reviewer approval records. Reviewer approval manifest now records release, security, and operations approvals with UTC timestamps and a deterministic checklist SHA-256 digest. Approval report writing now renders retained Markdown reports with run identity, checklist digest, reviewer roles, UTC write time, and report SHA-256 digest coverage. Approved run promotion package now collects approval report, integrity seal, publication attachment, and promotion gate artifact references with required digest coverage. 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 approval manifest now records release, security, and operations approvals with UTC timestamps and a deterministic checklist SHA-256 digest. Approval report writing now renders retained Markdown reports with run identity, checklist digest, reviewer roles, UTC write time, and report SHA-256 digest coverage. Approved run promotion package now collects approval report, integrity seal, publication attachment, and promotion gate artifact references with required digest coverage. Publication handoff now binds the approved package to requested channel, requester identity, UTC handoff time, explicit publish intent, and channel version policy. 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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@
320320
Run("SIGTRAN commercial evidence run approval manifest requires required roles", SigtranCommercialEvidenceRunApprovalManifestRequiresRequiredRoles);
321321
Run("SIGTRAN commercial evidence run approval report writer retains markdown", SigtranCommercialEvidenceRunApprovalReportWriterRetainsMarkdown);
322322
Run("SIGTRAN commercial evidence approved run promotion package covers required artifacts", SigtranCommercialEvidenceApprovedRunPromotionPackageCoversRequiredArtifacts);
323+
Run("SIGTRAN commercial evidence publication handoff enforces channel version policy", SigtranCommercialEvidencePublicationHandoffEnforcesChannelVersionPolicy);
323324
Run("SIGTRAN status capabilities use domain documentation labels", SigtranStatusCapabilitiesUseDomainDocumentationLabels);
324325
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
325326
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
@@ -5632,6 +5633,46 @@ static void SigtranCommercialEvidenceApprovedRunPromotionPackageCoversRequiredAr
56325633
}
56335634
}
56345635

5636+
static void SigtranCommercialEvidencePublicationHandoffEnforcesChannelVersionPolicy()
5637+
{
5638+
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
5639+
Directory.CreateDirectory(tempRoot);
5640+
5641+
try
5642+
{
5643+
SigtranCommercialEvidenceApprovedRunPromotionPackage package = CreateReadyCommercialEvidenceApprovedRunPromotionPackage(tempRoot);
5644+
5645+
SigtranCommercialEvidencePublicationHandoff beta = SigtranCommercialEvidencePublicationHandoffs.Create(
5646+
package,
5647+
SigtranPublishChannelKind.Beta,
5648+
"release-manager",
5649+
DateTimeOffset.UtcNow);
5650+
SigtranCommercialEvidencePublicationHandoff stable = SigtranCommercialEvidencePublicationHandoffs.Create(
5651+
package,
5652+
SigtranPublishChannelKind.Stable,
5653+
"release-manager",
5654+
DateTimeOffset.UtcNow);
5655+
5656+
Assert(beta.IsReadyForPublicationGate, beta.Describe());
5657+
Assert(beta.ChannelAcceptsPackageVersion, "beta channel should accept prerelease version");
5658+
Assert(!beta.RequiresCommercialReadiness, "beta channel should not require stable commercial readiness");
5659+
Assert(!stable.IsReadyForPublicationGate, "stable handoff should reject prerelease version");
5660+
Assert(!stable.ChannelAcceptsPackageVersion, "stable channel should not accept prerelease version");
5661+
Assert(stable.RequiresCommercialReadiness, "stable channel should require commercial readiness");
5662+
}
5663+
finally
5664+
{
5665+
DeleteTempEvidenceRoot(tempRoot);
5666+
}
5667+
}
5668+
5669+
static SigtranCommercialEvidenceApprovedRunPromotionPackage CreateReadyCommercialEvidenceApprovedRunPromotionPackage(string tempRoot)
5670+
{
5671+
return SigtranCommercialEvidenceApprovedRunPromotionPackages.CreateDefault(
5672+
CreateReadyCommercialEvidenceRunApprovalReportWriteResult(tempRoot),
5673+
DateTimeOffset.UtcNow);
5674+
}
5675+
56355676
static SigtranCommercialEvidenceRunApprovalReportWriteResult CreateReadyCommercialEvidenceRunApprovalReportWriteResult(string tempRoot)
56365677
{
56375678
return SigtranCommercialEvidenceRunApprovalReportWriters.WriteReport(
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
namespace Sigtran.NET.Core.Utilities;
2+
3+
/// <summary>
4+
/// Describes a publication handoff for an approved commercial evidence run.
5+
/// </summary>
6+
public sealed class SigtranCommercialEvidencePublicationHandoff
7+
{
8+
/// <summary>Creates an approved commercial evidence publication handoff.</summary>
9+
/// <param name="promotionPackage">The approved run promotion package.</param>
10+
/// <param name="channel">The requested publication channel.</param>
11+
/// <param name="requestedBy">The requester identity.</param>
12+
/// <param name="createdAtUtc">The UTC handoff creation time.</param>
13+
/// <param name="publishRequested">Whether publication was explicitly requested.</param>
14+
public SigtranCommercialEvidencePublicationHandoff(
15+
SigtranCommercialEvidenceApprovedRunPromotionPackage promotionPackage,
16+
SigtranPublishChannel channel,
17+
string requestedBy,
18+
DateTimeOffset createdAtUtc,
19+
bool publishRequested)
20+
{
21+
PromotionPackage = promotionPackage ?? throw new ArgumentNullException(nameof(promotionPackage));
22+
Channel = channel ?? throw new ArgumentNullException(nameof(channel));
23+
RequestedBy = string.IsNullOrWhiteSpace(requestedBy) ? throw new ArgumentException("Requester is required.", nameof(requestedBy)) : requestedBy;
24+
CreatedAtUtc = createdAtUtc.Offset == TimeSpan.Zero ? createdAtUtc : createdAtUtc.ToUniversalTime();
25+
PublishRequested = publishRequested;
26+
}
27+
28+
/// <summary>The approved run promotion package.</summary>
29+
public SigtranCommercialEvidenceApprovedRunPromotionPackage PromotionPackage { get; }
30+
31+
/// <summary>The requested publication channel.</summary>
32+
public SigtranPublishChannel Channel { get; }
33+
34+
/// <summary>The requester identity.</summary>
35+
public string RequestedBy { get; }
36+
37+
/// <summary>The UTC handoff creation time.</summary>
38+
public DateTimeOffset CreatedAtUtc { get; }
39+
40+
/// <summary>Whether publication was explicitly requested.</summary>
41+
public bool PublishRequested { get; }
42+
43+
/// <summary>The package version covered by the handoff.</summary>
44+
public string PackageVersion => PromotionPackage.ApprovalReport.Manifest.Checklist.Target.PackageVersion;
45+
46+
/// <summary>Whether the handoff creation time is normalized to UTC.</summary>
47+
public bool HasUtcCreationTime => CreatedAtUtc.Offset == TimeSpan.Zero;
48+
49+
/// <summary>Whether the selected publication channel accepts the package version.</summary>
50+
public bool ChannelAcceptsPackageVersion => Channel.AcceptsVersion(PackageVersion);
51+
52+
/// <summary>Whether the selected publication channel requires commercial readiness.</summary>
53+
public bool RequiresCommercialReadiness => Channel.RequiresCommercialReadiness;
54+
55+
/// <summary>Whether the handoff is ready for publication gate evaluation.</summary>
56+
public bool IsReadyForPublicationGate => PromotionPackage.IsReady
57+
&& PublishRequested
58+
&& HasUtcCreationTime
59+
&& ChannelAcceptsPackageVersion;
60+
61+
/// <summary>Formats a compact publication handoff summary.</summary>
62+
/// <returns>The publication handoff summary.</returns>
63+
public string Describe()
64+
{
65+
return $"commercialEvidencePublicationHandoffReady={IsReadyForPublicationGate} channel={Channel.FeedName} version={PackageVersion}";
66+
}
67+
}
68+
69+
/// <summary>
70+
/// Provides approved commercial evidence publication handoff helpers.
71+
/// </summary>
72+
public static class SigtranCommercialEvidencePublicationHandoffs
73+
{
74+
/// <summary>Creates a publication handoff for an approved commercial evidence run.</summary>
75+
/// <param name="promotionPackage">The approved run promotion package.</param>
76+
/// <param name="channelKind">The requested publication channel kind.</param>
77+
/// <param name="requestedBy">The requester identity.</param>
78+
/// <param name="createdAtUtc">The UTC handoff creation time.</param>
79+
/// <param name="publishRequested">Whether publication was explicitly requested.</param>
80+
/// <returns>The approved commercial evidence publication handoff.</returns>
81+
public static SigtranCommercialEvidencePublicationHandoff Create(
82+
SigtranCommercialEvidenceApprovedRunPromotionPackage promotionPackage,
83+
SigtranPublishChannelKind channelKind,
84+
string requestedBy,
85+
DateTimeOffset createdAtUtc,
86+
bool publishRequested = true)
87+
{
88+
SigtranPublishChannel channel = SigtranPublishChannels.GetChannels().First(item => item.Kind == channelKind);
89+
return new(promotionPackage, channel, requestedBy, createdAtUtc, publishRequested);
90+
}
91+
}

0 commit comments

Comments
 (0)