Skip to content

AIFACTORY-FEAT-173: Health aggregator template: the Factory fleet profile with scoped targets and readiness events

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 I2 Deliver it · State elaborated · Route backend-developer · Phase before development · Build order 29 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 I2 are developed. The mark travels with every task (tag phase:before-development).

The health aggregator template is the component behind environment, SLO and fleet health (RuntimeEnvironmentService, SloService, FleetInventoryService and the generated product host name it). Its own control-plane backlog is complete through B-F06: merged inventory with an ops registry and Kubernetes scrape, multi-probe polling with adaptive intervals and hysteresis, aggregator-owned incidents with notify-only sinks, history and SLO tables, the Blazor graph, MCP tools, Redis leader election and the engine library. Its locked decisions make the registry single-tenant and ops-only and keep the sinks outside the Factory: the Factory needs targets that belong to an environment, a tenant and a project, reads filtered by the Factory token, health flips and the readiness bundle (readiness-bundle.schema.json, ADR-0014) as Factory events, and discovery from the Factory's own environment inventory. Component: HealthChecks aggregator (extend).

Delivers —
Stubs —
Realizes components: cmp-healthchecks
adrs: ADR-0014, ADR-0015, ADR-0018
Requirements —
Depends on AIFACTORY-FEAT-174 HealthChecks.Aggregator engine library: published and reusable from a base-template service
AIFACTORY-FEAT-162 Authorization server template: the Factory token contract, workload identity and delegation
Sources model/components.yaml, ConnectSoft.HealthChecksAggregatorTemplate/Docs/Control Plane/Index.md, ConnectSoft.HealthChecksAggregatorTemplate/Docs/Control Plane/health-agg-core.md, docs/reference/schemas/readiness-bundle.schema.json

AIFACTORY-US-270: Health aggregator template: under the Factory profile a target belongs to an environment, a tenant and a project, and the admin, health and graph routes return only what the Factory token grants

enabling · persona asset-maintainer As an asset maintainer, I want the registry and the reads of a generated aggregator to be scoped by the Factory token, so that one aggregator serves the environments of many tenants and no caller sees a target of another tenant.

The locked decisions of the template (Docs/Control Plane/Index.md of the template) make the runtime registry ops-only and single-tenant behind the Identity Platform policy HealthAggregatorOps, authenticate /api/admin/*, /api/health/* and /graph, and leave the orchestrator /health and readiness anonymous. That suits one operations team and one inventory. A Factory estate has many tenants, and ADR-0015 decision 3 enforces authorization at the backend for every read and write. Under UseFactoryProfile this PBI gives every target an environment, a tenant and a project: the rows of HealthCheckTargets, the configured Services[], the history tables and the incidents carry the three identifiers through the scoped records of the engine feature, and the template defines no second copy of those records. A request takes its tenant from the validated token through the scope accessor of the pinned ConnectSoft.Extensions.AI.Factory.Abstractions package, and a project is admitted only when the token grants a role in it. The policy HealthAggregatorOps on the admin routes is satisfied by the Operator role of the project of the target, by its Workspace admin and by a Platform admin of the tenant, with the role names taken from the token contract of the abstractions package and typed nowhere in the template. The health and graph routes answer a holder of any role of the project and return only its targets. A target of another tenant is answered 404, the same answer as for a name that does not exist, and a missing role inside the tenant of the caller is answered 403, as the amendments of ADR-0015 state. A user token has one audience, the gateway that fronts the aggregator. The environment and SLO services call with a workload token that carries a service scope and no tenant claim; the aggregator reads the tenant and project such a caller forwards only when the token holds the service scope that names it. The anonymous /health and readiness report the state of the aggregator itself and no target of any tenant. The audit events of the registry, TargetCreated, TargetUpdated, TargetDeleted and TargetEnabledChanged, record the scope with the actor.

Acceptance criteria

AC1 Given an aggregator generated with UseFactoryProfile that holds targets of two tenants, when a caller of the first tenant lists targets on the admin route, reads the health detail and opens the graph, then every answer holds only targets of projects in which the token grants a role, and no target, history row or incident of the second tenant appears (ADR-0015 decision 3).
AC2 Given a caller of one tenant, when it reads, changes or deletes a target of another tenant by name, then the answer is 404 with the same body as for a name that does not exist; given a caller without the Operator role in the project of a target of its own tenant, when it calls an admin route for that target, then the answer is 403 (ADR-0015 amendment on a resource of another tenant, docs/architecture/adr/0015-factory-tenancy-under-canonical-adr-0100.md).
AC3 Given a workload token with the service scope that names the forwarded scope and no tenant claim, when the caller forwards a tenant and a project, then the aggregator reads them and answers within that scope; given a workload token without that service scope, then the forwarded scope is ignored and the answer is 403 (ADR-0015 amendment on audience and workload tokens).
AC4 Given the anonymous /health and readiness endpoints of the generated aggregator, when they are probed without a token, then they report the state of the aggregator itself and name no target of any tenant, as the locked decision on public and authenticated routes keeps them (ADR-0015 decision 3, model/components.yaml).
AC5 Given a registry write under the profile, when a target is created, changed, enabled or deleted, then the audit event of the registry records the actor and the environment, tenant and project of the target; given a generation without UseFactoryProfile, then the registry stays single-tenant and its tests pass unchanged (ADR-0028 amendment on the Factory profile switch).
Traces: services RuntimeEnvironmentService
Traces: adrs ADR-0015, ADR-0028
Relates: nfrs NFR-01
Depends on feature:component-healthchecks-aggregator-engine-library, feature:component-auth-server-template-factory-tokens, feature:component-extensions-ai, feature:component-base-template-factory-profile
Sources model/components.yaml, model/template-parameters/connectsoft-healthchecks-aggregator.yaml, docs/architecture/adr/0015-factory-tenancy-under-canonical-adr-0100.md, docs/planes/control/tenancy.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-626 Targets scoped by environment, tenant and project implementation Under UseFactoryProfile target records and the ops registry carry environment, tenant and project; /api/admin/, /api/health/ and /graph read the scope from the Factory token through the scope accessor of the pinned abstractions package (HealthAggregatorOps satisfied by the Factory operator role of the project) and return only targets within it; a target of another tenant is answered 404 and a missing role 403; the orchestrator /health and readiness stay anonymous. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1224 Scope columns and indexes on the target, history and incident tables migration A migration adds the environment, tenant and project columns to HealthCheckTargets, HealthCheckSamples, HealthCheckFlips and the incident and SLO tables under the profile, makes the target name unique per scope and adds the tenant filter of the persistence layer; mapping tests run against an isolated test database. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1225 Two-tenant fixture over the admin, health and graph routes fixture An acceptance fixture seeds targets of two tenants and calls every admin, health and graph route with user tokens of both tenants, with a token without the Operator role and with workload tokens with and without the service scope; it asserts the filtered answers, the 404 and the 403. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1226 Verify the scoped reads and the 404 and 403 answers verification Generate the template with UseFactoryProfile, build it in Release and run the two-tenant fixture and the mapping tests; all pass, and the default generation passes its registry tests unchanged, which proves AC1 to AC5 of AIFACTORY-US-270 (ADR-0015). ConnectSoft.HealthChecksAggregatorTemplate

AIFACTORY-US-271: Health aggregator template: health flips, incident changes and readiness changes of an environment are published under the run event envelope through the Orleans messaging profile

enabling · persona asset-maintainer As an asset maintainer, I want the aggregator to announce what it observes as Factory events, so that the environment, SLO and fleet services react to a health change without polling the aggregator.

The template keeps the aggregator as the system of record of incidents: a flip is a row of HealthCheckFlips, an incident is a row of its own tables, and the IHealthIncidentSink adapters for webhooks, PagerDuty and Azure Event Grid only notify. The parameter MessagingModelType offers None, NServiceBus and MassTransit (model/template-parameters/connectsoft-healthchecks-aggregator.yaml), and nothing is published for another service to consume. Under UseFactoryProfile this PBI adds three event types: a target changed its health state, an incident was opened, changed or resolved, and the stabilized readiness of an environment changed, which is the result of the hysteresis machine over the targets of that environment. The three are inputs of the environment, SLO and fleet services and are not the events those services are modelled with: ServiceHealthChanged of SloService and IncidentOpened, IncidentStateChanged and IncidentResolved of FleetIncidentService stay what those services publish from what they derive. An incident of the aggregator records that one target is failing and is not a fleet incident; a fleet incident is opened by FleetIncidentService under its own rules. No modelled service lists a consumes row for the aggregator events yet, which this PBI reports as a gap of the model and does not close. Each event is published under the run event envelope of the contracts package, as the amendment of ADR-0014 on envelopes per event family requires of a Factory service, with the tenant and project of the target and the environment in the payload. The outbox record is written in the same transaction as the flip row or the incident row (ADR-0014 decision 4) and dispatched through the Orleans messaging profile, whose value the template receives from the base template through its base-template submodule; the template adds no messaging code of its own. Leader election stays on the Redis lock, as the locked decision states, so only the leader writes rows and outbox records. The readiness bundle of docs/reference/schemas/readiness-bundle.schema.json is the pinned input set of a readiness-activated workflow and is assembled by the workflow engine; its members may be signal references with a producer, an event, an object identifier, an object version and an event identifier. The aggregator does not assemble a bundle. Its readiness event carries exactly what such a member needs: the environment as the object, a version that grows with every transition, and the event identifier. An authenticated read returns the current readiness of an environment in the same shape for a consumer that missed the event. The sinks stay notify-only: an event is published whether or not a sink is configured, and a failing sink never holds back an event.

Acceptance criteria

AC1 Given an aggregator generated with UseFactoryProfile, when a target of an environment changes its health state, then the flip row and one outbox record are committed in one transaction and the event is published under run-event-envelope-v1 with the tenant and project of the target, a correlation identifier and the environment, target, previous and new state in its payload; when the transaction rolls back, then neither the row nor the event exists (ADR-0014 decision 4).
AC2 Given an incident that is opened, changed and resolved, when each transition commits, then one event per transition is published with the incident identifier, and a consumer that receives the same event identifier twice applies it once; a configured sink that fails delays no event and is retried on its own (ADR-0014 decision 3, ADR-0012).
AC3 Given the stabilized readiness of an environment changes, when the readiness event is published, then it carries the producer, the event name, the environment identifier as the object, a version that grows with every transition and the event identifier, and a test validates that a member built from it is a valid signal reference of readiness-bundle-v1 (docs/reference/schemas/readiness-bundle.schema.json, docs/reference/schemas/handoff-refs.schema.json).
AC4 Given a caller within the scope of an environment, when it reads the current readiness of that environment, then the answer has the shape of the last readiness event with its version, and a caller of another tenant is answered 404 (ADR-0015 amendment on a resource of another tenant, ADR-0014).
AC5 Given a generation without UseFactoryProfile, when its tests run, then no event is published, the sinks behave as before and the messaging choices of the template are unchanged (ADR-0028 amendment on the Factory profile switch, model/template-parameters/connectsoft-healthchecks-aggregator.yaml).
Traces: services RuntimeEnvironmentService
Traces: descriptors run-event-envelope-v1, readiness-bundle-v1
Traces: adrs ADR-0012, ADR-0014, ADR-0015, ADR-0028
Depends on AIFACTORY-US-270, feature:component-base-template-factory-profile, feature:contracts-package
Sources model/components.yaml, model/template-parameters/connectsoft-healthchecks-aggregator.yaml, docs/reference/schemas/readiness-bundle.schema.json, docs/reference/schemas/handoff-refs.schema.json, docs/reference/schemas/run-event-envelope.schema.json, docs/architecture/adr/0014-run-and-lifecycle-envelopes.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1227 Contracts and topics of the three aggregator event types with golden files contract The messaging model of the template declares the health flip, incident change and environment readiness event types with their payload fields and topic names, each carried by the run event envelope of the pinned contracts package; one golden JSON file per event type fixes the serialised form, and a test builds a signal reference from the readiness event and validates it against docs/reference/schemas/handoff-refs.schema.json. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-627 Health flips and the readiness bundle as Factory events implementation Under UseFactoryProfile health flips, incident changes and readiness changes of an environment are published under the run event envelope through the Orleans messaging profile, with the outbox record in the transaction of the row; the readiness event carries what a signal member of a readiness bundle needs against readiness-bundle.schema.json, an authenticated read returns the current readiness of an environment in the same shape, and the IHealthIncidentSink adapters stay notify-only. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1228 Consumer, duplicate and rollback tests on the Orleans inbox fixture The acceptance suite of the Factory case holds a consumer that reads a flip, the three incident transitions and a readiness change from the Orleans inbox with every required envelope field, a duplicate delivery test, a rollback test that finds no outbox record and a test in which a failing sink delays no event. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1229 Verify the published events and the readiness read verification Generate the template with UseFactoryProfile, build it in Release and run the golden file, consumer, duplicate, rollback and readiness read tests; all pass, and the default generation publishes nothing, which proves AC1 to AC5 of AIFACTORY-US-271 (ADR-0014, docs/reference/schemas/readiness-bundle.schema.json). ConnectSoft.HealthChecksAggregatorTemplate

AIFACTORY-US-272: Health aggregator template: a discovery source reads targets from the environment inventory of the Factory and merges them by the existing inventory rules

enabling · persona asset-maintainer As an asset maintainer, I want the aggregator to take its targets from the inventory the Factory already keeps of each environment, so that a workload that is deployed is probed without anyone registering it by hand.

The core page of the template (Docs/Control Plane/health-agg-core.md of the template) fixes the merge of the inventory: the runtime registry first, then the Kubernetes scrape snapshot, then the configured Services[], then the resolution of discovery-scheme addresses; a name the registry and the scrape share is skipped silently, and a name the scrape and the configuration share is logged as TargetCollision. The parameter Discovery has the values Static and ServiceDiscovery. In a Factory estate the workloads of an environment and their endpoints are already known: RuntimeEnvironmentService keeps the observed inventory of every environment (model/services/runtime-cloud/RuntimeEnvironmentService.yaml). Its operation GetRuntimeInventory, a GET on /factory/environments/{environmentId}/inventory under the scope factory.runtime.read, returns the inventory of one environment with its staleness, and each ObservedWorkload of it carries a name, a kind, a version, the ready and the desired replicas, endpoints as a list of strings and a health value. The inventory carries no health address and no criticality, and tenant and project belong to the environment and not to the workload. This PBI adds a further discovery source behind a port. For every environment its options name, with the tenant and the project of that environment, the inventory provider calls GetRuntimeInventory with a workload token that holds factory.runtime.read and turns each workload into targets: one target per entry of endpoints, with the health address derived from the endpoint and the health path an option names, the workload name as the target name, and the environment, tenant and project of the configured environment. Criticality comes from a default of the options and can be overridden for one target by a registry row. The tests of the template run the provider against a stub that serves recorded responses of GetRuntimeInventory in exactly that shape, because the service is scaffolded after the template is published; the operation is Factory code of a later feature and is therefore named under the sources of this PBI and not among its traces. The Discovery parameter gains a value for this source, which UseFactoryProfile selects. The precedence is recorded on the core page and in a test: the registry wins over the inventory, so that an operator can override or mute a discovered target, and the inventory wins over the Kubernetes scrape and the configuration, because it alone is bound to a scope. A collision is decided per target key, the name with its three identifiers: a key the registry shares with the inventory is skipped silently, as a name the registry shares with the scrape is today, and a key the inventory shares with the scrape or with the configuration is logged as TargetCollision. When the inventory cannot be read the last known targets stay and are reported as Degraded, the rule the page already applies when a discovery address cannot be resolved; a response that is marked stale removes no target. A target that is gone from a fresh inventory is removed after the next successful read and its open incident is resolved with that reason.

Acceptance criteria

AC1 Given a stub that serves recorded responses of GetRuntimeInventory for two environments of two tenants, each with ObservedWorkload entries that carry name, kind, version, replicas, endpoints and health, when the aggregator starts with the inventory discovery selected and a workload token that holds factory.runtime.read, then it polls one target per endpoint at the health address derived from the endpoint and the health path of the options, every target carries the environment, tenant and project of its configured environment and the default criticality of the options, a registry row overrides the criticality of one target, and a token without the scope is refused by the stub with 403 (ADR-0015 decision 2, model/services/runtime-cloud/RuntimeEnvironmentService.yaml).
AC2 Given the same target key in the registry, the inventory, the Kubernetes scrape and the configuration, when the inventory is merged, then the registry row wins over the inventory and that collision is skipped silently, as a name the registry shares with the scrape is today, the inventory wins over the scrape and over the configuration and each of those two collisions is logged as TargetCollision, and the core page of the template states this precedence and what is logged per pair (ADR-0018, model/components.yaml).
AC3 Given GetRuntimeInventory cannot be reached, when the refresh interval passes, then the last known targets keep being polled and are reported as Degraded with the reason, and when the operation answers again the targets are refreshed and the state clears; a response that is marked stale removes no target (ADR-0018, docs/architecture/nfr-baseline.md).
AC4 Given a workload that is gone from a fresh inventory, when the next successful read is merged, then its target is no longer polled and its open incident is resolved with the reason that the target left the inventory, and the resolution is published as an incident event of the profile (ADR-0014, ADR-0018).
Traces: services RuntimeEnvironmentService
Traces: adrs ADR-0014, ADR-0015, ADR-0018
Depends on AIFACTORY-US-270, AIFACTORY-US-271
Sources model/components.yaml, model/services/runtime-cloud/RuntimeEnvironmentService.yaml, model/template-parameters/connectsoft-healthchecks-aggregator.yaml, docs/architecture/nfr-baseline.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1230 Inventory provider port, the client contract of GetRuntimeInventory and the recorded precedence contract The template declares the inventory provider port, a client contract for the response of GetRuntimeInventory with the ObservedWorkload fields of model/services/runtime-cloud/RuntimeEnvironmentService.yaml (name, kind, version, replicas, endpoints and health, with the staleness of the inventory), the options of the HTTP implementation (the environments with their tenant and project, the workload token with factory.runtime.read, the health path and the default criticality), the new value of the Discovery parameter, and the merge precedence with what is logged per pair written on the core page of the template. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-628 Discovery from the Factory environment inventory implementation A discovery source calls GetRuntimeInventory for each configured environment beside static configuration and the Kubernetes scrape, derives one target per endpoint with the health path of the options, the scope of the environment and the default criticality that a registry row can override, merges by the existing inventory rules and is selected by the discovery parameter, with the merge precedence recorded; last known targets stay Degraded while the inventory cannot be read, and a target that left a fresh inventory is removed and its incident resolved. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1231 Stub inventory and the merge, outage and removal tests fixture A stub that serves recorded responses of GetRuntimeInventory for two environments in the shape of model/services/runtime-cloud/RuntimeEnvironmentService.yaml and refuses a token without factory.runtime.read, and tests that cover the derived health address, the default criticality with its registry override, the four-way collision with its precedence and its log records, an unreadable inventory with last known targets kept as Degraded, a stale response and a workload that leaves the inventory with its incident resolved. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1232 Verify the inventory discovery against the stub verification Generate the template with UseFactoryProfile, build it in Release and run the discovery tests against the stub of GetRuntimeInventory; the scoped targets with their derived health address and criticality, the precedence, the outage and the removal tests pass and prove AC1 to AC4 of AIFACTORY-US-272 (ADR-0018, model/services/runtime-cloud/RuntimeEnvironmentService.yaml). ConnectSoft.HealthChecksAggregatorTemplate

AIFACTORY-US-273: Health aggregator template: the boolean parameter UseFactoryProfile, off by default, turns scope, Factory events and inventory discovery on together and leaves every other generation unchanged

enabling · persona asset-maintainer As an asset maintainer, I want one profile parameter that generates the Factory shape of the aggregator, so that a Factory aggregator is generated by one switch and a generation without it is what it was.

The amendment of ADR-0028 on the Factory profile switch selects the Factory shape of a template by the boolean parameter UseFactoryProfile, off by default and named the same in every template that has a Factory shape. The A-F06 page of the template lists its own parameters, --discovery, --enable-registry, --probe-auth and --alert-sinks, and the template composes its symbols on those of the base template through template/healthchecks.template.extend.json and its merge script. The pieces of the earlier PBIs each hang on one of these: the registry needs EnableRegistry and the identity platform, the events need the Orleans messaging value with NHibernate persistence on SQL Server, and the discovery needs its new value. A Factory aggregator needs all of them at once. This PBI brings UseFactoryProfile into the template as the symbol the base template defines, received through the base-template submodule and not declared a second time. The submodule pointer moves to the base template that carries the symbol and the Orleans messaging value, build/MaterializedDirectory.Packages.props is regenerated, and no file inside the submodule is edited, as the pages of the template require. With the parameter on, computed symbols of the extend file derive the registry, the identity platform, NHibernate persistence, the Orleans messaging choice with the actor model it needs, the inventory discovery value, the scope requirement and the operator role policy, whatever the single options say; a conflicting single option is overridden by the computed symbols and is not refused, the rule AIFACTORY-US-212 of the feature component-worker-template-factory-profile sets for the profile of the worker template. Leader election stays on the Redis lock under the profile. With the parameter off, the template generates what it generates today, which a comparison of the default case proves. The parameters page of the template documents the parameter and what it turns on, and the template inventory of the documentation repository picks it up.

Acceptance criteria

AC1 Given the template, when an aggregator is generated with UseFactoryProfile and no other option, then it carries the scoped registry with the operator role policy, the three event types on the Orleans messaging profile, the inventory discovery and NHibernate persistence, and it builds in Release and passes its tests (ADR-0028 amendment on the Factory profile switch, ADR-0012).
AC2 Given UseFactoryProfile is on and a conflicting single option is passed, such as --enable-registry false, a broker messaging value or --discovery Static, when the aggregator is generated, then the computed symbols of the profile win and the generated settings show the profile values; given the parameter is off, then the output of the default case equals the output of the template before this feature (ADR-0028, model/template-parameters/connectsoft-healthchecks-aggregator.yaml).
AC3 Given the composed template configuration, when it is inspected, then UseFactoryProfile is defined once, by the base template of the submodule, the package snapshot check passes, and after the next template inventory model/template-parameters/connectsoft-healthchecks-aggregator.yaml lists the parameter and the new value of Discovery (ADR-0028, docs/architecture/catalogs/templates.md keeps the row of the template).
Traces: adrs ADR-0012, ADR-0028
Depends on AIFACTORY-US-270, AIFACTORY-US-271, AIFACTORY-US-272, feature:component-base-template-factory-profile
Sources model/components.yaml, model/templates.yaml, model/template-parameters/connectsoft-healthchecks-aggregator.yaml, docs/architecture/catalogs/templates.md, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1233 Computed symbols of the Factory profile in the extend file of the template contract template/healthchecks.template.extend.json and the merge script derive, from the UseFactoryProfile symbol of the base template, the registry, the identity platform, NHibernate persistence, the Orleans messaging choice with its actor model, the inventory discovery value, the scope requirement and the operator role policy; the composed configuration defines UseFactoryProfile once. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1234 Base-template submodule moved to the base template with the profile and the package snapshot regenerated operations The base-template submodule of the template points at the base template that carries UseFactoryProfile and the Orleans value of MessagingModelType, build/MaterializedDirectory.Packages.props is regenerated and its check passes, and no file inside the submodule is edited. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1235 Parameters page of the template documents the Factory profile documentation The A-F06 page and the consumer documentation of the template describe UseFactoryProfile, the symbols it derives, the override rule for a conflicting single option and the new value of Discovery, so that python -I tools/docs_model inventory-templates of the documentation repository lists them in model/template-parameters/connectsoft-healthchecks-aggregator.yaml without a hand edit. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1236 Verify the profile on, the profile off and the conflicting options verification Generate an aggregator with the profile on, one with it off and three with the profile on and one conflicting option each; build and test each; every profile case shows the profile values and the default case equals the output before the feature, which proves AC1 to AC3 of AIFACTORY-US-273 (ADR-0028). ConnectSoft.HealthChecksAggregatorTemplate

AIFACTORY-US-274: Health aggregator template: the packed template passes the default cases and the Factory profile case of the shared template pipeline before the package publishes

evidence · persona asset-maintainer As an asset maintainer, I want every change of the aggregator template gated by its generated cases, the Factory profile case among them, so that a package that would generate an aggregator which leaks a target or loses an event never reaches the feed.

This PBI is the gate of the feature. The estate gates its templates with the shared template pipeline of ConnectSoft.AzurePipelines (template-ci/v1). The aggregator template already owns the manifest build/template-ci.json with a case for the template kind and a case for the solution kind and the payload validator build/Test-HealthChecksPayload.ps1, and the rollout ledger of the shared pipeline lists the repository as pending. The status table on the index page of the control plane backlog of the template keeps the features of A-F02 to A-F06 and of B-F01 to B-F06 open until the remaining review of their implementations closes, and the work of this feature changes exactly that code: the scoped registry changes the registry of A-F02, the incident events the incidents of A-F05 and the scope columns the history tables of B-F01. The amendment of ADR-0028 on the Factory profile switch has the shared pipeline admit one additional gating case per declared profile beside the default case. This PBI first closes every review that table lists as open, A-F02 to A-F06 and B-F01 to B-F05 here and B-F06 through AIFACTORY-US-269 of the engine library feature, so that the gate runs on reviewed code, and then adds the Factory profile case to the manifest: a generation with UseFactoryProfile under the name of a Factory service repository, with the services the case needs, SQL Server for the outbox and the two-tenant fixture, a co-hosted silo and Redis for the leader lock. The candidate is packed once and installed; each case is generated, restored and built in Release; its tests run with the discovery and completion checks, the two-tenant fixture, the event tests and the inventory discovery tests among them for the Factory case; the dependency audit runs. A case that fails any stage fails the run with the case and the stage named, and publication is not reached. Publication requires the complete reports of every case bound to the candidate and pushes a version that is not yet on the ConnectSoft feed. This is an evidence PBI (D113): a template feature has no scenario, so the gate names what it proves through its ADRs, the requirement on release gates and its sources: the isolation rule of ADR-0015 and the generated-solution gate the epic requires of every template.

Acceptance criteria

AC1 Given a change of the aggregator template with the reviews of the A-F02 to A-F06 and B-F01 to B-F06 implementations closed, which the status table of the template lists as open, when the template pipeline runs the shared installer jobs with build/template-ci.json, then the candidate is packed once and installed, the default cases and the Factory profile case are generated, restored and built in Release, their tests run with the discovery and completion checks against the services the manifest declares, and the dependency audit runs (FR-11, ADR-0028 amendment on the Factory profile switch).
AC2 Given a planted defect in the Factory profile case, a disabled tenant filter or an event published outside its transaction, when the pipeline evaluates the run, then the run fails at the test stage with the case named, no later stage of that case is reported as passed and the package is not published (FR-11, ADR-0015 decision 3).
AC3 Given complete reports of every case bound to the candidate, when the publication job runs, then the package is pushed to the ConnectSoft feed with a version that was not on it, and a fresh install of that version generates an aggregator with UseFactoryProfile whose two-tenant, event and discovery tests pass unchanged (ADR-0028, model/backlog/epics.yaml states the gate as the completion of the epic).
Traces: adrs ADR-0015, ADR-0028
Traces: requirements FR-11
Depends on AIFACTORY-US-270, AIFACTORY-US-271, AIFACTORY-US-272, AIFACTORY-US-273, feature:component-base-template-findings
Sources model/components.yaml, model/backlog/epics.yaml, docs/architecture/ecosystem-composition.md, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md, docs/architecture/catalogs/templates.md

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1237 Factory profile case in the template pipeline manifest operations build/template-ci.json of the template holds, beside its default cases, one Factory profile case that generates with UseFactoryProfile under a Factory service name, with its test filter and the required services SQL Server, a silo and Redis; the shared installer jobs run the case on every change of the template. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1238 Planted isolation and transaction defects for the gate fixture Pipeline fixtures generate the Factory profile case with a disabled tenant filter and with an event published outside its transaction, and assert that each run fails at the test stage with the case named and that publication is not reached. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-1239 Open reviews closed and publication bound to the complete reports operations The reviews of the A-F02 to A-F06 and B-F01 to B-F05 implementations the status table of the template lists as open are closed, the review of B-F06 is closed by AIFACTORY-US-269, and the table says so for every row; the publication job requires the complete report of every case bound to the candidate and refuses a missing or failed stage and a version that is already on the ConnectSoft feed with the reason. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-629 Factory parameters and the generated-solution gate verification One green run and the two planted runs of the gate: the pipeline instantiates the packed template with UseFactoryProfile, builds and tests the generated solution with scope, the Factory event publication and the inventory discovery on together, and publishes only on the green run, after the reviews of the A-F02 to A-F06 and B-F01 to B-F06 implementations are closed; the runs prove AC1 to AC3 of AIFACTORY-US-274 (FR-11, ADR-0028). ConnectSoft.HealthChecksAggregatorTemplate

AIFACTORY-US-123: Health aggregator template: the Factory fleet profile with scoped targets and readiness events is delivered and proven on a generated solution

enabling · persona asset-maintainer As an asset maintainer, I want HealthChecks aggregator to carry the Factory fleet profile with scoped targets and readiness events, so that it serves fleet and Factory health; the engine library in the environment and SLO services without later rework.

This is the integration PBI of the feature. With the scoped targets, the Factory events, the inventory discovery, the profile parameter and the gate of the earlier PBIs, an asset maintainer generates the aggregator of a Factory estate by one command: dotnet new connectsoft-healthchecks-aggregator with UseFactoryProfile. The generated service takes its targets from the environment inventory, keeps each under its environment, tenant and project, answers its admin, health and graph routes only within what the Factory token grants, with 404 for a target of another tenant and 403 for a missing role, and publishes health flips, incident changes and readiness changes of an environment under the run event envelope with the row that records them. A generation without the parameter is the single-tenant aggregator the template generated before. The implementation lives in the tasks of the earlier PBIs; this PBI keeps the migrated verification of the feature. The feature is done when the packed template passes its default cases and the Factory profile case in the shared template pipeline, the package is on the ConnectSoft feed, and a fresh install of it generates the Factory aggregator that builds and passes its tests unchanged, which is the component the environment service of this increment and the SLO and fleet services of later increments name for their health.

Acceptance criteria

AC1 Given the template repository ConnectSoft.HealthChecksAggregatorTemplate with the work of this feature, when the template is packed, installed and instantiated in its pipeline, then the generated solution of every case builds and its tests pass before the package publishes with a verified version (ADR-0028, model/components.yaml).
AC2 Given the work of AIFACTORY-TASK-626 (targets scoped by environment, tenant and project) is done, then target records and the ops registry carry environment, tenant and project, the admin, health and graph routes read the scope from the Factory token and return only targets within it, proven by a two-tenant test, and the orchestrator health and readiness stay anonymous (ADR-0015 decision 3).
AC3 Given the work of AIFACTORY-TASK-627 (health flips and the readiness bundle as Factory events) is done, then health flips, incident changes and readiness changes are published under the run event envelope through the Orleans messaging profile, the readiness event carries what a signal member of docs/reference/schemas/readiness-bundle.schema.json needs, and the sinks stay notify-only (ADR-0014 decision 4).
AC4 Given the work of AIFACTORY-TASK-628 (discovery from the Factory environment inventory) is done, then a discovery source reads targets from the environment inventory of the Factory beside static configuration and the Kubernetes scrape, merged by the existing inventory rules and selected by the discovery parameter, with the merge precedence recorded (ADR-0018, model/services/runtime-cloud/RuntimeEnvironmentService.yaml).
AC5 Given the work of AIFACTORY-TASK-629 (factory parameters and the generated-solution gate) is done, then UseFactoryProfile turns scope, the Factory event publication and the inventory discovery on together, the pipeline instantiates the packed template with it, builds and tests the generated solution, and the reviews the status table of the template lists as open, A-F02 to A-F06 and B-F01 to B-F06 and not only B-F04 to B-F06 as the migrated text had it, are closed first (ADR-0028 amendment on the Factory profile switch).
Traces: services RuntimeEnvironmentService
Traces: adrs ADR-0014, ADR-0015, ADR-0018, ADR-0028
Depends on AIFACTORY-US-270, AIFACTORY-US-271, AIFACTORY-US-272, AIFACTORY-US-273, AIFACTORY-US-274
Sources model/components.yaml, model/services/runtime-cloud/RuntimeEnvironmentService.yaml, docs/reference/schemas/readiness-bundle.schema.json

Tasks

Task Kind Expected output Repository
AIFACTORY-TASK-1240 Locked decisions of the template extended for the Factory profile documentation The table of locked decisions on the index page of the control plane backlog of the template states, beside each decision the profile touches (the ops-only single-tenant registry, the notify-only sinks, the discovery default and the Redis leader election), what holds under UseFactoryProfile and that the decision is unchanged without it. ConnectSoft.HealthChecksAggregatorTemplate
AIFACTORY-TASK-682 Verify healthchecks-aggregator-fleet-profile-delivered by running the declared command verification Run dotnet build -c Release and dotnet test -c Release --no-build on the authoring solution and on the default and Factory profile cases generated from the published package; they pass and prove AC1 to AC5 of AIFACTORY-US-123. ConnectSoft.HealthChecksAggregatorTemplate