Skip to content

AIFACTORY-FEAT-172: Workers.Runtime library: the worker engine published and shaped for Factory services

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 Ecosystem component extensions · Increment I0 Readiness · State elaborated · Route backend-developer · Phase before development · Build order 17 of 185 (Templates and libraries)

Before development

Template or library work: every task of this feature changes a template or a shared library the Factory builds on, and it lands before the Factory's own repositories of I0 are developed. The mark travels with every task (tag phase:before-development).

The worker template's engine already lives in its own repository and package, ConnectSoft.Workers.Runtime (B-F06): options, drain, idempotency store, failed-work model and sinks, job catalog and lease, IWorkTrigger, shard filter and metric names, with the ASP.NET host, Hangfire dashboard, MCP and Pulumi kept in the template. Its status page records that the package pipeline is not created and the template cannot restore it from the feed. The Factory's base-template services with background loops (environment promotion, pipeline polling, retention sweeps, outbox maintenance) would each write their own drain, idempotency and lease; they register this engine instead, once it carries scope and the envelope identifiers in its contracts. Component: WorkerTemplate (extend), library ConnectSoft.Workers.Runtime.

Delivers —
Stubs —
Realizes components: cmp-worker-template
adrs: ADR-0012, ADR-0024, ADR-0028
Requirements —
Depends on —
Sources model/components.yaml, ConnectSoft.WorkerTemplate/docs/Control Plane/worker-ops.md

AIFACTORY-US-206: Workers.Runtime library: work items and failed work carry tenant, project, run, step and attempt identity, and the scoped idempotency key is an option beside the unchanged default store

enabling · persona asset-maintainer As an asset maintainer, I want the contracts of the worker engine to carry the scope and the envelope identity of the work they dispatch, so that a Factory service that registers the engine attributes every processed message and every failed work record to its tenant, project and run.

The Features page of ConnectSoft.Workers.Runtime lists what the engine owns: registration through AddWorkersRuntime, the drain coordinator, idempotency with in-memory, SQL and Redis stores, the failed-work store with its sinks, the job catalog, the singleton lease, the triggers and the dispatcher. The worker-core page of the worker template describes the stored shapes: a processed message is keyed by message id and payload hash with a completion time, and failed work has the statuses Open, Acked, Replayed and Discarded. None of these contracts names a tenant, a project or a run, because the template is an operations tool for one tenant by a locked decision of its own backlog. A Factory message travels under the envelope of ADR-0014, whose decision 1 requires tenant, project, run, step and attempt identity and whose decision 3 defines idempotency per trusted scope and operation. This PBI adds a scope value to the engine, in the namespace of the library, with tenant id, project id, run id, step id, attempt id, event id and correlation id; the engine keeps this minimal scope type of its own and references no AI package, so a host that registers only the engine takes no Factory library. WorkItem carries it, a trigger fills it from the envelope of the message, the dispatcher hands it to the message and job handlers, and the failure sinks report it. The stored key is settled by decision D114 and the amendment of ADR-0028 on the Factory profile switch: the key scoped by tenant and project is an option of the engine that the Factory profile selects, and the default store does not change. Without the option a processed message is keyed by message id and payload hash exactly as today: SqlIdempotencyStore reads the table ProcessedMessages under its primary key of message id and payload hash, the failed-work table keeps its columns, and an existing worker behaves as before. With the option, the stored key of a processed message is tenant, project and message id with the payload hash as a compared column: the same message id and hash of two tenants do not collide, a repeat with the same payload hash is answered as already processed, and a repeat with a different hash is a conflict that is recorded as failed work. Under the same option the SQL failed-work store writes the scope columns of FailedWorkRecord and the failed-work filter selects by tenant and project. A second option requires the scope for message-shaped work, and work that arrives without it is refused and recorded; the Factory profile sets both options together, so no processed-message row without a tenant and a project is written under the scoped key. Job-shaped work of the catalog stays unscoped, and the catalog itself stays per worker.

Acceptance criteria

AC1 Given a trigger that dispatches a message read from an envelope, when the dispatcher calls the message handler, then the WorkItem carries the tenant id, project id, run id, step id, attempt id, event id and correlation id of the envelope as a scope value of the namespace ConnectSoft.Workers.Runtime, and the handler and the failure sinks receive it unchanged (ADR-0014 decision 1).
AC2 Given the SQL and the Redis idempotency stores with the scoped key selected, whose stored key of a processed message is tenant, project and message id with the payload hash as a compared column, when the same message id with the same payload hash is processed for two tenants, then the two do not collide; a repeat of the same scope, message id and payload hash is answered as already processed and a repeat with a different payload hash is a conflict recorded as failed work, which is the idempotency rule of ADR-0014 decision 3 and the deduplication scope ADR-0012 decision 2 asks a profile to declare.
AC3 Given the option that requires scope for message-shaped work, when a message arrives without tenant or project, then the dispatcher refuses it before the handler and records it as failed work with the reason; with the scoped key selected the SQL failed-work store writes the scope of FailedWorkRecord and the failed-work filter selects by tenant and project, and job-shaped work of the catalog is dispatched without a scope, since the job catalog stays per worker (ADR-0014, model/components.yaml).
AC4 Given a host that does not select the scoped key, when the engine is registered and a message is processed, then the processed message is keyed by message id and payload hash as today, SqlIdempotencyStore and the SQL failed-work store read and write the tables of today without a new column or key, and the existing tests of the stores pass unchanged, because the scoped key exists only as the option the Factory profile selects (ADR-0028 amendment on the Factory profile switch, ADR-0014 decision 3).
Traces: adrs ADR-0012, ADR-0014, ADR-0024, ADR-0028
Sources model/components.yaml, docs/architecture/ecosystem-composition.md, docs/architecture/adr/0014-run-and-lifecycle-envelopes.md, docs/architecture/adr/0012-messaging-port-and-transport-profiles.md, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-624 Scope and envelope identifiers in the engine contracts implementation IWorkTrigger, the work item of the dispatch and the failed-work model carry tenant, project, run, step and attempt identity as library types in the ConnectSoft.Workers.Runtime namespace, in a minimal scope type of the engine that references no AI package; the idempotency key takes the scope when the scoped key is selected; the message and job handler contracts receive the scope; the Generic Host sample of the getting started page shows a scoped work item. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1010 Scoped idempotency key as an option of the in-memory, SQL and Redis stores implementation The options of the engine gain the scoped key, off by default. Without it the in-memory, SQL and Redis idempotency stores key a processed message by message id and payload hash as today, and SqlIdempotencyStore reads and writes ProcessedMessages under the key of today. With it the stores key a processed message by tenant, project and message id and keep the payload hash as a compared value: a repeat with the same hash is reported as already processed and a repeat with a different hash as a conflict. docs/Features.md of the library lists the option and names the Factory profile of the worker template as what selects it. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1011 Scope columns and the scoped key of the SQL stores and the schema check at start migration With the scoped key selected the SQL failed-work and idempotency stores read and write tenant, project, run, step and attempt columns, and ProcessedMessages is read under the key of tenant, project and message id with the payload hash as a column. The schema script of the engine that AIFACTORY-TASK-1057 ships carries that scoped shape beside the default shape, whose key of message id and payload hash is the one migration 2 of the worker template created. At start the stores check the columns and the key of the shape the options select and fail with the missing column or the other key named; without the option the stores run on the tables of today and need no new column. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1012 Verify scoped dispatch, scoped idempotency and the refusal of unscoped messages verification Run dotnet test -c Release --no-build on the library solution; the tests of the scoped work item, of two tenants with the same message id and the same payload hash on the in-memory and on the SQL store with the scoped key selected, of the hash conflict, of the refused message without scope and of the unchanged default stores on the key of message id and payload hash pass and prove AC1 to AC4 of AIFACTORY-US-206 (ADR-0014). ConnectSoft.Workers.Runtime

AIFACTORY-US-219: Workers.Runtime library: a SQL job catalog loads the Jobs table at start, persists operator changes and keeps the in-memory catalog as its cache

enabling · persona asset-maintainer As an asset maintainer, I want the job catalog of the worker engine to have a durable provider beside the in-memory one, so that a pause or a schedule change made by an operator survives a restart in every host that registers the engine, the worker template and a base-template service alike.

The job catalog of the engine is the type InMemoryJobCatalog, the only implementation of IJobCatalog in ConnectSoft.Workers.Runtime. It is the in-memory overlay the worker-core page of the worker template describes: it is seeded from configuration, a change made by an operator wins over the seed and the override is logged, and the change is lost when the process restarts, because nothing reads the Jobs table that the migration of the worker template creates. Every other durable store of the engine lives in the engine and reads a table the host creates: SqlIdempotencyStore, SqlFailedWorkStore and SqlSingletonLease. The durable catalog belongs beside them, so that the worker template and a base-template service that registers the engine get the same behaviour and the template only wires it. This PBI adds a SQL implementation of IJobCatalog to the engine. At start it loads the catalog from the Jobs table, seeds a job that exists only in the configuration and keeps the in-memory catalog as its cache for reads. Upsert, Pause and Resume are written to the table before the cache changes; a change made by an operator wins over the seed of the configuration and is logged. A catalog provider option selects the in-memory or the SQL catalog, and the in-memory catalog stays the default, so an existing host is unchanged. When the SQL provider is selected and the Jobs table or one of its columns is missing, the start fails with the missing object named. When the store is unreachable during a mutation, the mutation is refused and the cache is not changed, so the cache never shows a state the table does not hold. The catalog stays per worker and carries no tenant or project.

Acceptance criteria

AC1 Given a host that selects the SQL catalog provider of ConnectSoft.Workers.Runtime, when an operator pauses a job or changes its schedule through IJobCatalog and the process restarts, then the catalog is loaded from the Jobs table with the change in place, a job that exists only in the configuration is seeded into the table, and the change of the operator wins over the seed and is logged (docs/architecture/ecosystem-composition.md lists the catalog gap of the worker template; ADR-0028).
AC2 Given the SQL catalog, when Upsert, Pause or Resume is called, then the change is written to the Jobs table before the in-memory cache changes and reads are served from the cache; a mutation while the store is unreachable is refused and leaves the cache unchanged, proven by a test with a failing connection (ADR-0028 decision 5 gives each service its own store, model/components.yaml).
AC3 Given a host that sets no catalog provider, when the engine is registered, then InMemoryJobCatalog is used as before; and given the SQL provider with a missing Jobs table or a missing column, when the host starts, then the start fails with the missing object named (ADR-0028, model/components.yaml).
Traces: adrs ADR-0028
Sources model/components.yaml, docs/architecture/ecosystem-composition.md, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1055 SQL job catalog beside the in-memory catalog implementation A SQL IJobCatalog beside InMemoryJobCatalog in ConnectSoft.Workers.Runtime loads the catalog from the Jobs table at start, seeds a job found only in configuration, persists Upsert, Pause and Resume before the cache changes, logs an operator override and keeps the in-memory catalog as its cache; a mutation with the store unreachable is refused and leaves the cache unchanged. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1056 Catalog provider option, registration and the start check of the Jobs table implementation The options of the engine gain a catalog provider with the in-memory catalog as its default and the SQL catalog as its second value; AddWorkersRuntime registers the catalog the option selects; with the SQL provider the start checks the Jobs table and its columns and fails with the missing object named; docs/Features.md of the library lists the provider. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1058 Verify the persisted catalog across a restart and the refused mutation verification Run dotnet test -c Release --no-build on the library solution; the tests of the reload after a restart, the seeded job, the operator override, the refused mutation with a failing connection, the default provider and the start check pass and prove AC1 to AC3 of AIFACTORY-US-219 (ADR-0028). ConnectSoft.Workers.Runtime

AIFACTORY-US-207: Workers.Runtime library: a base-template service registers the engine for its background loop with drain, idempotency, failed work and the singleton lease

enabling · persona asset-maintainer As an asset maintainer, I want a guide and a conformance suite for a base-template service that registers the worker engine, so that the services with background loops reuse one drain, idempotency, failed-work and lease implementation instead of writing their own.

The Factory has services on the base template that run background loops: environment promotion, pipeline polling, retention sweeps and outbox maintenance. Each would otherwise write its own drain, idempotency, failed-work handling and single-run guarantee. The worker-ops page of the worker template sets the boundary of the engine: the package uses the Generic Host and dependency injection abstractions only, and the ASP.NET host, the Hangfire dashboard, the MCP server, the operations pages and Pulumi stay in the template. The getting started page of the library holds a Generic Host sample. This PBI makes the engine consumable by a base-template service. The getting started page gains the registration of a reconciler loop in such a service: the job in the catalog, the handler, the drain coordinator wired to the stop of the host, the idempotency and failed-work stores on the relational store the service owns, and the singleton lease so that two replicas do not run the same job. The engine has no schema of its own today: its SQL stores read the tables ProcessedMessages, FailedWork and Leases, and the SQL catalog the table Jobs, of the schema ConnectSoft.WorkerTemplate, which only the migration of the worker template creates. The engine therefore ships an idempotent schema script for the four tables with a configurable schema name and the two shapes of the stores: the default shape, which equals the tables of today, and the scoped shape with the scope columns and the scoped key, which a Factory service selects together with the scoped key option. A base-template service applies the script from its own migration, and a test of the worker template keeps its migrations equal to the script, the default generation in the default shape and the Factory profile in the scoped shape. The page states the rules the pages of the template record: a periodic timer ticks only with a SQL or Redis lease provider and fails the start otherwise, and readiness mapping stays with the host. A conformance suite in the test support of the library lets a consuming service prove drain, a single run under two replicas, a repeat answered by idempotency and a failed-work record after exhausted retries. The guide and the suite are proven here on a sample host: a Generic Host test host under the tests folder of the library, which registers the engine the way the guide shows for a base-template service and has no template dependency. The proof on a generated base-template service belongs to the first service that registers the engine in a later increment. An architecture test keeps the forbidden references out of the package. The engine is for background loops; run and workflow state stays on the grains of ADR-0024 and never moves into the engine.

Acceptance criteria

AC1 Given the getting started page of the library, when a maintainer of a base-template service follows it, then the service registers AddWorkersRuntime for a reconciler loop with a catalog job, a handler, drain on host stop, idempotency and failed work on the relational store the service owns and the singleton lease, and the tables are created in the store of the service from the schema script of the engine, in the scoped shape when the service selects the scoped key, applied by the migration of the service under its own schema name, as ADR-0028 decision 5 gives each service its own store.
AC2 Given the conformance suite of the library, when a consuming service runs it against its registration, then it proves that a stop request drains in-flight work, that two replicas run a singleton job once, that a repeated message is answered by idempotency and that exhausted retries leave one Open failed-work record; a periodic timer without a SQL or Redis lease provider fails the start (ADR-0024, model/components.yaml).
AC3 Given the package ConnectSoft.Workers.Runtime, when the architecture test runs, then the package references no ASP.NET shared framework, no Hangfire dashboard, no MCP server package and no Pulumi package, and holds no run or workflow state type, which ADR-0024 decision 1 keeps on grains.
Traces: adrs ADR-0024, ADR-0028
Depends on AIFACTORY-US-206, AIFACTORY-US-219
Sources model/components.yaml, docs/architecture/ecosystem-composition.md, docs/architecture/adr/0024-durable-execution-substrate.md, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1013 Reconciler loop of a base-template service in the getting started page documentation docs/GettingStarted.md of the library shows a base-template service that registers AddWorkersRuntime for a reconciler loop: catalog job, handler, drain on host stop, SQL idempotency and failed work on the store of the service, the tables created from the schema script of the engine by the migration of the service, the singleton lease, the scoped key option and the option that requires the scope; the page lists what stays on the host. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1057 Schema script of the engine for ProcessedMessages, FailedWork, Leases and Jobs migration The engine ships an idempotent schema script for the tables ProcessedMessages, FailedWork, Leases and Jobs with a configurable schema name and a shape parameter: the default shape creates the tables as migration 2 of the worker template does, with message id and payload hash as the key of ProcessedMessages, and the scoped shape adds the scope columns and makes tenant, project and message id the key; the SQL stores and the SQL catalog read the schema name from the options, with ConnectSoft.WorkerTemplate as the default in place of the fixed name; docs/GettingStarted.md shows a base-template service applying the script in the scoped shape from its own migration; a test of the library applies the script twice to an empty database in each shape and runs the SQL stores on the result, and the script is the reference a test of the worker template compares its migrations with (AIFACTORY-TASK-1022). ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1014 Conformance suite for a consuming host fixture A conformance suite in the test support of the library takes the service collection of a consuming host and runs the drain, single-run, idempotent repeat and failed-work cases against it with in-memory and SQL providers. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-625 Consumption guide and conformance tests for a base-template service verification The guide of AIFACTORY-TASK-1013 and the suite of AIFACTORY-TASK-1014 are run on a sample host: a Generic Host test host under tests/ of ConnectSoft.Workers.Runtime that registers the engine the way the guide shows for a base-template service (catalog job, handler, drain on host stop, SQL stores on tables created from the schema script, singleton lease) and has no template dependency. It registers AddWorkersRuntime for its reconciler loop and passes the suite; an architecture test keeps Microsoft.AspNetCore.App, the Hangfire dashboard, MCP and Pulumi out of the library, which proves AC1 to AC3 of AIFACTORY-US-207. ConnectSoft.Workers.Runtime

AIFACTORY-US-208: Workers.Runtime library: the pipeline exists, the package is published to the ConnectSoft feed and the worker template restores it from the feed

evidence · persona asset-maintainer As an asset maintainer, I want proof that the worker engine is on the ConnectSoft feed with a version the worker template and the services pin, so that no consumer restores the engine from a local source or carries a pin for a version that was never published.

This PBI is the publication proof of the feature. The worker-ops page of the worker template and the Runbook page of the library record the same open point: the repository has a pipeline definition that tests and packs on master, but the pipeline has not been created, so the worker template cannot restore the package from the feed and carries a pin for a version that is not published. The Runbook also records that the coverage threshold of the pipeline is zero. The pipeline is created from the definition in the repository, builds, tests, packs and pushes the package to the ConnectSoft feed, the Azure Artifacts feed the ConnectSoft libraries already publish to, which decision D114 makes the Factory feed, and refuses a version that is already on the feed. The coverage threshold is raised from zero to the value the measured coverage of the engine supports, and the value is recorded in the Runbook. Two consumers prove the result. A clean Generic Host probe that has the ConnectSoft feed as its only source restores the published version, registers the engine and dispatches one scoped work item. The pipeline of the worker template restores the same version from the feed, with no local source and no project reference, as the locked decision of its backlog requires. The published version replaces the pin in the worker template and is recorded in the Runbook, where the base-template services read it.

Acceptance criteria

AC1 Given the pipeline definition in the library repository, when the pipeline is created and runs on master, then the package is built, tested, packed and pushed to the ConnectSoft feed, a version already on the feed is refused, the coverage threshold is no longer zero, and the published version is recorded in the Runbook page (ADR-0028, model/backlog/epics.yaml).
AC2 Given a clean Generic Host probe with the ConnectSoft feed as its only package source, when it restores the published version, registers AddWorkersRuntime and dispatches one scoped work item, then the handler receives the scope and the probe ends without a failed-work record (ADR-0014 decision 1, docs/architecture/ecosystem-composition.md names the engine package on the feed as a need of this component).
AC3 Given the pipeline of the worker template, when it restores its packages, then ConnectSoft.Workers.Runtime comes from the ConnectSoft feed at the published version, with no local source and no project reference, and the template solution builds and passes its tests on it (ADR-0028, model/components.yaml).
Traces: adrs ADR-0014, ADR-0028
Depends on AIFACTORY-US-206, AIFACTORY-US-207, AIFACTORY-US-219
Sources model/components.yaml, model/backlog/epics.yaml, docs/architecture/ecosystem-composition.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-623 Package published from its own pipeline operations The runtime repository has its pipeline in Azure DevOps, created from the definition in the repository; it packs ConnectSoft.Workers.Runtime on master and pushes it to the feed; the worker template restores the package from the feed in its pipeline and not from a local source, and the version is verified. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1015 Version guard and coverage threshold in the runtime pipeline operations The publication stage of the runtime pipeline refuses a version that is already on the feed with the reason; the coverage threshold is set to the value the measured coverage supports and is recorded, with the published version, in the Runbook page of the library. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1016 Generic Host feed probe for the published engine fixture A probe project with the ConnectSoft feed as its only source restores the published version, registers the engine with in-memory providers and dispatches one scoped work item to a recording handler; the probe runs as the last stage of the runtime pipeline. ConnectSoft.Workers.Runtime
AIFACTORY-TASK-1017 Verify the published engine by the probe and by the worker template restore verification One run of the runtime pipeline publishes the package and the probe passes; one run of the worker template pipeline restores the published version from the feed and builds and tests the template solution; both runs prove AC1 to AC3 of AIFACTORY-US-208 (ADR-0028). ConnectSoft.WorkerTemplate

AIFACTORY-US-111: Workers.Runtime library: the worker engine published and shaped for Factory services is delivered and proven by its consumers

enabling · persona asset-maintainer As an asset maintainer, I want WorkerTemplate to carry the worker engine published and shaped for Factory services, so that it serves runtime worker, reconcilers, dispatchers; the Workers.Runtime engine in base-template services with background loops without later rework.

This is the integration PBI of the feature. An asset maintainer takes the worker engine from a repository whose package has never been published to a package on the ConnectSoft feed that carries the scope and the envelope identity in its contracts and that a base-template service can register for its background loop. The implementation lives in the earlier PBIs of this file; this PBI proves them together from the side of the two consumers. The worker template restores the published version from the feed and builds on it, and the sample host of the library, a Generic Host test host that registers the engine for a reconciler loop the way the guide shows for a base-template service, passes the conformance suite with the scoped key selected and scoped work: a message of one tenant is processed once, the same message id of another tenant is processed as well, a message without scope is refused and recorded, and a stop request drains. The feature is done when the engine is on the feed with a recorded version, its contracts carry tenant, project, run, step and attempt identity, the scoped idempotency key is an option beside the unchanged default store, an operator change of the job catalog survives a restart under the SQL catalog, the tables of the stores can be created from the schema script of the engine, and no reference to the ASP.NET host, the Hangfire dashboard, MCP or Pulumi has entered the package. Repository of the feature: ConnectSoft.Workers.Runtime. The service that reaches the engine in a later increment is the agent runtime, through the worker template.

Acceptance criteria

AC1 Given the library repository ConnectSoft.Workers.Runtime, when its pipeline runs, then the package builds, its tests pass and it publishes to the ConnectSoft feed with a verified version that the consuming repositories pin (ADR-0028, model/components.yaml).
AC2 Given the work of AIFACTORY-TASK-623 (package published from its own pipeline) is done, then the runtime repository has its pipeline, the package is on the feed, and the worker template restores it from the feed in its pipeline and not from a local source, with the version verified (ADR-0028, docs/architecture/ecosystem-composition.md).
AC3 Given the work of AIFACTORY-TASK-624 (scope and envelope identifiers in the engine contracts) is done, then the trigger contract, the work item and the failed-work model carry tenant, project, run and step identity as library types in the namespace of the library, the scoped idempotency key is an option of the SQL and Redis stores beside the unchanged default key and the Generic Host sample shows them (ADR-0014 decision 1 and decision 3).
AC4 Given the work of AIFACTORY-TASK-625 (consumption guide and conformance tests for a base-template service) is done, then the getting started page and the conformance suite show a base-template service registering the engine for its reconciler loop with drain, idempotency, failed work and the singleton lease, and an architecture test keeps the ASP.NET shared framework, the Hangfire dashboard, MCP and Pulumi out of the library (ADR-0024, ADR-0028 decision 5).
AC5 Given the work of AIFACTORY-TASK-1055 (SQL job catalog beside the in-memory catalog) and of AIFACTORY-TASK-1057 (schema script of the engine) is done, then a host that selects the SQL catalog keeps an operator change of a job across a restart, and a base-template service creates the tables of the stores and of the catalog in its own store from the script of the engine (ADR-0028 decision 5, model/components.yaml).
Traces: adrs ADR-0012, ADR-0014, ADR-0024, ADR-0028
Depends on AIFACTORY-US-206, AIFACTORY-US-207, AIFACTORY-US-208, AIFACTORY-US-219
Sources model/components.yaml, docs/architecture/ecosystem-composition.md, docs/architecture/adr/0014-run-and-lifecycle-envelopes.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1018 Scoped conformance run of the sample host on the published engine verification The sample host of AIFACTORY-TASK-625, a Generic Host test host under tests/ of ConnectSoft.Workers.Runtime that registers the engine the way the guide shows for a base-template service (catalog job, handler, drain on host stop, SQL stores, singleton lease) with no template dependency, is built for this run against the engine package of the ConnectSoft feed in place of the project reference and passes the conformance suite with the scoped key selected and scoped work of two tenants, a message without scope and a stop request; the run proves AC3 and AC4 of AIFACTORY-US-111 (ADR-0014). ConnectSoft.Workers.Runtime
AIFACTORY-TASK-695 Verify workers-runtime-library-delivered by running the declared command verification Run dotnet build -c Release and dotnet test -c Release --no-build on the library solution and on the worker template solution restored from the feed; they pass and prove AC1 to AC5 of AIFACTORY-US-111. ConnectSoft.Workers.Runtime