Skip to content

AIFACTORY-FEAT-116: Workflow definition: Release promotion

Generated from the architecture model

This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.

A design artefact, not a tracker

This backlog is generated from model/backlog/ and validated against the architecture model. No work item exists in any tracker, and no item carries a date, an estimate or an assignee (ADR-0029).

Epic Factory assets: workflow definitions, agents and skills · Increment I2 Deliver it · State elaborated · Route solution-architect · Build order 105 of 185 (Factory code)

The workflow definition release as a published asset: Promotes a milestone-validated release through the environments: verifies readiness, promotes to staging, bakes against the guards, waits for the production approval, promotes and verifies; a failed verification requests the rollback. It has 6 steps, names the agents deployment-orchestrator, devops-engineer, release-manager and the tools none, and is executed by WorkflowEngineService under Run Control.

Delivers —
Stubs —
Realizes workflows: release
adrs: ADR-0014, ADR-0017, ADR-0027
Requirements FR-05, FR-06, FR-10, FUX-05, XL-10, XL-11
Depends on AIFACTORY-FEAT-189 AgentRegistryService: the publication path of releases from I2
Sources model/workflows/release.yaml

Scenarios to trace (7, catalog): SCN-release-001 ✓, SCN-release-007 ✓, SCN-release-002 ✓, SCN-release-003 ✓, SCN-release-005 ✓, SCN-release-004 ✓, SCN-release-006 ✓

AIFACTORY-US-029: A release moves to production through staging, a bake and my approval

behavior · persona reviewer As a reviewer, I want a release to pass staging and a bake period before I am asked to approve production, so that I decide on evidence, and a failed production promotion requests the rollback of the previous version.

The integration PBI of the definition release. When ReleaseService publishes ReleaseReady for a product release and PipelineExecutionService publishes PipelineRunCompleted in state Succeeded or PartiallySucceeded for the same project, WorkflowEngineService satisfies the two required readiness members release (release-manifest-v1, versioned on the release version) and pipeline-results (artifact-v1, hashed on the commit). It submits the run itself through SubmitRun of RunControlService with a service token that names the project and the bundle idempotency key (D131): the same release version returns the existing run and a newer member supersedes the open correlation. Run Control accepts the run and publishes RunAccepted; the engine loads the Published release of the definition that the run pinned through AgentRegistryService and marks the seven steps ready in the declared order: verify-readiness, the condition check-readiness, promote-staging, bake, promote-production, approve-production and verify, with the agents release-manager, devops-engineer and deployment-orchestrator on their pinned releases. A negative readiness verdict stops the release at check-readiness, before promote-staging, and nothing is promoted (D133). promote-production requests the production promotion, which opens the gate of EnvironmentPromotionService; approve-production opens no approval of its own: a person gives one production approval, that gate bound to the release id and the production environment, and the step waits on it, so the promotion is handed off to production only after the approval (D133, D139). Every step records exactly one outcome and the run reports exactly one outcome to Run Control (ADR-0014). A failed production promotion compensates by requesting the rollback, and verify declares Compensate because it follows the effect of promote-production, so a failed verification compensates that confirmed effect with the same rollback (D133); a rollback is a new promotion of the previous release that skips the approval gate (D135). Before any run, the definition release and the agent releases of its three agents, with any skill, tool or model profile release they need that is not yet Published, are submitted through SubmitRelease and published through PublishRelease of AgentRegistryService (feature agent-registry-service-publication); each publication is approved by a Reviewer who is not the submitter, a Platform admin for a model profile release, no evaluation verdict is required before I4, and the runs pin the Published release, never a Draft one (D140). The step behaviour is specified in AIFACTORY-US-1190 to AIFACTORY-US-1193; this PBI proves the chain on the recorded fixture.

Acceptance criteria

AC1 Given ReleaseService/ReleaseReady and PipelineExecutionService/PipelineRunCompleted in state Succeeded for the same project and tenant, when both required members are satisfied, then WorkflowEngineService/ReadinessRunSubmitted is emitted once and the run is submitted through RunControlService/SubmitRun with a service token naming the project (D131); a repeated ReleaseReady for the same version returns the existing run.
AC2 Given the Published release of the definition release, submitted through AgentRegistryService/SubmitRelease and published through AgentRegistryService/PublishRelease after an approval by a Reviewer who is not the submitter (D140), with its 7 steps, input mappings, retry policies, timeouts, the failure policy of each agent and human step, the condition of check-readiness, the waits_on block of approve-production, the idempotency_key of promote-staging and the compensation of promote-production exactly as in model/workflows/release.yaml, when RunControlService/RunAccepted arrives for a run that pinned it, then WorkflowEngineService/WorkflowRunStarted is emitted and release/verify-readiness, release/check-readiness, release/promote-staging, release/bake, release/promote-production, release/approve-production and release/verify become ready in that order, each agent step on the pinned Published release of its agent, and no Draft release is loaded (D139).
AC3 Given every step succeeds, when the run completes, then promotion-evidence (artifact-v1) is the run output, WorkflowEngineService/WorkflowRunCompleted is emitted once and RunControlService/RunCompleted follows exactly once (ADR-0014).
AC4 Given release/promote-production fails under its failure_policy Compensate, when the engine applies it, then WorkflowEngineService/CompensationStarted is emitted, the rollback to the previous release is requested with the evidence recorded and RunControlService/RunFailed is published exactly once; given release/verify fails after release/promote-production succeeded, then the engine compensates under the failure_policy Compensate of verify, WorkflowEngineService/CompensationStarted is emitted, the compensation of promote-production requests the rollback to the previous release, WorkflowEngineService/WorkflowRunFailed names verify with compensated true and RunControlService/RunFailed follows once; given release/check-readiness finds a negative verdict, then WorkflowEngineService/WorkflowRunFailed names check-readiness and nothing is promoted (D133, D135, ADR-0014, ADR-0017).
AC5 Given the recorded fixture inputs of model/workflows/release.yaml, when the fixture run executes in the pipeline, then its outputs match the recorded ones field by field and the run stays within the declared budget (ADR-0024).
Traces: services WorkflowEngineService, RunControlService, ReleaseService, PipelineExecutionService, EnvironmentPromotionService, AgentRegistryService
Traces: workflows release
Traces: steps release/verify-readiness, release/check-readiness, release/promote-staging, release/bake, release/approve-production, release/promote-production, release/verify
Traces: agents release-manager, devops-engineer, deployment-orchestrator
Traces: apis RunControlService/SubmitRun, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease
Traces: events AgentRegistryService/AssetReleasePublished, ReleaseService/ReleaseReady, PipelineExecutionService/PipelineRunCompleted, WorkflowEngineService/ReadinessRunSubmitted, WorkflowEngineService/WorkflowRunStarted, WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, WorkflowEngineService/CompensationStarted, RunControlService/RunAccepted, RunControlService/RunCompleted, RunControlService/RunFailed
Traces: descriptors workflow-definition-v1, readiness-bundle-v1, release-manifest-v1, artifact-v1
Traces: adrs ADR-0014, ADR-0017, ADR-0024, ADR-0027
Traces: requirements FR-05, FR-06, FR-10, FUX-05, XL-10, XL-11
Depends on AIFACTORY-US-1190, AIFACTORY-US-1191, AIFACTORY-US-1192, AIFACTORY-US-1193, feature:release-service, feature:pipeline-execution-service-complete, feature:workflow-engine-service, feature:run-control-service, feature:agent-registry-service-thin, feature:agent-registry-service-publication
Sources model/workflows/release.yaml, docs/planes/agent-runtime/workflow-definitions/release.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-339 Readiness start on a ready release and its pipeline results implementation The release run starts once per release version when ReleaseReady and PipelineRunCompleted are both satisfied, through SubmitRun with a service token naming the project, and a newer member version supersedes the open correlation (AC1 of AIFACTORY-US-029). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-278 Author, submit and publish the release of the workflow definition release with its agent releases implementation The release of release (workflow-definition-v1) authored with its 7 steps, input mappings, retry policies, timeouts, the condition of check-readiness, the failure policy of each agent and human step (Compensate on promote-production and verify), the waits_on block of approve-production on the promotion gate of EnvironmentPromotionService, the idempotency_key releaseId + staging of promote-staging and the compensation of promote-production exactly as in model/workflows/release.yaml and accepted by ValidateWorkflowDefinition; it is submitted through SubmitRelease of AgentRegistryService together with the agent releases deployment-orchestrator, devops-engineer and release-manager of AIFACTORY-TASK-279 and any skill, tool or model profile release of their closure that is not yet Published, each publication is approved, through the approval that RunControlService opens with the subject kind asset-release, by a Reviewer who is not the submitter (a Platform admin for a model profile release), and each release is published through PublishRelease with the alias latest moved to it (feature agent-registry-service-publication, D140); no evaluation verdict is required before I4, and the Published release ids are recorded for the fixture run, which pins them. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-279 Author the agent releases deployment-orchestrator, devops-engineer, release-manager with their prompts and skills implementation Draft releases of deployment-orchestrator, devops-engineer and release-manager with their instructions, the skills release-manager-verify-readiness, devops-engineer-promote-staging, deployment-orchestrator-promote-production and release-manager-verify among their bound skills, tool bindings and model profiles of model/agents/devops-delivery/; each release passes a smoke run on a fixture input in the template tests and is submitted for publication by AIFACTORY-TASK-278, and no evaluation verdict of the suite devops-delivery-core-v1 is required for its publication before I4 (D140). ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-280 Fixture run of release against recorded inputs verification The definition runs end to end on a fixture release and pipeline run in the acceptance environment from the readiness start to RunCompleted on the Published releases of AIFACTORY-TASK-278; every step output validates against its descriptor (AC2, AC3 and AC5 of AIFACTORY-US-029). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-736 Verify release-through-environments by running the declared command verification Run dotnet test -c Release --filter Category=WorkflowFixture; it passes and proves AC1 to AC5 of AIFACTORY-US-029, including the compensation path of a failed production promotion, the compensated failed verification and the stop at check-readiness of AC4; the output names the Published release ids of the definition release, deployment-orchestrator, devops-engineer and release-manager that the run pinned, as AgentRegistryService/GetRelease reports them with their approval by a Reviewer who is not the submitter (D140). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1190: The Release Manager verifies readiness, a negative verdict stops the release, and the DevOps Engineer requests the staging promotion

behavior · persona reviewer As a reviewer of the project, I want the readiness of a release verified from its bill of materials, attestations, gates and open findings, a release judged not ready stopped, and a ready release promoted to staging once, so that nothing reaches staging or production on a negative readiness verdict.

The first two agent steps of release and the condition between them. When the engine marks verify-readiness ready it resolves pipeline-results from input.pipeline-results and release from input.release (release-manifest-v1); the release-manager release runs the skill release-manager-verify-readiness in read class with knowledge-search and read-range and writes readiness (artifact-v1): the verdict over the software bill of materials, the attestations, the gates and the open findings of the release, with the member passed. The step declares failure_policy Retry with the exponential budget of 3 attempts. The engine then evaluates the condition check-readiness, steps.verify-readiness.readiness.passed == true, over the recorded output without a service call, within PT1M and without a retry. A negative verdict stops the release before promote-staging: the definition declares no false branch, so the run fails with the readiness verdict as its evidence and nothing is promoted (D133); a missing or unreadable verdict fails the condition the same way instead of being read as passed. When it holds, promote-staging becomes ready and receives release and readiness from steps.verify-readiness.readiness; the devops-engineer release runs the skill devops-engineer-promote-staging in shared-write class with its bound tools list-files, search-text, search-symbols, find-references, read-range, get-dependencies, get-git-diff, knowledge-search, write-file, propose-change-set, mcp-azure-devops and mcp-github, and returns staging-promotion (artifact-v1). The definition says the step requests the staging promotion through EnvironmentPromotionService, but none of those tools reaches that service, and the only tool that does, deploy-environment, is production class above the shared-write class of the step; this is reported as an open question, so this PBI asserts the recorded staging-promotion artifact and its mappings only. The step declares failure_policy Retry with idempotency_key releaseId + staging, so a Failed attempt of failure class transient is retried under the exponential budget of 3 attempts with backoff 30s (D114); an attempt of any other failure class is not retried, and an Uncertain attempt goes to an operator decision of the project (D119). Either step that exceeds PT30M or spends its budget fails the run, and neither step has a compensation.

Acceptance criteria

AC1 Given a run accepted with release and pipeline-results, when release-manager executes release/verify-readiness, then readiness (artifact-v1) is recorded once under the run envelope with the verdict over the bill of materials, the attestations, the gates and the open findings (SCN-release-001).
AC2 Given steps.verify-readiness.readiness is recorded with passed false, or is missing or unreadable, or the evaluation exceeds PT1M, when the engine evaluates release/check-readiness, then the condition is not retried, WorkflowEngineService/WorkflowRunFailed names check-readiness with the verdict as evidence, release/promote-staging never becomes ready and nothing is promoted; given passed true, then the condition completes with exactly one outcome and release/promote-staging becomes ready (SCN-release-007, D133).
AC3 Given release/check-readiness held, when devops-engineer executes release/promote-staging with release from input.release and readiness from steps.verify-readiness.readiness, then staging-promotion (artifact-v1) is recorded once under the run envelope and release/bake becomes ready (SCN-release-002).
AC4 Given an attempt of release/promote-staging settles Failed with failure class transient, when Run Control evaluates the step, then it is retried under the exponential budget of 3 attempts because the step declares idempotency_key releaseId + staging, no second staging-promotion is recorded, and an Uncertain attempt is not retried and waits for an operator decision (SCN-release-002, D114).
AC5 Given an attempt of either agent step spends its budget, settles Failed with a non-transient failure class or exceeds PT30M, when Run Control settles the step through RunControlService/StepSettled, then WorkflowEngineService/WorkflowRunFailed names the step and production is never asked for (SCN-release-001, SCN-release-002, ADR-0014).
Traces: workflows release
Traces: steps release/verify-readiness, release/check-readiness, release/promote-staging
Traces: agents release-manager, devops-engineer
Traces: services WorkflowEngineService, RunControlService
Traces: events RunControlService/StepSettled, WorkflowEngineService/WorkflowRunFailed
Traces: descriptors release-manifest-v1, artifact-v1
Traces: scenarios SCN-release-001, SCN-release-007, SCN-release-002
Traces: adrs ADR-0014, ADR-0017
Traces: requirements FR-10, XL-11
Depends on feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/release.yaml, model/skills/devops-delivery/release-manager-verify-readiness.yaml, model/skills/devops-delivery/devops-engineer-promote-staging.yaml, model/scenarios/release.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4744 Bind the verify-readiness and promote-staging skills, the readiness condition and the staging idempotency key implementation The steps verify-readiness and promote-staging of the Draft release run release-manager-verify-readiness and devops-engineer-promote-staging with the input mappings of model/workflows/release.yaml, the condition check-readiness reads steps.verify-readiness.readiness.passed == true with timeout PT1M and no false branch, and promote-staging depends on check-readiness and carries failure policy Retry with idempotency_key releaseId + staging. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4745 Fixture release with its expected readiness verdict and staging promotion fixture A recorded release manifest and pipeline results with the expected readiness verdict and the expected staging-promotion artifact, a second release whose verdict is negative with the expected failed run at check-readiness, plus a transient failure of the staging request, as the oracle of SCN-release-001, SCN-release-007 and SCN-release-002. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4746 Prove readiness verification and the staging promotion on the fixture verification A fixture run proves SCN-release-001, SCN-release-007 and SCN-release-002 (AC1 to AC5 of AIFACTORY-US-1190); a negative verdict ending in WorkflowRunFailed naming check-readiness with nothing promoted, one staging-promotion artifact per release under transient retries, an Uncertain attempt waiting for an operator decision and the exhaustion path ending in WorkflowRunFailed. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1191: The release bakes in staging for its declared window before production is asked for

behavior · persona reviewer As a reviewer of the project, I want the release to stay in staging for its bake window before the production approval is requested, so that I am never asked to approve a release that has not run in staging.

The bake timer of release. When promote-staging succeeded the engine marks bake ready: it is an engine timer in sandbox class with no agent, no tool and no attempt. The engine stores a durable timer entry for the bake window of PT2H, moves its projection of the run to WaitingForTimer and returns it to Running when the timer fires and TimerFired is emitted; a timer that fires after its step already advanced is a no-op, and a run cancelled while it waits ends Cancelled. Only then does promote-production become ready, so no production promotion, and with it no production approval of its gate, is requested before the bake window has passed (D139). The definition fails the run on a guard breach during the window, but no I2 service evaluates the guards: SloService is delivered in I4 and the timer step itself evaluates nothing. This PBI delivers the bake window, its ordering before the production approval and the cancellation branch; the breach branch of SCN-release-003 stays untraced, and whether the staging verification of EnvironmentPromotionService, with its SLO window, is the guard the bake relies on in I2 is reported as an open question. The step has no failure policy and no retry; it changes no shared system.

Acceptance criteria

AC1 Given release/promote-staging succeeded, when the engine reaches release/bake, then a durable timer entry for the bake window PT2H is stored, the run projection is WaitingForTimer and no attempt is dispatched (SCN-release-003).
AC2 Given the bake window is due, when the timer fires, then WorkflowEngineService/TimerFired is emitted once, the projection returns to Running and release/promote-production becomes ready; a second firing is a no-op (SCN-release-003, D139).
AC3 Given the run is cancelled while it waits, when RunControlService/RunCancelled is heard, then the projection ends Cancelled, the timer is not fired into a new step and no production approval is requested (SCN-release-003, ADR-0014).
Traces: workflows release
Traces: steps release/bake
Traces: services WorkflowEngineService
Traces: events WorkflowEngineService/TimerFired, RunControlService/RunCancelled
Traces: scenarios SCN-release-003
Traces: adrs ADR-0014, ADR-0017
Traces: requirements FR-10
Depends on AIFACTORY-US-1190, feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/release.yaml, model/services/agent-mesh/WorkflowEngineService.yaml, model/scenarios/release.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-340 Bake timer before the production approval implementation The timer step bake of the Draft release waits the bake window PT2H on a durable timer entry and only then makes promote-production ready, as model/workflows/release.yaml declares (SCN-release-003). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4747 Prove the bake window on the fixture verification A fixture run with a shortened bake window proves SCN-release-003 (AC1 to AC3 of AIFACTORY-US-1191); one TimerFired, a no-op second firing, promote-production ready only after the window, and a cancelled run that requests no approval. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1192: A reviewer approves production on the readiness evidence and the Deployment Orchestrator requests the promotion

behavior · persona reviewer As a reviewer of the project, I want to approve the production promotion of the exact release on its readiness evidence, and the promotion handed off to production only after my decision, so that production changes on a decision someone other than the requester took, with a rollback ready if it fails.

The production promotion and the production approval of release. A person gives one production approval: the approval gate of EnvironmentPromotionService, bound to the release id and the production environment (D133). The promotion is requested first and waits for that approval (D139). When bake fired the engine marks promote-production ready and resolves release from input.release; the deployment-orchestrator release runs the skill deployment-orchestrator-promote-production in production class and requests the production promotion through EnvironmentPromotionService with the tool deploy-environment; the promotion enters AwaitingApproval and its gate requests the approval through RequestApproval of RunControlService with the service identity of EnvironmentPromotionService, the subject kind promotion and the promotion id as subject id, of action class production, with the approver rule role Reviewer in project scope, where the requester never decides (ADR-0015, D18, D135); the step returns production-promotion (artifact-v1) naming the promotion. The engine then emits StepReady for the Human step approve-production, which opens no approval of its own: it declares waits_on the gate that promote-production opened, and the engine advances it when ApprovalDecided names that gate for the release id and the production environment. An approving decision completes the step with exactly one outcome and EnvironmentPromotionService hands the promotion off through PromotionApproved, so its saga applies and verifies only after the approval; a rejection, an expiry the on-expiry rule does not re-request, or the timeout P7D fails the step, and since the step declares failure_policy Fail the engine reports WorkflowRunFailed naming approve-production and Run Control publishes RunFailed once, with the staging promotion in place and nothing deployed to production. promote-production declares failure_policy Compensate and no retry, so a Failed attempt or a timeout PT30M is not retried and the compensation, which runs only once the effect of the step is confirmed, requests the rollback to the previous release and records the incident link. A rollback opens a new promotion of the previous release whose rollbackOfPromotionId names the failed one; it skips the approval gate, hands off through PromotionApproved like any promotion, and the failed promotion ends RolledBack with RollbackCompleted when the new one completes (D135). The identity a compensation calls RollbackPromotion with, a scope the Operator holds by role, is left to the owner as an open question. An Uncertain attempt goes to an operator decision of the project (D119).

Acceptance criteria

AC1 Given release/bake fired, when deployment-orchestrator executes release/promote-production, then one production promotion of input.release is requested through EnvironmentPromotionService/Promotions.Request, the promotion waits in AwaitingApproval, RunControlService/ApprovalRequested is published once for its gate with the subject kind promotion, action class production, the binding to the release id and the production environment and the approver rule role Reviewer that excludes the requester, and production-promotion (artifact-v1) is recorded once under the run envelope (SCN-release-005, ADR-0015, D133, D139).
AC2 Given release/promote-production succeeded, when release/approve-production becomes ready, then the engine opens no approval request of its own and no second production approval is requested; the step waits on the gate that promote-production opened, and nothing is handed off to production while it waits (SCN-release-004, D133, D139).
AC3 Given the step waits on the gate, when RunControlService/ApprovalDecided approves the gate for that release id and environment, then release/approve-production completes once and EnvironmentPromotionService/PromotionApproved hands the promotion off; when it rejects or expires the gate with no re-request left, or the step reaches P7D without a decision, then the step fails under failure_policy Fail, WorkflowEngineService/WorkflowRunFailed names approve-production, RunControlService/RunFailed follows once, nothing is deployed to production and the staging promotion stays in place (SCN-release-004, D119, D121).
AC4 Given an attempt of release/promote-production settles Failed or exceeds PT30M, when Run Control settles the step, then it is not retried, WorkflowEngineService/CompensationStarted is emitted and the compensation requests the rollback through EnvironmentPromotionService/RollbackPromotion, which opens a new promotion of the previous release that skips the approval gate and hands off through EnvironmentPromotionService/PromotionApproved, records the incident link, and WorkflowEngineService/WorkflowRunFailed names promote-production with compensated true; when EnvironmentPromotionService/PromotionFailed reports rolledBack true, the compensation records the existing rollback evidence and requests no second rollback; an Uncertain attempt waits for an operator decision (SCN-release-005, ADR-0014, D135).
AC5 Given the rollback promotion of the previous release completes, when EnvironmentPromotionService records its completion, then the failed promotion ends RolledBack, EnvironmentPromotionService/RollbackCompleted is published once naming the rollback promotion, and the previous release is the current release of production (SCN-release-005, D135).
Traces: workflows release
Traces: steps release/approve-production, release/promote-production
Traces: agents deployment-orchestrator
Traces: services WorkflowEngineService, RunControlService, EnvironmentPromotionService
Traces: aggregates RunControlService/ApprovalRequest, EnvironmentPromotionService/Promotion
Traces: apis EnvironmentPromotionService/Promotions.Request, EnvironmentPromotionService/RollbackPromotion
Traces: events RunControlService/ApprovalRequested, RunControlService/ApprovalDecided, RunControlService/RunFailed, EnvironmentPromotionService/PromotionApproved, EnvironmentPromotionService/PromotionFailed, EnvironmentPromotionService/RollbackCompleted, WorkflowEngineService/WorkflowRunFailed, WorkflowEngineService/CompensationStarted
Traces: descriptors release-manifest-v1, artifact-v1, approval-request-v1
Traces: scenarios SCN-release-004, SCN-release-005
Traces: adrs ADR-0014, ADR-0015, ADR-0017
Traces: requirements FR-10, FUX-05, XL-11
Depends on AIFACTORY-US-1191, feature:environment-promotion-service, feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/release.yaml, model/skills/devops-delivery/deployment-orchestrator-promote-production.yaml, model/tools/deploy-environment.yaml, model/scenarios/release.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-341 Production step waiting on the promotion gate and the guarded production promotion implementation The agent step promote-production requests the production promotion first, and the human step approve-production that follows opens no approval of its own and waits on the promotion gate of EnvironmentPromotionService with subject kind promotion, bound to the release id and the production environment, failing under failure policy Fail on a rejected or expired gate, and promote-production carries failure policy Compensate with the rollback compensation that opens a new promotion of the previous release, exactly as model/workflows/release.yaml declares. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4748 Fixture production decisions and promotion outcomes fixture Recorded approving, rejecting and expiring decisions of the promotion gate bound to the release id and the production environment, a decision attempted by the requester, and a succeeding, a failing and an Uncertain production promotion with the expected rollback promotion and RollbackCompleted, as the oracle of SCN-release-004 and SCN-release-005. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4749 Prove the production approval and the production promotion on the fixture verification A fixture run proves SCN-release-004 and SCN-release-005 (AC1 to AC5 of AIFACTORY-US-1192); no approval request opened by the engine, the requester refused as decider, one production promotion requested before the waiting step and handed off only after an approving gate decision, the rejecting and expiring decisions ending in WorkflowRunFailed naming approve-production and RunFailed once, the rollback compensation as a new promotion of the previous release without approval, the failed promotion ending RolledBack with RollbackCompleted, and no second rollback when PromotionFailed reports rolledBack true. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1193: The Release Manager verifies the production promotion and records the evidence, and a failed verification rolls production back

behavior · persona reviewer As a reviewer of the project, I want the production promotion verified on health and smoke results and the evidence recorded, and a failed verification answered by a rollback to the previous release, so that every production promotion ends either verified with evidence or rolled back with the evidence of the failure.

The last agent step of release. When approve-production completed on the approved gate and the promotion was handed off (D139), the engine marks verify ready and resolves pipeline-results from input.pipeline-results, release from input.release and production-promotion from steps.promote-production.production-promotion. The release-manager release runs the skill release-manager-verify in read class with knowledge-search and read-range: it reads the health and smoke results of the promotion and writes promotion-evidence (artifact-v1), which is the run output and is recorded once under the run envelope. When the verification holds the run completes with exactly one Completed outcome. The step follows the effect of promote-production and declares failure_policy Compensate (D133): a Failed attempt of failure class transient is retried under the declared exponential budget of 3 attempts with backoff 30s, while any other failure class, a failed verification included, is not retried. When the step settles Failed on a failed verification, a timeout PT30M or a spent budget, the engine moves the run to Compensating and emits CompensationStarted; the compensations of the succeeded steps run in reverse order, and since the effect of promote-production is confirmed its compensation requests the rollback to the previous release, which opens a new promotion of that release without an approval (D135), and records the incident link. WorkflowRunFailed names verify with compensated true and RunFailed follows once; the evidence of the failure stays recorded.

Acceptance criteria

AC1 Given release/promote-production succeeded and release/approve-production completed, when the engine marks release/verify ready, then pipeline-results, release and production-promotion are resolved from the mappings of model/workflows/release.yaml and release-manager executes the step on its pinned release (SCN-release-006).
AC2 Given health and smoke results pass, when the step returns promotion-evidence, then the output is recorded once under the run envelope, WorkflowEngineService/WorkflowRunCompleted is emitted once and the run output is set (SCN-release-006, ADR-0014).
AC3 Given the verification fails, or an attempt exceeds PT30M or spends the exponential budget of 3 attempts, when Run Control settles the step Failed, then the engine emits WorkflowEngineService/CompensationStarted, the compensation of release/promote-production requests the rollback through EnvironmentPromotionService/RollbackPromotion, WorkflowEngineService/WorkflowRunFailed names verify with compensated true and RunControlService/RunFailed follows once; the evidence of the failure stays recorded (SCN-release-006, D133, ADR-0014).
Traces: workflows release
Traces: steps release/verify, release/promote-production
Traces: agents release-manager
Traces: services WorkflowEngineService, EnvironmentPromotionService
Traces: apis EnvironmentPromotionService/RollbackPromotion
Traces: events WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, WorkflowEngineService/CompensationStarted, RunControlService/RunFailed
Traces: descriptors artifact-v1
Traces: scenarios SCN-release-006
Traces: adrs ADR-0014, ADR-0017
Traces: requirements FR-10, XL-10
Depends on AIFACTORY-US-1192, feature:environment-promotion-service, feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/release.yaml, model/skills/devops-delivery/release-manager-verify.yaml, model/scenarios/release.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4750 Bind the verify skill and map the run output implementation The step verify of the Draft release runs release-manager-verify with pipeline-results, release and production-promotion mapped as in model/workflows/release.yaml, and promotion-evidence is set as the run output. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4751 Fixture passing and failing verifications fixture Recorded health and smoke results of a verified and of a failed production promotion with the expected promotion-evidence and the expected failed run with compensated true and one rollback request, as the oracle of SCN-release-006. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4752 Prove the verification and the failed verification on the fixture verification A fixture run proves SCN-release-006 (AC1 to AC3 of AIFACTORY-US-1193); the evidence recorded once and the run completed, and a failed verification that emits CompensationStarted, requests one rollback of promote-production and ends the run Failed with WorkflowRunFailed naming verify with compensated true and RunFailed once. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService