AIFACTORY-FEAT-001: AgentRegistryService: thin delivery for the first outcome¶
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 Control Plane (PF-01) · Increment I1 Generate a microservice · State elaborated · Route backend-developer · Build order 51 of 185 (Factory code)
AgentRegistryService is the service of bounded context BC-04 (Asset Publication). Publishes immutable releases of agents, skills, tools, workflows, policies and model profiles with their full dependency closure, hashes and evaluation evidence; serves release resolution to Run Control and release loading to the runtime (BC-04). In this increment it is delivered thin: Loads the seeded Draft releases of the six chain definitions and their nine agents by alias; no publication gate and no evaluation evidence. Its own repository is ConnectSoft.AI.SoftwareFactory.AgentRegistryService.
| Delivers | AgentRegistryService (thin): Loads the seeded Draft releases of the six chain definitions and their nine agents by alias; no publication gate and no evaluation evidence. |
| Stubs | — |
| Realizes | adrs: ADR-0002, ADR-0021, ADR-0022, ADR-0023 |
| Requirements | FR-02, FR-11, FUX-02, FUX-10, NFR-02, NFR-11, NFR-13, XL-02, XL-08, XL-15 |
| Depends on | — |
| Sources | model/services/control-plane/AgentRegistryService.yaml |
Scenarios to trace (15, catalog): SCN-AgentRegistryService-001 ✓, SCN-AgentRegistryService-002 ✓, SCN-AgentRegistryService-003 ✓, SCN-AgentRegistryService-004 ✓, SCN-AgentRegistryService-014 ✓, SCN-AgentRegistryService-005 ✓, SCN-AgentRegistryService-006 ✓, SCN-AgentRegistryService-007 ✓, SCN-AgentRegistryService-008 ✓, SCN-AgentRegistryService-009 ✓, SCN-AgentRegistryService-010 ✓, SCN-AgentRegistryService-011 ✓, SCN-AgentRegistryService-012 ✓, SCN-AgentRegistryService-013 ✓, SCN-AgentRegistryService-015 ✓
AIFACTORY-US-053: AgentRegistryService answers the chain with its thin contract¶
behavior · persona platform-admin
As a platform admin, I want AgentRegistryService to answer the calls of the first-outcome chain with a well-formed result of its thin scope, so that the Asset Publication context has one owner that the rest of the Factory calls through its contract.
This is the integration PBI of the thin delivery. The first outcome runs six workflow definitions (vision-to-blueprint, architecture-decomposition, module-blueprints, application-design, database-blueprint and generate-product) and the nine agents their steps name, on model profiles of model/model-profiles.yaml, and none of these definitions, agents and profiles is Published yet: the evaluation gate of ADR-0021 is built in the fourth increment, and until then the amendment of that decision lets a Draft workflow or agent release run only in the acceptance environment and in the projects a platform policy rule names as internal. The Draft allowance covers the model profile releases as well: the thin delivery seeds all eleven model profiles of model/model-profiles.yaml (code-fast, code-agent, code-agent-strong, reasoning, reasoning-high, structured, vision, long-context, embedding, reranker and pii-local) as Draft releases that are loadable by alias, and not only the five that the nine agents name (D123), and the approval of a model profile release by a Platform admin who is not its author becomes required with the complete delivery in I4 (D121). AgentRegistryService is therefore delivered thin, and the thin scope is exactly this: the service registers the seeded Draft releases of those six definitions, nine agents and eleven model profiles with their aliases and stores the authoring document of each in ArtifactService under a content reference the loaded release names (AIFACTORY-US-401, D121, D123), resolves an alias or a release id to one of them for RunControlService at submission (AIFACTORY-US-402) and streams the manifest and the closure content references of one of them to the runtime (AIFACTORY-US-403). Nothing else is served. The publication path arrives with feature agent-registry-service-publication in I2 (D140): the REST operations ValidateRelease, SubmitRelease, PublishRelease, GetRelease, ListReleases and MoveAlias, the events AssetReleaseSubmitted and AssetReleasePublished, the ClosureResolver worker, the publication approval and its handler PublishOnApproval of ApprovalDecided. DeprecateRelease and RevokeRelease with their events, the evaluation evidence and its gate, the learning release and the other consumed events arrive with feature agent-registry-service-complete in I4. The registry applies no waiver of its own, because the rule of the amendment is a policy rule and is evaluated where policy is evaluated. The repository ConnectSoft.AI.SoftwareFactory.AgentRegistryService is created and scaffolded in I0 by AIFACTORY-TASK-001 of feature repository-and-pipeline-conventions (D140) from the pinned base template package with UseFactoryProfile, and this feature starts from that scaffold, so token validation, the scope chain with its 401, 403 and 404 answers, the tenant row filter, health, readiness and the telemetry wiring come from the profile and are not written again. The model names release-manifest-v1 as the request and as the reply descriptor of both methods. docs/reference/schemas/release-manifest.schema.json describes a published release: it requires publishedAt and publishedBy, which a Draft release does not have, allows no additional property and has no shape for a request by alias or by release id. That conflict is an open point reported to the owner, and the thin delivery makes its contract checkable without deciding it. The proto request message of ResolveRelease names the asset kind, the asset id and the alias name, or the releaseId, and that of LoadRelease names the releaseId. The reply message carries the manifest, and the contract test compares, for a Draft release, the fields releaseId, assetKind, assetId, version, state, closure and hash with the schema and asserts that publishedAt, publishedBy, evaluation and approval are absent in state Draft. The reply names the hash hash, as the schema does; manifestHash is the name of the same value on the aggregate and in the table. The complete delivery fills the publication fields of the same reply message for a Published release, so it replaces the thin delivery without a change of the two messages. A caller without a workload identity is refused before any handler runs.
Acceptance criteria
| AC1 | Given the repository ConnectSoft.AI.SoftwareFactory.AgentRegistryService created and scaffolded in I0 by AIFACTORY-TASK-001 of feature repository-and-pipeline-conventions with dotnet new connectsoft-base -n ConnectSoft.AI.SoftwareFactory.AgentRegistryService --UseFactoryProfile true from the pinned template package, when its pipeline runs, then the solution builds, the unit and acceptance tests pass with complete reports and a container image is published (ADR-0028, model/services/control-plane/AgentRegistryService.yaml). |
| AC2 | Given the seeded Draft releases of the six chain definitions, their nine agents and the eleven model profiles (D121, D123), when each alias is resolved through AgentRegistryService/AssetPublication.ResolveRelease and each release is loaded through AgentRegistryService/AssetPublication.LoadRelease, then all twenty-six answer with the reply message fixed by the contract test, whose fields releaseId, assetKind, assetId, version, state Draft, closure and hash match release-manifest-v1 and whose publishedAt, publishedBy, evaluation and approval are absent, as AIFACTORY-US-402 and AIFACTORY-US-403 prove one by one (ADR-0021). |
| AC3 | Given the service descriptor of the thin delivery, when the contract test compares it with the hosted surface, then exactly AgentRegistryService/AssetPublication.ResolveRelease and AgentRegistryService/AssetPublication.LoadRelease are hosted, no REST operation of publication answers, the OrleansMessaging section declares no published event, and the test fails when an operation outside the thin scope stated in model/backlog/features/control-plane.yaml appears. |
| AC4 | Given a call without a workload identity or with a token that lacks the service scope, when it reaches either method, then it is refused before any handler runs and nothing is read (ADR-0015); given the service starts, when liveness and readiness are probed, then liveness answers and readiness is unready until agent-registry-sql is migrated, the identity authority is reachable and every seed entry is registered, so a failed seed loader never serves an empty registry that would answer NOT_FOUND to a caller (model/services/control-plane/AgentRegistryService.yaml). |
| Traces: services | AgentRegistryService |
| Traces: apis | AgentRegistryService/AssetPublication.ResolveRelease, AgentRegistryService/AssetPublication.LoadRelease |
| Traces: descriptors | release-manifest-v1 |
| Traces: adrs | ADR-0015, ADR-0021, ADR-0028 |
| Depends on | AIFACTORY-US-401, AIFACTORY-US-402, AIFACTORY-US-403, feature:repository-and-pipeline-conventions, feature:component-base-template-factory-profile, feature:component-base-template-findings, feature:component-extensions-ai |
| Sources | model/services/control-plane/AgentRegistryService.yaml, model/backlog/features/control-plane.yaml, docs/architecture/adr/0021-quality-gates.md, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-003 Contract of the thin surface: service descriptor and proto of ResolveRelease and LoadRelease against release-manifest-v1 |
contract | The service descriptor file of the repository lists exactly AssetPublication.ResolveRelease (no streaming) and AssetPublication.LoadRelease (server streaming), both internal and of class read. The proto fixes the request message of ResolveRelease (asset kind, asset id and alias name, or releaseId), the request message of LoadRelease (releaseId) and the reply message with the manifest; the manifest message of the LoadRelease stream names, beside the manifest fields, the content reference and the hash of the authoring document of the release (D121). A contract test with golden files compares, for a Draft release, the fields releaseId, assetKind, assetId, version, state, closure and hash of the reply with docs/reference/schemas/release-manifest.schema.json and asserts that publishedAt, publishedBy, evaluation and approval are absent in state Draft; it does not validate a Draft reply against the whole schema, which requires the publication fields, and that difference is the open point the PBI reports. The contract test of the Factory profile compares the hosted endpoints with the service descriptor file in both directions, so callers run against this service without a fake and the complete delivery adds operations and fills the publication fields without changing the two request messages or the reply message. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-697 Verify agent-registry-service-thin-contract 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-053, that is the scaffold, the twenty-six seeded releases answered by both methods (SCN-AgentRegistryService-008, SCN-AgentRegistryService-009), the thin surface, the golden files of the request and reply messages, readiness that stays unready until the seed is registered and the refusal of a caller without workload identity. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-401: Register the seeded Draft releases of the six chain definitions, their nine agents and the eleven model profiles with their aliases and their authoring documents¶
enabling · persona platform-admin
As a platform admin, I want the Draft releases of the first-outcome chain registered in the registry store when the service starts, so that a run can pin an exact release of every definition and agent before the publication gate exists.
Before the publication gate exists, the releases the first outcome runs are registered by a seed and not through SubmitRelease and PublishRelease. The seed set holds one manifest for each of the six workflow definitions of the chain (vision-to-blueprint, architecture-decomposition, module-blueprints, application-design, database-blueprint, generate-product) and for each of the nine agents their steps name (vision-architect, enterprise-architect, domain-modeler, solution-architect, application-architect, database-engineer, microservice-generator, backend-developer, frontend-developer). The owner decided that the thin registry seeds the model profiles as well (D121), and that it seeds all eleven profiles of model/model-profiles.yaml and not only the five that those agents name (D123), so the seed set also holds one manifest for each of code-fast, code-agent, code-agent-strong, reasoning, reasoning-high, structured, vision, long-context, embedding, reranker and pii-local, each of the asset kind ModelProfile, which makes twenty-six entries. ModelRouterService loads all eleven through the two read methods of this feature (D123). The Draft allowance covers these model profile releases, they are loadable by alias like the others, and the approval of a model profile release by a Platform admin who is not its author becomes required with the complete delivery in I4. The features of the definitions and of the agents author their Draft releases, in the repositories ConnectSoft.AI.SoftwareFactory.WorkflowEngineService and ConnectSoft.AI.SoftwareFactory.AgentTemplate, and feature model-router-service authors the eleven model-profile-v1 documents and their seed entries; this PBI registers them. The loader reads the seed set from one configured location, the directory named by the configuration key Publication:Seed:Path of the thin delivery, a key the model does not list and that is removed with the loader by feature agent-registry-service-complete. The directory holds one JSON file per seed entry with two members: manifest, the Draft manifest with releaseId, assetKind, assetId, version, state Draft, source with repository, commit and path, closure and hash, and alias, the alias name the entry registers. Beside each entry file the directory holds the authoring document of that entry, which is the workflow definition, the agent definition or the model-profile-v1 document its feature authored, under the file name that the last segment of source.path of the manifest gives. The decision does not say how the loader finds the authoring document of an entry, so that file name rule is what this PBI fixes, and it is reported to the owner. How the twenty-six authored manifests and their authoring documents reach that location (copied at build, packaged, or mounted at deployment) is an open point reported to the owner: the features that author them depend on this feature, so this PBI cannot depend on them without a cycle. Until it is decided, the acceptance suite proves the loader on the fixture set of AIFACTORY-TASK-1652, which has the same file shape. The thin delivery creates the three tables of the model in agent-registry-sql, the store this service owns: AssetReleases, ReleaseClosure and ReleaseAliases, with the tenant column on every row and the tenant row filter of the Factory profile. When the service starts, the seed loader writes each release in state Draft with its releaseId in the content-addressed form of the model, its source repository and commit and its manifestHash, one ReleaseClosure row per dependency with exact version and hash, and one ReleaseAliases row for the alias the seed entry names. The table requires SubmittedBy, the subject that submitted a candidate (D117); no member submitted a seeded release, so the loader records the workload identity of the service there, and a later submission through SubmitRelease replaces it with the subject that submits. The manifest document is stored through ArtifactService, the authority of artifact-blob, and its reference is kept in ManifestRef. The authoring document of the entry is stored through ArtifactService too, by its content hash, and the loaded release names its content reference (D121): LoadRelease delivers the content reference and the hash of the authoring document with the manifest message of the release (AIFACTORY-US-403), so a caller fetches the document from ArtifactService and compares its hash before it uses it. Storing is idempotent on the content hash, so a restart stores no document twice. The model lists ManifestRef on AssetReleases and no field for the reference of the authoring document, so where the release keeps that reference between the seed and the load is reported to the owner; this PBI fixes only that every loaded seeded release names it. The releases belong to the platform tenant, which the model defines for ConnectSoft-published assets and which every tenant can read. The loader is idempotent: a release whose releaseId and manifestHash are already registered is left as it is. A seed entry whose hash does not match its manifest, whose closure entry lacks a version or a hash, or whose authoring document is missing from the seed location fails the loader with the entry named, and no partial release stays registered for that entry. When ArtifactService is unavailable the loader fails fast. In both cases readiness stays unready until every seed entry is registered, so the service never serves an empty or partial registry that would answer NOT_FOUND, which an attempt takes as failure class permanent. The loader is retried in the running process with backoff, without a restart, and every failed attempt is logged with the entry or the dependency named; liveness keeps answering meanwhile. No release leaves Draft, no evaluation record and no approval is attached, and no event is published.
Acceptance criteria
| AC1 | Given an empty agent-registry-sql and the seed set of twenty-six entries in the seed location the loader is configured with, each in the file shape AIFACTORY-TASK-002 states, when the service starts, then AssetReleases holds twenty-six AgentRegistryService/AssetRelease rows in state Draft owned by the platform tenant, six of the asset kind Workflow, nine of the kind Agent and eleven of the kind ModelProfile (D121, D123), each with releaseId, sourceCommit, manifestHash and ManifestRef, ReleaseClosure holds one row per dependency with exact version and hash, and ReleaseAliases holds the alias each seed entry names (model/services/control-plane/AgentRegistryService.yaml). |
| AC2 | Given the seed already registered, when the service starts again or two replicas start together, then no row is duplicated or changed and a release whose releaseId and manifestHash are already registered is left as it is (model/services/control-plane/AgentRegistryService.yaml). |
| AC3 | Given a seed entry whose hash does not match its manifest, whose closure entry lacks a version or a hash or whose authoring document is missing from the seed location, or an unavailable ArtifactService, when the loader runs, then it fails with the entry or the dependency named, no partial release stays registered for that entry, readiness stays unready until every seed entry is registered, and the loader is retried in the running process with backoff, without a restart, so that readiness turns ready once the entry is corrected or ArtifactService answers again (docs/reference/schemas/release-manifest.schema.json). |
| AC4 | Given the registered seed, when the tables and the outbox are inspected, then no AgentRegistryService/AssetRelease is InReview, Published or Deprecated, no EvaluationRecordRef and no ApprovalId is set and the outbox holds no record, because the thin delivery has no publication gate and no evaluation evidence (ADR-0021, model/backlog/features/control-plane.yaml). |
| AC5 | Given the registered seed, when the content held by the fake of ArtifactService is inspected, then it holds the authoring document of each of the twenty-six entries, a workflow definition, an agent definition or a model-profile-v1 document, under the content reference the registered release names, the content under that reference has the hash the release states for it, and a second start stores no document twice (D121, model/services/control-plane/AgentRegistryService.yaml). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: workflows | vision-to-blueprint, architecture-decomposition, module-blueprints, application-design, database-blueprint, generate-product |
| Traces: agents | vision-architect, enterprise-architect, domain-modeler, solution-architect, application-architect, database-engineer, microservice-generator, backend-developer, frontend-developer |
| Traces: descriptors | release-manifest-v1, model-profile-v1 |
| Traces: adrs | ADR-0021, ADR-0028 |
| Depends on | feature:component-base-template-factory-profile, feature:artifact-service |
| Sources | model/services/control-plane/AgentRegistryService.yaml, model/model-profiles.yaml, model/backlog/features/control-plane.yaml, docs/reference/schemas/release-manifest.schema.json, docs/planes/control/services/agent-registry-service/index.md#data-model-and-storage |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-1651 Migration and read mappings of AssetReleases, ReleaseClosure and ReleaseAliases in agent-registry-sql |
migration | The three tables of model/services/control-plane/AgentRegistryService.yaml exist with their columns, keys, the unique index on tenant, asset kind, asset and version and the state index; the mappings carry the tenant row filter of the Factory profile; mapping tests run against an isolated test database, never a shared one. The write paths of publication are added by feature agent-registry-service-complete on the same tables. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-002 Seed loader of the thin scope: twenty-six Draft releases with closure rows, aliases, manifest references and authoring documents |
implementation | At start the loader reads the seed set from the directory named by the configuration key Publication:Seed:Path, one JSON file per entry with the members manifest (the Draft manifest with releaseId, assetKind, assetId, version, state Draft, source with repository, commit and path, closure and hash) and alias (the alias name the entry registers), and beside it the authoring document of the entry under the file name the last segment of source.path gives; it registers the Draft releases of the six chain definitions, their nine agents and the eleven model profiles of model/model-profiles.yaml, which are code-fast, code-agent, code-agent-strong, reasoning, reasoning-high, structured, vision, long-context, embedding, reranker and pii-local, in the platform tenant (D121, D123), stores each manifest through ArtifactService and keeps the reference in ManifestRef, stores the authoring document of each entry through ArtifactService by its content hash and keeps its content reference and hash so that the loaded release names them, records the workload identity of the service in SubmittedBy, which the table requires and no member supplies for a seeded release (D117), writes one closure row per dependency and the alias each seed entry names, is idempotent on releaseId and manifestHash across restarts and concurrent replicas, and fails with the entry named when a hash does not match, a closure entry is incomplete or the authoring document is missing; a readiness check reports unready until every seed entry is registered, and a failed run is retried in the running process with backoff, without a restart; it moves no release out of Draft and writes no outbox record. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1652 Seed set fixture of twenty-six manifests with their authoring documents and of the broken entries for the acceptance suite |
fixture | The acceptance suite holds a seed directory in the file shape of AIFACTORY-TASK-002 with one entry per chain definition, agent and model profile, twenty-six in all, each with its authoring document beside it, whose manifests carry the fields releaseId, assetKind, assetId, version, state Draft, source, closure and hash of docs/reference/schemas/release-manifest.schema.json and none of its publication fields, an entry with a wrong hash, an entry with a closure row without a hash and an entry without its authoring document, and a fake of ArtifactService that keeps what was stored under which content reference and can be switched to unavailable and back. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1653 Verify the seed registration through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Feature=SeededDraftReleases"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-401: twenty-six Draft releases, eleven of them model profile releases, with closure, alias and manifest reference read from the configured seed location, the idempotent restart, the refused broken entries, readiness that stays unready while the loader fails and turns ready after its retry succeeds without a restart, the empty outbox, and the authoring document of every entry held by the fake of ArtifactService under the content reference its release names, with the hash the release states. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-402: Resolve an alias or a release id to one immutable seeded release for Run Control at submission¶
behavior · persona requester
As a requester, I want the release alias of my submission resolved to one exact release with its closure, so that my run pins what it will execute and a later alias move cannot change it.
RunControlService resolves the release a run will pin when it accepts a submission: run-submission-v1 names a release alias or a release id, and the internal gRPC method AgentRegistryService/AssetPublication.ResolveRelease turns it into one immutable release with its closure. The caller presents a workload token. Such a token carries service scopes and no tenant claim, so the service reads the tenant and project the caller forwards only when the token holds the service scope that names AgentRegistryService (ADR-0015). In the thin delivery the method answers for the seeded Draft releases only. The Draft releases of the eleven model profiles are among them and are resolved by alias like the others, under the Draft allowance that covers model profile releases until the complete delivery (D121, D123); the profile loader of ModelRouterService resolves them with its workload token (feature model-router-service). An alias is looked up in ReleaseAliases by asset kind, asset id and name among the releases the tenant of the caller can read, which are its own and those of the platform tenant, and is resolved to the release it points at when the call is made; a release id is looked up directly. The request message names the asset kind, the asset id and the alias name, or the releaseId. The reply message carries the manifest fields releaseId, assetKind, assetId, version, state Draft, closure with every entry at its exact version and hash, and hash, which is the name release-manifest-v1 gives the value the aggregate holds as manifestHash; publishedAt, publishedBy, evaluation and approval are absent in state Draft, as the open point of AIFACTORY-US-053 records. The caller therefore pins the release id and never the alias. The reply states the state as it is and the registry applies no waiver: whether a Draft release may run is decided by the policy rule of the ADR-0021 amendment when policy is evaluated for the submission. The method is of class read and writes nothing. A call without a workload identity is refused with UNAUTHENTICATED, a token without the service scope with PERMISSION_DENIED, a request that names neither an alias nor a release id with INVALID_ARGUMENT, and an alias or release that the tenant of the caller cannot read with NOT_FOUND, which is also the answer for a release of another tenant and never confirms that it exists. When agent-registry-sql is unavailable the call fails with UNAVAILABLE; the dependency is fail-fast for RunControlService, which then accepts no run.
Acceptance criteria
| AC1 | Given the seeded Draft release of a chain definition and its alias, when RunControlService calls AgentRegistryService/AssetPublication.ResolveRelease with the asset kind, the asset id and the alias name under a workload token that holds the service scope, then the reply message carries exactly one release with the fields releaseId, assetKind, assetId, version, state Draft, hash and every closure entry with exact version and hash of release-manifest-v1, without publishedAt, publishedBy, evaluation and approval, the same reply is given for a request by releaseId, and nothing is written (SCN-AgentRegistryService-008). |
| AC2 | Given each of the twenty-six seeded releases, the eleven model profile releases among them (D121, D123), when its alias is resolved twice, then both replies name the same releaseId and the same hash, because no operation of the thin delivery moves an alias or changes a release (SCN-AgentRegistryService-008, model/backlog/features/control-plane.yaml). |
| AC3 | Given a caller without a workload identity, a token without the service scope, a request that names neither an alias nor a release id, or an alias or release id the tenant of the caller cannot read, when AgentRegistryService/AssetPublication.ResolveRelease is called, then the call is refused with UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT or NOT_FOUND respectively, a release of another tenant is answered NOT_FOUND exactly as an unknown one, and no state changes (SCN-AgentRegistryService-008, ADR-0015). |
| AC4 | Given agent-registry-sql is unavailable, when AgentRegistryService/AssetPublication.ResolveRelease is called, then the call fails with UNAVAILABLE and no partial manifest is returned, so the caller, for which the dependency is fail-fast, accepts no run on an unresolved release (SCN-AgentRegistryService-008, model/services/control-plane/RunControlService.yaml). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/AssetPublication.ResolveRelease |
| Traces: descriptors | release-manifest-v1 |
| Traces: adrs | ADR-0015, ADR-0021 |
| Traces: requirements | FR-02 |
| Traces: scenarios | SCN-AgentRegistryService-008 |
| Depends on | AIFACTORY-US-401, feature:component-base-template-factory-profile |
| Sources | model/services/control-plane/AgentRegistryService.yaml, model/services/control-plane/RunControlService.yaml, docs/reference/schemas/release-manifest.schema.json, docs/planes/control/services/agent-registry-service/index.md#apis |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-1654 ResolveRelease over the seeded releases with workload scope checks and the tenant row filter |
implementation | AssetPublication.ResolveRelease takes the request message of AIFACTORY-TASK-003 (asset kind, asset id and alias name, or releaseId), resolves it among the releases the forwarded tenant can read and returns the reply message with releaseId, assetKind, assetId, version, state, hash and the closure entries, without the publication fields for a Draft release; it reads the forwarded tenant and project only under the service scope, answers UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT, NOT_FOUND (also for a release of another tenant, ADR-0015) and UNAVAILABLE as the PBI states, and writes nothing. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1655 Verify resolve-a-seeded-release-for-run-control through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-AgentRegistryService-008"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-402 over the twenty-six seeded releases, the two-tenant fixture and a stopped store. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-403: Stream the manifest and the closure content references of a seeded release to the runtime¶
behavior · persona requester
As a requester, I want the runtime to load exactly the release my run pinned, so that every step of the run executes the definition and the agents that were resolved at submission.
The runtime of the Agent Mesh loads a release by its id: WorkflowEngineService loads the release of a workflow definition and its closure, and AgentRuntimeService loads the release of an agent when an attempt starts. The profile loader of ModelRouterService loads the release of a model profile the same way (D121). Each caller calls the internal gRPC method AgentRegistryService/AssetPublication.LoadRelease with a workload token; the service reads the tenant and project the caller forwards only when the token holds the service scope that names AgentRegistryService (ADR-0015). The method is a server stream. The request message names the releaseId. The first message is the manifest of the release with the fields releaseId, assetKind, assetId, version, state and hash of release-manifest-v1, without the publication fields a Draft release does not have (the open point of AIFACTORY-US-053). Beside those fields the manifest message names the content reference and the hash of the authoring document of the release, which is the workflow definition, the agent definition or the model profile document that the seed loader stored through ArtifactService (AIFACTORY-US-401, D121), so the loaded release names where its own document is held. Then one message follows per closure entry with the kind, the asset id, the exact version, the hash and the content reference of that dependency, in the order of the manifest; the stream then completes. The content itself is never streamed by the registry: a reference names content held by ArtifactService, and the caller fetches it there. In the thin delivery the method serves the seeded Draft releases only and the manifest states state Draft. The method is of class read and writes nothing; loading the same release twice yields the same messages. A call without a workload identity is refused with UNAUTHENTICATED, a token without the service scope with PERMISSION_DENIED, a request without a release id with INVALID_ARGUMENT, and a release id the tenant of the caller cannot read with NOT_FOUND, which is also the answer for a release of another tenant; an attempt that receives NOT_FOUND takes the failure class permanent. When the store becomes unavailable the stream ends with UNAVAILABLE and the caller, for which the dependency is fail-fast, discards what it received and loads again; a release is used only after its stream completed.
Acceptance criteria
| AC1 | Given a seeded Draft release of an agent, when the runtime calls AgentRegistryService/AssetPublication.LoadRelease with its releaseId under a workload token that holds the service scope, then the stream delivers the manifest message with the fields releaseId, assetKind, assetId, version, state Draft and hash of release-manifest-v1, without publishedAt, publishedBy, evaluation and approval, and with the content reference and the hash of the authoring document of the release (D121), then one message per closure entry with exact version, hash and content reference in manifest order, and completes without writing anything (SCN-AgentRegistryService-009). |
| AC2 | Given the release of each of the six chain definitions, the nine agents and the eleven model profiles, when it is loaded twice, then both streams deliver the same messages, the hash of the streamed manifest equals the hash that AgentRegistryService/AssetPublication.ResolveRelease returned for the same release, and the content the fake of ArtifactService holds under the content reference the manifest message names is the authoring document of that release with the hash the message states (SCN-AgentRegistryService-009, D121). |
| AC3 | Given a caller without a workload identity, a token without the service scope, a request without a release id, or a release id the tenant of the caller cannot read, when AgentRegistryService/AssetPublication.LoadRelease is called, then the call is refused with UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT or NOT_FOUND respectively, a release of another tenant is answered NOT_FOUND exactly as an unknown one, and no message is streamed (SCN-AgentRegistryService-009, ADR-0015). |
| AC4 | Given the store becomes unavailable after the manifest was streamed, when the stream continues, then it ends with UNAVAILABLE without a completion, and a repeated call after recovery delivers the whole release from the manifest on (SCN-AgentRegistryService-009, model/services/control-plane/AgentRegistryService.yaml). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/AssetPublication.LoadRelease, AgentRegistryService/AssetPublication.ResolveRelease |
| Traces: descriptors | release-manifest-v1 |
| Traces: adrs | ADR-0015 |
| Traces: requirements | FR-02 |
| Traces: scenarios | SCN-AgentRegistryService-009 |
| Depends on | AIFACTORY-US-401, feature:component-base-template-factory-profile |
| Sources | model/services/control-plane/AgentRegistryService.yaml, model/services/agent-mesh/AgentRuntimeService.yaml, model/services/agent-mesh/WorkflowEngineService.yaml, docs/reference/schemas/release-manifest.schema.json |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-1656 LoadRelease server stream of the manifest and the closure content references |
implementation | AssetPublication.LoadRelease takes the request message of AIFACTORY-TASK-003 (releaseId), streams the manifest message with releaseId, assetKind, assetId, version, state and hash, without the publication fields for a Draft release and with the content reference and the hash of the authoring document of the release that the seed loader stored through ArtifactService (D121), and then one message per closure entry with version, hash and content reference in manifest order, completes the stream, reads the forwarded tenant and project only under the service scope, answers UNAUTHENTICATED, PERMISSION_DENIED, INVALID_ARGUMENT and NOT_FOUND (also for a release of another tenant, ADR-0015) before the first message and ends with UNAVAILABLE when the store fails during the stream. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1657 Verify load-a-seeded-release-for-the-runtime through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-AgentRegistryService-009"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-403 over the twenty-six seeded releases, the authoring document each of them names in the fake of ArtifactService, the two-tenant fixture and a store stopped during the stream. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |