Skip to content

AIFACTORY-FEAT-148: Workflow definition: Pipeline blueprint

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 I4 Trust and accountability · State elaborated · Route solution-architect · Build order 141 of 185 (Factory code)

The workflow definition pipeline-blueprint as a published asset: Builds the Pipeline Blueprint from the Module, Test and Security Blueprints: build, test, scan and packaging stages per module with their gates, and the artefacts a release takes; deployment stays a promotion and is not a pipeline stage. Validated against the DSL. It has 5 steps, names the agents devops-engineer and the tools blueprint-submit-version, blueprint-validate, and is executed by WorkflowEngineService under Run Control.

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

Scenarios to trace (6, catalog): SCN-pipeline-blueprint-001 ✓, SCN-pipeline-blueprint-002 ✓, SCN-pipeline-blueprint-003 ✓, SCN-pipeline-blueprint-004 ✓, SCN-pipeline-blueprint-005 ✓, SCN-pipeline-blueprint-006 ✓

AIFACTORY-US-094: The Pipeline blueprint workflow runs from its published definition

behavior · persona operator As an operator, I want the pipeline blueprint workflow to run from its published definition with the agents, tools and gates it declares, so that pipeline-blueprint, validation-receipt are produced the same way on every run, with evidence.

The integration PBI of the definition pipeline-blueprint, the producing definition of the Pipeline kind (ADR-0030). It is readiness-activated with three required members of one project, the validated Module, Test and Security Blueprints (BlueprintValidated with passed true and the matching kind). When all three are satisfied the ReadinessCorrelator of WorkflowEngineService submits exactly one run through SubmitRun of RunControlService with its service token naming the project, the code-agent model profile and the bundle idempotency key; a newer member version supersedes the open correlation. On RunAccepted the engine loads the Published release the run pinned through AgentRegistryService and marks the five steps ready in order: derive-stages and draft-pipeline-blueprint on the devops-engineer release, the tool steps submit-version and validate, and the condition check-valid, which loops back to the draft at most twice. Every agent and tool step declares failure_policy Retry; the shared-write step submit-version also declares idempotency_key documentHash, which is what lets its Retry hold under ADR-0014. The shared write is autonomous unless the project policy gates blueprint drafts, in which case the run waits for an approval (D64). Deployment stays a promotion and is never a pipeline stage. No step declares a compensation. The run reports exactly one outcome within its budget. Before any run, the definition release and the agent release of devops-engineer, 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. In I4 the evaluation gate of the complete delivery applies: where an evaluation suite exists for the asset kind, a release is published only with a passed evaluation record (ADR-0021), and a release of devops-engineer published in I2 without one is resubmitted through the gate as a new version; the runs pin the Published release, never a Draft one (D140). The step behaviour is specified in AIFACTORY-US-1244 to AIFACTORY-US-1246; this PBI proves the chain on the recorded fixture.

Acceptance criteria

AC1 Given the Published release of pipeline-blueprint, submitted through AgentRegistryService/SubmitRelease and published through AgentRegistryService/PublishRelease after an approval by a Reviewer who is not the submitter and with a passed evaluation record where an evaluation suite exists for its asset kind (ADR-0021, D140), carries the activation block, the 5 steps, input mappings, retry policies, timeouts, the on_false loop of check-valid, the failure_policy Retry of the four agent and tool steps and the idempotency_key documentHash of pipeline-blueprint/submit-version exactly as in model/workflows/pipeline-blueprint.yaml, when the last required member of an open WorkflowEngineService/ReadinessCorrelation is satisfied, then WorkflowEngineService/ReadinessSatisfied is published, one run is submitted through RunControlService/SubmitRun with the service token of the engine naming the project and the bundle idempotency key and WorkflowEngineService/ReadinessRunSubmitted names it; a repeated submission with the same key and body returns the same run; the same key with a different body is answered 409 by RunControlService/SubmitRun and the correlation becomes Superseded with reason conflict, publishing WorkflowEngineService/ReadinessSuperseded and no run; a newer member version publishes WorkflowEngineService/ReadinessSuperseded instead of a second run; and on RunControlService/RunAccepted WorkflowEngineService/WorkflowRunStarted is emitted and pipeline-blueprint/derive-stages, pipeline-blueprint/draft-pipeline-blueprint, pipeline-blueprint/submit-version, pipeline-blueprint/validate and pipeline-blueprint/check-valid become ready in that order on the pinned Published release of devops-engineer, and no Draft release is loaded.
AC2 Given every step succeeds and pipeline-blueprint/check-valid holds, when the run completes, then pipeline-blueprint (blueprint-pipeline-v1, the validated BlueprintVersion that steps.submit-version.version-ref names, D133) and validation-receipt (blueprint-validation-receipt-v1) are recorded as the run outputs under the run envelope, WorkflowEngineService/WorkflowRunCompleted is emitted once and RunControlService/RunCompleted follows exactly once (ADR-0014).
AC3 Given a step is settled Failed with its retry budget spent or with a failure class that is not retried, or pipeline-blueprint/check-valid reaches its iteration limit, when the engine applies the compensation policy of model/workflows/pipeline-blueprint.yaml, then WorkflowEngineService/WorkflowRunFailed names the failed step and the failure class, every Draft version created stays a Draft and RunControlService/RunFailed is published exactly once (recovery, not replay, ADR-0014).
AC4 Given the project policy gates blueprint drafts, when pipeline-blueprint/submit-version is reached, then the run waits WaitingForApproval on a RunControlService/ApprovalRequested that names the run as its subject and resumes only on the matching RunControlService/ApprovalDecided, exactly as AIFACTORY-US-1245 AC3 specifies the gate (ADR-0026, D64, D129).
AC5 Given the recorded fixture inputs of model/workflows/pipeline-blueprint.yaml, when the fixture run executes in the pipeline, then its outputs match the recorded ones field by field, every step output validates against its descriptor and the run stays within the declared budget (ADR-0024).
Traces: workflows pipeline-blueprint
Traces: steps pipeline-blueprint/derive-stages, pipeline-blueprint/draft-pipeline-blueprint, pipeline-blueprint/submit-version, pipeline-blueprint/validate, pipeline-blueprint/check-valid
Traces: agents devops-engineer
Traces: tools blueprint-submit-version, blueprint-validate
Traces: services WorkflowEngineService, RunControlService, AgentRegistryService
Traces: aggregates WorkflowEngineService/ReadinessCorrelation
Traces: apis RunControlService/SubmitRun, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease
Traces: events AgentRegistryService/AssetReleasePublished, WorkflowEngineService/ReadinessSatisfied, WorkflowEngineService/ReadinessRunSubmitted, WorkflowEngineService/ReadinessSuperseded, RunControlService/RunAccepted, RunControlService/RunCompleted, RunControlService/RunFailed, RunControlService/ApprovalRequested, RunControlService/ApprovalDecided, WorkflowEngineService/WorkflowRunStarted, WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed
Traces: descriptors workflow-definition-v1, readiness-bundle-v1, blueprint-module-v1, blueprint-test-v1, blueprint-security-v1, blueprint-pipeline-v1, blueprint-validation-receipt-v1
Traces: adrs ADR-0014, ADR-0021, ADR-0024, ADR-0026, ADR-0027, ADR-0030
Traces: requirements FR-05, FR-06, FUX-05, XL-10, XL-11
Depends on AIFACTORY-US-1244, AIFACTORY-US-1245, AIFACTORY-US-1246, feature:workflow-engine-service, feature:run-control-service, feature:agent-registry-service-complete, feature:agent-registry-service-publication
Sources model/workflows/pipeline-blueprint.yaml, model/agents/devops-delivery/devops-engineer.yaml, docs/planes/agent-runtime/workflow-definitions/pipeline-blueprint.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-410 Author, submit and publish the release of the workflow definition pipeline-blueprint with its agent release implementation The release of pipeline-blueprint (workflow-definition-v1) authored with its activation block, its 5 steps, input mappings, retry policies, timeouts, the on_false loop of check-valid and the compensation policy as in model/workflows/pipeline-blueprint.yaml, the failure_policy Retry of the four agent and tool steps copied as it stands and the idempotency_key documentHash of submit-version, and accepted by ValidateWorkflowDefinition of WorkflowEngineService; it is submitted through SubmitRelease of AgentRegistryService together with the agent release devops-engineer of AIFACTORY-TASK-411 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); the evaluation gate of the complete delivery applies, so a release of an asset kind with an evaluation suite is published only with a passed evaluation record, and the Published release ids are recorded for the fixture run, which pins them. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-411 Author the agent release devops-engineer with its prompts and skills implementation A Draft release of devops-engineer with its instructions, the fifteen bound skills of model/agents/devops-delivery/devops-engineer.yaml, the tool bindings and the model profile code-agent, as a new version of the agent, since the releases published in I2 carry no evaluation record; the release is evaluated with the suite devops-delivery-core-v1 on a fixture input and carries a passed evaluation record before AIFACTORY-TASK-410 submits it for publication through the evaluation gate (D140). ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-412 Fixture run of pipeline-blueprint against recorded inputs verification The definition runs end to end on a fixture project in the acceptance environment from a satisfied readiness bundle to RunCompleted on the Published releases of AIFACTORY-TASK-410; every step output validates against its descriptor and pipeline-blueprint and validation-receipt match the recorded ones field by field (AC1, AC2 and AC5 of AIFACTORY-US-094). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-732 Verify pipeline-blueprint-runs-from-its-definition by running the declared command verification Run dotnet test -c Release --filter Category=WorkflowFixture; it passes and proves AC1 to AC5 of AIFACTORY-US-094, including the same-key replay, the 409 conflict with the correlation Superseded with reason conflict and no run, the failure path of AC3 and, at chain level, the wait of AC4 (the gate itself is proven by AIFACTORY-TASK-4965); the output names the Published release ids of pipeline-blueprint and devops-engineer that the run pinned, as AgentRegistryService/GetRelease reports them with their approval by a Reviewer who is not the submitter and their evaluation record (D140). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1244: The DevOps role derives the stages per module and drafts the Pipeline Blueprint with gates and artefacts

behavior · persona operator As an operator, I want build, test, scan and packaging stages per module derived from the Module, Test and Security Blueprints and written up as a Pipeline Blueprint, so that every module's pipeline runs the suites and scan gates its blueprints demand, and deployment stays a promotion.

The two agent steps of pipeline-blueprint. When the engine marks derive-stages ready it resolves module-blueprints, test-blueprint and security-blueprint from the run inputs; the devops-engineer release runs in read class with skills such as devops-engineer-strategy-composer and devops-engineer-template-resolver and writes stage-plan: the build, test, scan and packaging stages of every module, the suites of the Test Blueprint each stage runs and the scan gates the Security Blueprint demands. When draft-pipeline-blueprint becomes ready it receives the same three blueprints, stage-plan from steps.derive-stages.stage-plan and, on a revision pass, the findings of the last validation receipt as feedback; the devops-engineer release, sandbox class, with the skills devops-engineer-pipeline-renderer and devops-engineer-artifact-emitter, writes the Pipeline Blueprint against blueprint-pipeline-v1 with stages, gates and thresholds, the pipeline templates of the house library (ConnectSoft.AzurePipelines), the produced artefacts and their provenance attestations, and no deployment stage and no credential, as pipeline-blueprint-draft. Neither step touches a shared system. Both declare failure_policy Retry, exponential, 3 attempts, backoff 30s, timeout PT30M: a Failed attempt of failure class transient is retried, any other is not, and a step that spends its budget fails the run with the evidence.

Acceptance criteria

AC1 Given a run accepted with module-blueprints (blueprint-module-v1), test-blueprint (blueprint-test-v1) and security-blueprint (blueprint-security-v1), when devops-engineer executes pipeline-blueprint/derive-stages, then the output stage-plan (artifact-v1) is recorded once under the run envelope with the build, test, scan and packaging stages of every module, the test suites each stage runs and the scan gates of the Security Blueprint (SCN-pipeline-blueprint-001).
AC2 Given steps.derive-stages.stage-plan is recorded, when devops-engineer executes pipeline-blueprint/draft-pipeline-blueprint, then the output pipeline-blueprint-draft (blueprint-pipeline-v1) is recorded once with stages, gates and thresholds, pipeline templates of the house library, the produced artefacts with their provenance attestations, no deployment stage and no credential (SCN-pipeline-blueprint-002).
AC3 Given a revision pass after pipeline-blueprint/check-valid took its false branch, when pipeline-blueprint/draft-pipeline-blueprint re-runs, then the findings of steps.validate.validation-receipt are in its context as feedback and the new draft addresses each finding by rule id (PIPE-001 to PIPE-003 or the schema path) (SCN-pipeline-blueprint-002, ADR-0026).
AC4 Given an attempt of pipeline-blueprint/derive-stages or pipeline-blueprint/draft-pipeline-blueprint exceeds its timeout PT30M, settles Failed with a failure class other than transient, or settles Failed with failure class transient until the exponential budget of 3 attempts is spent, when the engine applies the policy of model/workflows/pipeline-blueprint.yaml, then WorkflowEngineService/WorkflowRunFailed names the step and no shared system is changed (SCN-pipeline-blueprint-001, SCN-pipeline-blueprint-002, ADR-0014).
Traces: workflows pipeline-blueprint
Traces: steps pipeline-blueprint/derive-stages, pipeline-blueprint/draft-pipeline-blueprint
Traces: agents devops-engineer
Traces: services WorkflowEngineService
Traces: events WorkflowEngineService/StepReady, WorkflowEngineService/WorkflowRunFailed
Traces: descriptors blueprint-module-v1, blueprint-test-v1, blueprint-security-v1, blueprint-pipeline-v1, artifact-v1
Traces: scenarios SCN-pipeline-blueprint-001, SCN-pipeline-blueprint-002
Traces: adrs ADR-0014, ADR-0026, ADR-0030
Traces: requirements FR-05, FR-06, FUX-05
Depends on feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/pipeline-blueprint.yaml, model/agents/devops-delivery/devops-engineer.yaml, model/scenarios/pipeline-blueprint.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4960 Recorded fixture for the stage derivation and the Pipeline Blueprint draft fixture Fixture Module Blueprints of two modules, a Test Blueprint and a Security Blueprint with one scan gate, with the expected stage-plan and the expected Pipeline Blueprint draft (blueprint-pipeline-v1) without a deployment stage, plus a receipt with a PIPE-002 finding as feedback for the revision pass, as the oracle of SCN-pipeline-blueprint-001 and SCN-pipeline-blueprint-002. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4961 Verify the input mappings and action classes of the two agent steps in the Draft release verification The steps derive-stages and draft-pipeline-blueprint of the Draft release authored by AIFACTORY-TASK-410 resolve module-blueprints, test-blueprint, security-blueprint and stage-plan exactly as mapped in model/workflows/pipeline-blueprint.yaml and are announced with actionClass read and sandbox; the feedback attachment on the on_false branch is engine behaviour proven by AIFACTORY-TASK-4968. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4962 Prove the stage derivation and the draft on the fixture verification A fixture run proves SCN-pipeline-blueprint-001 and SCN-pipeline-blueprint-002 (AC1 to AC4 of AIFACTORY-US-1244); the outputs validate against artifact-v1 and blueprint-pipeline-v1, the draft carries no deployment stage, and the retry exhaustion path ends in WorkflowRunFailed naming the step. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1245: The Pipeline Blueprint draft is stored as a project-scope Draft version and validated with a receipt

behavior · persona operator As an operator, I want the drafted Pipeline Blueprint stored as a Draft version of the project and validated against its schema and the PIPE rules, so that a validation verdict with findings exists for every draft before a pipeline is generated from it.

The two tool steps of pipeline-blueprint. When submit-version becomes ready the engine resolves document from steps.draft-pipeline-blueprint.pipeline-blueprint-draft and emits StepReady with actionClass shared-write and idempotent true; Run Control dispatches the attempt and blueprint-submit-version goes through the fixed pipeline of ToolAdapterService. Draft versions are autonomous by default; when the project policy (BC-20) gates blueprint drafts the invocation waits AwaitingApproval for an approval requested through RunControl.RequestApproval that names the run as its subject and is bound to the invocation request hash, which covers the document hash, with proposalKind tool-invocation (D64, D129). The tool calls Blueprints.SubmitDraftVersion of BlueprintService under the run's workload identity: the document becomes a project-scope Draft BlueprintVersion of kind Pipeline, idempotent on its document hash, which the step declares as its idempotency_key. A rejected or expired decision denies the invocation and the attempt fails policy-denied. An attempt whose effect cannot be confirmed settles Uncertain and is never retried automatically. When validate becomes ready blueprint-validate calls Blueprints.Validate; BlueprintService validates against blueprint-pipeline-v1 and the rules PIPE-001 to PIPE-003, returns a receipt, moves the version to Validated only when the receipt passed, and emits BlueprintValidated. A receipt with passed false is a successful step output. A version reference of another tenant is answered NOT_FOUND and the attempt takes the failure class permanent (ADR-0015).

Acceptance criteria

AC1 Given steps.draft-pipeline-blueprint.pipeline-blueprint-draft is recorded and the project policy does not gate blueprint drafts, when pipeline-blueprint/submit-version runs blueprint-submit-version through BlueprintService/Blueprints.SubmitDraftVersion, then a Draft BlueprintService/BlueprintVersion of kind Pipeline exists in project scope, the output version-ref (blueprint-version-ref-v1) is recorded once under the run envelope, no approval is requested, and a resubmission of the same document hash returns the same version (SCN-pipeline-blueprint-003, D64).
AC2 Given steps.submit-version.version-ref is recorded, when pipeline-blueprint/validate runs blueprint-validate through BlueprintService/Blueprints.Validate, then the output validation-receipt (blueprint-validation-receipt-v1) with findings by rule id (PIPE-001 to PIPE-003) or schema path is recorded once whether it passed or not, BlueprintService/BlueprintValidated is emitted with passed and the document hash, and the version moves to Validated only for a passed receipt; a version reference of another tenant is answered NOT_FOUND with no receipt and the attempt takes the failure class permanent and is not retried (SCN-pipeline-blueprint-004, ADR-0015).
AC3 Given the project policy gates blueprint drafts, when pipeline-blueprint/submit-version is reached, then the ToolAdapterService/ToolInvocation of blueprint-submit-version is held AwaitingApproval, an approval naming the run as its subject is requested through RunControlService/RunControl.RequestApproval bound to the request hash with proposalKind tool-invocation, RunControlService/ApprovalRequested is published before any write, and BlueprintService/Blueprints.SubmitDraftVersion is called only on an approving RunControlService/ApprovalDecided for that hash; a rejected or expired decision publishes ToolAdapterService/ToolInvocationDenied and the attempt fails policy-denied without a Draft version (SCN-pipeline-blueprint-003, ADR-0026, D129).
AC4 Given an attempt of pipeline-blueprint/submit-version settles Failed with failure class transient, when Run Control evaluates the step, then it is retried under the fixed budget of 2 attempts with backoff 10s, which holds for this shared-write step because it declares idempotency_key documentHash, and on exhaustion it fails with evidence; given any other failure class it is not retried; given the attempt settles Uncertain (timeout PT2M after dispatch), then ToolAdapterService/ToolEffectUncertain is published and the attempt waits for an operator to settle it through ToolAdapterService/ConfirmToolEffect, the document hash ensuring that a confirmed effect is never duplicated; an attempt of pipeline-blueprint/validate that exceeds PT5M or fails transient is retried under its fixed budget and then fails with evidence (SCN-pipeline-blueprint-003, SCN-pipeline-blueprint-004, ADR-0014).
Traces: workflows pipeline-blueprint
Traces: steps pipeline-blueprint/submit-version, pipeline-blueprint/validate
Traces: tools blueprint-submit-version, blueprint-validate
Traces: services BlueprintService, WorkflowEngineService, ToolAdapterService, RunControlService
Traces: aggregates BlueprintService/BlueprintVersion, ToolAdapterService/ToolInvocation
Traces: apis BlueprintService/Blueprints.SubmitDraftVersion, BlueprintService/Blueprints.Validate, RunControlService/RunControl.RequestApproval, ToolAdapterService/ConfirmToolEffect
Traces: events BlueprintService/BlueprintValidated, WorkflowEngineService/StepReady, RunControlService/ApprovalRequested, RunControlService/ApprovalDecided, ToolAdapterService/ToolInvocationDenied, ToolAdapterService/ToolEffectUncertain
Traces: descriptors blueprint-pipeline-v1, blueprint-version-ref-v1, blueprint-validation-receipt-v1
Traces: scenarios SCN-pipeline-blueprint-003, SCN-pipeline-blueprint-004
Traces: adrs ADR-0014, ADR-0015, ADR-0026
Traces: requirements FR-05, FR-06
Depends on AIFACTORY-US-1244, feature:blueprint-service, feature:workflow-engine-service, feature:run-control-service, feature:tool-adapter-service
Sources model/workflows/pipeline-blueprint.yaml, model/tools/blueprint-submit-version.yaml, model/tools/blueprint-validate.yaml, model/services/template-library/BlueprintService.yaml, model/scenarios/pipeline-blueprint.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4963 Fixture Pipeline Blueprint documents with their expected receipts fixture One fixture Pipeline Blueprint document that passes PIPE-001 to PIPE-003 and one that fails PIPE-002 with a deployment stage, each with its expected blueprint-version-ref-v1, blueprint-validation-receipt-v1 and the version state after the verdict, plus a version reference of another tenant with the expected NOT_FOUND and no receipt, as the oracle of SCN-pipeline-blueprint-003 and SCN-pipeline-blueprint-004. ConnectSoft.AI.SoftwareFactory.BlueprintService
AIFACTORY-TASK-4964 Bind the submit and validate tool steps of the Draft release with the Pipeline kind implementation The tool steps submit-version and validate of the Draft release call blueprint-submit-version and blueprint-validate with document and version-ref mapped as in model/workflows/pipeline-blueprint.yaml, submit-version is announced shared-write with idempotent true and the fixed retry of 2 attempts, validate sandbox with the same budget, and the bindings of model/tools/blueprint-submit-version.yaml and model/tools/blueprint-validate.yaml are reused unchanged for the kind Pipeline. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4965 Prove the submit and validate steps of pipeline-blueprint on the fixture verification A fixture run proves SCN-pipeline-blueprint-003 and SCN-pipeline-blueprint-004 (AC1 to AC4 of AIFACTORY-US-1245), including the idempotent resubmission, the gated path with an approval naming the run as its subject, the denial on rejection, the transient retry under the idempotency key, the Uncertain path settled through ConfirmToolEffect, a failed receipt recorded as a step output and the NOT_FOUND answer for another tenant. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1246: The engine checks the Pipeline Blueprint receipt and sends findings back to the draft at most twice

behavior · persona operator As an operator, I want a failed validation of the Pipeline Blueprint sent back to the draft a bounded number of times and then the run failed with the report, so that the Pipeline Blueprint improves on real findings without looping forever or hiding the verdict.

The condition step of pipeline-blueprint, its last step. When check-valid becomes ready the engine evaluates steps.validate.validation-receipt.passed == true over the recorded receipt; a condition step never retries, never calls a service and completes within PT1M. When the receipt passed, the condition completes with one outcome and the run completes. The run output pipeline-blueprint (blueprint-pipeline-v1) binds to the validated BlueprintVersion that steps.submit-version.version-ref of the passing iteration names, and to no draft and no other version (D133); validation-receipt binds to the receipt of that iteration, never to an earlier failed one. When it did not, the engine takes the on_false branch to draft-pipeline-blueprint with steps.validate.validation-receipt as feedback: the draft, submit and validate steps re-run in order, the revised document gets its own Draft version and receipt, and the iteration count of the run rises by one. The branch is taken at most 2 times; when the receipt is still failed after the last iteration the run fails with the validation report as its evidence, WorkflowRunFailed names check-valid with the failure class validation, Run Control records Failed exactly once and every Draft version created on the way stays a Draft. A missing or unreadable receipt fails the condition with evidence instead of being read as passed (ADR-0026).

Acceptance criteria

AC1 Given steps.validate.validation-receipt is recorded with passed true, when the engine evaluates pipeline-blueprint/check-valid, then the condition completes with exactly one outcome, no service is called, the run output pipeline-blueprint is the validated BlueprintVersion that steps.submit-version.version-ref of that iteration names and validation-receipt its receipt, WorkflowEngineService/WorkflowRunCompleted is emitted once and RunControlService/RunCompleted follows exactly once (SCN-pipeline-blueprint-005, D133).
AC2 Given the recorded receipt has passed false and fewer than 2 iterations were counted on the run, when the engine evaluates pipeline-blueprint/check-valid, then it takes the false branch to pipeline-blueprint/draft-pipeline-blueprint with the receipt as feedback, the steps pipeline-blueprint/submit-version and pipeline-blueprint/validate re-run on the revised draft and the iteration count rises by one (SCN-pipeline-blueprint-006).
AC3 Given the receipt is still passed false after the second iteration, when the engine evaluates pipeline-blueprint/check-valid, then the run fails with the validation report as evidence, WorkflowEngineService/WorkflowRunFailed names check-valid with failure class validation, RunControlService/RunFailed is published exactly once and no Draft version is promoted (SCN-pipeline-blueprint-006, ADR-0014).
AC4 Given the receipt is missing or unreadable, or the evaluation exceeds its timeout PT1M, when the engine evaluates pipeline-blueprint/check-valid, then the condition is not retried (none, 0 attempts), it fails with evidence and the run follows the compensation policy of model/workflows/pipeline-blueprint.yaml (SCN-pipeline-blueprint-005, ADR-0026).
Traces: workflows pipeline-blueprint
Traces: steps pipeline-blueprint/check-valid, pipeline-blueprint/draft-pipeline-blueprint
Traces: services WorkflowEngineService
Traces: events WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, RunControlService/RunCompleted, RunControlService/RunFailed
Traces: descriptors blueprint-validation-receipt-v1, blueprint-pipeline-v1, blueprint-version-ref-v1
Traces: scenarios SCN-pipeline-blueprint-005, SCN-pipeline-blueprint-006
Traces: adrs ADR-0014, ADR-0026
Traces: requirements FR-06
Depends on AIFACTORY-US-1245, feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/pipeline-blueprint.yaml, model/services/agent-mesh/WorkflowEngineService.yaml, model/scenarios/pipeline-blueprint.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4966 Fixture receipt sequences for the pass, loop and limit paths of pipeline-blueprint fixture Recorded receipt sequences (passed true; passed false then true; passed false three times) that drive check-valid through the pass, the single loop and the iteration limit, each with the expected run outcome and iteration count, as the oracle of SCN-pipeline-blueprint-005 and SCN-pipeline-blueprint-006. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4967 Bind the pipeline-blueprint run outputs to the validated version implementation When check-valid holds the run output pipeline-blueprint is bound to the validated BlueprintVersion that steps.submit-version.version-ref of the passing iteration names and validation-receipt to the receipt of that iteration, never to a draft or to an earlier failed iteration, as model/workflows/pipeline-blueprint.yaml declares (D133). ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4968 Prove the condition and the bounded loop of pipeline-blueprint on the fixture verification A fixture run proves SCN-pipeline-blueprint-005 and SCN-pipeline-blueprint-006 (AC1 to AC4 of AIFACTORY-US-1246); one outcome and a completed run on pass with pipeline-blueprint bound to the validated version of the passing iteration, a loop back with feedback and iteration count on a failed receipt, and WorkflowRunFailed naming check-valid with failure class validation after the second iteration. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService