AIFACTORY-FEAT-049: RuntimeCloudHost: gateway delivery¶
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 Runtime Cloud (PF-09) · Increment I2 Deliver it · State elaborated · Route backend-developer · Build order 100 of 185 (Factory code)
RuntimeCloudHost is the platform API gateway of bounded context BC-25 (Provisioning & Reconciliation). The API gateway of the Runtime Cloud platform (ADR-0028): routes public REST and internal gRPC calls to the 3 services it fronts, validates tokens and scopes, and owns no business state. Its own repository is ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost.
| Delivers | RuntimeCloudHost (complete) |
| Stubs | — |
| Realizes | adrs: ADR-0004, ADR-0012, ADR-0014, ADR-0017 |
| Requirements | FR-08, FR-09, FUX-05, NFR-06, NFR-08, NFR-09, XL-04, XL-10, XL-14 |
| Depends on | — |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml |
Scenarios to trace (5, catalog): SCN-RuntimeCloudHost-001 ✓, SCN-RuntimeCloudHost-002 ✓, SCN-RuntimeCloudHost-003 ✓, SCN-RuntimeCloudHost-004 ✓, SCN-RuntimeCloudHost-005 ✓
AIFACTORY-US-076: RuntimeCloudHost routes the calls of its platform under a trusted scope¶
enabling · persona operator
As an operator, I want one gateway in front of ExecutionCapacityService, IaCProvisioningService and RuntimeEnvironmentService that validates tokens and scopes, so that no service of the platform is reachable from outside the cluster except through its gateway and every call arrives with a scope the service can trust.
This is the integration PBI of the gateway of the Runtime Cloud platform. ADR-0028 makes RuntimeCloudHost the API gateway of its platform: it routes public REST and internal gRPC calls to the three services the model lists under deployment.fronts, ExecutionCapacityService, IaCProvisioningService and RuntimeEnvironmentService, validates tokens and scopes and owns no business state, no relational store and no secret (gateway role GW-03). The repository ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost is created by the first task of this feature by the steps of the repository checklist of feature repository-and-pipeline-conventions: it is scaffolded once from the pinned API gateway template package with UseFactoryProfile and the gateway role Platform (feature component-api-gateway-template), which fixes persistence, messaging and the actor model to none. The gateway therefore has no outbox and no inbox, consumes no event (ADR-0028 amendment on gateways and events) and its only store is the shared cache. The scope of a call is established once from the validated token with the scope accessor of the pinned ConnectSoft.Extensions.AI.Factory.Abstractions package (feature component-extensions-ai); the gateway copies neither the accessor nor the token contract. A user token has one audience, this gateway, and the gateway forwards it unchanged to the fronted service, which accepts the audience of its own gateway, and exchanges no token (ADR-0015 amendments D114 and D117). A workload token carries service scopes and no tenant claim and is admitted only on an internal gRPC route whose operation names a scope the token holds. The feature is delivered by five further PBIs: the fronts file and the routes generated from it (AIFACTORY-US-1082), token, tenant and scope on every read route (AIFACTORY-US-1083), the pass-through of a shared-write call (AIFACTORY-US-1084), the production routes whose gate stays in the fronted service (AIFACTORY-US-1085), and health, targets, limits and telemetry with the three failure modes of a gateway (AIFACTORY-US-1086). A call without a token, with an expired token or with a user token issued for another gateway is answered 401 and a missing scope 403, and no fronted service is called. A project-scoped route names its project in the path, a query parameter or a body member and never in a header the caller types, and the gateway checks it against the roles of the token; no operation of the three service files names a project that way, so every route either addresses a resource by its identifier or reads under the tenant of the token, the gateway forwards it under the tenant of the token and the scope of the operation, the fronted service answers 403 for a missing role and 404 for a resource of another tenant (ADR-0015 amendment D113), and the gateway returns that answer unchanged; a project header a caller sends is dropped on every route. All three fronted services are delivered complete in this increment, ExecutionCapacityService by feature execution-capacity-service-complete after its thin delivery of I1, so every route serves from the start. The inbound list of model/services/runtime-cloud/RuntimeCloudHost.yaml names DeliveryHost, AgentRuntimeWorker, ToolExecutorHost and StudioBff: ToolExecutorHost is delivered in I1, DeliveryHost in this increment, and AgentRuntimeWorker and StudioBff in I3. The row of DeliveryHost has the kind event, while a gateway consumes and publishes no event, so that row describes no call this gateway serves and is reported as a correction of the model. Apart from that list, EnvironmentPromotionService, delivered in this increment, calls the two internal gRPC read routes for promotion verification. Each caller calls the gateway in its own PBIs, and this feature waits for none of them. The feature adds no direct public route to any service of the platform. The gateway invents no response.
Acceptance criteria
| AC1 | Given the repository ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost created by the steps of the repository checklist, whose first commit is the unchanged output of dotnet new connectsoft-apigateway -n ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost --UseFactoryProfile true --GatewayRole Platform from the pinned template package, when its pipeline runs with the work of this feature, then no second scaffold was run, the solution builds, the tests pass with complete reports and a container image is published (ADR-0028, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| AC2 | Given a valid token for a route of each fronted service, when the call passes the gateway, then the scope is established once from the token through the scope accessor of the pinned abstractions package, the call is forwarded with the token unchanged, the tenant of the token, the correlation id and the trace context, the fronted service answers and the response returns unchanged, as AIFACTORY-US-1083 to AIFACTORY-US-1085 prove per route class (ADR-0015, FR-08). |
| AC3 | Given the generated gateway, when its architecture test runs, then the test fails on a persistence model, an aggregate, a migration or a message consumer, the gateway binds no relational store, no outbox and no inbox, its configuration holds no secret, and no event of the model lists RuntimeCloudHost as a consumer (ADR-0028, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| AC4 | Given the gateway deployed with two replicas, when RuntimeCloudHost/RuntimeCloudHealth is probed and one replica is stopped, then health reports the identity platform and the three fronted services, the other replica keeps serving and nothing is replayed, because the gateway holds no state (ADR-0017, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| Traces: services | RuntimeCloudHost, ExecutionCapacityService, IaCProvisioningService, RuntimeEnvironmentService |
| Traces: apis | RuntimeCloudHost/RuntimeCloudHealth |
| Traces: adrs | ADR-0004, ADR-0012, ADR-0014, ADR-0015, ADR-0017, ADR-0028 |
| Traces: requirements | FR-08, FR-09 |
| Depends on | AIFACTORY-US-1082, AIFACTORY-US-1083, AIFACTORY-US-1084, AIFACTORY-US-1085, AIFACTORY-US-1086, feature:repository-and-pipeline-conventions, feature:component-api-gateway-template, feature:component-extensions-ai, feature:execution-capacity-service-thin, feature:execution-capacity-service-complete, feature:ia-cprovisioning-service, feature:runtime-environment-service |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml, model/gateways.yaml, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md, docs/planes/execution/environments/services/runtime-cloud-host/index.md#purpose-and-responsibilities |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-295 Create the repository ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost and scaffold it from the API gateway template with the Factory profile and the Platform gateway role |
implementation | The repository exists, created by the steps of the repository checklist of feature repository-and-pipeline-conventions; its first commit is the unchanged output of dotnet new connectsoft-apigateway -n ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost --UseFactoryProfile true --GatewayRole Platform from the pinned template package, whose version the repository records; the solution builds and the template tests, the architecture test of the Platform role included, pass in the repository pipeline, which publishes the container image; a deviation is corrected in the repository before the fronts file of AIFACTORY-TASK-296 is written. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4343 Deployment values of the gateway: replica range, ports, probes and the address of each fronted service |
operations | The deployment manifest of the gateway states the replica range, the https and grpc ports, the liveness and readiness probes on the health operation and one base address per fronted service from configuration, as model/services/runtime-cloud/RuntimeCloudHost.yaml records them; it leaves RuntimeCloud:Host:FrontedServices at its default, the three service identifiers of deployment.fronts, sets ConnectSoftIdentityPlatform:Authority to the authority of the profile, supplies the entries of RuntimeCloud:Host:Targets from the values of the installation, holds no secret and binds the shared cache as its only store; the same image runs in the saas-default, hybrid, on-prem and hybrid-compute topologies (ADR-0017). | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-784 Verify runtime-cloud-host-routes-its-platform by running the declared command |
verification | Run dotnet build -c Release and dotnet test -c Release --no-build in the pipeline of the repository; a run that discovers no test counts as a failure; the runs pass and prove AC1 to AC4 of AIFACTORY-US-076, that is the repository with its scaffold of the Platform role, the scope established once and forwarded, the architecture test of the Platform role and, for AC4, the acceptance test of feature TwoReplicas (dotnet test -c Release --filter "Category=Acceptance&Feature=TwoReplicas"), which hosts two instances behind one test balancer with the fakes of the fronted services, stops one and asserts that the other keeps serving and that no call is replayed. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-US-1082: Runtime Cloud fronts file: named clients and REST and gRPC routes of the three fronted services, generated at build¶
enabling · persona platform-admin
As a platform admin, I want the route table of the Runtime Cloud gateway generated from the list of services it fronts, so that every operation of the platform has exactly one route with its scope and class and no forwarding code is written by hand.
The API gateway template is a custom gateway with controllers, use cases and named clients and no reverse proxy, so a route exists only when it is declared. Under UseFactoryProfile the generated solution holds a build-time source generator that reads a fronts file on every build and emits one named HTTP client and one gRPC client per fronted service, the REST and gRPC routes that forward to them and the route table (feature component-api-gateway-template). This PBI writes the fronts file of the Runtime Cloud platform. It lists the three services of deployment.fronts in model/services/runtime-cloud/RuntimeCloudHost.yaml, each with its base addresses from configuration and its operations in the shape of the apis section of its service file: name, method and path or gRPC method with its streaming mode, scope, side-effect class and idempotency. For ExecutionCapacityService these are the five REST operations ListWorkerPools, SetWorkerPool, GetQuotas, SetQuota and ListCapacityLeases and the three gRPC methods Capacity.AcquireLease, Capacity.RenewLease and Capacity.ReleaseLease. For IaCProvisioningService these are the five REST operations ListSpecifications, ListProvisioningRuns, GetProvisioningRun, PlanProvisioning and CancelProvisioning and the gRPC method Provisioning.GetCurrentSpecification. For RuntimeEnvironmentService these are the five REST operations GetRuntimeInventory, ListDrift, ObserveEnvironment, ListReconciliationProposals and DecideReconciliation and the gRPC method Inventory.GetObservedState. That is fifteen REST routes and five unary gRPC routes. By side-effect class ten REST routes and two gRPC routes are read, two REST routes and the three lease methods are shared-write, and three REST routes, SetWorkerPool, PlanProvisioning and DecideReconciliation, are production. Each REST entry also states how its operation addresses a project. No operation of the three service files names a project in its path, a query parameter or a body member. Nine are marked as addressed by a resource identifier only, because their path or body names a run, a specification, an environment, a proposal, a pool or a quota scope: GetProvisioningRun, CancelProvisioning, PlanProvisioning, GetRuntimeInventory, ListDrift, ObserveEnvironment, DecideReconciliation, SetWorkerPool and SetQuota. The path parameter scope of SetQuota names a project quota, a tenant quota or an edition default, and the model does not state how a project is told from the others in it, so the gateway cannot check a project there and the gap is reported as a correction of the service file. Six read under the scope of the caller and are marked as scoped by the tenant of the token: ListSpecifications, ListProvisioningRuns, ListReconciliationProposals, ListWorkerPools, GetQuotas and ListCapacityLeases. Each gRPC route names the scope a workload token must hold: the security section of model/services/runtime-cloud/ExecutionCapacityService.yaml names factory.capacity.lease for the three lease methods, and the model names no scope for Provisioning.GetCurrentSpecification and Inventory.GetObservedState; the rule proposed here is that their routes require the read scope of their service, factory.provisioning.read and factory.runtime.read, held by the workload token, and the owner may choose another scope. A test lists the emitted route table against the file and against the three service files of the model, so an operation of the model without a route, a route without an operation, a service named twice or a route named twice fails the build with the entry named. A path that no route matches is answered 404. The gateway adds no operation of its own beyond RuntimeCloudHealth and RuntimeCloudTargets, transforms no payload and composes no response from two services. The option RuntimeCloud:Host:FrontedServices is bound at startup and compared with the service names of the fronts file: a value that names no service of the file, or a service of the file that the value omits, fails startup with the name; its default names the three service identifiers of deployment.fronts, so the deployment manifest does not set it. The pipeline publishes the OpenAPI document of the fifteen public REST operations as a build output, checked against the fronts file and the three service files. The typed client of this gateway belongs to this feature (D140): one library in the repository ConnectSoft.AI.SoftwareFactory.Clients, generated with dotnet new connectsoft-api-library, the generation switch and UseFactoryProfile in the user-token layout from that published document, by the rules of feature typed-gateway-clients (AIFACTORY-US-381 to AIFACTORY-US-383), which it applies and does not repeat. It holds the fifteen public REST operations and no internal gRPC method, is checked against the model by the contract check of that feature, takes the shared types from the pinned contracts package, attaches the token issued for this gateway only to requests to the base address of this gateway, is versioned with the contracts package, published to the ConnectSoft feed and recorded on the Runbook page with the consumer that pins it. No workload layout is generated, because no public REST operation of this gateway admits a workload token; the workload callers of the platform, EnvironmentPromotionService, AgentRuntimeWorker and ToolExecutorHost, call its internal gRPC routes and pin no REST client. The caller of the package is StudioBff, which holds a user token and pins it in its own repository for the provisioning, inventory and capacity screens (AIFACTORY-US-1363); no caller writes a client of this gateway by hand.
Acceptance criteria
| AC1 | Given the fronts file of the Runtime Cloud platform, when the gateway builds, then one named HTTP client and one gRPC client exist per service of deployment.fronts and one route per REST operation and gRPC method of those services, fifteen REST routes and five gRPC routes, each with the scope, side-effect class, idempotency and streaming mode of the operation, and the route table test passes against model/services/runtime-cloud/RuntimeCloudHost.yaml and the three service files under model/services/runtime-cloud (ADR-0028). |
| AC2 | Given an operation removed from the file, a route named twice or a service named twice, when the gateway builds, then the build fails with the entry named; given RuntimeCloud:Host:FrontedServices at its default, when the gateway starts, then startup succeeds; given a value that names no service of the fronts file or omits one, then startup fails with the differing name; given a path no route matches, then the answer is 404 and no fronted service is called (ADR-0028, docs/architecture/catalogs/gateways.md). |
| AC3 | Given a fake of each fronted service, when one REST route and one gRPC route per service are called with a valid token, then each call reaches the fake of its service with the authorization header carrying the token of the caller unchanged, the tenant, the correlation id and the trace context, a project header sent by the caller has been dropped, and the response of the fake returns unchanged (ADR-0015, FR-08). |
| AC4 | Given the built gateway, when its pipeline publishes the OpenAPI document of the public REST routes, then the document holds exactly the fifteen REST operations of the fronts file with their methods, paths, scopes and response codes and no internal gRPC method, and a contract check fails the build when it differs from the three service files under model/services/runtime-cloud (docs/architecture/api-governance.md). |
| AC5 | Given the published OpenAPI document and the pinned API library template, when the client of this gateway is generated, built and published in the repository ConnectSoft.AI.SoftwareFactory.Clients, then it holds the fifteen public REST operations in the user-token layout and no internal gRPC method, the contract check against the three service files under model/services/runtime-cloud passes, the token issued for RuntimeCloudHost is attached only to requests to its base address, and the package is on the ConnectSoft feed with a version tied to the contracts package and recorded on the Runbook page with StudioBff as its consumer (model/backlog/pbis/engineering-readiness/typed-gateway-clients.yaml, ADR-0015). |
| Traces: services | RuntimeCloudHost, ExecutionCapacityService, IaCProvisioningService, RuntimeEnvironmentService |
| Traces: adrs | ADR-0015, ADR-0028 |
| Traces: requirements | FR-08, FR-09 |
| Depends on | feature:component-api-gateway-template, feature:execution-capacity-service-complete, feature:ia-cprovisioning-service, feature:runtime-environment-service, feature:typed-gateway-clients, feature:component-api-library-template-factory-clients |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml, model/backlog/pbis/engineering-readiness/typed-gateway-clients.yaml, model/services/runtime-cloud/ExecutionCapacityService.yaml, model/services/runtime-cloud/IaCProvisioningService.yaml, model/services/runtime-cloud/RuntimeEnvironmentService.yaml, model/gateways.yaml, docs/architecture/catalogs/gateways.md, docs/architecture/api-governance.md, docs/planes/execution/environments/services/runtime-cloud-host/index.md#context-and-boundaries |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-296 Fronts file with the REST and gRPC operations of ExecutionCapacityService, IaCProvisioningService and RuntimeEnvironmentService |
implementation | The fronts file lists the three services of deployment.fronts with their base addresses from configuration and every REST operation and gRPC method of their service files with name, path or method, streaming mode, scope, side-effect class and idempotency; each REST operation carries one of two markings, by a resource identifier only for the nine operations whose path or body names a run, a specification, an environment, a proposal, a pool or a quota scope, or by the tenant of the token for the six list and read operations, and a test fails when an operation carries none or two; each gRPC route names the scope a workload token must hold; the build emits the named clients, the fifteen REST routes, the five gRPC routes and the route table; RuntimeCloud:Host:FrontedServices is compared with the fronts file at startup; a project header of a caller is dropped on every route; a call without a valid token or scope is refused at the gateway by the generated policies. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4344 Fakes of the three fronted services and the token matrix of the acceptance suite |
fixture | The acceptance suite holds one fake per fronted service, generated from its fronts entry, that records the headers and metadata it received, answers a configured status and can stop answering, and tokens for the matrix of role, tenant and project, including an expired token, an identity token, a user token of another audience, a token with a role in one project and none in another, a token with the tenant-wide Platform admin role, and a workload token with and without the scope of each gRPC route. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4345 OpenAPI document of the public REST routes of the gateway as a published build output |
contract | The pipeline publishes one OpenAPI document with the fifteen public REST operations of the fronts file, their methods, paths, scopes, idempotency headers and response codes, and no internal gRPC method; a contract check compares the document with the three service files under model/services/runtime-cloud and fails the build on a missing operation, an operation of another service or a differing method, path, scope or response code, and the document is the input of the client of AIFACTORY-TASK-6602; no client package is built in this repository. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-6602 Typed client of RuntimeCloudHost in the user-token layout, generated from the published document and published to the ConnectSoft feed |
implementation | One client library in the repository ConnectSoft.AI.SoftwareFactory.Clients, generated with dotnet new connectsoft-api-library, the generation switch and UseFactoryProfile in the JWT bearer layout of the template from the OpenAPI document of AIFACTORY-TASK-4345, holds the fifteen public REST operations of ExecutionCapacityService, IaCProvisioningService and RuntimeEnvironmentService and no internal gRPC method, takes the shared types from the pinned contracts package and declares no handler, header name or claim name of its own; the contract check of AIFACTORY-TASK-1556 covers its document; a stub of the gateway in the fixture of the client solution answers 401, 403, 404 and a redirect to a second host, and the token issued for RuntimeCloudHost is attached only to requests to its base address; the package is versioned with the contracts package, published to the ConnectSoft feed by the generated pipeline after its tests pass and restored by the probe consumer from the feed alone; the Runbook page records its version with StudioBff as the consumer that pins it. |
ConnectSoft.AI.SoftwareFactory.Clients |
AIFACTORY-TASK-4346 Verify the route table against the fronts file and the model |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Feature=RouteTable"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-1082: one route per operation of the three service files under model/services/runtime-cloud, the failing builds, the start with the option at its default and the failing startup on a differing value, the 404 of an unknown path, one forwarded call per service and protocol with the dropped project header of the caller, and the contract check of the published OpenAPI document; AC5 is proven in the pipeline of ConnectSoft.AI.SoftwareFactory.Clients by the build, the tests and the probe stage of AIFACTORY-TASK-6602. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-US-1083: A read route of the Runtime Cloud gateway forwards a call only under a validated token, the tenant of the token and the scope of its operation¶
behavior · persona operator
As an operator, I want my reads of pools, quotas, leases, specifications, provisioning runs, inventories, drift and proposals to reach the services only with the tenant and the scope my token grants, so that nobody reads across a tenant through the gateway and every read is served by the service that owns the state.
A caller reaches a read operation of the Runtime Cloud platform through the gateway: an Operator, a Workspace admin, a Platform admin or an Observer reads worker pools, quotas and leases, deployment specifications and provisioning runs, the runtime inventory and the drift of an environment and the reconciliation proposals, and an Operator asks for an observation now, an operation the model gives the class read. A user presents an access token of the authorization server whose one audience is this gateway (ADR-0015 amendment D114). The gateway validates issuer, signature, lifetime and audience through the pinned resource-server library and requires the scope the operation names: factory.capacity.read for ListWorkerPools, GetQuotas and ListCapacityLeases, factory.provisioning.read for ListSpecifications, ListProvisioningRuns and GetProvisioningRun, factory.runtime.read for GetRuntimeInventory, ListDrift and ListReconciliationProposals, and factory.runtime.operate for ObserveEnvironment. It takes the tenant from the tid claim and overwrites any tenant header of the caller. No read operation names a project in its path, a query parameter or a body member: four name a run or an environment by identifier and six read under the scope of the caller, and a gateway without business state cannot know the tenant or the project of such a resource, so it forwards the call under the tenant of the token and the scope of the operation; the fronted service answers 403 for a missing role and 404 for a resource of another tenant (ADR-0015 amendment D113), and the gateway returns that answer unchanged. A project header a caller sends is dropped and establishes nothing. Every public REST operation names a factory. scope a user holds, so a workload token on a REST route is answered 403. The scope is established once with the scope accessor of the pinned abstractions package and forwarded: the authorization header with the user token itself, the tenant, the correlation id and the trace context; the gateway exchanges no token and the fronted service applies its own tenant filter and role policies (ADR-0015 amendment D117). The internal gRPC surface has two read methods, Provisioning.GetCurrentSpecification and Inventory.GetObservedState, which EnvironmentPromotionService calls in this increment for promotion verification and FleetInventoryService in its own increment; a workload token that holds the scope of the route (AIFACTORY-US-1082) is forwarded with the tenant-id and the project metadata of the caller unchanged, and a workload token without it, or a user token, is answered PERMISSION_DENIED and no fronted service is called. For every read route the response is served by the fronted service with no side effect and returns unchanged with the correlation id; the gateway keeps nothing of the call. A call without a token, with an expired token, with an identity token or with a user token issued for another gateway is answered 401 and a token without the scope 403; in each case no fronted service is called and the refusal is counted for the route and logged with the correlation id and without the token. When the fronted service does not answer, the route answers 503, over gRPC UNAVAILABLE, with a retry hint that names the service and never its address, and the routes of the other services keep serving.
Acceptance criteria
| AC1 | Given a user token whose audience is this gateway, with factory.provisioning.read, when the read route of GetProvisioningRun is called, then the gateway forwards the call with the user token unchanged in the authorization header, the tenant of the tid claim, the correlation id and the trace context, IaCProvisioningService answers, the response returns unchanged with the correlation id and nothing is written by the gateway (SCN-RuntimeCloudHost-004, ADR-0015). |
| AC2 | Given the token matrix of the acceptance suite, when the ten read routes are called, then a call without a token, with an expired token, with an identity token or with a user token issued for another gateway is answered 401, a token without the scope of the operation and a workload token on a REST route are answered 403, and in none of these cases a fronted service is called; each refusal is counted for its route and logged with the correlation id and without the token (SCN-RuntimeCloudHost-004, ADR-0015). |
| AC3 | Given a valid user token, a tenant header of the caller that names another tenant and a project header of the caller, when the routes of GetRuntimeInventory and ListProvisioningRuns are called, then the tenant header is overwritten with the tid claim, the project header is dropped, the calls are forwarded under the tenant of the token and the scope of the operation, and the 403 of the fronted service for a missing role and its 404 for a resource of another tenant (ADR-0015 amendment D113) return unchanged (SCN-RuntimeCloudHost-004, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| AC4 | Given a workload token that holds the scope of the route, when the gRPC routes of Provisioning.GetCurrentSpecification and Inventory.GetObservedState are called with tenant-id and project metadata, then each is forwarded with that metadata unchanged and the reply, a NOT_FOUND for an environment outside the forwarded tenant included, returns unchanged; given a workload token without the scope, or a user token, then the answer is PERMISSION_DENIED and no fronted service is called (SCN-RuntimeCloudHost-004, ADR-0015). |
| AC5 | Given the fake of RuntimeEnvironmentService does not answer, when its read routes are called, then the gateway answers 503, over gRPC UNAVAILABLE, with a problem response that carries a retry hint and names the service and never its address, no response is invented, and the read routes of ExecutionCapacityService and IaCProvisioningService keep serving (SCN-RuntimeCloudHost-004, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| Traces: services | RuntimeCloudHost, ExecutionCapacityService, IaCProvisioningService, RuntimeEnvironmentService |
| Traces: adrs | ADR-0015, ADR-0028 |
| Traces: requirements | FR-08, FR-09, XL-14 |
| Traces: scenarios | SCN-RuntimeCloudHost-004 |
| Relates: screens | capacity, provisioning, inventory |
| Depends on | AIFACTORY-US-1082, feature:component-api-gateway-template, feature:component-extensions-ai, feature:execution-capacity-service-complete, feature:ia-cprovisioning-service, feature:runtime-environment-service |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml, model/services/runtime-cloud/IaCProvisioningService.yaml, model/services/runtime-cloud/RuntimeEnvironmentService.yaml, docs/architecture/adr/0015-factory-tenancy-under-canonical-adr-0100.md, docs/planes/execution/environments/services/runtime-cloud-host/index.md#security |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4347 Issuer, audience, scope and tenant configuration of the read routes |
implementation | The gateway is configured with the authority of ConnectSoftIdentityPlatform:Authority and its own resource as the one audience of a user token; each read route requires the scope of its operation; the tenant header is overwritten with the tid claim; a project header of a caller is dropped on every route; a route addressed by a resource identifier or scoped by the tenant of the token is forwarded under the tenant of the token and leaves the role and the tenant of the resource to the fronted service; a workload token is refused with 403 on a REST route; the two gRPC read routes admit a workload token with the scope of the route and forward the tenant-id and project metadata unchanged; the user token is forwarded unchanged and no token is exchanged; refusals are counted per route and logged with the correlation id and without the token. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4348 Verify the read routes through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-RuntimeCloudHost-004"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-1083 over the token matrix: the token received by the fake equal to the user token of the caller, the overwritten tenant header and the dropped project header, the 403 and 404 of the fakes returned unchanged, a workload token refused on a REST route, the two gRPC read routes with and without the scope, and a fake that stops answering. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-US-1084: A shared-write route of the Runtime Cloud gateway passes the call through and the gateway keeps nothing between calls¶
behavior · persona operator
As an operator, I want a cancellation, a quota change or a capacity lease I repeat after a failure to be applied once, so that a lost answer or a restarted gateway never cancels twice, changes a quota twice or grants a second lease.
A shared-write operation changes state that others read. The Runtime Cloud platform has two on its public surface, SetQuota of ExecutionCapacityService and CancelProvisioning of IaCProvisioningService, and three on its internal gRPC surface, Capacity.AcquireLease, Capacity.RenewLease and Capacity.ReleaseLease of ExecutionCapacityService, which the runtime workers and the tool executor call for the capacity of an attempt, a sandbox, a build or a browser session. The caller sends each through the gateway under the token, tenant and scope rules of AIFACTORY-US-1083: factory.capacity.admin for SetQuota, factory.provisioning.apply for CancelProvisioning, and on a gRPC route a workload token that holds factory.capacity.lease. SetQuota names a quota scope and CancelProvisioning a run by identifier, so the gateway forwards them under the tenant of the token and the scope of the operation, and the 403 of the fronted service for a missing role and its 404 for a resource of another tenant (ADR-0015 amendment D113) return unchanged. None of these operations declares idempotency by key header: SetQuota and CancelProvisioning are naturally idempotent, so a repeated call finds the state the first one left and the fronted service answers it once, and the three lease methods carry the lease in their messages under the idempotency rule of ExecutionCapacityService. Where a caller sends an Idempotency-Key anyway the gateway forwards it unchanged and gives it no meaning. The gateway is no party to idempotency. It stores neither a key nor a result, keeps no session, no lease and no pending call, has no outbox and writes no event, so a gateway replica that crashes during a call loses nothing: the replica restarts, nothing is replayed, and the caller repeats the call and receives from the service the result of the one application (failure mode of a gateway replica crash in the model). When the fronted service does not answer, the route answers 503, over gRPC UNAVAILABLE, with a problem response that names the service and carries a retry hint, the other routes keep serving, and the caller repeats the call. A refusal by the gateway, 401 or 403, reaches no fronted service, so it applies nothing. An invalid body and every domain refusal, the 409 of CancelProvisioning for a run that is no longer Planned and the 422 of SetQuota among them, are answers of the fronted service and return unchanged with the correlation id. The gateway records request count and latency for the route with the status that was returned.
Acceptance criteria
| AC1 | Given a valid token with factory.provisioning.apply and the route of CancelProvisioning, when the call arrives and is repeated after the first answer was lost, then the gateway forwards both with the body and the established scope unchanged, the fake of IaCProvisioningService answers the second from the state the first left, and both responses return unchanged with the correlation id (SCN-RuntimeCloudHost-005, ADR-0015). |
| AC2 | Given a workload token that holds factory.capacity.lease, when a gateway replica is stopped while a call of Capacity.AcquireLease is in flight and the caller repeats it through another replica, then the second replica forwards the repeated call unchanged, the gateway replayed nothing, and an inspection of the shared cache finds no key, no lease and no result; that ExecutionCapacityService grants one lease is the rule of that service and is proven by its own suite (SCN-RuntimeCloudHost-005, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| AC3 | Given the fakes answer 409 for CancelProvisioning of a run that is no longer Planned, 422 for an invalid SetQuota, 403 for a missing role and 404 for a resource of another tenant, when the calls pass the gateway, then each answer returns unchanged with its body and the correlation id (SCN-RuntimeCloudHost-005, ADR-0015). |
| AC4 | Given a call without a token, a token that lacks the scope, a user token on a lease route and a fronted service that does not answer, when a shared-write route is called, then the answer is 401, 403, PERMISSION_DENIED or 503 respectively, a call the gateway refuses reaches no fronted service and applies nothing, and the 503 names the service and carries a retry hint while the other routes keep serving (SCN-RuntimeCloudHost-005, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| Traces: services | RuntimeCloudHost, ExecutionCapacityService, IaCProvisioningService |
| Traces: adrs | ADR-0015, ADR-0028 |
| Traces: requirements | FR-08, FR-09 |
| Traces: scenarios | SCN-RuntimeCloudHost-005 |
| Relates: screens | capacity, provisioning |
| Depends on | AIFACTORY-US-1082, AIFACTORY-US-1083, feature:component-api-gateway-template, feature:execution-capacity-service-complete, feature:ia-cprovisioning-service |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml, model/services/runtime-cloud/ExecutionCapacityService.yaml, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md, docs/planes/execution/environments/services/runtime-cloud-host/index.md#failure-and-recovery |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4349 Forwarded body, headers and metadata of a shared-write route and a stateless call path |
implementation | A shared-write route forwards the body, any Idempotency-Key header and the established scope unchanged and returns the status and the body of the fronted service unchanged; the three lease routes admit a workload token with factory.capacity.lease only and forward the tenant-id and project metadata unchanged; no key, body, lease or result is written to the shared cache or to any store; request count and latency are recorded for the route with the returned status. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4350 Verify the shared-write routes through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-RuntimeCloudHost-005"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-1084 with a repeated cancellation, a replica stopped during a lease call and the repeat through the second replica, the 409, 422, 403 and 404 of the fakes returned unchanged, the refusals of the gateway without a call to a fronted service, a fake that stops answering and an inspection of the shared cache that finds no key, lease or result. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-US-1085: A production route of the Runtime Cloud gateway is forwarded under its scope and the gate of the action stays in the fronted service¶
behavior · persona operator
As an operator, I want a provisioning plan, a reconciliation decision or a pool change to be gated by the service that owns its state, with the gateway only checking who I am and what I may call, so that an approval is never decided twice or by a component that holds no state.
Three operations of the Runtime Cloud platform are of side-effect class production: PlanProvisioning of IaCProvisioningService, which plans a specification version against an environment and leads to an apply in a cloud account, DecideReconciliation of RuntimeEnvironmentService, whose acceptance of a production proposal leads to such a run, and SetWorkerPool of ExecutionCapacityService, which creates or changes the bounds and autoscaling of a pool and is applied through provisioning. ADR-0028 leaves a platform gateway routing and the validation of tokens and scopes and no business state, and names a gateway that accumulates logic beyond routing and validation as a reason to revisit the decision. The gateway therefore treats these routes as it treats every route: it validates the token, takes the tenant from it, requires the scope the operation names, factory.provisioning.apply for PlanProvisioning, factory.runtime.operate for DecideReconciliation and factory.capacity.admin for SetWorkerPool, and forwards the call with the established scope. Each of them names a specification, a proposal or a pool by identifier, so the gateway forwards it under the tenant of the token and the scope of the operation, and the 403 of the fronted service for a missing role and its 404 for a resource of another tenant (ADR-0015 amendment D113) return unchanged. The gate itself is decided where the state is. Whether an apply needs an approval is decided by the policy decision of PolicyEngineService alone, asked by IaCProvisioningService for the run, or carried by the approval of the promotion that handed the desired state over; the approval is requested from and decided in RunControlService and reaches the service as an event. RuntimeEnvironmentService records the decision of the Operator and writes nothing to infrastructure. The gateway evaluates no policy and no approval, holds no approval reference, refuses nothing for a missing approval, calls no cloud account, writes no receipt and no audit evidence; where a command leaves audit evidence, the service that owns the command writes it to its own outbox in the transaction of the command, as the event AuditEvidenceSubmitted on the topic audit.evidence.v1.evidence-submitted. The Idempotency-Key of PlanProvisioning passes through unchanged. The answer of the fronted service, the 202 of an accepted plan, the 409 of a reused key or of a decided proposal, the 422 of an invalid plan, decision or pool among them, returns unchanged with the correlation id. A call without a token is answered 401 and a token without the scope 403, and no fronted service is called.
Acceptance criteria
| AC1 | Given a token with factory.provisioning.apply, when the production route of PlanProvisioning is called with an Idempotency-Key against the fake of IaCProvisioningService that answers 202, 409, 422, 403 and 404, then the gateway forwards the call with the key and the body unchanged under the tenant of the token and returns each answer unchanged with the correlation id; the gateway evaluated no policy, held no approval and wrote nothing (SCN-RuntimeCloudHost-003, ADR-0028). |
| AC2 | Given a token with factory.runtime.operate, when the production route of DecideReconciliation is called against the fake of RuntimeEnvironmentService that answers 200, 409, 422, 403 and 404, and a token with factory.capacity.admin calls the route of SetWorkerPool against the fake of ExecutionCapacityService that answers 200, 201 and 422, then every answer returns unchanged and no route was refused by the gateway for a missing approval (SCN-RuntimeCloudHost-003, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| AC3 | Given a call without a token or with an expired token, or a token that lacks the scope of the operation, when a production route is called, then the gateway answers 401 or 403, no fronted service is called and the refusal is counted for the route (SCN-RuntimeCloudHost-003, ADR-0015). |
| AC4 | Given the route table, when the register test lists every route of class production, then it finds exactly the routes of PlanProvisioning, DecideReconciliation and SetWorkerPool, each with its scope, and fails when the gateway holds a handler, a cache entry or a store for a policy decision, an approval, a receipt or an evidence record (SCN-RuntimeCloudHost-003, ADR-0028). |
| Traces: services | RuntimeCloudHost, ExecutionCapacityService, IaCProvisioningService, RuntimeEnvironmentService |
| Traces: adrs | ADR-0015, ADR-0019, ADR-0028 |
| Traces: requirements | FR-08, FR-09, XL-04 |
| Traces: scenarios | SCN-RuntimeCloudHost-003 |
| Relates: screens | provisioning, inventory, capacity |
| Depends on | AIFACTORY-US-1082, AIFACTORY-US-1083, feature:component-api-gateway-template, feature:execution-capacity-service-complete, feature:ia-cprovisioning-service, feature:runtime-environment-service |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml, model/services/runtime-cloud/IaCProvisioningService.yaml, model/services/runtime-cloud/RuntimeEnvironmentService.yaml, model/services/runtime-cloud/ExecutionCapacityService.yaml, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-4351 Production routes forwarded under their scope and the register of production routes |
implementation | The routes of PlanProvisioning, DecideReconciliation and SetWorkerPool require factory.provisioning.apply, factory.runtime.operate and factory.capacity.admin, forward the body, the Idempotency-Key of PlanProvisioning and the established scope unchanged and return the answer of the fronted service unchanged; a register test lists every route of class production from the route table and fails when such a route has no scope or when the gateway holds a handler, a cache entry or a store for a policy decision, an approval, a receipt or an evidence record. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4352 Fakes of the three production operations for the acceptance suite |
fixture | The acceptance suite holds a fake of PlanProvisioning that answers 202, 409, 422, 403 and 404, a fake of DecideReconciliation that answers 200, 409, 422, 403 and 404 and a fake of SetWorkerPool that answers 200, 201 and 422, each generated from its fronts entry and recording the headers and body it received. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4353 Verify the production routes through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-RuntimeCloudHost-003"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-1085: the plan forwarded with its key, the answers of the three fakes returned unchanged, the refusals of the gateway without a call to a fronted service and the register of production routes. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-US-1086: Health, targets, limits and telemetry of the Runtime Cloud gateway while the identity platform, a fronted service or a replica fails¶
behavior · persona operator
As an operator, I want to see whether the Runtime Cloud gateway, the identity platform and each fronted service answer, and which provisioning targets this installation has, so that I can tell a failing service from a failing gateway and act on the right one.
An operator and the probes of the cluster read the state of the gateway through its two own operations. RuntimeCloudHost/RuntimeCloudHealth reports liveness and readiness of the gateway with the aggregated health of the three services it fronts and of the identity platform. Liveness needs no token; the detail is served to a caller whose scope carries factory.health.read. The identity platform is the one required dependency of the gateway, and the health check is the detection signal the model names for its failure. While a cached signing key still validates tokens, the gateway stays in rotation: readiness stays ready, tokens that were already issued keep passing, and from the first failed probe the health operation answers 200 with the health degraded and a detail that names the identity platform as unreachable (ADR-0015 amendment D117). The gateway leaves rotation only when no valid key remains, because none was cached or the cached keys expired: readiness turns unready, the health operation answers 503 with a problem response that names the identity platform, and calls are refused, so the gateway fails closed. Liveness keeps answering 200 without a token in both phases. A fronted service is an optional dependency: when it does not answer, health reports it as unavailable in the detail and the answer stays 200, its routes answer 503 with a retry hint, and the routes of the other services keep serving. RuntimeCloudHost/RuntimeCloudTargets returns to a caller whose scope carries factory.meta.read the provisioning targets configured for the installation, Azure subscriptions, clusters and on-prem endpoints, and the version of the IaC runner. The targets are bound to the configuration section RuntimeCloud:Host:Targets of the gateway: a list with one entry per target of the installation, each the identifier and the kind of the target, azure-subscription, cluster or on-prem-endpoint after the three the model names, with no default value, every entry supplied by the deployment of the installation. An entry without an identifier or a kind, or with another kind, fails startup with the entry named, and a deployment that supplies no entry is answered with an empty list. An entry holds no credential or connection secret, and the reply names each target by its identifier and kind only. The model names this section nowhere, so it is reported as an option the model omits. The model names no operation of IaCProvisioningService that returns the runner version, and the gateway holds no state, so the runner version alone stays an open point reported to the owner; until it is decided the reply states it as not reported and invents no value. The model lists only 200 for the operation; the 401 for a call without a token and the 403 for a token without the scope are given by the host and are reported as codes the model omits; when no valid signing key remains the call is refused with the 503 of the failing-closed gateway. A call that exceeds the rate limit configured for the rate-limit class of its route (ADR-0018) is refused with 429, over gRPC RESOURCE_EXHAUSTED, through the pinned rate-limiting library, from the configuration of the deployment, and calls no fronted service. The gateway emits connectsoft.factory.runtime_cloud.host.requests with the dimensions service, route and status and connectsoft.factory.runtime_cloud.host.request_duration with service and route, the latency including the fronted service, each recorded through the helper of the pinned observability library, which puts the tenant, and the project where a call carries one, on the instrument by default (ADR-0019); the gateway carries the trace context to the service. Logs, activities and metrics never contain a token, a plan, an inventory or any other payload. A replica that crashes is detected by the readiness probe and restarts; because the gateway holds no state, nothing is replayed and callers repeat their call.
Acceptance criteria
| AC1 | Given the gateway with the identity platform and the fronted services reachable, when RuntimeCloudHost/RuntimeCloudHealth is called, then liveness answers 200 without a token and a caller with factory.health.read receives 200 with the state of each of the three fronted services and of the identity platform; a call for the detail without a token is answered 401 and a token without the scope 403 (SCN-RuntimeCloudHost-001). |
| AC2 | Given the identity platform is unreachable and a cached signing key still validates tokens, when calls arrive and RuntimeCloudHost/RuntimeCloudHealth is probed, then already issued tokens pass, readiness stays ready and health answers 200 degraded with a detail that names the identity platform; given no valid key remains, when calls arrive, then they are refused, readiness is unready, RuntimeCloudHost/RuntimeCloudHealth answers 503 with a problem response that names the identity platform and liveness keeps answering 200 (SCN-RuntimeCloudHost-001, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| AC3 | Given one fronted service does not answer, when RuntimeCloudHost/RuntimeCloudHealth and the routes are called, then health answers 200 and reports the service as unavailable in its detail, its routes answer 503 with a retry hint that names the service, over gRPC UNAVAILABLE, the routes of the other services keep serving and the gateway invents no response (SCN-RuntimeCloudHost-001, ADR-0028). |
| AC4 | Given a caller with factory.meta.read and the section RuntimeCloud:Host:Targets with two entries supplied by the deployment, when RuntimeCloudHost/RuntimeCloudTargets is called, then the response is 200 with the two targets by identifier and kind, no credential, and the runner version stated as not reported; given the section without entries, then the list is empty; given an entry without a kind, then startup fails with the entry named; given no token, a token without the scope, or no valid signing key, then the answer is 401, 403 or 503 and nothing is written (SCN-RuntimeCloudHost-002, ADR-0004). |
| AC5 | Given routed calls and a call above the rate limit of the rate-limit class of its route (ADR-0018), when the metrics and logs are read, then connectsoft.factory.runtime_cloud.host.requests counts every call by service, route and status, the call above the limit was refused with 429 and called no fronted service, connectsoft.factory.runtime_cloud.host.request_duration holds the latency by service and route, both carry the tenant of the call from the helper of the pinned observability library, and no log record, activity or metric holds a token or a payload (ADR-0019, model/services/runtime-cloud/RuntimeCloudHost.yaml). |
| Traces: services | RuntimeCloudHost, ExecutionCapacityService, IaCProvisioningService, RuntimeEnvironmentService |
| Traces: apis | RuntimeCloudHost/RuntimeCloudHealth, RuntimeCloudHost/RuntimeCloudTargets |
| Traces: adrs | ADR-0004, ADR-0015, ADR-0017, ADR-0018, ADR-0019, ADR-0028 |
| Traces: requirements | NFR-06, NFR-08, NFR-09 |
| Traces: scenarios | SCN-RuntimeCloudHost-001, SCN-RuntimeCloudHost-002 |
| Depends on | AIFACTORY-US-1082, feature:component-api-gateway-template, feature:component-observability-factory-conventions |
| Sources | model/services/runtime-cloud/RuntimeCloudHost.yaml, docs/architecture/adr/0017-deployment-profiles.md, docs/architecture/adr/0018-nfr-baseline.md, docs/planes/execution/environments/services/runtime-cloud-host/index.md#metrics-and-observability, docs/planes/execution/environments/services/runtime-cloud-host/index.md#failure-and-recovery |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-297 Health, targets and telemetry of the gateway |
implementation | The health operation serves liveness without a token and the detail under factory.health.read with the aggregated state of the three fronted services and of the identity platform; while the identity platform is unreachable and a cached signing key still validates tokens, readiness stays ready and the operation answers 200 degraded naming the identity platform; when no valid key remains, readiness turns unready and the operation answers 503 naming the identity platform (D117); the targets operation serves, under factory.meta.read, the targets bound from the configuration section RuntimeCloud:Host:Targets by identifier and kind, an empty list when the deployment supplies no entry, and the runner version as not reported, and never returns a credential; the section has no default value, and an entry without an identifier or a kind, or with a kind other than azure-subscription, cluster or on-prem-endpoint, fails startup with the entry named; every routed call records connectsoft.factory.runtime_cloud.host.requests and request_duration with their modelled dimensions and the tenant of the call, and carries the trace context to the service. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4354 Rate limits per route from the configuration of the gateway |
implementation | Each route takes its rate limit from the configuration of the deployment through the pinned rate-limiting library and answers 429 above it, over gRPC RESOURCE_EXHAUSTED; a refusal by the limit calls no fronted service and is counted under its status in connectsoft.factory.runtime_cloud.host.requests; no limit value is fixed in code. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4355 Runbook of the three failure modes of the gateway |
documentation | The repository documentation holds one runbook entry per failure mode of model/services/runtime-cloud/RuntimeCloudHost.yaml (identity platform unreachable, fronted service unavailable, gateway replica crash) with its detection signal, the expected answers of the gateway and the recovery step; the entry of the identity platform states its two phases, degraded and in rotation while a cached signing key validates tokens, and out of rotation and failing closed when no valid key remains; the entry of the replica crash states that nothing is replayed and that callers repeat their call. | ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |
AIFACTORY-TASK-4356 Verify health, targets, limits and telemetry through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-RuntimeCloudHost-001\|Scenario=SCN-RuntimeCloudHost-002)"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-1086 with the identity platform stopped while a cached key validates tokens, without a cached key and after the cached key expired, one fake stopped, the targets operation with two configured entries, with none, with an entry without a kind and without its scope, a call above its limit, the two series with service, route, status and tenant, and a scan of the captured logs and activities for token and payload content. |
ConnectSoft.AI.SoftwareFactory.RuntimeCloudHost |