Skip to content

Commit d48f277

Browse files
committed
Add commercial evidence publication handoff gate
1 parent ac2011a commit d48f277

7 files changed

Lines changed: 147 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, 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 |
79+
| Approved commercial run publication handoff | Phase 41 in progress: approved run target identity, approval checklist, reviewer approval manifest, approval report writing, promotion package, publication handoff, and handoff gate 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, channel version policy, and handoff blocker reporting; audit trail, command materialization, status reporting, and final validation remain |
8080

8181
## Requirements
8282

docs/PHASE41_APPROVED_COMMERCIAL_RUN_PUBLICATION_HANDOFF.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ This unit gives the publication handoff a single approved package contract inste
8181

8282
This unit keeps RC and stable publication boundaries explicit before a final publication gate evaluates the handoff.
8383

84+
## Unit 7 - Publication Handoff Gate
85+
86+
`SigtranCommercialEvidencePublicationHandoffGates` evaluates handoff blockers:
87+
88+
- Promotion package readiness.
89+
- Explicit publish request.
90+
- UTC handoff time.
91+
- Channel acceptance of package version.
92+
- Stable commercial readiness approval when required.
93+
94+
This unit gives release operators actionable blockers before package publication workflows are allowed to proceed.
95+
8496
## Validation
8597

8698
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
@@ -10,7 +10,8 @@ Phase 41 prepares the SDK to move from filesystem-backed evidence verification i
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.
1212
- Publication handoff that connects an approved promotion package to channel policy, requester identity, UTC handoff time, and explicit publish intent.
13+
- Publication handoff gate that reports blockers for package readiness, publish intent, UTC timing, channel/version policy, and stable commercial readiness approval.
1314

1415
## Readiness Position
1516

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.
17+
The phase is in progress. Approved run target identity, approval checklist, reviewer approval manifest, approval report writing, promotion package, publication handoff, and handoff gate are available. 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; publication handoff 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 gate 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 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.
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. Publication handoff gate now reports blockers for package readiness, publish intent, UTC timing, channel/version policy, and stable commercial readiness approval. 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
@@ -321,6 +321,7 @@
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);
323323
Run("SIGTRAN commercial evidence publication handoff enforces channel version policy", SigtranCommercialEvidencePublicationHandoffEnforcesChannelVersionPolicy);
324+
Run("SIGTRAN commercial evidence publication handoff gate reports blockers", SigtranCommercialEvidencePublicationHandoffGateReportsBlockers);
324325
Run("SIGTRAN status capabilities use domain documentation labels", SigtranStatusCapabilitiesUseDomainDocumentationLabels);
325326
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
326327
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
@@ -5666,6 +5667,49 @@ static void SigtranCommercialEvidencePublicationHandoffEnforcesChannelVersionPol
56665667
}
56675668
}
56685669

5670+
static void SigtranCommercialEvidencePublicationHandoffGateReportsBlockers()
5671+
{
5672+
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
5673+
Directory.CreateDirectory(tempRoot);
5674+
5675+
try
5676+
{
5677+
SigtranCommercialEvidenceApprovedRunPromotionPackage package = CreateReadyCommercialEvidenceApprovedRunPromotionPackage(tempRoot);
5678+
SigtranCommercialEvidencePublicationHandoff beta = SigtranCommercialEvidencePublicationHandoffs.Create(
5679+
package,
5680+
SigtranPublishChannelKind.Beta,
5681+
"release-manager",
5682+
DateTimeOffset.UtcNow);
5683+
SigtranCommercialEvidencePublicationHandoff stable = SigtranCommercialEvidencePublicationHandoffs.Create(
5684+
package,
5685+
SigtranPublishChannelKind.Stable,
5686+
"release-manager",
5687+
DateTimeOffset.UtcNow);
5688+
SigtranCommercialEvidencePublicationHandoff noPublish = SigtranCommercialEvidencePublicationHandoffs.Create(
5689+
package,
5690+
SigtranPublishChannelKind.Beta,
5691+
"release-manager",
5692+
DateTimeOffset.UtcNow,
5693+
publishRequested: false);
5694+
5695+
SigtranCommercialEvidencePublicationHandoffGateResult approved = SigtranCommercialEvidencePublicationHandoffGates.Evaluate(beta, commercialReadinessApproved: false);
5696+
SigtranCommercialEvidencePublicationHandoffGateResult stableBlocked = SigtranCommercialEvidencePublicationHandoffGates.Evaluate(stable, commercialReadinessApproved: false);
5697+
SigtranCommercialEvidencePublicationHandoffGateResult noPublishBlocked = SigtranCommercialEvidencePublicationHandoffGates.Evaluate(noPublish, commercialReadinessApproved: false);
5698+
5699+
Assert(approved.CanProceedToPackagePublicationGate, approved.Describe());
5700+
AssertEqual(0, approved.Blockers.Count, "approved handoff blocker count");
5701+
Assert(!stableBlocked.CanProceedToPackagePublicationGate, "stable handoff should be blocked for prerelease version and readiness");
5702+
Assert(stableBlocked.Blockers.Contains("channel-version-rejected"), "stable handoff should expose channel version blocker");
5703+
Assert(stableBlocked.Blockers.Contains("stable-commercial-readiness-required"), "stable handoff should expose commercial readiness blocker");
5704+
Assert(!noPublishBlocked.CanProceedToPackagePublicationGate, "missing publish request should block handoff");
5705+
Assert(noPublishBlocked.Blockers.Contains("publish-not-requested"), "handoff gate should expose publish intent blocker");
5706+
}
5707+
finally
5708+
{
5709+
DeleteTempEvidenceRoot(tempRoot);
5710+
}
5711+
}
5712+
56695713
static SigtranCommercialEvidenceApprovedRunPromotionPackage CreateReadyCommercialEvidenceApprovedRunPromotionPackage(string tempRoot)
56705714
{
56715715
return SigtranCommercialEvidenceApprovedRunPromotionPackages.CreateDefault(
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
namespace Sigtran.NET.Core.Utilities;
2+
3+
/// <summary>
4+
/// Describes an approved commercial evidence publication handoff gate result.
5+
/// </summary>
6+
public sealed class SigtranCommercialEvidencePublicationHandoffGateResult
7+
{
8+
/// <summary>Creates a publication handoff gate result.</summary>
9+
/// <param name="handoff">The publication handoff under evaluation.</param>
10+
/// <param name="commercialReadinessApproved">Whether commercial readiness was approved for the requested channel.</param>
11+
/// <param name="blockers">The publication handoff blockers.</param>
12+
public SigtranCommercialEvidencePublicationHandoffGateResult(
13+
SigtranCommercialEvidencePublicationHandoff handoff,
14+
bool commercialReadinessApproved,
15+
IReadOnlyList<string> blockers)
16+
{
17+
Handoff = handoff ?? throw new ArgumentNullException(nameof(handoff));
18+
CommercialReadinessApproved = commercialReadinessApproved;
19+
ArgumentNullException.ThrowIfNull(blockers);
20+
Blockers = blockers.ToArray();
21+
}
22+
23+
/// <summary>The publication handoff under evaluation.</summary>
24+
public SigtranCommercialEvidencePublicationHandoff Handoff { get; }
25+
26+
/// <summary>Whether commercial readiness was approved for the requested channel.</summary>
27+
public bool CommercialReadinessApproved { get; }
28+
29+
/// <summary>The publication handoff blockers.</summary>
30+
public IReadOnlyList<string> Blockers { get; }
31+
32+
/// <summary>Whether the publication handoff can proceed to the package publication gate.</summary>
33+
public bool CanProceedToPackagePublicationGate => Blockers.Count == 0;
34+
35+
/// <summary>Formats a compact publication handoff gate summary.</summary>
36+
/// <returns>The publication handoff gate summary.</returns>
37+
public string Describe()
38+
{
39+
return $"commercialEvidencePublicationHandoffGateReady={CanProceedToPackagePublicationGate} blockers={Blockers.Count} channel={Handoff.Channel.FeedName}";
40+
}
41+
}
42+
43+
/// <summary>
44+
/// Provides approved commercial evidence publication handoff gate helpers.
45+
/// </summary>
46+
public static class SigtranCommercialEvidencePublicationHandoffGates
47+
{
48+
/// <summary>Evaluates an approved commercial evidence publication handoff.</summary>
49+
/// <param name="handoff">The publication handoff under evaluation.</param>
50+
/// <param name="commercialReadinessApproved">Whether commercial readiness was approved for the requested channel.</param>
51+
/// <returns>The publication handoff gate result.</returns>
52+
public static SigtranCommercialEvidencePublicationHandoffGateResult Evaluate(
53+
SigtranCommercialEvidencePublicationHandoff handoff,
54+
bool commercialReadinessApproved)
55+
{
56+
ArgumentNullException.ThrowIfNull(handoff);
57+
List<string> blockers = [];
58+
59+
if (!handoff.PromotionPackage.IsReady)
60+
{
61+
blockers.Add("promotion-package-not-ready");
62+
}
63+
64+
if (!handoff.PublishRequested)
65+
{
66+
blockers.Add("publish-not-requested");
67+
}
68+
69+
if (!handoff.HasUtcCreationTime)
70+
{
71+
blockers.Add("handoff-time-not-utc");
72+
}
73+
74+
if (!handoff.ChannelAcceptsPackageVersion)
75+
{
76+
blockers.Add("channel-version-rejected");
77+
}
78+
79+
if (handoff.RequiresCommercialReadiness && !commercialReadinessApproved)
80+
{
81+
blockers.Add("stable-commercial-readiness-required");
82+
}
83+
84+
return new(handoff, commercialReadinessApproved, blockers);
85+
}
86+
}

0 commit comments

Comments
 (0)