AIFACTORY-FEAT-120: Workflow definition: Test plan¶
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 139 of 185 (Factory code)
The workflow definition test-plan as a published asset: Builds the Test Blueprint from the service and module blueprints: scenarios from features and invariants, a coverage matrix and the quality constraints, validated against the DSL. It has 6 steps, names the agents qa-engineer, test-generator and the tools blueprint-submit-version, blueprint-validate, and is executed by WorkflowEngineService under Run Control.
| Delivers | — |
| Stubs | — |
| Realizes | workflows: test-plan adrs: ADR-0014, ADR-0024, ADR-0026 |
| Requirements | FR-08, FUX-10, XL-08 |
| Depends on | AIFACTORY-FEAT-189 AgentRegistryService: the publication path of releases from I2 |
| Sources | model/workflows/test-plan.yaml |
Scenarios to trace (7, catalog): SCN-test-plan-001 ✓, SCN-test-plan-002 ✓, SCN-test-plan-003 ✓, SCN-test-plan-004 ✓, SCN-test-plan-005 ✓, SCN-test-plan-006 ✓, SCN-test-plan-007 ✓
AIFACTORY-US-092: The Test plan workflow runs from its published definition¶
behavior · persona requester
As a requester, I want the test plan workflow to run from its published definition with the agents, tools and gates it declares, so that test-blueprint, validation-receipt are produced the same way on every run, with evidence.
The integration PBI of the definition test-plan. The definition is readiness-activated with two required members of one project, the validated Service and Module Blueprints (BlueprintValidated with passed true and the matching kind). When both are satisfied the ReadinessCorrelator of WorkflowEngineService submits exactly one run through SubmitRun of RunControlService with its service token naming the project 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 six steps ready in order: derive-scenarios on the test-generator release, coverage-matrix and draft-test-blueprint on the qa-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 one 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 bound to the request hash (D64). No step declares a compensation. The run completes with the outputs test-blueprint, bound to the validated BlueprintVersion that steps.submit-version.version-ref names (D133, AIFACTORY-US-1240), and validation-receipt, and reports exactly one outcome within its budget. Before any run, the definition release and the agent releases of test-generator and qa-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 an agent release published before I4 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-1238 to AIFACTORY-US-1240; this PBI proves the chain on the recorded fixture.
Acceptance criteria
| AC1 | Given the Published release of test-plan, 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 6 steps, input mappings, retry policies, timeouts, the on_false loop of check-valid, the failure_policy Retry of the five agent and tool steps and the idempotency_key documentHash of test-plan/submit-version exactly as in model/workflows/test-plan.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 test-plan/derive-scenarios, test-plan/coverage-matrix, test-plan/draft-test-blueprint, test-plan/submit-version, test-plan/validate and test-plan/check-valid become ready in that order, each agent step on the pinned Published release of test-generator or qa-engineer, and no Draft release is loaded. |
| AC2 | Given every step succeeds and test-plan/check-valid holds, when the run completes, then test-blueprint (blueprint-test-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 test-plan/check-valid reaches its iteration limit, when the engine applies the compensation policy of model/workflows/test-plan.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 test-plan/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-1239 AC3 specifies the gate (ADR-0026, D64, D129). |
| AC5 | Given the recorded fixture inputs of model/workflows/test-plan.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 | test-plan |
| Traces: steps | test-plan/derive-scenarios, test-plan/coverage-matrix, test-plan/draft-test-blueprint, test-plan/submit-version, test-plan/validate, test-plan/check-valid |
| Traces: agents | qa-engineer, test-generator |
| 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-service-v1, blueprint-module-v1, blueprint-test-v1, blueprint-validation-receipt-v1 |
| Traces: adrs | ADR-0014, ADR-0021, ADR-0024, ADR-0026 |
| Traces: requirements | FR-08, FUX-10, XL-08 |
| Depends on | AIFACTORY-US-1238, AIFACTORY-US-1239, AIFACTORY-US-1240, feature:workflow-engine-service, feature:run-control-service, feature:agent-registry-service-complete, feature:agent-registry-service-publication |
| Sources | model/workflows/test-plan.yaml, model/agents/qa/test-generator.yaml, model/agents/qa/qa-engineer.yaml, docs/planes/agent-runtime/workflow-definitions/test-plan.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-404 Author, submit and publish the release of the workflow definition test-plan with its agent releases |
implementation | The release of test-plan (workflow-definition-v1) authored with its activation block, its 6 steps, input mappings, retry policies, timeouts, the on_false loop of check-valid and the compensation policy as in model/workflows/test-plan.yaml, the failure_policy Retry of the five 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 releases test-generator and qa-engineer of AIFACTORY-TASK-405 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-405 Author the agent releases qa-engineer and test-generator with their prompts and skills |
implementation | Draft releases of test-generator (the forty-seven bound skills of model/agents/qa/test-generator.yaml, model profile code-agent) and qa-engineer (the ten bound skills of model/agents/qa/qa-engineer.yaml, model profile code-agent) with their instructions and tool bindings; each is evaluated with the suite qa-core-v1 and carries a passed evaluation record before AIFACTORY-TASK-404 submits it for publication, and a release of either agent published before I4 without an evaluation record is resubmitted through the evaluation gate as a new version (D140). | ConnectSoft.AI.SoftwareFactory.AgentTemplate |
AIFACTORY-TASK-406 Fixture run of test-plan 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-404; every step output validates against its descriptor and test-blueprint and validation-receipt match the recorded ones field by field (AC1, AC2 and AC5 of AIFACTORY-US-092). | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-738 Verify test-plan-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-092, 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-4947); the output names the Published release ids of test-plan, test-generator and qa-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-1238: Scenarios, a coverage matrix and the Test Blueprint draft are derived from the service and module blueprints¶
behavior · persona requester
As a requester, I want acceptance scenarios derived from my features and invariants, mapped in a coverage matrix and written up as a Test Blueprint, so that the quality constraints of my product are planned before any test is generated.
The three agent steps of test-plan. When the engine marks derive-scenarios ready it resolves service-blueprint and module-blueprints from the run inputs; the test-generator release runs in read class with skills such as test-generator-generate-test-scenarios and test-generator-plan-failure-flow-scenarios and writes scenarios, the acceptance scenarios of every feature, invariant and adverse branch. coverage-matrix receives the same blueprints and steps.derive-scenarios.scenarios; the qa-engineer release, read class, with the skill qa-engineer-analyze-coverage, maps every scenario to its context, operation and NFR target and names the gaps in coverage-matrix. draft-test-blueprint receives the blueprints and steps.coverage-matrix.coverage-matrix, and on a revision pass the findings of the last validation receipt as feedback; the qa-engineer release, sandbox class, writes the Test Blueprint with suites, data and environments against blueprint-test-v1 as test-blueprint-draft. No step touches a shared system or needs an approval. All three 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.
Acceptance criteria
| AC1 | Given a run accepted with service-blueprint (blueprint-service-v1) and module-blueprints (blueprint-module-v1), when test-generator executes test-plan/derive-scenarios, then the output scenarios (artifact-v1) is recorded once under the run envelope with at least one scenario for every feature, invariant and adverse branch of the blueprints (SCN-test-plan-001). |
| AC2 | Given steps.derive-scenarios.scenarios is recorded, when qa-engineer executes test-plan/coverage-matrix, then the output coverage-matrix (artifact-v1) maps every scenario to a context, an operation and an NFR target and names every operation or target without a scenario as a gap (SCN-test-plan-002). |
| AC3 | Given steps.coverage-matrix.coverage-matrix is recorded, when qa-engineer executes test-plan/draft-test-blueprint, then the output test-blueprint-draft (blueprint-test-v1) with suites, data and environments is recorded once; on a revision pass after test-plan/check-valid took its false branch the findings of the last receipt are in its context as feedback and the new draft addresses each by rule id (TST-001 to TST-003 or the schema path) (SCN-test-plan-003, ADR-0026). |
| AC4 | Given an attempt of one of the three steps 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/test-plan.yaml, then WorkflowEngineService/WorkflowRunFailed names the step and no shared system is changed (SCN-test-plan-001, SCN-test-plan-002, SCN-test-plan-003, ADR-0014). |
| Traces: workflows | test-plan |
| Traces: steps | test-plan/derive-scenarios, test-plan/coverage-matrix, test-plan/draft-test-blueprint |
| Traces: agents | test-generator, qa-engineer |
| Traces: services | WorkflowEngineService |
| Traces: events | WorkflowEngineService/StepReady, WorkflowEngineService/WorkflowRunFailed |
| Traces: descriptors | blueprint-service-v1, blueprint-module-v1, blueprint-test-v1, artifact-v1 |
| Traces: scenarios | SCN-test-plan-001, SCN-test-plan-002, SCN-test-plan-003 |
| Traces: adrs | ADR-0014, ADR-0026 |
| Traces: requirements | FR-08, FUX-10 |
| Depends on | feature:workflow-engine-service, feature:run-control-service |
| Sources | model/workflows/test-plan.yaml, model/agents/qa/test-generator.yaml, model/agents/qa/qa-engineer.yaml, model/scenarios/test-plan.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4942 Recorded fixture for the scenario derivation, the coverage matrix and the draft |
fixture | A fixture Service Blueprint with two features, one invariant and one adverse branch and its Module Blueprints, with the expected scenarios, the expected coverage-matrix naming one gap and the expected Test Blueprint draft (blueprint-test-v1), plus a receipt with TST-002 findings as feedback for the revision pass, as the oracle of SCN-test-plan-001 to SCN-test-plan-003. | ConnectSoft.AI.SoftwareFactory.AgentTemplate |
AIFACTORY-TASK-4943 Verify the input mappings and action classes of the three agent steps in the Draft release |
verification | The steps derive-scenarios, coverage-matrix and draft-test-blueprint of the Draft release authored by AIFACTORY-TASK-404 resolve their inputs exactly as mapped in model/workflows/test-plan.yaml and are announced with actionClass read, read and sandbox; the feedback attachment on the on_false branch is engine behaviour proven by AIFACTORY-TASK-4950 and is not repeated here. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4944 Prove the derivation, the coverage matrix and the draft on the fixture |
verification | A fixture run proves SCN-test-plan-001 to SCN-test-plan-003 (AC1 to AC4 of AIFACTORY-US-1238); the outputs validate against artifact-v1 and blueprint-test-v1, and the retry exhaustion path ends in WorkflowRunFailed naming the step. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-US-1239: The Test Blueprint draft is stored as a project-scope Draft version and validated with a receipt¶
behavior · persona requester
As a requester, I want the drafted Test Blueprint stored as a Draft version of my project and validated against its schema and the TST rules, so that a validation verdict with findings exists for every draft before anything is published.
The two tool steps of test-plan. When submit-version becomes ready the engine resolves document from steps.draft-test-blueprint.test-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 Test, 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 with the version reference; BlueprintService validates against blueprint-test-v1 and the rules TST-001 to TST-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-test-blueprint.test-blueprint-draft is recorded and the project policy does not gate blueprint drafts, when test-plan/submit-version runs blueprint-submit-version through BlueprintService/Blueprints.SubmitDraftVersion, then a Draft BlueprintService/BlueprintVersion of kind Test 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-test-plan-004, D64). |
| AC2 | Given steps.submit-version.version-ref is recorded, when test-plan/validate runs blueprint-validate through BlueprintService/Blueprints.Validate, then the output validation-receipt (blueprint-validation-receipt-v1) with findings by rule id (TST-001 to TST-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-test-plan-005, ADR-0015). |
| AC3 | Given the project policy gates blueprint drafts, when test-plan/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-test-plan-004, ADR-0026, D129). |
| AC4 | Given an attempt of test-plan/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 test-plan/validate that exceeds PT5M or fails transient is retried under its fixed budget and then fails with evidence (SCN-test-plan-004, SCN-test-plan-005, ADR-0014). |
| Traces: workflows | test-plan |
| Traces: steps | test-plan/submit-version, test-plan/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-test-v1, blueprint-version-ref-v1, blueprint-validation-receipt-v1 |
| Traces: scenarios | SCN-test-plan-004, SCN-test-plan-005 |
| Traces: adrs | ADR-0014, ADR-0015, ADR-0026 |
| Traces: requirements | FR-08, XL-08 |
| Depends on | AIFACTORY-US-1238, feature:blueprint-service, feature:workflow-engine-service, feature:run-control-service, feature:tool-adapter-service |
| Sources | model/workflows/test-plan.yaml, model/tools/blueprint-submit-version.yaml, model/tools/blueprint-validate.yaml, model/services/template-library/BlueprintService.yaml, model/scenarios/test-plan.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4945 Fixture Test Blueprint documents with their expected receipts |
fixture | One fixture Test Blueprint document that passes TST-001 to TST-003 and one that fails TST-002, 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-test-plan-004 and SCN-test-plan-005. | ConnectSoft.AI.SoftwareFactory.BlueprintService |
AIFACTORY-TASK-4946 Bind the submit and validate tool steps of the Draft release with the Test 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/test-plan.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 Test. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4947 Prove the submit and validate steps on the fixture |
verification | A fixture run proves SCN-test-plan-004 and SCN-test-plan-005 (AC1 to AC4 of AIFACTORY-US-1239), 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-1240: The engine checks the Test Blueprint receipt and sends findings back to the draft at most twice¶
behavior · persona requester
As a requester, I want a failed validation of my Test Blueprint sent back to the draft a bounded number of times and then the run failed with the report, so that the Test Blueprint improves on real findings without looping forever or hiding the verdict.
The condition step of test-plan, 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 test-blueprint (blueprint-test-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-test-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 test-plan/check-valid, then the condition completes with exactly one outcome, no service is called, the run output test-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-test-plan-006, D133). |
| AC2 | Given the recorded receipt has passed false and fewer than 2 iterations were counted on the run, when the engine evaluates test-plan/check-valid, then it takes the false branch to test-plan/draft-test-blueprint with the receipt as feedback, the steps test-plan/submit-version and test-plan/validate re-run on the revised draft and the iteration count rises by one (SCN-test-plan-007). |
| AC3 | Given the receipt is still passed false after the second iteration, when the engine evaluates test-plan/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-test-plan-007, ADR-0014). |
| AC4 | Given the receipt is missing or unreadable, or the evaluation exceeds its timeout PT1M, when the engine evaluates test-plan/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/test-plan.yaml (SCN-test-plan-006, ADR-0026). |
| Traces: workflows | test-plan |
| Traces: steps | test-plan/check-valid, test-plan/draft-test-blueprint |
| Traces: services | WorkflowEngineService |
| Traces: events | WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, RunControlService/RunCompleted, RunControlService/RunFailed |
| Traces: descriptors | blueprint-validation-receipt-v1, blueprint-test-v1, blueprint-version-ref-v1 |
| Traces: scenarios | SCN-test-plan-006, SCN-test-plan-007 |
| Traces: adrs | ADR-0014, ADR-0026 |
| Traces: requirements | FR-08 |
| Depends on | AIFACTORY-US-1239, feature:workflow-engine-service, feature:run-control-service |
| Sources | model/workflows/test-plan.yaml, model/services/agent-mesh/WorkflowEngineService.yaml, model/scenarios/test-plan.yaml |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4948 Fixture receipt sequences for the pass, loop and limit paths of test-plan |
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-test-plan-006 and SCN-test-plan-007. | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4949 Bind the test-plan run outputs to the validated version |
implementation | When check-valid holds the run output test-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/test-plan.yaml declares (D133). | ConnectSoft.AI.SoftwareFactory.WorkflowEngineService |
AIFACTORY-TASK-4950 Prove the condition and the bounded loop of test-plan on the fixture |
verification | A fixture run proves SCN-test-plan-006 and SCN-test-plan-007 (AC1 to AC4 of AIFACTORY-US-1240); one outcome and a completed run on pass with test-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 |