Skip to content

Commit cdab33c

Browse files
committed
Add commercial evidence approval command materialization status
1 parent f360319 commit cdab33c

8 files changed

Lines changed: 414 additions & 4 deletions

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, publication handoff, handoff gate, and approval audit trail 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, handoff blocker reporting, and digest-covered audit lifecycle events; 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, handoff gate, approval audit trail, command materialization, and interim status reporting 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, handoff blocker reporting, digest-covered audit lifecycle events, and ordered approval workflow scripts; documentation and final validation remain |
8080

8181
## Requirements
8282

docs/PHASE41_APPROVED_COMMERCIAL_RUN_PUBLICATION_HANDOFF.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,21 @@ This unit gives release operators actionable blockers before package publication
107107

108108
This unit gives the approval path a retained audit chain that can be reviewed before package publication proceeds.
109109

110+
## Unit 9 - Command Materialization And Interim Status
111+
112+
`SigtranCommercialEvidenceApprovalCommands` materializes the approval handoff workflow:
113+
114+
- Run target creation.
115+
- Approval checklist generation.
116+
- Reviewer approval recording.
117+
- Approval report writing.
118+
- Promotion package creation.
119+
- Publication handoff creation.
120+
- Handoff gate evaluation.
121+
- Approval audit trail writing.
122+
123+
`SigtranCommercialEvidenceApprovalHandoffStatus` reports the first nine completed capabilities and keeps `status-final-validation-pending` as a blocker until the final unit completes.
124+
110125
## Validation
111126

112127
Each unit in this phase is validated with:

docs/PHASE41_SUMMARY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Phase 41 prepares the SDK to move from filesystem-backed evidence verification i
1212
- Publication handoff that connects an approved promotion package to channel policy, requester identity, UTC handoff time, and explicit publish intent.
1313
- Publication handoff gate that reports blockers for package readiness, publish intent, UTC timing, channel/version policy, and stable commercial readiness approval.
1414
- Approval audit trail that records digest-covered run target, checklist, manifest, report, package, handoff, and gate lifecycle events.
15+
- Approval command materialization that writes the ordered approval handoff workflow to a retained shell script.
16+
- Interim status reporting for nine completed approval handoff units, with final validation still pending.
1517

1618
## Readiness Position
1719

18-
The phase is in progress. Approved run target identity, approval checklist, reviewer approval manifest, approval report writing, promotion package, publication handoff, handoff gate, and approval audit trail are available. Command materialization, status reporting, documentation, and final validation remain.
20+
The phase is in progress. Approved run target identity, approval checklist, reviewer approval manifest, approval report writing, promotion package, publication handoff, handoff gate, approval audit trail, command materialization, and interim status reporting are available. 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; approval audit trail 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; command materialization and interim status 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. Publication handoff gate now reports blockers for package readiness, publish intent, UTC timing, channel/version policy, and stable commercial readiness approval. Approval audit trail now records digest-covered lifecycle events for run target, checklist, manifest, report, package, handoff, and gate. 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. Approval audit trail now records digest-covered lifecycle events for run target, checklist, manifest, report, package, handoff, and gate. Command materialization now writes the ordered approval workflow to a retained shell script. Interim status reporting now tracks nine completed capabilities and keeps final validation pending. Documentation and final validation remain in progress.
367367

368368
## Recommended First Deliverable
369369

src/Sigtran.NET.Tests/Program.cs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@
323323
Run("SIGTRAN commercial evidence publication handoff enforces channel version policy", SigtranCommercialEvidencePublicationHandoffEnforcesChannelVersionPolicy);
324324
Run("SIGTRAN commercial evidence publication handoff gate reports blockers", SigtranCommercialEvidencePublicationHandoffGateReportsBlockers);
325325
Run("SIGTRAN commercial evidence approval audit trail covers lifecycle", SigtranCommercialEvidenceApprovalAuditTrailCoversLifecycle);
326+
Run("SIGTRAN commercial evidence approval command materializer writes script", SigtranCommercialEvidenceApprovalCommandMaterializerWritesScript);
327+
Run("SIGTRAN commercial evidence approval handoff status summarizes pending final validation", SigtranCommercialEvidenceApprovalHandoffStatusSummarizesPendingFinalValidation);
326328
Run("SIGTRAN status capabilities use domain documentation labels", SigtranStatusCapabilitiesUseDomainDocumentationLabels);
327329
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
328330
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
@@ -5741,6 +5743,49 @@ static void SigtranCommercialEvidenceApprovalAuditTrailCoversLifecycle()
57415743
}
57425744
}
57435745

5746+
static void SigtranCommercialEvidenceApprovalCommandMaterializerWritesScript()
5747+
{
5748+
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
5749+
Directory.CreateDirectory(tempRoot);
5750+
5751+
try
5752+
{
5753+
SigtranCommercialEvidenceApprovalCommandPlan plan = SigtranCommercialEvidenceApprovalCommands.CreateDefaultPlan(
5754+
Path.Combine(tempRoot, "approval"),
5755+
"commercial-run-20260622-001");
5756+
SigtranCommercialEvidenceApprovalCommandMaterialization materialization = SigtranCommercialEvidenceApprovalCommands.WriteScript(
5757+
plan,
5758+
Path.Combine(tempRoot, "scripts", "commercial-evidence-approval.sh"),
5759+
DateTimeOffset.UtcNow);
5760+
5761+
Assert(materialization.IsReady, materialization.Describe());
5762+
Assert(materialization.ScriptExists, "approval command script should exist");
5763+
Assert(materialization.ScriptSizeBytes > 0, "approval command script should be non-empty");
5764+
Assert(materialization.IncludesRunId, "approval command script should include run id");
5765+
Assert(materialization.IncludesAllCommands, "approval command script should include every command");
5766+
}
5767+
finally
5768+
{
5769+
DeleteTempEvidenceRoot(tempRoot);
5770+
}
5771+
}
5772+
5773+
static void SigtranCommercialEvidenceApprovalHandoffStatusSummarizesPendingFinalValidation()
5774+
{
5775+
IReadOnlyList<string> capabilities = SigtranCommercialEvidenceApprovalHandoffStatus.GetCompletedCapabilities();
5776+
IReadOnlyList<string> blockers = SigtranCommercialEvidenceApprovalHandoffStatus.GetDefaultBlockers();
5777+
5778+
AssertEqual(9, SigtranCommercialEvidenceApprovalHandoffStatus.CompletedUnitCount, "approval handoff completed unit count");
5779+
AssertEqual(9, capabilities.Count, "approval handoff capability count");
5780+
Assert(capabilities.Contains("command-materialization"), "approval handoff status should include command materialization");
5781+
Assert(!capabilities.Contains("documentation"), "approval handoff status should keep documentation pending before final validation");
5782+
Assert(SigtranCommercialEvidenceApprovalHandoffStatus.ApprovalHandoffFoundationReady, SigtranCommercialEvidenceApprovalHandoffStatus.Describe());
5783+
Assert(!SigtranCommercialEvidenceApprovalHandoffStatus.RealApprovedCommercialRunReady, SigtranCommercialEvidenceApprovalHandoffStatus.Describe());
5784+
Assert(!SigtranCommercialEvidenceApprovalHandoffStatus.PackagePublicationReady, SigtranCommercialEvidenceApprovalHandoffStatus.Describe());
5785+
Assert(blockers.Contains("real-approved-commercial-run-required"), "approval handoff status should require a real approved run");
5786+
Assert(blockers.Contains("status-final-validation-pending"), "approval handoff status should keep final validation pending");
5787+
}
5788+
57445789
static SigtranCommercialEvidencePublicationHandoffGateResult CreateReadyCommercialEvidencePublicationHandoffGateResult(string tempRoot)
57455790
{
57465791
return SigtranCommercialEvidencePublicationHandoffGates.Evaluate(

0 commit comments

Comments
 (0)