Skip to content

Commit 9aa682b

Browse files
committed
Add package publication request boundary
1 parent 4c718c4 commit 9aa682b

6 files changed

Lines changed: 145 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ The first production milestone is M3UA over a transport abstraction. SCCP, TCAP,
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 |
7979
| Approved commercial run publication handoff | Phase 41 foundation-complete: approved run target identity, approval checklist, reviewer approval manifest, approval report writing, promotion package, publication handoff, handoff gate, approval audit trail, command materialization, status reporting, documentation, and final validation are complete, 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, handoff blocker reporting, digest-covered audit lifecycle events, and ordered approval workflow scripts; package publication still requires a real approved commercial run |
80+
| Commercial package publication gate integration | Phase 42 in progress: handoff-derived package publication request is available and binds package version, channel, requester identity, run id, promotion package id, UTC request time, and artifact-binding readiness; package publication remains blocked until artifact binding, credential readiness, evidence assembly, release guard, channel policy, gate execution, dry-run rehearsal, guarded commands, and status reporting are complete |
8081

8182
## Requirements
8283

@@ -144,6 +145,7 @@ Start here:
144145
- [Complete phase index](docs/PHASE_INDEX.md)
145146
- [Commercial readiness report](docs/COMMERCIAL_READINESS_REPORT.md)
146147
- [Phase 35 commercial gate report](docs/PHASE35_COMMERCIAL_GATE_REPORT.md)
148+
- [Phase 42 package publication gate integration](docs/PHASE42_COMMERCIAL_PACKAGE_PUBLICATION_GATE_INTEGRATION.md)
147149
- [Alpha release checklist](docs/ALPHA_RELEASE.md)
148150

149151
Architecture and protocol docs:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Phase 42 - Commercial Package Publication Gate Integration
2+
3+
Phase 42 connects an approved commercial evidence publication handoff to the package publication gate. It does not publish packages by itself. The phase prepares request, package artifact, credential, evidence, release guard, channel policy, gate execution, dry-run, command, and status contracts so a release workflow can decide whether publication is allowed from retained evidence.
4+
5+
## Unit Plan
6+
7+
| Unit | Capability | Status |
8+
| --- | --- | --- |
9+
| 1 | Package publication request derived from approved handoff gate | Complete |
10+
| 2 | Package artifact binding with package and symbols digests | Pending |
11+
| 3 | Credential readiness bridge for required publication secrets | Pending |
12+
| 4 | Publication evidence assembly from approved run and artifacts | Pending |
13+
| 5 | Release publish guard bridge | Pending |
14+
| 6 | Publication channel policy evaluation bridge | Pending |
15+
| 7 | Commercial package publication gate execution | Pending |
16+
| 8 | Dry-run publication rehearsal artifact | Pending |
17+
| 9 | Guarded publish command materialization and status | Pending |
18+
| 10 | Final documentation, README alignment, validation, commit, and push | Pending |
19+
20+
## Current Capability
21+
22+
`SigtranPackagePublicationRequest` turns a `SigtranCommercialEvidencePublicationHandoffGateResult` into a package publication request. The request preserves the package version, publication channel, requester identity, commercial evidence run id, approved promotion package id, and UTC request time.
23+
24+
The request can only move to package artifact binding when the upstream handoff gate allows evaluation and the request time is normalized to UTC. This keeps package publication blocked when approval handoff evidence is incomplete.
25+
26+
## Commercial Gate Position
27+
28+
Phase 42 is still in progress. Unit 1 establishes the handoff-to-publication request boundary. Real package publication remains blocked until package artifacts, required credentials, retained evidence, release guard, channel policy, and the final publication gate all pass.

docs/PHASE42_SUMMARY.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Phase 42 Summary - Commercial Package Publication Gate Integration
2+
3+
Phase 42 is in progress. It connects approved commercial evidence handoff records to the package publication gate without enabling live publication prematurely.
4+
5+
## Completed Capabilities
6+
7+
- Package publication request that derives package version, channel, requester identity, run id, promotion package id, UTC request time, and artifact-binding readiness from an approved handoff gate.
8+
9+
## Readiness Position
10+
11+
Unit 1 is complete. The SDK can now represent the publication request boundary after commercial approval handoff. Package publication still requires artifact binding, credential readiness, evidence assembly, release guard evaluation, channel policy evaluation, final gate execution, dry-run rehearsal, guarded command materialization, status reporting, and retained real release evidence.

docs/PHASE_INDEX.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ This index is the complete phase map for Sigtran.NET. It links each phase to the
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 |
4848
| 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) | Foundation complete; package publication requires real approved commercial run |
49+
| 42 | Commercial package publication gate integration | [Phase 42 Commercial Package Publication Gate Integration](PHASE42_COMMERCIAL_PACKAGE_PUBLICATION_GATE_INTEGRATION.md), [Phase 42 Summary](PHASE42_SUMMARY.md) | In progress; handoff-derived publication request complete |
4950

5051
## Current Commercial Gate
5152

52-
The SDK can now define governed commercial evidence-producing execution, model intake of retained artifacts, verify retained files, execute filesystem-backed verification, and prepare approved commercial run publication handoff records. RC publication remains blocked until retained execution-run, release-run, and commercial evidence artifacts are complete and approved. Stable publication remains blocked until external peer evidence, trusted timestamped signing, production performance evidence, retained release-run artifacts, real artifact file evidence, approved commercial run handoff, and the commercial evidence dossier are complete.
53+
The SDK can now define governed commercial evidence-producing execution, model intake of retained artifacts, verify retained files, execute filesystem-backed verification, prepare approved commercial run publication handoff records, and derive a package publication request from an approved handoff gate. RC publication remains blocked until retained execution-run, release-run, and commercial evidence artifacts are complete and approved. Stable publication remains blocked until external peer evidence, trusted timestamped signing, production performance evidence, retained release-run artifacts, real artifact file evidence, approved commercial run handoff, package publication gate integration, and the commercial evidence dossier are complete.

src/Sigtran.NET.Tests/Program.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@
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);
324324
Run("SIGTRAN commercial evidence publication handoff gate reports blockers", SigtranCommercialEvidencePublicationHandoffGateReportsBlockers);
325+
Run("SIGTRAN package publication request derives from approved handoff", SigtranPackagePublicationRequestDerivesFromApprovedHandoff);
325326
Run("SIGTRAN commercial evidence approval audit trail covers lifecycle", SigtranCommercialEvidenceApprovalAuditTrailCoversLifecycle);
326327
Run("SIGTRAN commercial evidence approval command materializer writes script", SigtranCommercialEvidenceApprovalCommandMaterializerWritesScript);
327328
Run("SIGTRAN commercial evidence approval handoff status summarizes final validation", SigtranCommercialEvidenceApprovalHandoffStatusSummarizesFinalValidation);
@@ -5713,6 +5714,34 @@ static void SigtranCommercialEvidencePublicationHandoffGateReportsBlockers()
57135714
}
57145715
}
57155716

5717+
static void SigtranPackagePublicationRequestDerivesFromApprovedHandoff()
5718+
{
5719+
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
5720+
Directory.CreateDirectory(tempRoot);
5721+
5722+
try
5723+
{
5724+
SigtranCommercialEvidencePublicationHandoffGateResult gate = CreateReadyCommercialEvidencePublicationHandoffGateResult(tempRoot);
5725+
5726+
SigtranPackagePublicationRequest request = SigtranPackagePublicationRequests.Create(
5727+
gate,
5728+
DateTimeOffset.UtcNow);
5729+
5730+
Assert(request.IsReadyForArtifactBinding, request.Describe());
5731+
Assert(request.HasUtcRequestTime, "package publication request time should be UTC");
5732+
Assert(request.HandoffGateAllowsPackageEvaluation, "handoff gate should allow package publication evaluation");
5733+
AssertEqual("1.0.0-rc.1", request.PackageVersion, "publication request package version");
5734+
AssertEqual(SigtranPublishChannelKind.Beta, request.Channel.Kind, "publication request channel");
5735+
AssertEqual("release-manager", request.RequestedBy, "publication request requester");
5736+
AssertEqual("commercial-run-20260622-001", request.RunId, "publication request run id");
5737+
Assert(request.Describe().Contains("packagePublicationRequestReady=True", StringComparison.Ordinal), request.Describe());
5738+
}
5739+
finally
5740+
{
5741+
DeleteTempEvidenceRoot(tempRoot);
5742+
}
5743+
}
5744+
57165745
static void SigtranCommercialEvidenceApprovalAuditTrailCoversLifecycle()
57175746
{
57185747
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
namespace Sigtran.NET.Core.Utilities;
2+
3+
/// <summary>
4+
/// Describes a package publication request derived from an approved commercial evidence handoff.
5+
/// </summary>
6+
public sealed class SigtranPackagePublicationRequest
7+
{
8+
/// <summary>Creates a package publication request.</summary>
9+
/// <param name="handoffGate">The approved commercial evidence handoff gate result.</param>
10+
/// <param name="requestedAtUtc">The UTC publication request time.</param>
11+
public SigtranPackagePublicationRequest(
12+
SigtranCommercialEvidencePublicationHandoffGateResult handoffGate,
13+
DateTimeOffset requestedAtUtc)
14+
{
15+
HandoffGate = handoffGate ?? throw new ArgumentNullException(nameof(handoffGate));
16+
RequestedAtUtc = requestedAtUtc.Offset == TimeSpan.Zero ? requestedAtUtc : requestedAtUtc.ToUniversalTime();
17+
}
18+
19+
/// <summary>The approved commercial evidence handoff gate result.</summary>
20+
public SigtranCommercialEvidencePublicationHandoffGateResult HandoffGate { get; }
21+
22+
/// <summary>The UTC publication request time.</summary>
23+
public DateTimeOffset RequestedAtUtc { get; }
24+
25+
/// <summary>The requested package version.</summary>
26+
public string PackageVersion => HandoffGate.Handoff.PackageVersion;
27+
28+
/// <summary>The requested publication channel.</summary>
29+
public SigtranPublishChannel Channel => HandoffGate.Handoff.Channel;
30+
31+
/// <summary>The requester identity from the handoff.</summary>
32+
public string RequestedBy => HandoffGate.Handoff.RequestedBy;
33+
34+
/// <summary>The commercial evidence run identifier.</summary>
35+
public string RunId => HandoffGate.Handoff.PromotionPackage.ApprovalReport.Manifest.Checklist.Target.RunId;
36+
37+
/// <summary>The approved promotion package identifier.</summary>
38+
public string PromotionPackageId => HandoffGate.Handoff.PromotionPackage.PackageId;
39+
40+
/// <summary>Whether the request time is normalized to UTC.</summary>
41+
public bool HasUtcRequestTime => RequestedAtUtc.Offset == TimeSpan.Zero;
42+
43+
/// <summary>Whether the upstream handoff gate allows package publication evaluation.</summary>
44+
public bool HandoffGateAllowsPackageEvaluation => HandoffGate.CanProceedToPackagePublicationGate;
45+
46+
/// <summary>Whether the request is ready for package artifact binding.</summary>
47+
public bool IsReadyForArtifactBinding => HasUtcRequestTime
48+
&& HandoffGateAllowsPackageEvaluation;
49+
50+
/// <summary>Formats a compact package publication request summary.</summary>
51+
/// <returns>The package publication request summary.</returns>
52+
public string Describe()
53+
{
54+
return $"packagePublicationRequestReady={IsReadyForArtifactBinding} version={PackageVersion} channel={Channel.FeedName} runId={RunId}";
55+
}
56+
}
57+
58+
/// <summary>
59+
/// Provides package publication request helpers.
60+
/// </summary>
61+
public static class SigtranPackagePublicationRequests
62+
{
63+
/// <summary>Creates a package publication request from an approved commercial evidence handoff gate.</summary>
64+
/// <param name="handoffGate">The approved commercial evidence handoff gate result.</param>
65+
/// <param name="requestedAtUtc">The UTC publication request time.</param>
66+
/// <returns>The package publication request.</returns>
67+
public static SigtranPackagePublicationRequest Create(
68+
SigtranCommercialEvidencePublicationHandoffGateResult handoffGate,
69+
DateTimeOffset requestedAtUtc)
70+
{
71+
return new(handoffGate, requestedAtUtc);
72+
}
73+
}

0 commit comments

Comments
 (0)