Skip to content

Commit 1dfa98f

Browse files
committed
Add commercial evidence execution retry policy
1 parent 1dbc381 commit 1dfa98f

7 files changed

Lines changed: 219 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ The first production milestone is M3UA over a transport abstraction. SCCP, TCAP,
7272
| Supply-chain release execution | Phase 34 foundation-complete: final versioned SBOM, trusted timestamped package signing, provenance attestation, public API diff, artifact upload, ordered command-plan, release promotion gate, concrete workflow execution, status reporting, and final validation are available; retained release-run artifacts and commercial evidence are still required |
7373
| RC publish and commercial gate | Phase 35 complete: dry-run release rehearsal, gated NuGet prerelease publication, retained release notes, retained migration notes, final commercial readiness reporting, RC/stable decisioning, RC publication evidence manifest, release workflow channel wiring, status reporting, and final commercial gate report are available; stable publication remains blocked until commercial evidence is complete |
7474
| Commercial evidence readiness lockdown | Phase 36 foundation-complete: release target locking, protected secret readiness, evidence retention mapping, commercial evidence checklist, release preflight, protected release environments, dossier handoff, go/no-go gating, status reporting, and final validation are available; RC and stable publication remain blocked until retained commercial release evidence is complete |
75-
| Commercial evidence execution orchestration | Phase 37 in progress: evidence execution run identity, stage catalog, operator command plan, execution environment contract, artifact collection manifest, digest/redaction verification, and blocker classification are available; retry/resume and status reporting are still being implemented |
75+
| Commercial evidence execution orchestration | Phase 37 in progress: evidence execution run identity, stage catalog, operator command plan, execution environment contract, artifact collection manifest, digest/redaction verification, blocker classification, and retry/resume policy are available; status reporting is still being implemented |
7676

7777
## Requirements
7878

docs/PHASE37_COMMERCIAL_EVIDENCE_EXECUTION_ORCHESTRATION.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ This plan keeps evidence review auditable and prevents sensitive telecom traces
9292

9393
Each blocker declares whether it is retryable after correction. Unknown blockers are not retried automatically and require manual triage.
9494

95+
## Unit 8 - Retry And Resume Policy
96+
97+
`SigtranCommercialEvidenceExecutionRetryPolicies` maps blocker kinds to retry decisions:
98+
99+
- Environment, command, external peer, artifact, digest, and redaction blockers can be retried within bounded attempt counts.
100+
- Native SCTP host blockers, protected approval blockers, unknown blockers, and failed preflight blockers require manual correction.
101+
- Retry decisions include the stage identifier where execution should resume.
102+
103+
The policy prevents endless retries and keeps host capability, approval, and unknown failures under operator control.
104+
95105
## Validation
96106

97107
Each unit in this phase is validated with:

docs/PHASE37_SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Phase 37 prepares the SDK to execute real commercial evidence runs after readine
1111
- Artifact collection manifest that maps checklist artifacts to known stage roots and retained output paths.
1212
- Digest and redaction verification plan for every retained execution artifact.
1313
- Execution blocker classifier for readiness, environment, command, native SCTP, external peer, artifact, digest, redaction, and approval failures.
14+
- Retry and resume policy with bounded retries and manual-correction gates for non-retryable failures.
1415

1516
## Readiness Position
1617

17-
The phase is in progress. Execution orchestration still requires retry/resume policy, status reporting, and final validation.
18+
The phase is in progress. Execution orchestration still requires status reporting and final validation.

docs/PHASE_INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This index is the complete phase map for Sigtran.NET. It links each phase to the
4141
| 34 | Supply-chain release execution | [Phase 34 Supply Chain Release Execution](PHASE34_SUPPLY_CHAIN_RELEASE_EXECUTION.md), [Phase 34 Summary](PHASE34_SUMMARY.md) | Foundation complete; retained release run pending |
4242
| 35 | RC publish and commercial gate | [Phase 35 RC Publish And Commercial Gate](PHASE35_RC_PUBLISH_COMMERCIAL_GATE.md), [Phase 35 Summary](PHASE35_SUMMARY.md), [Phase 35 Commercial Gate Report](PHASE35_COMMERCIAL_GATE_REPORT.md) | RC gate foundation complete; stable publication blocked |
4343
| 36 | Commercial evidence readiness lockdown | [Phase 36 Commercial Evidence Readiness Lockdown](PHASE36_COMMERCIAL_EVIDENCE_READINESS_LOCKDOWN.md), [Phase 36 Summary](PHASE36_SUMMARY.md) | Foundation complete; real commercial evidence still required |
44-
| 37 | Commercial evidence execution orchestration | [Phase 37 Commercial Evidence Execution Orchestration](PHASE37_COMMERCIAL_EVIDENCE_EXECUTION_ORCHESTRATION.md), [Phase 37 Summary](PHASE37_SUMMARY.md) | In progress; blocker classifier complete |
44+
| 37 | Commercial evidence execution orchestration | [Phase 37 Commercial Evidence Execution Orchestration](PHASE37_COMMERCIAL_EVIDENCE_EXECUTION_ORCHESTRATION.md), [Phase 37 Summary](PHASE37_SUMMARY.md) | In progress; retry/resume policy complete |
4545

4646
## Current Commercial Gate
4747

docs/SDK_ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Status: Phase 36 is foundation-complete. The release target lock binds an RC ver
331331
- Define execution stages, operator commands, environment contracts, artifact collection, digest and redaction verification, blocker handling, retry/resume behavior, and execution status.
332332
- Keep the phase separate from real passing evidence: orchestration can prepare a run, but publication remains blocked until retained artifacts prove execution success.
333333

334-
Status: Phase 37 is in progress. Evidence execution run identity now binds a locked release target to a stable run id, operator identity, UTC start time, and run-scoped artifact root. The stage catalog now covers readiness preflight, native SCTP lab, external peer interoperability, protocol validation, performance benchmark, supply-chain evidence, release workflow dry-run, and dossier assembly with run-scoped artifact roots. The operator command plan now maps every stage to an ordered run-id-aware command and requires protected approval for supply-chain, workflow, and dossier assembly execution. The environment contract now binds run identity, lab inputs, and protected secrets while preventing fixed secret values from being stored. Artifact collection now maps all checklist artifacts to known stage roots and retained output paths. Digest and redaction verification now requires digest coverage for every artifact and redaction review for trace-bearing evidence. Blocker classification now categorizes readiness, environment, command, native SCTP, external peer, artifact, digest, redaction, and approval failures with retryability guidance. Retry/resume, status reporting, and final validation remain in progress.
334+
Status: Phase 37 is in progress. Evidence execution run identity now binds a locked release target to a stable run id, operator identity, UTC start time, and run-scoped artifact root. The stage catalog now covers readiness preflight, native SCTP lab, external peer interoperability, protocol validation, performance benchmark, supply-chain evidence, release workflow dry-run, and dossier assembly with run-scoped artifact roots. The operator command plan now maps every stage to an ordered run-id-aware command and requires protected approval for supply-chain, workflow, and dossier assembly execution. The environment contract now binds run identity, lab inputs, and protected secrets while preventing fixed secret values from being stored. Artifact collection now maps all checklist artifacts to known stage roots and retained output paths. Digest and redaction verification now requires digest coverage for every artifact and redaction review for trace-bearing evidence. Blocker classification now categorizes readiness, environment, command, native SCTP, external peer, artifact, digest, redaction, and approval failures with retryability guidance. Retry/resume now applies bounded retries and manual-correction gates for non-retryable failures. Status reporting and final validation remain in progress.
335335

336336
## Recommended First Deliverable
337337

src/Sigtran.NET.Tests/Program.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@
285285
Run("SIGTRAN commercial evidence execution artifact manifest covers retained outputs", SigtranCommercialEvidenceExecutionArtifactManifestCoversRetainedOutputs);
286286
Run("SIGTRAN commercial evidence execution verification requires digests and redaction", SigtranCommercialEvidenceExecutionVerificationRequiresDigestsAndRedaction);
287287
Run("SIGTRAN commercial evidence execution blocker classifier categorizes failures", SigtranCommercialEvidenceExecutionBlockerClassifierCategorizesFailures);
288+
Run("SIGTRAN commercial evidence execution retry policy gates resume decisions", SigtranCommercialEvidenceExecutionRetryPolicyGatesResumeDecisions);
288289
Run("SIGTRAN status capabilities use domain documentation labels", SigtranStatusCapabilitiesUseDomainDocumentationLabels);
289290
Run("Native SCTP platform probe reports socket creation capability", NativeSctpPlatformProbeReportsSocketCreationCapability);
290291
Run("Native SCTP socket factory creates or reports unsupported platform", NativeSctpSocketFactoryCreatesOrReportsUnsupportedPlatform);
@@ -4733,6 +4734,35 @@ static void SigtranCommercialEvidenceExecutionBlockerClassifierCategorizesFailur
47334734
Assert(!unknown.Retryable, "unknown blocker should not be automatically retried");
47344735
}
47354736

4737+
static void SigtranCommercialEvidenceExecutionRetryPolicyGatesResumeDecisions()
4738+
{
4739+
SigtranCommercialEvidenceExecutionRun run = SigtranCommercialEvidenceExecutionRuns.CreateReleaseCandidateRun(
4740+
"1.0.0-rc.1",
4741+
"abcdef123456",
4742+
"run-20260622-001",
4743+
"release-automation",
4744+
DateTimeOffset.UtcNow);
4745+
SigtranCommercialEvidenceExecutionStageCatalog catalog = SigtranCommercialEvidenceExecutionStages.CreateDefault(run);
4746+
SigtranCommercialEvidenceExecutionRetryPolicy policy = SigtranCommercialEvidenceExecutionRetryPolicies.CreateDefault(catalog);
4747+
SigtranCommercialEvidenceExecutionBlockerClassifier classifier = SigtranCommercialEvidenceExecutionBlockers.CreateDefault();
4748+
SigtranCommercialEvidenceExecutionRetryDecision peerRetry = policy.Decide(classifier.Classify("external-peer-unavailable"), attemptCount: 1);
4749+
SigtranCommercialEvidenceExecutionRetryDecision peerExhausted = policy.Decide(classifier.Classify("external-peer-unavailable"), attemptCount: 3);
4750+
SigtranCommercialEvidenceExecutionRetryDecision nativeSctp = policy.Decide(classifier.Classify("native-sctp-unavailable"), attemptCount: 0);
4751+
SigtranCommercialEvidenceExecutionRetryDecision unknown = policy.Decide(classifier.Classify("operator-note-required"), attemptCount: 0);
4752+
4753+
Assert(policy.IsReady, policy.Describe());
4754+
Assert(policy.CoversKnownBlockers, "retry policy should cover known blocker kinds");
4755+
Assert(policy.UsesKnownResumeStages, "retry policy should resume from known stages");
4756+
Assert(policy.ProtectsNonRetryableFailures, "retry policy should protect non-retryable failures");
4757+
Assert(peerRetry.CanRetry, "external peer blocker should be retryable before exhaustion");
4758+
Assert(peerRetry.ResumeStageId == "external-peer-interop", "external peer retry should resume from peer stage");
4759+
Assert(!peerExhausted.CanRetry, "external peer retry should stop after max attempts");
4760+
Assert(peerExhausted.RequiresManualCorrection, "exhausted retry should require manual correction");
4761+
Assert(!nativeSctp.CanRetry, "native SCTP host blocker should not retry automatically");
4762+
Assert(nativeSctp.RequiresManualCorrection, "native SCTP blocker should require host correction");
4763+
Assert(!unknown.CanRetry, "unknown blockers should not retry automatically");
4764+
}
4765+
47364766
static void SigtranStatusCapabilitiesUseDomainDocumentationLabels()
47374767
{
47384768
IReadOnlyList<string>[] statusCapabilities =

0 commit comments

Comments
 (0)