AIFACTORY-FEAT-189: AgentRegistryService: the publication path of releases from I2¶
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 I2 Deliver it · State elaborated · Route backend-developer · Build order 92 of 185 (Factory code)
The owner decided that the publication of releases moves before I4 (D140), so that the workflow definitions and agents of I2 and later increments become loadable as Published releases instead of growing the seed of the thin delivery. This feature delivers the publication path of AgentRegistryService in I2: validating and submitting a release candidate with its dependency closure, the closure resolver, the publication approval by a Reviewer who is not the submitter through Run Control with the subject asset release, publishing on the approval, the reads of releases and the move of an alias. The evaluation verdict, deprecation, revocation, the learning release and the remaining consumers stay with the complete delivery in I4. Repository ConnectSoft.AI.SoftwareFactory.AgentRegistryService.
| Delivers | AgentRegistryService (thin): ValidateRelease, SubmitRelease, PublishRelease, GetRelease, ListReleases and MoveAlias, the events AssetReleaseSubmitted and AssetReleasePublished, the worker ClosureResolver and the handler PublishOnApproval of ApprovalDecided; the publication approval names the subject asset release (D135); no evaluation verdict is required before I4. |
| Stubs | — |
| Realizes | adrs: ADR-0002, ADR-0021, ADR-0022 |
| Requirements | FR-02, FR-11, FUX-02, FUX-10, NFR-02, NFR-11, NFR-13, XL-02, XL-08, XL-15 |
| Depends on | AIFACTORY-FEAT-001 AgentRegistryService: thin delivery for the first outcomeAIFACTORY-FEAT-006 RunControlService: complete delivery |
| 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-1561: A workflow definition and its agent are submitted, published by a Reviewer who is not the submitter, and resolved and loaded by alias¶
behavior · persona asset-maintainer
As an asset maintainer, I want to take a workflow definition and the agent it runs from a commit to Published releases that a Reviewer approved, so that the runs of I2 and of later increments pin Published releases instead of growing the seed of the first outcome.
This is the integration PBI of the feature. The owner decided that the publication of releases moves before I4 (D140): the seed of the thin delivery stays the twenty-six Draft releases of I1, and every workflow definition and agent of a workflow feature of I2, I3 or I4, with any new skill, tool and model profile release it needs, is submitted and published through this path in its own feature, so that its runs pin the Published release. An agent that several workflow features extend with skills gets a new version per feature: the first feature in build order submits version 1, each later feature submits a new version with the skills it adds, the alias latest moves to each new Published version, and each run pins the version it was published with (D141). This PBI proves the path end to end on a deployed estate with one workflow definition and the agent it runs. An asset maintainer validates the agent candidate without side effect (AIFACTORY-US-414) and submits it from its source commit (AIFACTORY-US-415); the ClosureResolver worker resolves its closure and computes its hash; the service requests the publication approval through RunControl.RequestApproval of RunControlService with its own service identity, the subject kind asset-release and the release id as subject id (D135, D140); a Reviewer who is not the submitter decides it, and the handler PublishOnApproval moves the release to Published on the ApprovalDecided that grants it (AIFACTORY-US-416). The workflow definition, whose closure names the Published agent release, follows the same way, and the maintainer moves the alias of each to its Published release (AIFACTORY-US-419). RunControlService then resolves the workflow alias through AssetPublication.ResolveRelease to the Published release at submission and pins it, and WorkflowEngineService and AgentRuntimeService load the pinned releases through AssetPublication.LoadRelease. Both methods come from the thin delivery, their contract does not change and their callers are not rebuilt; a Published release carries publishedAt, publishedBy and approval, and evaluation stays absent. No evaluation verdict is required before I4, because no evaluation suite is delivered before the complete QualityScoreService of I4; the option Publication:Gates:RequireEvaluation takes effect with the complete delivery, which also publishes the seeded releases through the gate and resubmits as a new version, through the gate, a release published before I4 without an evaluation record where a suite exists (D140). A ModelProfile release is approved by a Platform admin who is not its author, a release of every other kind by a Reviewer who is not its author (D119). Releases are read with their manifest, closure and aliases (AIFACTORY-US-418). Deprecation, revocation, the learning release, the evaluation evidence and the remaining consumers stay with feature agent-registry-service-complete in I4. The six REST operations of this feature are reached through ControlPlaneApi under factory.assets.read, factory.assets.write or factory.assets.publish; the gateway forwards the user token without exchanging it and the service accepts the audience of its own gateway (ADR-0015 amendment D117); a release of another tenant is answered 404, over gRPC NOT_FOUND, and a missing scope inside the tenant of the caller 403 (ADR-0015). A publication writes AssetReleasePublished and an audit-evidence-v1 record of action release-published to the outbox in the transaction of the command (D115). Manifests never contain secrets.
Acceptance criteria
| AC1 | Given an agent and a workflow definition whose closure names that agent, both at a source commit, and an asset maintainer A, when A validates and submits the agent through AgentRegistryService/ValidateRelease and AgentRegistryService/SubmitRelease, its closure is resolved, and the publication approval requested through RunControlService/RunControl.RequestApproval with the subject kind asset-release and the release id is granted by a Reviewer B who is not A, and the same follows for the workflow definition, then both AgentRegistryService/AssetRelease rows are Published through RunControlService/ApprovalDecided with publishedAt, publishedBy and approvalId, one AgentRegistryService/AssetReleasePublished outbox record and one audit-evidence-v1 record of action release-published are written for each, and neither release carries an evaluation record (D135, D140, ADR-0021). |
| AC2 | Given the two Published releases of AC1, when A moves the alias stable of each through AgentRegistryService/MoveAlias and a requester submits a run of the workflow by that alias, then RunControlService resolves the alias through AgentRegistryService/AssetPublication.ResolveRelease to the Published workflow release with its closure and pins its release id, WorkflowEngineService and AgentRuntimeService load the workflow definition and the agent by release id through AgentRegistryService/AssetPublication.LoadRelease, and the request and reply messages are those the contract test of the thin delivery fixes, so no caller is rebuilt (FR-02, XL-15). |
| AC3 | Given an agent candidate submitted by A whose publication approval names A as decidedBy, or a ModelProfile candidate whose approval was given by a Reviewer and not by a Platform admin, when RunControlService/ApprovalDecided is handled or AgentRegistryService/PublishRelease is called, then the release is not published, it stays InReview and connectsoft.factory.releases.blocked is incremented with the reason; the seeded Draft releases of the thin delivery are still resolved by alias under the Draft allowance, since the complete delivery publishes them through the gate (D119, D140, ADR-0021). |
| AC4 | Given the service descriptor of the repository, when the contract test compares it with the hosted surface, then AgentRegistryService/ValidateRelease, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease, AgentRegistryService/GetRelease, AgentRegistryService/ListReleases and AgentRegistryService/MoveAlias are hosted with their scope, side-effect class, idempotency and response codes beside the two gRPC methods of the thin delivery, and the outbox holds only AgentRegistryService/AssetReleaseSubmitted, AgentRegistryService/AssetReleasePublished and the audit-evidence-v1 record of a publication; given releases of two tenants and of the platform tenant, a release of the other tenant is answered 404, a missing scope 403, and a user token that ControlPlaneApi forwards unchanged is accepted without a token exchange (ADR-0014, ADR-0015). |
| AC5 | Given the service starts, when readiness is probed, then it is unready until agent-registry-sql is migrated, while the outbox check of the messaging profile is unhealthy and while the identity authority is unreachable, and connectsoft.factory.releases.published and connectsoft.factory.releases.blocked are emitted with the dimensions of model/services/control-plane/AgentRegistryService.yaml. |
| Traces: services | AgentRegistryService, RunControlService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/ValidateRelease, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease, AgentRegistryService/GetRelease, AgentRegistryService/ListReleases, AgentRegistryService/MoveAlias, AgentRegistryService/AssetPublication.ResolveRelease, AgentRegistryService/AssetPublication.LoadRelease, RunControlService/RunControl.RequestApproval |
| Traces: events | AgentRegistryService/AssetReleaseSubmitted, AgentRegistryService/AssetReleasePublished, RunControlService/ApprovalDecided |
| Traces: descriptors | release-manifest-v1, approval-request-v1, audit-evidence-v1, run-event-envelope-v1 |
| Traces: adrs | ADR-0014, ADR-0015, ADR-0021, ADR-0028 |
| Traces: requirements | FR-02, XL-15 |
| Depends on | AIFACTORY-US-414, AIFACTORY-US-415, AIFACTORY-US-416, AIFACTORY-US-418, AIFACTORY-US-419, feature:agent-registry-service-thin, feature:run-control-service, feature:component-base-template-factory-profile, feature:component-audit-factory-evidence, feature:contracts-package |
| Sources | model/services/control-plane/AgentRegistryService.yaml, model/services/control-plane/RunControlService.yaml, docs/planes/control/services/agent-registry-service/index.md#context-and-boundaries, docs/planes/control/registries.md, docs/architecture/adr/0021-quality-gates.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-366 API hosting of the publication path: service descriptor, REST hosts, scope policies and problem responses of the six REST operations |
contract | The service descriptor file lists the six REST operations of the publication path, ValidateRelease, SubmitRelease, PublishRelease, GetRelease, ListReleases and MoveAlias, beside the two gRPC methods of the thin delivery, with scope, side-effect class, idempotency and response codes; the routes are hosted with the scope policy of each route, problem responses for every modelled refusal code and the Idempotency-Key filter of SubmitRelease; DeprecateRelease and RevokeRelease join the descriptor and the hosts with the complete delivery in I4 (D140); the behaviour of each operation is delivered by AIFACTORY-US-414 to AIFACTORY-US-419, not here. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-369 Security, tenancy and telemetry of the publication path of AgentRegistryService |
implementation | The scopes factory.assets.read, factory.assets.write and factory.assets.publish and the roles of the model are enforced per route of the publication path, a user token forwarded by ControlPlaneApi is accepted with the audience of that gateway and no token is exchanged (ADR-0015 amendment D117), every query is tenant-filtered with the platform tenant readable by every tenant, so a release of another tenant is answered 404 (ADR-0015), the manifest-signing-key and messaging-transport secrets come from secret references, readiness reports the store, the outbox and the identity authority, and the two release counters are created through the instrument helper of the observability library; the Platform admin role of DeprecateRelease and RevokeRelease is enforced with those routes in I4. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-6347 Contract of AssetReleaseSubmitted and AssetReleasePublished against the run event envelope of the contracts package |
contract | Golden files fix AssetReleaseSubmitted and AssetReleasePublished on their topics under run-event-envelope-v1 with the payload fields of model/services/control-plane/AgentRegistryService.yaml and the tenant in the envelope; a contract test fails when a serialised event differs from its file or from docs/reference/schemas/run-event-envelope.schema.json, and the envelope type comes from the pinned contracts package. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-6348 Verify the publication path of a workflow definition and its agent on the deployed estate |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Feature=PublicationPath" in the pipeline of the repository against the deployed RunControlService, WorkflowEngineService and AgentRuntimeService; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-1561: an agent and a workflow definition submitted by one maintainer and published on the approval of a Reviewer who is not that maintainer, with no evaluation record, the aliases moved and the workflow alias resolved to its Published release and loaded with its agent by release id without a rebuilt caller, the publication refused for an approval by the submitter and for a ModelProfile release approved by a Reviewer, the seeded Draft releases still served, the hosted surface against the service descriptor, the two-tenant matrix with the platform tenant and readiness with the two counters. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-414: Validate a release candidate and report missing, unreviewed or incompatible dependencies without publishing¶
behavior · persona asset-maintainer
As an asset maintainer, I want to learn what blocks my candidate before I submit it, so that I fix a missing or unpublished dependency without opening a review that cannot pass.
An asset maintainer, a caller whose scope carries factory.assets.write, asks whether a candidate could be published before submitting it. AgentRegistryService/ValidateRelease takes a candidate body in the shape of release-manifest-v1 that carries assetKind, assetId, version and source with repository, commit and path. The publication fields of the descriptor (publishedAt, publishedBy, evaluation, approval, signature and revocation) are absent on a candidate, and so are state, closure and hash, which the service computes. The descriptor requires fields a candidate cannot supply, the open point the thin delivery already reports to the owner, so the validation of a body checks the candidate fields and not the whole schema. The operation reads the asset sources at that commit through ext-azure-devops, resolves the dependency closure from Git and the registry and reports, without publishing anything, every dependency with its exact version and hash and every dependency that is missing, unreviewed, which means not Published, or incompatible with the declared runtime adapter. The closure follows the asset kind: an agent pulls its skills, their tools and MCP servers, a workflow pulls its agents, and each pulls the policy bundle and the model profile it names. The operation is of class sandbox: it creates no release, writes no row and no blob, publishes no event and requests no approval, so it can be repeated at will. Two calls with the same inputs return the same report and the same manifest hash, and one changed dependency changes the hash. The resolver that computes the closure and the hashes is the one the ClosureResolver worker runs after a submission, so a candidate that validates clean resolves the same way when it is submitted. The response is 200 whether or not findings exist, because the findings are the answer. A body that lacks a candidate field or carries a publication field is refused with 400 and a caller without the scope with 403. The source system is a required, fail-fast dependency: when the commit cannot be read, the call fails fast with a problem response that names the dependency and nothing is reported as resolved. Dependencies are looked up only among the releases the tenant of the caller can read, its own and those of the platform tenant; a dependency that exists only in another tenant is reported as missing and never confirmed. The owner moved this operation to the publication path of I2 (D140), so the workflow features of I2 and later validate their definitions and agents before they submit them. The command-line client and the Studio call the operation through the gateway.
Acceptance criteria
| AC1 | Given a candidate whose dependencies are all Published and compatible, when AgentRegistryService/ValidateRelease is called by a caller with factory.assets.write, then the response is 200 with every dependency named with exact version and hash and no finding, and no release, row, event or approval request exists afterwards (SCN-AgentRegistryService-001, FR-02). |
| AC2 | Given a candidate with one dependency that does not exist, one that is not Published and one that is incompatible with the declared runtime adapter, when AgentRegistryService/ValidateRelease is called, then the response is 200 and the report names each of the three with its kind, asset id and finding; a dependency that exists only in another tenant is reported as missing (SCN-AgentRegistryService-001, ADR-0015). |
| AC3 | Given the same inputs validated twice and then once more with one dependency moved to another version, when the three reports are compared, then the first two carry the same manifest hash and the third a different one (SCN-AgentRegistryService-001, model/services/control-plane/AgentRegistryService.yaml). |
| AC4 | Given a body that lacks assetKind, assetId, version or source with repository, commit and path or that carries a publication field such as publishedAt, a caller without factory.assets.write, or a source commit that cannot be read because ext-azure-devops is unavailable, when AgentRegistryService/ValidateRelease is called, then the answer is 400, 403 or a fail-fast problem response that names the dependency respectively, and nothing is written (SCN-AgentRegistryService-001). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/ValidateRelease |
| Traces: descriptors | release-manifest-v1 |
| Traces: adrs | ADR-0015, ADR-0021 |
| Traces: requirements | FR-02, FUX-02, NFR-02 |
| Traces: scenarios | SCN-AgentRegistryService-001 |
| Depends on | feature:agent-registry-service-thin, feature:component-base-template-factory-profile |
| Sources | model/services/control-plane/AgentRegistryService.yaml, docs/planes/control/registries.md, docs/reference/schemas/release-manifest.schema.json |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-540 Closure resolver with hashes |
implementation | The resolver reads the asset sources at a commit through ext-azure-devops, walks the dependencies of a candidate by asset kind among the releases the tenant can read, records each with exact version and hash, computes the manifestHash so that the same inputs give the same hash and a changed dependency a different one, and reports a missing, unpublished or incompatible dependency by kind and asset id; ValidateRelease and the ClosureResolver worker share it. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1683 ValidateRelease as a sandbox operation over the resolver |
implementation | ValidateRelease validates the candidate fields of the body (assetKind, assetId, version and source with repository, commit and path, and no publication field of release-manifest-v1), runs the resolver and returns 200 with the report of resolved dependencies and findings; it writes no row, no blob and no outbox record, answers 400 and 403 as modelled and fails fast with a problem response that names ext-azure-devops when the commit cannot be read. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1684 Verify validate-a-release-candidate through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-AgentRegistryService-001"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-414 with a fake of the source system, a clean candidate, the three kinds of finding, the repeated hash and the stopped source system. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-415: Submit a release candidate from a source commit into review and resolve its closure¶
behavior · persona asset-maintainer
As an asset maintainer, I want to submit a candidate from a commit and have its closure resolved before its publication approval is requested, so that the review of my release runs on exactly the content and dependencies of that commit.
An asset maintainer with factory.assets.write submits a candidate through AgentRegistryService/SubmitRelease with an Idempotency-Key. The body is a candidate in the shape of release-manifest-v1: it carries assetKind, assetId, version, source with repository, commit and path and the hash that ValidateRelease reported for these inputs. The publication fields of the descriptor (publishedAt, publishedBy, evaluation, approval, signature and revocation) are absent on a candidate, and a body that lacks a candidate field or carries a publication field is refused with 400. The model does not say which step computes the hash that the row and the event carry at the 202, although ManifestHash and ManifestRef are not nullable and the closure is resolved afterwards. That is an open point reported to the owner, and this PBI fixes the following so that it is checkable. The command stores the submitted candidate manifest through ArtifactService, a fail-fast call, keeps its reference in ManifestRef and the submitted hash in manifestHash, records the subject of the caller in submittedBy, the author from whom no approval of the release may come (D117), creates the AssetRelease as an InReview candidate (transition SubmitForReview) with its release id in the form kind, asset, version and hash, and writes the AssetReleaseSubmitted outbox record in the same transaction; the response is 202 with the release location, because the closure and the publication approval follow. A version that exists in the tenant as a Draft release, whether a candidate returned by RejectedOrChanged or by ApprovalExpiredStaleOrCancelled or a seeded Draft release of the thin delivery, is no conflict: the existing release moves to InReview through SubmitForReview with the submitted source commit and hash and with the subject of this submission in submittedBy, one AssetReleaseSubmitted record is written and no second row exists under the unique index on tenant, asset kind, asset and version. When the submitted hash equals the hash of the existing row the release id is kept; when it differs, the model says that a changed dependency changes the release id, and how the row, its closure rows and the aliases that point at it move to the new id is an open point reported to the owner, which also covers a resubmission that corrects the hash of an InReview candidate. The event triggers the ClosureResolver worker of the service: it resolves the dependency closure from Git and the registry and computes the hash with the resolver of AIFACTORY-TASK-540. When the computed hash equals manifestHash, it writes one ReleaseClosure row per dependency, stores the resolved manifest through ArtifactService and points ManifestRef at it, and the publication approval is then requested as AIFACTORY-US-416 states. When it differs, the computed hash is the authoritative one and the submitted hash is not accepted: the candidate stays InReview with a blocking finding that names both hashes, connectsoft.factory.releases.blocked is incremented with the reason, no closure row is written and no approval is requested for the candidate until the maintainer resubmits with the hash the resolver reports. The worker runs at most four candidates in parallel, partitioned by tenant, is idempotent on release id and source commit, and retries with exponential backoff up to five attempts. The owner moved the publication path to I2 (D140): before I4 no evaluation suite exists, no evaluation runs on a submission and none is awaited; from I4 QualityScoreService also consumes the event and evaluates the candidate where an evaluation suite exists for its asset kind (D117), and the complete delivery attaches its verdict. When the source commit stays unreachable after the retries, the candidate stays InReview with a blocking finding that names the commit, the same counter is incremented, and the maintainer resubmits, which announces the candidate again and lets the resolver run on it. A repeated submission with the same key and the same body returns the same release and changes nothing; the same key with a different body is refused with 409, and so is a submission for a version that already exists in the tenant as a Published or Deprecated release, because a Published release is immutable and a change is a new version. A caller without the scope is refused with 403, and when ArtifactService is unavailable the call fails fast and nothing is written. AssetReleaseSubmitted carries releaseId, tenantId, assetKind, assetId, version and manifestHash under the run event envelope of the contracts package; the dispatcher of the agent-registry messaging profile publishes it on asset-publication.releases.v1.asset-release-submitted and retries a transport outage with backoff. This PBI also holds the aggregate, the write mappings of the three tables and the messaging profile of the service, on which every write operation of the feature relies. The release commands of the command-line client are delivered and proven with AIFACTORY-US-419.
Acceptance criteria
| AC1 | Given a caller with factory.assets.write and a candidate body with assetKind, assetId, version, source and hash, when AgentRegistryService/SubmitRelease is called with an Idempotency-Key, then the response is 202 with the release location, the submitted candidate manifest is stored through ArtifactService with its reference in ManifestRef, the AgentRegistryService/AssetRelease is InReview with releaseId, sourceCommit, the submitted hash as manifestHash and the subject of the caller as submittedBy, and the AgentRegistryService/AssetReleaseSubmitted outbox record is written in the same transaction; when ArtifactService is unavailable the call fails fast and nothing is written (SCN-AgentRegistryService-002, ADR-0014). |
| AC2 | Given the same submission repeated with the same key and body, when it arrives, then the same release is returned and no second release or outbox record exists; given a release of that tenant, asset and version in state Draft, when AgentRegistryService/SubmitRelease is called, then that release moves to InReview through SubmitForReview with the submitted source commit and hash and the subject of this submission as submittedBy, one AgentRegistryService/AssetReleaseSubmitted record is written and no second row exists; given the same key with a different body, a version of the asset that is already Published or Deprecated, a body that lacks a candidate field or carries a publication field, or a caller without the scope, when it is called, then the answer is 409, 409, 400 or 403 respectively and nothing is written or published (SCN-AgentRegistryService-002, ADR-0015). |
| AC3 | Given an InReview candidate announced by AgentRegistryService/AssetReleaseSubmitted, when the ClosureResolver worker runs and the hash it computes equals the manifestHash of the candidate, then ReleaseClosure holds every dependency with exact version and hash, the resolved manifest is stored through ArtifactService with ManifestRef pointing at it, and a duplicate trigger for the same release id and source commit has no second effect; when the computed hash differs, then the candidate stays InReview with a blocking finding that names both hashes, connectsoft.factory.releases.blocked is incremented with its reason, no closure row is written and no approval is requested for it (SCN-AgentRegistryService-010, model/services/control-plane/AgentRegistryService.yaml). |
| AC4 | Given the source commit stays unreachable, when the worker has retried five times with exponential backoff, then the candidate stays InReview with a blocking finding that names the commit, connectsoft.factory.releases.blocked is incremented with its reason, and a resubmission by the maintainer lets the resolver run again (SCN-AgentRegistryService-002, model/services/control-plane/AgentRegistryService.yaml). |
| AC5 | Given a committed submission, when the dispatcher of the agent-registry messaging profile publishes AgentRegistryService/AssetReleaseSubmitted on asset-publication.releases.v1.asset-release-submitted, then the event is sent under the run event envelope with releaseId, tenantId, assetKind, assetId, version and manifestHash, and a transport outage is retried with backoff so the event is neither lost nor published twice under its event id (SCN-AgentRegistryService-010, ADR-0012). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/SubmitRelease |
| Traces: events | AgentRegistryService/AssetReleaseSubmitted |
| Traces: descriptors | release-manifest-v1, run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015, ADR-0021 |
| Traces: requirements | FR-02, XL-02 |
| Traces: scenarios | SCN-AgentRegistryService-002, SCN-AgentRegistryService-010 |
| Depends on | AIFACTORY-US-414, feature:artifact-service, feature:contracts-package, feature:component-base-template-factory-profile |
| Sources | model/services/control-plane/AgentRegistryService.yaml, docs/planes/control/services/agent-registry-service/index.md#sagas-and-long-running-flows, docs/reference/schemas/release-manifest.schema.json, docs/reference/schemas/run-event-envelope.schema.json |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-364 Domain model: AssetRelease with the transitions and invariants of the publication path |
implementation | The AssetRelease aggregate holds the fields, the ClosureEntry and Alias entities and the Signature value object of the model, among them submittedBy, withdrawalReason, inFlightPolicy and finding (D117), the transitions SubmitForReview (from a new candidate and from an existing Draft release), GatesPassedAndApproved, RejectedOrChanged and ApprovalExpiredStaleOrCancelled, and the invariants of the publication path: blocked publication on an incomplete closure, a stable manifestHash, immutability of a Published release, Published for every asset kind only with an approval by someone other than submittedBy under the role the asset kind requires, and the return from InReview to Draft with a finding when the publication approval ends Expired, Stale or Cancelled; no evaluation verdict is required before I4 (D140), and the transitions Deprecate and Revoke with their reason and in-flight policy and the evidence invariant of ADR-0021 are added by the complete delivery in I4 (AIFACTORY-TASK-541, AIFACTORY-TASK-6342); unit tests cover every transition, every rejected pair of states and every invariant. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-365 Persistence in agent-registry-sql: write mappings of AssetReleases, ReleaseClosure and ReleaseAliases |
implementation | No schema is added: on the three tables the thin delivery created (AIFACTORY-TASK-1651) the mappings are completed for writes, that is the evaluation record reference, the approval and publication fields, the columns SubmittedBy, WithdrawalReason, InFlightPolicy and Finding of the model (D117), the alias rows with movedAt and movedBy and the row version as optimistic concurrency token, all under the tenant row filter with the platform tenant readable by every tenant; mapping tests run against an isolated test database, never a shared one. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-6346 Messaging wiring of the agent-registry profile for the publication path: outbox for two published events and the inbox subscription of ApprovalDecided |
implementation | The OrleansMessaging section declares the service name agent-registry, the published events AssetReleaseSubmitted and AssetReleasePublished with their topics and the subscription of ApprovalDecided of RunControlService with its handler PublishOnApproval (D140); the outbox writer enlists in the unit of work of each command, the inbox deduplicates on the event id and the handler reads the tenant from the run event envelope and refuses a message without one; the other published events and subscriptions of the model join the same section with the complete delivery in I4 (AIFACTORY-TASK-367). | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1685 SubmitRelease with the idempotency key and the AssetReleaseSubmitted outbox record |
implementation | The operation validates the candidate fields of the body (assetKind, assetId, version, source with repository, commit and path, hash, and no publication field), stores the submitted candidate manifest through ArtifactService (fail-fast) and keeps its reference in ManifestRef and the submitted hash in manifestHash, records the subject of the caller in submittedBy (D117), creates the InReview candidate with releaseId and source repository and commit and writes AssetReleaseSubmitted in one transaction, returns 202 with the location and returns the same release for the same key and body. A version that exists as a Draft release in the tenant moves to InReview through SubmitForReview with the submitted source commit and hash and the subject of this submission in submittedBy, with one AssetReleaseSubmitted record and no second row; the release id is kept when the hash is unchanged, and the case of a changed hash is the open point the PBI reports. The operation answers 409 for a reused key with a different body and for a version that is already Published or Deprecated, 400 and 403 as modelled; a resubmission of an InReview candidate with a blocking finding announces it again. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-368 Worker: ClosureResolver triggered by AssetReleaseSubmitted |
implementation | The worker runs on AssetReleaseSubmitted for InReview candidates without a resolved closure, at most four in parallel and partitioned by tenant, with exponential retry of five attempts and a backoff of 30 seconds and the idempotency key releaseId and sourceCommit; it computes the hash with the shared resolver and, when it equals the manifestHash the command wrote, writes the ReleaseClosure rows, stores the resolved manifest through ArtifactService and points ManifestRef at it, after which the publication approval is requested (AIFACTORY-TASK-1687); when the computed hash differs it writes no closure row, leaves the candidate InReview with a blocking finding that names both hashes and increments connectsoft.factory.releases.blocked, so that no approval is requested for the candidate; after exhausted retries on an unreachable commit it leaves the candidate InReview with a blocking finding and increments the same counter; a duplicate trigger has no second effect. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1686 Verify submit-a-release-candidate through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-AgentRegistryService-002\|Scenario=SCN-AgentRegistryService-010)"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-415, including the candidate manifest stored at submission, the submission of a version that exists as a Draft release, the worker with a duplicate trigger, with a computed hash that differs from the submitted one and with an unreachable commit, and the publication and payload of AssetReleaseSubmitted; consumer handling is proven by the suites of the consumers. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-416: Publish a release only with a complete closure and the approval its asset kind requires, requested through Run Control for the asset release¶
behavior · persona reviewer
As a reviewer, I want a release to become Published only on the exact manifest I approved, so that Published means reviewed and nobody publishes their own work.
A release reaches Published only with a second pair of eyes (ADR-0021, D117). The approval rule holds for every asset kind: the publication approval is granted by someone other than the subject that submitted the candidate, which the release keeps in submittedBy. Who approves depends on the asset kind (D119): a ModelProfile release is approved by a Platform admin who is not its author, the role ADR-0021 decision 1 names, and a release of every other asset kind by a Reviewer who is not its author; an approval from anyone else does not count. ApprovalDecided names the decider and not the role, so the role is bound by the approver rule of the approval request, which names the role the asset kind requires and which RunControlService enforces when the decision is taken. The owner moved this path to I2 (D140), and no evaluation verdict is required for a publication before I4, because no evaluation suite is delivered before the complete QualityScoreService of I4. The service therefore requests the publication approval as soon as the ClosureResolver worker has resolved the closure of a candidate without a blocking finding, for every asset kind. The evaluation evidence of ADR-0021, the handler RecordEvaluationEvidence and the option Publication:Gates:RequireEvaluation, under which a candidate of a kind with a suite waits for its verdict, take effect with the complete delivery in I4 (feature agent-registry-service-complete). The owner decided that an approval request names its subject as a kind and an id from a closed list, that runId is optional and that the service that owns the subject receives the decision (D135): AgentRegistryService, the publisher of the release, requests the publication approval through RunControl.RequestApproval of RunControlService with its own service identity, whose workload token holds factory.approvals.request, and the request is bound to no run, no step and no lease (AIFACTORY-US-1492 of feature run-control-service, D140). The registry supplies the subject kind asset-release with the release id as subject id, actionClass publication, the proposal kind release, the proposal hash equal to the manifestHash of the candidate, the tenant, the submittedBy of the release as the requester and the approver rule that names the role the asset kind requires; a release carries no project, so the request names none. RunControlService announces the decision as ApprovalDecided with its state, decidedBy and the subject kind asset-release and the release id, without runId, and the inbox handler PublishOnApproval acts on it once per event id. A caller whose scope carries factory.assets.publish reaches the same transition through AgentRegistryService/PublishRelease, which is an approval-gated action. Both paths apply one rule, the transition GatesPassedAndApproved: every closure entry is present, Published and compatible with the declared runtime adapter, and the publication approval is granted for exactly this manifestHash by a decidedBy that differs from the submittedBy of the release, whatever its asset kind, under the role the asset kind requires, Platform admin for a ModelProfile release and Reviewer for every other kind (D119). When the rule holds, the release moves from InReview to Published with publishedAt, publishedBy and approvalId, the signature over the manifest hash is recorded when Publication:Signing:KeyId names a key, and two outbox records are written in the transaction of the command: AssetReleasePublished and an audit-evidence-v1 record of action release-published that names the actor, the release as subject with its manifestHash and the outcome, on the topic audit.evidence.v1.evidence-submitted under the run event envelope (D115); a command that rolls back leaves no evidence. connectsoft.factory.releases.published is incremented and the release is immutable from then on. When the rule does not hold, PublishRelease answers 412 with a problem body that names the failing gate, PublishOnApproval does not publish, connectsoft.factory.releases.blocked is incremented with the reason and the release stays InReview. Of the six outcomes ApprovalDecided announces, only an approval publishes. A rejection and a request for changes return the candidate to Draft through RejectedOrChanged. An expired, stale or cancelled request returns the candidate to Draft through ApprovalExpiredStaleOrCancelled with a finding that names the outcome (D117); the maintainer submits it again from Draft, as AIFACTORY-US-415 states for a version that exists as a Draft release, and a new approval is requested once its closure is resolved. A release of another tenant or an unknown one is answered 404, a caller without the scope 403, a release that is Draft, Deprecated or Revoked 409, since a revoked release is never published again (D119), and a repeated call for a release that is already Published returns 200 and changes nothing. RunControlService is a fail-fast dependency: when it is unavailable the approval request fails, it is retried with backoff and the release stays InReview meanwhile.
Acceptance criteria
| AC1 | Given an InReview release of any asset kind whose closure the ClosureResolver worker resolved without a blocking finding, when the worker completes, then the publication approval is requested once through RunControlService/RunControl.RequestApproval with actionClass publication, the proposal kind release, the proposal hash equal to the manifestHash, the subject kind asset-release with the release id, submittedBy as the requester and the approver rule of the role the asset kind requires, under the service identity of AgentRegistryService and without a run, step or lease, and without waiting for an evaluation verdict (D135, D140); a candidate with a blocking finding requests none; an unavailable RunControlService is retried with backoff and the release stays InReview (SCN-AgentRegistryService-003, ADR-0021). |
| AC2 | Given an InReview release with a complete and compatible closure and a publication approval granted for its manifestHash by someone other than its submittedBy (D117), in two cases, an agent release approved by a Reviewer and a ModelProfile release approved by a Platform admin (D119), neither of which carries an evaluation record (D140), when AgentRegistryService/PublishRelease is called by a caller with factory.assets.publish or RunControlService/ApprovalDecided grants the approval, then the AgentRegistryService/AssetRelease is Published with publishedAt, publishedBy and approvalId, the AgentRegistryService/AssetReleasePublished outbox record is written, and an audit-evidence-v1 record of action release-published that names the actor, the release as subject with its manifestHash and the outcome is written to the outbox in the transaction of the command, on the topic audit.evidence.v1.evidence-submitted under the run event envelope; a command that rolls back leaves no evidence (D115); connectsoft.factory.releases.published is incremented (SCN-AgentRegistryService-003, ADR-0014, ADR-0021). |
| AC3 | Given a release with a missing, unpublished or incompatible closure entry, without a granted approval for its manifestHash, or, for any asset kind, with a granting decision whose decidedBy equals the submittedBy of the release or whose approval was not given under the role its asset kind requires, Platform admin for a ModelProfile release and Reviewer for every other kind (D119), when AgentRegistryService/PublishRelease is called, then the answer is 412 with a problem body that names the failing gate, and when RunControlService/ApprovalDecided grants an approval for it, then PublishOnApproval does not publish; in each case the release stays InReview, nothing is published and connectsoft.factory.releases.blocked is incremented with the reason (SCN-AgentRegistryService-003, NFR-11). |
| AC4 | Given a caller without factory.assets.publish, a release of another tenant or an unknown one, or a release that is Draft, Deprecated or Revoked, when AgentRegistryService/PublishRelease is called, then the answer is 403, 404 or 409 respectively and nothing changes; given a release already Published, when the call is repeated, then it returns 200 and writes no second event; given a RunControlService/ApprovalDecided whose state is Rejected or ChangesRequested, when it is handled, then the candidate returns to Draft through RejectedOrChanged; given one whose state is Expired, Stale or Cancelled, when it is handled, then the candidate returns to Draft through ApprovalExpiredStaleOrCancelled with a finding that names the state (D117); none of these five states publishes the release and each delivery is acknowledged once per event id (SCN-AgentRegistryService-003, ADR-0015). |
| AC5 | Given a committed publication, when the dispatcher of the agent-registry messaging profile publishes AgentRegistryService/AssetReleasePublished on asset-publication.releases.v1.asset-release-published, then the event is sent under the run event envelope with releaseId, tenantId, assetKind, assetId, version and manifestHash, and a transport outage is retried with backoff so the event is neither lost nor published twice under its event id (SCN-AgentRegistryService-011, ADR-0012). |
| Traces: services | AgentRegistryService, RunControlService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/PublishRelease, RunControlService/RunControl.RequestApproval |
| Traces: events | AgentRegistryService/AssetReleasePublished, RunControlService/ApprovalDecided |
| Traces: descriptors | release-manifest-v1, approval-request-v1, audit-evidence-v1, run-event-envelope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015, ADR-0021 |
| Traces: requirements | FR-02, FUX-10, NFR-11, XL-02, XL-08 |
| Traces: scenarios | SCN-AgentRegistryService-003, SCN-AgentRegistryService-011 |
| Depends on | AIFACTORY-US-415, feature:run-control-service, feature:component-audit-factory-evidence, feature:contracts-package |
| Sources | model/services/control-plane/AgentRegistryService.yaml, model/services/control-plane/RunControlService.yaml, docs/architecture/quality-gates.md, docs/planes/control/services/agent-registry-service/index.md#sagas-and-long-running-flows, docs/reference/schemas/audit-evidence.schema.json |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-1687 Inbox handler PublishOnApproval and the publication approval request after the closure is resolved |
implementation | When the ClosureResolver worker has resolved the closure of a candidate without a blocking finding, the service requests the publication approval from RunControlService through RunControl.RequestApproval with actionClass publication, proposal kind release, proposal hash equal to the manifestHash, the subject kind asset-release with the release id, submittedBy as the requester and the approver rule of the role the asset kind requires, under the service identity of the registry with the scope factory.approvals.request and without a run, step or lease (D135, D140; fail-fast, retried with backoff while the release stays InReview), for every asset kind and without waiting for an evaluation verdict, since no evaluation suite exists before I4 (D140); the request waits on a passed or waived verdict for the kinds with a suite only from the complete delivery (AIFACTORY-TASK-6341). PublishOnApproval handles every state of ApprovalDecided once per event id: Approved applies GatesPassedAndApproved after checking, for every asset kind, that decidedBy differs from submittedBy and that the approval was given under the role the kind requires, Platform admin for a ModelProfile release and Reviewer for every other kind (D119), and it does not publish and increments connectsoft.factory.releases.blocked when a check fails; Rejected and ChangesRequested apply RejectedOrChanged; Expired, Stale and Cancelled apply ApprovalExpiredStaleOrCancelled, which returns the candidate to Draft with a finding that names the state (D117); the handler reads the tenant from the envelope. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1688 PublishRelease with the gate rule, the signature, the audit evidence and the two counters |
implementation | PublishRelease applies the same GatesPassedAndApproved rule: the complete and compatible closure and, for every asset kind, the check that decidedBy differs from submittedBy (D117) and that the approval was given under the role the kind requires, Platform admin for a ModelProfile release and Reviewer for every other kind (D119); the evidence check of ADR-0021 is added by the complete delivery in I4 (AIFACTORY-TASK-6342, D140); it answers 409 for a release that is Draft, Deprecated or Revoked, a revoked release never being published again (D119); in the transaction of the publication it writes AssetReleasePublished and, through the Factory sink of the audit library pinned from feature component-audit-factory-evidence, an audit-evidence-v1 record of action release-published with the actor, the release as subject with its manifestHash and the outcome, on the topic audit.evidence.v1.evidence-submitted under the run event envelope, so that a rollback leaves no evidence (D115); it records the signature over the manifest hash when Publication:Signing:KeyId names a key, increments connectsoft.factory.releases.published, answers 412 with the failing gate named and increments connectsoft.factory.releases.blocked, and answers 403, 404 (also for a release of another tenant, ADR-0015) and 409 as modelled; a repeat on a Published release returns 200 without a second event. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1689 Verify publish-a-release-under-gates-and-approval through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-AgentRegistryService-003\|Scenario=SCN-AgentRegistryService-011)"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-416 against a fake of RunControl.RequestApproval and fixtures of ApprovalDecided: the approval request with the subject kind asset-release made once the closure is resolved and none for a candidate with a blocking finding, both paths to Published for an agent release and for a ModelProfile release without an evaluation record, the evidence record on the topic audit.evidence.v1.evidence-submitted and none after a rollback, each failing gate with its 412, the subject in submittedBy as approver refused on both paths, a ModelProfile release approved by a Reviewer and an agent release approved outside the Reviewer role not published, the 409 of a Draft release, the six states of ApprovalDecided with the return to Draft and its finding for Expired, Stale and Cancelled, the refusals and the publication and payload of AssetReleasePublished; releases in the states Deprecated and Revoked, which the complete delivery of I4 produces, are written by a fixture of the store; consumer handling is proven by the suites of the consumers. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-418: Read one release with its manifest, closure, evidence and aliases, and list the releases of the tenant¶
behavior · persona observer
As an observer, I want to read a release with its closure, its approval, its evidence where it has some and its aliases, and to list releases by kind, asset and state, so that I can see why a release is allowed to run and which one an alias selects.
A caller whose scope carries factory.assets.read, an observer, a reviewer before a decision or the Studio asset views, reads releases through two operations, which the owner moved to the publication path of I2 (D140). AgentRegistryService/GetRelease returns one release addressed by releaseId: its manifest as release-manifest-v1, the closure entries with exact version and hash, the evaluation record reference with its verdict where the release carries one, the approval and the aliases that point at the release. A release published before I4 carries no evaluation record, because no evaluation verdict is required before I4, and the read returns it without one (D140). The read also returns what the release keeps about its withdrawal and about a return to Draft (D119): the reason of a deprecation or a revocation in withdrawalReason, the in-flight policy in inFlightPolicy and the finding recorded when a candidate returned to Draft. AgentRegistryService/ListReleases returns the releases the caller can read, filtered by asset kind, asset and state, each with kind, asset, version and state. Both run under the tenant row filter of the service: a caller reads the releases of its own tenant and those of the platform tenant, which holds the assets ConnectSoft publishes and is readable by every tenant; a release of another tenant never appears in a list and is answered 404 when addressed, the same answer as for a release id that does not exist, so the response never confirms that it exists (ADR-0015). A caller without the scope is refused with 403. A Deprecated release and a Revoked release stay readable with their manifest unchanged, and the state shown, Revoked among them, is the committed state of agent-registry-sql. An alias that points at a release when it is revoked stays in place and visible (D121): the read of the Revoked release returns that alias among its aliases until an administrator moves it. Deprecation and revocation arrive with the complete delivery in I4, so the suite of this feature writes releases in those states through a fixture of the store. The manifest and the evaluation record are blobs held by ArtifactService and referenced by hash; the read returns the stored manifest and the reference of the record and never a secret, because manifests contain none. Both operations are of class read and write nothing. When the store is unavailable the call fails fast with a problem response. For a release that is not Published yet, a Draft or an InReview candidate, the read returns the manifest without the publication fields of the descriptor, as the contract of the thin delivery fixes it. The write mappings of the three tables are completed by AIFACTORY-TASK-365 of AIFACTORY-US-415, the first PBI that writes an AssetRelease; this PBI only reads.
Acceptance criteria
| AC1 | Given a Published release with closure, approval and two aliases and no evaluation record (D140), and one whose evaluation record reference and verdict a fixture of the store wrote, when a caller with factory.assets.read calls AgentRegistryService/GetRelease, then the response is 200 with the manifest as release-manifest-v1, every closure entry with exact version and hash, the approval and both aliases, the first without an evaluation record and the second with its reference and verdict, and nothing is written (SCN-AgentRegistryService-005, FUX-02). |
| AC2 | Given a caller without factory.assets.read, or a releaseId that exists only in another tenant or not at all, when AgentRegistryService/GetRelease is called, then the answer is 403 for the missing scope and 404 for the foreign and for the unknown release alike, with a problem response and no state change (SCN-AgentRegistryService-005, ADR-0015). |
| AC3 | Given releases of the tenant of the caller, of the platform tenant and of another tenant in several states, when AgentRegistryService/ListReleases is called with filters on asset kind, asset and state, then the response is 200 with only the matching releases of the own tenant and of the platform tenant, each with kind, asset, version and state, and a release of the other tenant never appears (SCN-AgentRegistryService-006, ADR-0015). |
| AC4 | Given agent-registry-sql is unavailable or the identity platform cannot validate the token, when AgentRegistryService/ListReleases is called, then the call fails fast with a problem response and no state changes; given a Deprecated release, when it is read or listed, then it is returned with state Deprecated and its manifest unchanged; given a Revoked release, when AgentRegistryService/GetRelease is called, then it is returned with the state Revoked, the withdrawalReason and the inFlightPolicy it keeps, every alias that still points at it (D121) and its manifest unchanged, and given a candidate that returned to Draft after an expired, stale or cancelled approval, then the read returns its finding (SCN-AgentRegistryService-005, SCN-AgentRegistryService-006, model/services/control-plane/AgentRegistryService.yaml, D119). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/GetRelease, AgentRegistryService/ListReleases |
| Traces: descriptors | release-manifest-v1 |
| Traces: adrs | ADR-0015 |
| Traces: requirements | FR-02, FUX-02, FUX-10 |
| Traces: scenarios | SCN-AgentRegistryService-005, SCN-AgentRegistryService-006 |
| Depends on | AIFACTORY-US-415, feature:agent-registry-service-thin, feature:component-base-template-factory-profile |
| Sources | model/services/control-plane/AgentRegistryService.yaml, docs/planes/control/services/agent-registry-service/index.md#data-model-and-storage, docs/reference/schemas/release-manifest.schema.json |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-1692 GetRelease and ListReleases read model with the tenant row filter and the platform tenant |
implementation | GetRelease returns the manifest as release-manifest-v1 with closure, the evaluation record reference and verdict where the release carries one, approval and aliases, and with the withdrawalReason, the inFlightPolicy and the finding the release keeps (D119); a release published before I4 is returned without an evaluation record (D140); the aliases of a Revoked release include every alias that still points at it, since such an alias stays in place and visible until an administrator moves it (D121); ListReleases returns the releases filtered by asset kind, asset and state; both read the own tenant and the platform tenant only, so a release of another tenant is answered 404, the same answer as for an id that does not exist (ADR-0015), and a missing scope is 403. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1693 Verify read-releases-with-closure-and-evidence through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-AgentRegistryService-005\|Scenario=SCN-AgentRegistryService-006)"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-418 over the two-tenant fixture with the platform tenant, a Published release without an evaluation record and one with a record written by a fixture of the store, a Deprecated release, a Revoked release read with its reason, its in-flight policy and the alias that still points at it, both written by a fixture of the store, a Draft candidate read with its finding and a stopped store. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-US-419: Point an alias at a Published release without touching the runs that were already accepted¶
behavior · persona asset-maintainer
As an asset maintainer, I want to move an alias such as stable to a newly published release, so that new submissions pick up the new release while every accepted run keeps the one it pinned.
An alias is a mutable name of an asset, such as latest or stable, that points at one release; a submission may name the alias, and Run Control resolves it to the release id when it accepts the run. The owner moved this operation to the publication path of I2 (D140), so the workflow features of I2 and later point the aliases of their definitions and agents at their Published releases. A caller whose scope carries factory.assets.publish points an alias at a release through AgentRegistryService/MoveAlias, addressed by asset kind, asset id and alias name, with the target release in the body. The service checks that the release exists in the tenant of the caller, belongs to the addressed asset and is Published, and then creates the alias or moves it, recording movedAt and movedBy; the response is 200. An alias is never pointed at a Draft, InReview, Deprecated or Revoked release: such a target is refused with 409, and a revoked release is never aliased again (D119). An alias that already points at a release when that release is revoked is another case (D121): the revocation leaves it in place and visible, AssetPublication.ResolveRelease through it answers FAILED_PRECONDITION naming the revoked release and SubmitRun of RunControlService answers 409, and that lasts until an administrator moves the alias to a Published release through this operation. That move is an ordinary move: it is refused only as any move is, and from its commit the alias resolves to the new release. Revocation arrives with the complete delivery in I4, so the suite of this feature writes Deprecated and Revoked releases, and an alias left on a Revoked release, through a fixture of the store. Moving an alias changes what later submissions resolve and nothing else. A run that was accepted before the move keeps the release id it pinned, because the alias selects a release at submission only; the registry changes no run and publishes no event for an alias. Two concurrent moves of the same alias are decided by the version conflict the model names: the first commits, the second is rejected with 409 and the caller reads the alias again. A repeated call that names the release the alias already points at returns 200 and changes nothing. A caller without the scope is answered 403; an asset or a release that does not exist in the tenant of the caller is answered 404, which is also the answer for an asset or a release of another tenant. From the moment the move commits, AgentRegistryService/AssetPublication.ResolveRelease resolves the alias to the new release. This PBI is the last whose route the command-line client calls, so it also delivers the release commands of the client in ConnectSoft.AI.SoftwareFactory.Cli: validate, submit, publish and move an alias, each through the gateway route of its operation. A command sends the modelled request, with an Idempotency-Key on a submission, prints the release id and the state, and for a validation the report with its findings, and exits with a non-zero code on 400, 403, 404, 409 and 412; the commands are proven in the repository of the client against a fake of the gateway.
Acceptance criteria
| AC1 | Given a Published release of an asset and a caller with factory.assets.publish, when AgentRegistryService/MoveAlias is called for an alias of that asset with the release as target, then the response is 200, ReleaseAliases points the alias at the release with movedAt and movedBy, and AgentRegistryService/AssetPublication.ResolveRelease resolves the alias to that release from then on; given an alias that points at a Revoked release, which the revocation left in place (D121), when the same call names a Published release of that asset as target, then the response is 200 and the alias resolves to that release again (SCN-AgentRegistryService-007, FR-02). |
| AC2 | Given a run accepted while the alias pointed at the earlier release, when the alias is moved, then the release id the run pinned is unchanged and loading it returns the earlier release, and the registry writes no outbox record for the move (SCN-AgentRegistryService-007, docs/planes/control/registries.md). |
| AC3 | Given a target release that is Draft, InReview, Deprecated or Revoked (D119), or two concurrent moves of the same alias, when AgentRegistryService/MoveAlias is called, then the target that is not Published is refused with 409, the first concurrent move commits and the second is rejected with 409, and the alias points at exactly one Published release (SCN-AgentRegistryService-007, model/services/control-plane/AgentRegistryService.yaml). |
| AC4 | Given a caller without factory.assets.publish, or an asset or release of another tenant or an unknown one, when AgentRegistryService/MoveAlias is called, then the answer is 403 or 404 respectively and the alias is unchanged; given a repeated call that names the release the alias already points at, when it arrives, then it returns 200 and changes nothing (SCN-AgentRegistryService-007, ADR-0015). |
| AC5 | Given the gateway routes of AgentRegistryService/ValidateRelease, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease and AgentRegistryService/MoveAlias, when each release command of the command-line client runs against a fake of the gateway, then it sends the modelled request, with an Idempotency-Key on a submission, prints the release id and the state, and for a validation the report with its findings, and exits with a non-zero code on 400, 403, 404, 409 and 412 (model/services/control-plane/AgentRegistryService.yaml). |
| Traces: services | AgentRegistryService |
| Traces: aggregates | AgentRegistryService/AssetRelease |
| Traces: apis | AgentRegistryService/MoveAlias, AgentRegistryService/AssetPublication.ResolveRelease, AgentRegistryService/ValidateRelease, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease |
| Traces: adrs | ADR-0015 |
| Traces: requirements | FR-02 |
| Traces: scenarios | SCN-AgentRegistryService-007 |
| Depends on | AIFACTORY-US-414, AIFACTORY-US-415, AIFACTORY-US-416, AIFACTORY-US-418, feature:command-line-client |
| Sources | model/services/control-plane/AgentRegistryService.yaml, docs/planes/control/registries.md, docs/planes/control/services/agent-registry-service/index.md#domain-model |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-1694 MoveAlias with the Published check and the version conflict of concurrent moves |
implementation | MoveAlias creates or moves the alias of the addressed asset to a Published release of that asset with movedAt and movedBy, refuses a target that is not Published and the losing one of two concurrent moves with 409, moves an alias that points at a Revoked release to a Published one like any other alias (D121), returns 200 without a change on a repeat, answers 403 and 404 (also for an asset or release of another tenant, ADR-0015) as modelled, and writes no outbox record. | ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-542 Release commands in the command-line client |
implementation | The client validates, submits and publishes a release and moves an alias through the gateway routes of ValidateRelease, SubmitRelease, PublishRelease and MoveAlias, sends an Idempotency-Key with a submission, prints the report of a validation with its findings and the release id and state after each command, and exits with a non-zero code on 400, 403, 404, 409 and 412. | ConnectSoft.AI.SoftwareFactory.Cli |
AIFACTORY-TASK-1695 Verify move-an-alias-to-a-published-release through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-AgentRegistryService-007"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-419, including a run that keeps its pinned release across a move, two concurrent moves and an alias moved from a Revoked release, written by a fixture of the store, to a Published one. |
ConnectSoft.AI.SoftwareFactory.AgentRegistryService |
AIFACTORY-TASK-1702 Verify the release commands of the command-line client against a fake of the gateway |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Feature=ReleaseCommands" in ConnectSoft.AI.SoftwareFactory.Cli; a zero-match filter counts as a failure; the tests prove AC5 of AIFACTORY-US-419 against a fake of the gateway routes of AgentRegistryService/ValidateRelease, AgentRegistryService/SubmitRelease, AgentRegistryService/PublishRelease and AgentRegistryService/MoveAlias: the modelled request of each command, the Idempotency-Key of a submission, the printed release id and state, the printed findings of a validation and a non-zero exit code on 400, 403, 404, 409 and 412. |
ConnectSoft.AI.SoftwareFactory.Cli |