Skip to content

AIFACTORY-FEAT-117: Workflow definition: Compliance check

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 136 of 185 (Factory code)

The workflow definition compliance-check as a published asset: Checks generated code and infrastructure against the selected compliance rule sets, raises findings to audit and blocks on critical findings. It has 7 steps, names the agents privacy-compliance, security-engineer and the tools none, and is executed by WorkflowEngineService under Run Control.

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

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

AIFACTORY-US-089: The Compliance check workflow runs from its published definition

behavior · persona reviewer As a reviewer, I want the compliance check workflow to run from its published definition with the agents, tools and gates it declares, so that findings are produced the same way on every run, with evidence.

The integration PBI of the definition compliance-check. The definition is readiness-activated: its activation block names four required members of one project, the generation run (GenerationCompleted of GenerationRecipeService with at least one module) and the validated Infrastructure, Database and Security Blueprints (BlueprintValidated with passed true and the matching kind). When every member is satisfied the ReadinessCorrelator of WorkflowEngineService submits exactly one run through SubmitRun of RunControlService with its service token naming the project, the release resolved when the correlation opened and the idempotency key {scope}:{operation}:{workflowReleaseId}:{bundleFingerprint}; a newer member version supersedes the open correlation. On RunAccepted the engine loads the Published release the run pinned through AgentRegistryService and marks the seven steps ready in their declared order: select-rule-sets, the fan-out fan-out-scans, the parallel scan-code and scan-infrastructure, the join join-scans, raise-findings and the condition block-on-critical. The agent steps run the releases of privacy-compliance and security-engineer; every agent step declares failure_policy Retry, which Run Control applies only to a Failed attempt of failure class transient, three agent steps being of read or sandbox class and raise-findings of shared-write class with idempotency_key finding id (D133). No step declares a compensation, so a failed run leaves its sandbox outputs as evidence (ADR-0014). The run reports exactly one outcome and stays within its budget of 600000 tokens, 60 USD and 240 minutes. Before any run, the definition release and the agent releases of privacy-compliance and security-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-1231 to AIFACTORY-US-1233; this PBI proves the whole chain on the recorded fixture.

Acceptance criteria

AC1 Given the Published release of compliance-check, 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 7 steps, input mappings, retry policies, timeouts and the failure_policy Retry of the four agent steps exactly as in model/workflows/compliance-check.yaml, when the last required member of an open WorkflowEngineService/ReadinessCorrelation of the project 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 the returned run; 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; and a newer member version publishes WorkflowEngineService/ReadinessSuperseded instead of a second run (ADR-0014).
AC2 Given RunControlService/RunAccepted for that release with the inputs generated-outputs (change-set-v1), infrastructure-blueprint, database-blueprint and security-blueprint, when the engine opens its projection, then WorkflowEngineService/WorkflowRunStarted is emitted and the steps compliance-check/select-rule-sets, compliance-check/fan-out-scans, compliance-check/scan-code, compliance-check/scan-infrastructure, compliance-check/join-scans, compliance-check/raise-findings and compliance-check/block-on-critical become ready in that order, each agent step on the pinned Published release of privacy-compliance or security-engineer, and no Draft release is loaded (D140).
AC3 Given every step succeeds, findings (findings-v1) is recorded with critical 0 and compliance-check/block-on-critical holds, when the run completes, then findings is recorded as the run output under the run envelope, WorkflowEngineService/WorkflowRunCompleted is emitted once and RunControlService/RunCompleted follows exactly once (ADR-0014, D133).
AC4 Given an agent step is settled Failed with its retry budget spent or with a failure class other than transient, a parallel step exceeds its timeout, or compliance-check/block-on-critical finds a critical finding, when the engine applies the compensation policy of model/workflows/compliance-check.yaml, then WorkflowEngineService/WorkflowRunFailed names the step and the failure class, the sandbox outputs stay in place as evidence and RunControlService/RunFailed is published exactly once (recovery, not replay, ADR-0014).
AC5 Given the recorded fixture inputs of model/workflows/compliance-check.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-0027).
Traces: workflows compliance-check
Traces: steps compliance-check/select-rule-sets, compliance-check/fan-out-scans, compliance-check/scan-code, compliance-check/scan-infrastructure, compliance-check/join-scans, compliance-check/raise-findings, compliance-check/block-on-critical
Traces: agents privacy-compliance, security-engineer
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, WorkflowEngineService/WorkflowRunStarted, WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed
Traces: descriptors workflow-definition-v1, readiness-bundle-v1, change-set-v1, blueprint-infrastructure-v1, blueprint-database-v1, blueprint-security-v1, findings-v1
Traces: adrs ADR-0014, ADR-0019, ADR-0021, ADR-0027
Traces: requirements FR-05, XL-10, XL-11
Depends on AIFACTORY-US-1231, AIFACTORY-US-1232, AIFACTORY-US-1233, feature:workflow-engine-service, feature:run-control-service, feature:agent-registry-service-complete, feature:agent-registry-service-publication
Sources model/workflows/compliance-check.yaml, model/agents/operations/privacy-compliance.yaml, model/agents/operations/security-engineer.yaml, docs/planes/agent-runtime/workflow-definitions/compliance-check.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-395 Author, submit and publish the release of the workflow definition compliance-check with its agent releases implementation The release of compliance-check (workflow-definition-v1) authored with its activation block of four required members, its 7 steps, input mappings, retry policies, timeouts, the condition of block-on-critical and the compensation policy as in model/workflows/compliance-check.yaml, the failure_policy Retry of the four agent steps copied as it stands, and accepted by ValidateWorkflowDefinition of WorkflowEngineService; it is submitted through SubmitRelease of AgentRegistryService together with the agent releases privacy-compliance and security-engineer of AIFACTORY-TASK-396 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-396 Author the agent releases privacy-compliance and security-engineer with their prompts and skills implementation Draft releases of privacy-compliance (the ten bound skills of model/agents/operations/privacy-compliance.yaml, model profile reasoning-high) and security-engineer (the eight bound skills of model/agents/operations/security-engineer.yaml, model profile code-agent-strong) with their instructions and tool bindings; each is evaluated with the suite operations-core-v1 and carries a passed evaluation record before AIFACTORY-TASK-395 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-397 Fixture run of compliance-check against recorded inputs verification The definition runs end to end on a fixture project in the acceptance environment from a satisfied readiness bundle to the outcome of block-on-critical on the Published releases of AIFACTORY-TASK-395; every step output validates against its descriptor and the output findings (findings-v1) matches the recorded one field by field (AC1 to AC3 and AC5 of AIFACTORY-US-089); a fixture without a critical finding ends Completed with findings as the run output and a fixture with one ends Failed at block-on-critical. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-723 Verify compliance-check-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-089, including the same-key replay, the 409 conflict with the correlation Superseded with reason conflict and no run, the superseded correlation of AC1, the Completed path of AC3 and the failure path of AC4 (WorkflowRunFailed then RunFailed exactly once); the output names the Published release ids of compliance-check, privacy-compliance and security-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-1231: The privacy and compliance role selects the rule sets from classification, residency and edition

behavior · persona reviewer As a reviewer, I want the compliance rule sets of a generation chosen from the tenant's classification, residency and the product's edition, so that the scans check exactly the obligations that apply to this product.

The first step of compliance-check. When the engine marks select-rule-sets ready it resolves database-blueprint, security-blueprint and generated-outputs from the run inputs of the same names. The privacy-compliance release runs in read class with the tools its card allows (knowledge-search, graph-query, list-files, read-range) and the skills that classify fields and weigh residency, such as privacy-compliance-classify-fields and privacy-compliance-cross-region-risk: it reads the data classes of the Database Blueprint, the controls of the Security Blueprint and the edition of the generated product and writes one artifact rule-sets that names each selected rule set with the reason it applies (classification, residency region under ADR-0019, edition). The step changes no shared system, needs no approval and records exactly one attempt outcome. It declares failure_policy Retry with an exponential budget of 3 attempts and backoff 30s: a Failed attempt of failure class transient is retried, any other failure class is not, and a step that exceeds its timeout PT30M or spends its budget fails the run with the evidence; no step succeeded before it, so nothing is compensated.

Acceptance criteria

AC1 Given a run accepted with the inputs database-blueprint (blueprint-database-v1), security-blueprint (blueprint-security-v1) and generated-outputs (change-set-v1), when the engine marks compliance-check/select-rule-sets ready and privacy-compliance executes it, then the output rule-sets (artifact-v1) is recorded once under the run envelope with exactly one attempt outcome (SCN-compliance-check-001).
AC2 Given a fixture tenant whose classification includes restricted data and whose residency region is fixed, when compliance-check/select-rule-sets runs, then every rule set in rule-sets names the classification, residency or edition that selected it, and a rule set whose reason does not apply to the fixture is absent (ADR-0019, SCN-compliance-check-001).
AC3 Given an attempt of compliance-check/select-rule-sets 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/compliance-check.yaml, then WorkflowEngineService/WorkflowRunFailed names the step, the run ends Failed with the evidence and no shared system is changed (SCN-compliance-check-001, ADR-0014).
Traces: workflows compliance-check
Traces: steps compliance-check/select-rule-sets
Traces: agents privacy-compliance
Traces: services WorkflowEngineService
Traces: events WorkflowEngineService/StepReady, WorkflowEngineService/WorkflowRunFailed
Traces: descriptors blueprint-database-v1, blueprint-security-v1, change-set-v1, artifact-v1
Traces: scenarios SCN-compliance-check-001
Traces: adrs ADR-0014, ADR-0019
Traces: requirements FR-05, XL-10
Depends on feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/compliance-check.yaml, model/agents/operations/privacy-compliance.yaml, model/scenarios/compliance-check.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4921 Recorded fixture for the rule set selection fixture A fixture Database, Security Blueprint and generated output of a product with restricted data in one residency region and a named edition, with the expected rule-sets artifact (artifact-v1) naming the reason of every selected rule set, as the oracle of SCN-compliance-check-001. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4922 Verify the input mappings and read class of select-rule-sets in the Draft release verification The step select-rule-sets of the Draft release authored by AIFACTORY-TASK-395 resolves database-blueprint, security-blueprint and generated-outputs exactly as mapped in model/workflows/compliance-check.yaml, is announced with actionClass read and runs privacy-compliance with no tool of a class above read. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4923 Prove the rule set selection on the fixture verification A fixture run proves SCN-compliance-check-001 (AC1 to AC3 of AIFACTORY-US-1231); the output validates against artifact-v1, and the timeout and retry exhaustion path ends in a WorkflowRunFailed that names select-rule-sets. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1232: The security role scans the code and the infrastructure in parallel and the engine joins both scans

behavior · persona reviewer As a reviewer, I want the code and the infrastructure of a generation scanned against the selected rule sets at the same time, so that both kinds of findings are ready together without one scan waiting on the other.

The parallel section of compliance-check. After select-rule-sets the engine evaluates the fan-out step fan-out-scans itself, without an agent or a service call, within PT1M, and marks scan-code and scan-infrastructure ready together. Both run the security-engineer release in sandbox class with the rule sets from steps.select-rule-sets.rule-sets and the Security Blueprint from input.security-blueprint. scan-code also receives generated-outputs and runs the static and dependency checks inside the isolated workspace with the tools its card allows (search-text, get-dependencies, shell-sandbox, build-and-test) and the skills security-engineer-policy-resolver and security-engineer-risk-scoring; it writes code-findings. scan-infrastructure also receives infrastructure-blueprint and checks it and its program against the policy rules; it writes infrastructure-findings. Neither scan changes the generated outputs or proposes a change set; a fix is a later run. The join join-scans waits for both branches, with no quorum declared, and completes within PT1M. Each scan declares failure_policy Retry, exponential, 3 attempts; a scan that fails for good fails the run, and no further step of the run becomes ready.

Acceptance criteria

AC1 Given compliance-check/select-rule-sets succeeded, when the engine evaluates compliance-check/fan-out-scans, then the step completes with exactly one outcome under the run envelope within PT1M, no attempt is dispatched for it, and WorkflowEngineService/StepReady is emitted for compliance-check/scan-code and compliance-check/scan-infrastructure in the same advance (SCN-compliance-check-002).
AC2 Given the two scan steps are ready, when security-engineer executes compliance-check/scan-code with security-blueprint, generated-outputs and rule-sets, then the output code-findings (artifact-v1) is recorded once and names for every finding the rule, the severity and the file or dependency it concerns, and no change set is proposed (SCN-compliance-check-003).
AC3 Given the two scan steps are ready, when security-engineer executes compliance-check/scan-infrastructure with security-blueprint, infrastructure-blueprint and rule-sets, then the output infrastructure-findings (artifact-v1) is recorded once and names for every finding the rule, the severity and the resource of the Infrastructure Blueprint it concerns (SCN-compliance-check-004).
AC4 Given both scans succeeded, when the engine evaluates compliance-check/join-scans, then it completes with exactly one outcome and compliance-check/raise-findings becomes ready; given one scan is settled Failed with its budget spent or a non-transient failure class, then the join never completes, WorkflowEngineService/WorkflowRunFailed names that scan, RunControlService/RunFailed follows exactly once and no further step of the run becomes ready (SCN-compliance-check-005, ADR-0014).
AC5 Given compliance-check/fan-out-scans or compliance-check/join-scans exceeds its timeout PT1M, when the engine applies the policy of model/workflows/compliance-check.yaml, then the step is not retried (none, 0 attempts), it fails with evidence and the run ends Failed with no shared system changed (SCN-compliance-check-002, SCN-compliance-check-005).
Traces: workflows compliance-check
Traces: steps compliance-check/fan-out-scans, compliance-check/scan-code, compliance-check/scan-infrastructure, compliance-check/join-scans
Traces: agents security-engineer
Traces: services WorkflowEngineService
Traces: events WorkflowEngineService/StepReady, WorkflowEngineService/WorkflowRunFailed, RunControlService/RunFailed
Traces: descriptors artifact-v1, blueprint-security-v1, blueprint-infrastructure-v1, change-set-v1
Traces: scenarios SCN-compliance-check-002, SCN-compliance-check-003, SCN-compliance-check-004, SCN-compliance-check-005
Traces: adrs ADR-0014
Traces: requirements FR-05, XL-11
Depends on AIFACTORY-US-1231, feature:workflow-engine-service, feature:run-control-service
Sources model/workflows/compliance-check.yaml, model/agents/operations/security-engineer.yaml, model/scenarios/compliance-check.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4924 Recorded fixture of a generation with code and infrastructure findings fixture A fixture generated output with one vulnerable dependency and one insecure code path, and a fixture Infrastructure Blueprint with one resource that breaks a policy rule, with the expected code-findings and infrastructure-findings (artifact-v1), as the oracle of SCN-compliance-check-003 and SCN-compliance-check-004. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4925 Map the fan-out, the two scans and the join of the Draft release onto the engine step kinds implementation The parallel steps fan-out-scans and join-scans of the Draft release are loaded as the engine step kinds Fanout and Join with timeout PT1M and no retry, the two scans depend on the fan-out and the join on both scans exactly as declared in model/workflows/compliance-check.yaml, and the scans map their inputs as declared. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4926 Prove the parallel scans and the join on the fixture verification A fixture run proves SCN-compliance-check-002 to SCN-compliance-check-005 (AC1 to AC5 of AIFACTORY-US-1232); both scans are announced in one advance, the join completes only after both, and a scan failed with its budget spent ends in WorkflowRunFailed naming that scan, RunFailed once and no later step of the run becoming ready. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService

AIFACTORY-US-1233: The findings are raised with severity, owner and evidence and a critical finding fails the run

behavior · persona reviewer As a reviewer, I want every finding of the two scans recorded with severity, owner and evidence, and the run failed when one is critical, so that no promotion can proceed on a generation that carries a critical compliance or security finding.

The last two steps of compliance-check. When join-scans completed the engine marks raise-findings ready and resolves database-blueprint, security-blueprint, code-findings from steps.scan-code.code-findings and infrastructure-findings from steps.scan-infrastructure.infrastructure-findings. The privacy-compliance release runs in shared-write class with the skills privacy-compliance-compliance-risk-scorer and privacy-compliance-compliance-report-emitter: it merges both lists, gives every finding an id, a category, a severity, an owner, its evidence references and a redacted summary, and returns findings (findings-v1) with the member critical, the count of the findings of severity critical, recorded once under the run envelope (D133). The findings are raised through Audit.RaiseFindings of AuditService (scope factory.audit.write), which records each finding as an open finding with one audit entry for the call and publishes FindingRaised once per recorded finding; the step declares idempotency_key finding id, so a retried attempt raises no finding twice, and a document whose critical count differs from the findings of severity critical it lists is refused with nothing recorded. The step binds no tool that reaches Audit.RaiseFindings, which is reported as an open question. When raise-findings succeeded the engine evaluates the condition block-on-critical, steps.raise-findings.findings.critical == 0, over the recorded output without a service call, within PT1M and without retry. A run with no critical finding completes with findings as its output; a critical finding fails the run with the findings as evidence, the definition declaring no false branch, so no promotion can proceed on this generation; a missing or unreadable output fails the condition instead of being read as passed (ADR-0027).

Acceptance criteria

AC1 Given compliance-check/join-scans completed, when privacy-compliance executes compliance-check/raise-findings with the four mapped inputs, then the output findings (findings-v1) is recorded once under the run envelope with exactly one attempt outcome, every finding of both scans carries its id, category, severity, owner, evidence references and summary, and critical equals the count of the findings of severity critical (SCN-compliance-check-006, ADR-0027, D133).
AC2 Given findings is recorded, when the findings are raised through AuditService/Audit.RaiseFindings, then each finding is recorded once as an open finding of AuditService/Finding, AuditService/FindingRaised is published once per recorded finding, and a retried attempt under idempotency_key finding id raises no finding twice; given an attempt 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, then WorkflowEngineService/WorkflowRunFailed names the step, the two scan outputs stay in place as evidence and the run ends Failed (SCN-compliance-check-006, ADR-0014, D133).
AC3 Given steps.raise-findings.findings is recorded with critical 0, when the engine evaluates compliance-check/block-on-critical, then the condition completes with exactly one outcome without a service call, WorkflowEngineService/WorkflowRunCompleted is emitted once with findings as the run output and RunControlService/RunCompleted follows exactly once (SCN-compliance-check-007, D133).
AC4 Given steps.raise-findings.findings is recorded with critical above 0, or is missing or unreadable, or the evaluation exceeds PT1M, when the engine evaluates compliance-check/block-on-critical, then the condition fails with evidence instead of being read as passed, without a retry, WorkflowEngineService/WorkflowRunFailed names block-on-critical with the findings as evidence and RunControlService/RunFailed is published exactly once, so that no promotion can proceed on this generation (SCN-compliance-check-007, ADR-0014, ADR-0027).
Traces: workflows compliance-check
Traces: steps compliance-check/raise-findings, compliance-check/block-on-critical
Traces: agents privacy-compliance
Traces: services WorkflowEngineService, AuditService
Traces: aggregates AuditService/Finding
Traces: apis AuditService/Audit.RaiseFindings
Traces: events WorkflowEngineService/StepReady, AuditService/FindingRaised, WorkflowEngineService/WorkflowRunCompleted, WorkflowEngineService/WorkflowRunFailed, RunControlService/RunCompleted, RunControlService/RunFailed
Traces: descriptors artifact-v1, findings-v1
Traces: scenarios SCN-compliance-check-006, SCN-compliance-check-007
Traces: adrs ADR-0014, ADR-0019, ADR-0027
Traces: requirements FR-05, XL-10, XL-11
Depends on AIFACTORY-US-1232, feature:workflow-engine-service, feature:run-control-service, feature:audit-service-complete
Sources model/workflows/compliance-check.yaml, model/agents/operations/privacy-compliance.yaml, model/services/governance/AuditService.yaml, docs/reference/schemas/findings.schema.json, model/scenarios/compliance-check.yaml

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-4927 Fixture findings sequences for the pass and the critical block fixture Two recorded scan output pairs, one with findings of severity at most high and one with one critical finding, each with the expected findings output valid against findings-v1 with its critical count, the expected FindingRaised per finding and the expected run outcome (Completed for the first pair, Failed naming block-on-critical for the second), as the oracle of SCN-compliance-check-006 and SCN-compliance-check-007. ConnectSoft.AI.SoftwareFactory.AgentTemplate
AIFACTORY-TASK-4928 Evaluate block-on-critical over the recorded findings and fail the run on a critical finding implementation The condition block-on-critical of the Draft release reads steps.raise-findings.findings from the recorded output without a service call, exactly as model/workflows/compliance-check.yaml states; a critical count above 0, a missing or an unreadable output fails the condition with evidence and is never read as passed, and a count of 0 completes the run with findings as its output. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService
AIFACTORY-TASK-4929 Prove the raised findings and the critical block on the fixture verification A fixture run proves SCN-compliance-check-006 and SCN-compliance-check-007 (AC1 to AC4 of AIFACTORY-US-1233); both sequences record findings valid against findings-v1 and raise each finding once through Audit.RaiseFindings, a retried attempt raises nothing twice, the pass sequence ends Completed with findings as the run output and the critical sequence ends in WorkflowRunFailed naming block-on-critical and RunFailed once. ConnectSoft.AI.SoftwareFactory.WorkflowEngineService