Skip to content

Commit 11c81a1

Browse files
committed
Add commercial evidence filesystem command materialization status
1 parent fa0a80a commit 11c81a1

8 files changed

Lines changed: 259 additions & 4 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The first production milestone is M3UA over a transport abstraction. SCCP, TCAP,
7575
| Commercial evidence execution orchestration | Phase 37 foundation-complete: evidence execution run identity, stage catalog, operator command plan, execution environment contract, artifact collection manifest, digest/redaction verification, blocker classification, retry/resume policy, status reporting, and final validation are available; real retained execution artifacts are still required before commercial publication |
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 |
78-
| Commercial evidence filesystem execution | Phase 40 in progress: filesystem observation, manifest execution, verification report execution, artifact writing, ledger execution, seal execution, publication attachment execution, and promotion execution are available, 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, and evaluating reviewer-approved promotion gates; command materialization, status reporting, and final validation remain |
78+
| Commercial evidence filesystem execution | Phase 40 in progress: filesystem observation, manifest execution, verification report execution, artifact writing, ledger execution, seal execution, publication attachment execution, promotion execution, command materialization, and interim status reporting are available, 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; final validation remains |
7979

8080
## Requirements
8181

docs/PHASE40_COMMERCIAL_EVIDENCE_FILESYSTEM_EXECUTION.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ This unit connects sealed filesystem evidence to release dossier attachment plan
9797

9898
This unit makes the filesystem-backed evidence path promotion-aware while preserving the existing commercial approval gate.
9999

100+
## Unit 9 - Command Materialization And Interim Status
101+
102+
`SigtranCommercialEvidenceFileSystemCommandMaterializer` writes a retained shell script from the commercial evidence file verification command plan:
103+
104+
- Preserves deterministic command order.
105+
- Writes the script to a retained filesystem path.
106+
- Includes the configured artifact root.
107+
- Includes every command from the command plan.
108+
- Keeps the promotion gate command visible as the explicit approval step.
109+
110+
`SigtranCommercialEvidenceFileSystemExecutionStatus` reports the first nine completed filesystem execution capabilities and keeps `status-final-validation-pending` as a blocker until the final unit completes.
111+
100112
## Validation
101113

102114
Each unit in this phase is validated with:

docs/PHASE40_SUMMARY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Phase 40 prepares the SDK to run commercial evidence file verification against r
1212
- Integrity seal execution that signs the filesystem-backed ledger with a deterministic aggregate SHA-256 seal.
1313
- Publication attachment execution that creates release dossier attachments from the filesystem-backed seal and requires redaction approval for trace-bearing artifacts.
1414
- Promotion gate execution that evaluates filesystem-backed attachments with reviewer identity, UTC evaluation time, and explicit approval blockers.
15+
- Command materialization that writes the ordered commercial evidence file verification plan to a retained shell script.
16+
- Interim status reporting for nine completed filesystem execution units, with final validation still pending.
1517

1618
## Readiness Position
1719

18-
The phase is in progress. Filesystem observation, manifest execution, report execution, artifact writing, ledger execution, seal execution, publication attachment execution, and promotion execution are available. Command materialization, status reporting, and final validation remain.
20+
The phase is in progress. Filesystem observation, manifest execution, report execution, artifact writing, ledger execution, seal execution, publication attachment execution, promotion execution, command materialization, and interim status reporting are available. Final validation remains.

docs/PHASE_INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This index is the complete phase map for Sigtran.NET. It links each phase to the
4444
| 37 | Commercial evidence execution orchestration | [Phase 37 Commercial Evidence Execution Orchestration](PHASE37_COMMERCIAL_EVIDENCE_EXECUTION_ORCHESTRATION.md), [Phase 37 Summary](PHASE37_SUMMARY.md) | Foundation complete; real execution artifacts still required |
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 |
47-
| 40 | Commercial evidence filesystem execution | [Phase 40 Commercial Evidence Filesystem Execution](PHASE40_COMMERCIAL_EVIDENCE_FILESYSTEM_EXECUTION.md), [Phase 40 Summary](PHASE40_SUMMARY.md) | In progress; filesystem promotion execution complete |
47+
| 40 | Commercial evidence filesystem execution | [Phase 40 Commercial Evidence Filesystem Execution](PHASE40_COMMERCIAL_EVIDENCE_FILESYSTEM_EXECUTION.md), [Phase 40 Summary](PHASE40_SUMMARY.md) | In progress; command materialization and interim status complete |
4848

4949
## Current Commercial Gate
5050

docs/SDK_ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ Status: Phase 39 is foundation-complete. Retained file evidence item verificatio
355355
- Build verification manifests, reports, retained artifacts, ledger, seal, attachments, promotion gate, and command materialization from observed files.
356356
- Keep filesystem execution separate from commercial publication: helpers can verify real files, but publication remains blocked until retained evidence comes from an approved commercial run.
357357

358-
Status: Phase 40 is in progress. Filesystem observation now reads retained files from disk, computes real SHA-256 digests, records file existence and size, and maps observations into the retained file verification model. Filesystem manifest execution now observes every promotion handoff item, supports retained-path-to-local-path overrides, and builds retained file manifests from real observations. Filesystem verification report execution now evaluates those manifests and exposes retained file blockers from real files. Verification artifact writing now retains a Markdown report and tab-separated observation manifest on disk. Retention ledger execution now creates ledger entries from filesystem-backed verification reports and written artifacts. Integrity seal execution now seals filesystem-backed ledgers with deterministic aggregate SHA-256 digests. Publication attachment execution now creates release dossier attachments from the filesystem-backed seal and requires approved redaction state for trace-bearing artifacts. Promotion execution now evaluates filesystem-backed attachments through reviewer approval, UTC evaluation, and explicit blockers. Command materialization, status reporting, and final validation remain in progress.
358+
Status: Phase 40 is in progress. Filesystem observation now reads retained files from disk, computes real SHA-256 digests, records file existence and size, and maps observations into the retained file verification model. Filesystem manifest execution now observes every promotion handoff item, supports retained-path-to-local-path overrides, and builds retained file manifests from real observations. Filesystem verification report execution now evaluates those manifests and exposes retained file blockers from real files. Verification artifact writing now retains a Markdown report and tab-separated observation manifest on disk. Retention ledger execution now creates ledger entries from filesystem-backed verification reports and written artifacts. Integrity seal execution now seals filesystem-backed ledgers with deterministic aggregate SHA-256 digests. Publication attachment execution now creates release dossier attachments from the filesystem-backed seal and requires approved redaction state for trace-bearing artifacts. Promotion execution now evaluates filesystem-backed attachments through reviewer approval, UTC evaluation, and explicit blockers. Command materialization now writes the ordered execution plan to a retained shell script. Interim status reporting now tracks nine completed capabilities and keeps final validation pending. Final validation remains in progress.
359359

360360
## Recommended First Deliverable
361361

src/Sigtran.NET.Tests/Program.cs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@
313313
Run("SIGTRAN commercial evidence filesystem integrity seal matches ledger", SigtranCommercialEvidenceFileSystemIntegritySealMatchesLedger);
314314
Run("SIGTRAN commercial evidence filesystem publication attachments protect trace evidence", SigtranCommercialEvidenceFileSystemPublicationAttachmentsProtectTraceEvidence);
315315
Run("SIGTRAN commercial evidence filesystem promotion gate requires approval", SigtranCommercialEvidenceFileSystemPromotionGateRequiresApproval);
316+
Run("SIGTRAN commercial evidence filesystem command materializer writes execution script", SigtranCommercialEvidenceFileSystemCommandMaterializerWritesExecutionScript);
317+
Run("SIGTRAN commercial evidence filesystem execution status summarizes pending final validation", SigtranCommercialEvidenceFileSystemExecutionStatusSummarizesPendingFinalValidation);
316318
Run("SIGTRAN status capabilities use domain documentation labels", SigtranStatusCapabilitiesUseDomainDocumentationLabels);
317319
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
318320
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
@@ -5416,6 +5418,51 @@ static void SigtranCommercialEvidenceFileSystemPromotionGateRequiresApproval()
54165418
}
54175419
}
54185420

5421+
static void SigtranCommercialEvidenceFileSystemCommandMaterializerWritesExecutionScript()
5422+
{
5423+
string tempRoot = Path.Combine(Path.GetTempPath(), "sigtran-commercial-evidence-" + Guid.NewGuid().ToString("N"));
5424+
Directory.CreateDirectory(tempRoot);
5425+
5426+
try
5427+
{
5428+
SigtranCommercialEvidenceFileVerificationCommandPlan plan = SigtranCommercialEvidenceFileVerificationCommands.CreateDefault(
5429+
Path.Combine(tempRoot, "artifacts"));
5430+
string scriptPath = Path.Combine(tempRoot, "scripts", "commercial-evidence.sh");
5431+
5432+
SigtranCommercialEvidenceFileSystemCommandMaterialization materialization = SigtranCommercialEvidenceFileSystemCommandMaterializer.WriteScript(
5433+
plan,
5434+
scriptPath,
5435+
DateTimeOffset.UtcNow);
5436+
5437+
Assert(materialization.IsReady, materialization.Describe());
5438+
Assert(materialization.ScriptExists, "materialized command script should exist");
5439+
Assert(materialization.ScriptSizeBytes > 0, "materialized command script should be non-empty");
5440+
Assert(materialization.IncludesArtifactRoot, "materialized command script should include artifact root");
5441+
Assert(materialization.IncludesAllCommands, "materialized command script should include all commands");
5442+
Assert(materialization.IncludesPromotionGate, "materialized command script should include promotion gate");
5443+
}
5444+
finally
5445+
{
5446+
DeleteTempEvidenceRoot(tempRoot);
5447+
}
5448+
}
5449+
5450+
static void SigtranCommercialEvidenceFileSystemExecutionStatusSummarizesPendingFinalValidation()
5451+
{
5452+
IReadOnlyList<string> capabilities = SigtranCommercialEvidenceFileSystemExecutionStatus.GetCompletedCapabilities();
5453+
IReadOnlyList<string> blockers = SigtranCommercialEvidenceFileSystemExecutionStatus.GetDefaultBlockers();
5454+
5455+
AssertEqual(9, SigtranCommercialEvidenceFileSystemExecutionStatus.CompletedUnitCount, "filesystem execution completed unit count");
5456+
AssertEqual(9, capabilities.Count, "filesystem execution capability count");
5457+
Assert(capabilities.Contains("command-materialization"), "filesystem execution status should include command materialization");
5458+
Assert(!capabilities.Contains("documentation"), "filesystem execution status should keep documentation pending before final validation");
5459+
Assert(SigtranCommercialEvidenceFileSystemExecutionStatus.ExecutionFoundationReady, SigtranCommercialEvidenceFileSystemExecutionStatus.Describe());
5460+
Assert(!SigtranCommercialEvidenceFileSystemExecutionStatus.RealApprovedCommercialRunReady, SigtranCommercialEvidenceFileSystemExecutionStatus.Describe());
5461+
Assert(!SigtranCommercialEvidenceFileSystemExecutionStatus.CommercialPublicationReady, SigtranCommercialEvidenceFileSystemExecutionStatus.Describe());
5462+
Assert(blockers.Contains("real-approved-commercial-run-required"), "filesystem execution status should require a real approved run");
5463+
Assert(blockers.Contains("status-final-validation-pending"), "filesystem execution status should keep final validation pending");
5464+
}
5465+
54195466
static SigtranCommercialEvidenceFileSystemPublicationAttachmentExecution CreateReadyCommercialEvidenceFileSystemPublicationAttachmentExecution(string tempRoot)
54205467
{
54215468
return SigtranCommercialEvidenceFileSystemPublicationAttachments.Create(

0 commit comments

Comments
 (0)