AIFACTORY-FEAT-072: StudioBff: complete delivery¶
Generated from the architecture model
This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.
A design artefact, not a tracker
This backlog is generated from model/backlog/ and validated against the architecture model. No work item exists in any tracker, and no item carries a date, an estimate or an assignee (ADR-0029).
Epic Factory Studio (PF-14) · Increment I3 Studio · State elaborated · Route backend-developer · Build order 112 of 185 (Factory code)
StudioBff is the backend-for-frontend of bounded context BC-29 (Experience Composition). The backend-for-frontend of the Factory Studio (GW-02): composes read models from every platform into screen-shaped responses under the caller's execution scope, forwards commands to the owning platform with idempotency keys and approval bindings, keeps session projections, saved views and preferences, and fronts StudioNotificationService; it owns no factory truth (BC-29). Its own repository is ConnectSoft.AI.SoftwareFactory.StudioBff.
| Delivers | StudioBff (complete) |
| Stubs | FleetOperationsHost as static, completed in I7DataEventFoundations as static, completed in I4 |
| Realizes | adrs: ADR-0014, ADR-0015, ADR-0016 |
| Requirements | FR-01, FR-05, FR-10, FUX-01, FUX-02, FUX-03, FUX-04, FUX-06, FUX-07, FUX-08, FUX-09, FUX-11, FUX-12, NFR-01, NFR-02, NFR-03, NFR-10, XL-01, XL-05, XL-06, XL-12 |
| Depends on | — |
| Sources | model/services/factory-studio/StudioBff.yaml |
Scenarios to trace (11, catalog): SCN-StudioBff-001 ✓, SCN-StudioBff-002 ✓, SCN-StudioBff-003 ✓, SCN-StudioBff-004 ✓, SCN-StudioBff-005 ✓, SCN-StudioBff-006 ✓, SCN-StudioBff-007 ✓, SCN-StudioBff-008 ✓, SCN-StudioBff-009 ✓, SCN-StudioBff-010 ✓, SCN-StudioBff-011 ✓
AIFACTORY-US-032: A Studio session carries my scope and my permissions¶
behavior · persona requester
As a requester, I want to sign in to the Studio and receive a session that holds my scope, my roles and my effective permissions, so that every screen shows only what my roles allow in that scope, through one backend that owns no factory truth.
This is the integration PBI of the feature. StudioBff is the backend-for-frontend of the Factory Studio in bounded context BC-29 (Experience Composition): the Studio front end calls only StudioBff on the route GW-02 and StudioRealtimeGateway, and every call carries the user token with the scope factory.studio.use. StudioBff calls the public gateways of the platforms delivered in I1 to I3 (ControlPlaneApi, TemplateCatalogHost, KnowledgeHost, GovernanceHost, IntegrationHost, ModelGatewayHost, ToolExecutorHost, RuntimeCloudHost, DeliveryHost and ObservabilityHost) with that user token, exchanged at the identity platform for a token of each gateway because a user token has one audience (ADR-0015, D114); these are REST calls made through the typed client package of each gateway, pinned from the ConnectSoft feed and given the exchanged token of its own gateway only, never through a gRPC route of a gateway and never through a client written by hand (D140, AIFACTORY-US-1363); the three routes of StudioNotificationService, which StudioBff fronts, receive the user token unchanged and accept the audience of StudioBff (D117). StudioBff owns no factory truth and keeps only its two aggregates in studio-sql: StudioSession and SavedView. FleetOperationsHost (I7) and DataEventFoundations (I4) are static stubs in I3, so their sources show the freshness Unknown. This PBI delivers the start of a session: StudioBff/GetStudioSession returns the session projection of the signed-in user, and when the user has no active session it starts one. The tenant is the claim tid of the validated token. The project of a new session is the one of the latest session row of the user in that tenant (index IX_Sessions_User); with no earlier session it is the first project that ProjectService/ListProjects returns through ControlPlaneApi for the user token; a user with no project receives a session that holds the tenant only, no project role and the tenant-scope roles of the token claims, and the screens that need a project show their empty state. The roles of the project are resolved with ProjectService/Projects.ResolveScope, which StudioBff calls with its own workload token holding the service scope that names ProjectService, the user as callerId with callerKind user, and the active platform policy revision in policyContext.policyRevision; the model names no source of that revision for a caller that is not a run, so this PBI assumes the revision that PolicyEngineService/Policy.GetActiveRevision returns through GovernanceHost and reports the point as an open question. The roles and the effective permissions snapshot are stored with the preferences of the user, and the StudioSession row and its StudioSessionStarted outbox record are written in one transaction. Feature flags come from the Config Platform, which arrives with feature component-config-platform in I5; until then they come from the options of the service and the session is returned without the platform (optional, degrade). A request without a valid token is refused with 401; while the identity platform is unreachable new sign-ins fail fast with 503 and a problem response naming the identity platform (D137), and sessions already started continue until their tokens expire. The other behaviours are delivered by AIFACTORY-US-1361 (scope switch), AIFACTORY-US-1362 (preferences and idle expiry), AIFACTORY-US-1363 (screen composition and health), AIFACTORY-US-1364 (command forwarding) and AIFACTORY-US-037 (saved views and search). Of the 169 consumed events of the model the inbox registers the handlers of the 111 whose producers are first delivered in I1 to I3, among them AttemptCheckpointed of AgentRuntimeService, whose handler RefreshExecutionAttemptView refreshes the execution attempt view with the checkpoint sequence (D137), each idempotent on the event id and each invalidating the cached compositions of the scope of its subject so that the next GetScreenModel recomposes; an event that a thin delivery does not publish yet simply never arrives, and the 58 handlers whose producers arrive in I4 to I8 are not registered in I3. The repository is created by the repository checklist of feature repository-and-pipeline-conventions and scaffolded from the API gateway template with the role BackendForFrontend and the one named exemption file of the template (feature component-api-gateway-template), which lists each admitted type with a reason: the aggregates StudioSession and SavedView, their mappings and migrations, the published events StudioSessionStarted and SavedViewChanged with the outbox registration, and the view-refresh inbox handlers.
Acceptance criteria
| AC1 | Given a signed-in user whose token carries factory.studio.use and who has no active session, when StudioBff/GetStudioSession is called, then the response is 200 with the tenant of the claim tid, the project of the latest session row of the user or else the first project of ProjectService/ListProjects, the roles that ProjectService/Projects.ResolveScope returned for a request with the workload token of StudioBff, the user as callerId and callerKind user, the effective permissions snapshot, the locale, the theme, the reduced-motion preference, the work area and the feature flags; the StudioBff/StudioSession row and its StudioBff/StudioSessionStarted outbox record are written in one transaction, and a later call on the active session refreshes lastSeenAt and starts no second session (SCN-StudioBff-001, D114). |
| AC2 | Given a request without a token or with a token that does not validate, or the identity platform unreachable for a new sign-in, when StudioBff/GetStudioSession is called, then the response is 401 with a problem response, or 503 with a problem response naming the identity platform (D137), no session is started and nothing is published, while a session already started continues until its token expires; given a user with no project, the session holds the tenant only and no project role (SCN-StudioBff-001). |
| AC3 | Given a session was started, when the outbox dispatcher publishes StudioBff/StudioSessionStarted on studio.sessions.v1.studio-session-started, then the event is sent under the canonical envelope with sessionId, tenantId, userId and locale, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-StudioBff-010, ADR-0012, ADR-0014). |
| AC4 | Given the repository ConnectSoft.AI.SoftwareFactory.StudioBff scaffolded from the API gateway template with the role BackendForFrontend, when its pipeline runs with the work of this feature, then the solution builds, the architecture test of the template passes with the one exemption file that lists, each with a reason, StudioBff/StudioSession, StudioBff/SavedView, their mappings and migrations, the published events StudioBff/StudioSessionStarted and StudioBff/SavedViewChanged with the outbox registration, and the view-refresh inbox handlers, the tests pass, the template version is recorded, a container image is published and each of the eleven scenarios of model/scenarios/StudioBff.yaml has a passing test that names its id (ADR-0028). |
| AC5 | Given the inbox and the configuration of the service, when they are compared with the model descriptor model/services/factory-studio/StudioBff.yaml, then the handlers of the 111 consumed events of producers first delivered in I1 to I3, AgentRuntimeService/AttemptCheckpointed among them (D137), are registered with idempotency on the event id and no other handler is, every query runs under the tenant row filter, the secrets studio-sql and studio-signing come from key-vault references, and the four metrics of the descriptor are emitted with their modelled dimensions (ADR-0015, ADR-0016, NFR-10). |
| Traces: services | StudioBff, ControlPlaneApi, ProjectService |
| Traces: aggregates | StudioBff/StudioSession |
| Traces: apis | StudioBff/GetStudioSession, ProjectService/Projects.ResolveScope, ProjectService/ListProjects |
| Traces: events | StudioBff/StudioSessionStarted, StudioBff/SavedViewChanged, AgentRuntimeService/AttemptCheckpointed |
| Traces: descriptors | execution-scope-v1 |
| Traces: adrs | ADR-0012, ADR-0014, ADR-0015, ADR-0016, ADR-0028 |
| Traces: requirements | FR-01, FUX-01, FUX-12 |
| Traces: scenarios | SCN-StudioBff-001, SCN-StudioBff-010 |
| Relates: screens | my-work |
| Relates: nfrs | NFR-01, NFR-10 |
| Depends on | AIFACTORY-US-1361, AIFACTORY-US-1362, AIFACTORY-US-1363, AIFACTORY-US-1364, AIFACTORY-US-037, feature:control-plane-api, feature:project-service, feature:agent-runtime-service, feature:template-catalog-host, feature:governance-host, feature:typed-gateway-clients, feature:repository-and-pipeline-conventions, feature:component-api-gateway-template, feature:contracts-package, feature:component-observability-factory-conventions |
| Sources | model/services/factory-studio/StudioBff.yaml, model/scenarios/StudioBff.yaml, docs/planes/experience/studio/services/studio-bff/index.md#purpose-and-responsibilities, docs/architecture/adr/0028-one-repository-and-deployable-per-service.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-513 Session start with scope resolution and the StudioSessionStarted outbox record |
implementation | GetStudioSession returns the session projection of the user; without an active session it takes the tenant from the claim tid, the project of the latest session row of the user or else the first project of ListProjects called with the user token, resolves the roles through a typed client of Projects.ResolveScope called with the workload token of StudioBff and its service scope, the user as callerId with callerKind user and the active platform policy revision, stores the roles and the effective permissions snapshot with the preferences of the latest session or the defaults, and writes the StudioSession row and its StudioSessionStarted outbox record in one transaction; a user with no project receives a tenant-only session; feature flags come from the options of the service while the Config Platform is absent; a missing or invalid token is 401, and an unreachable identity platform for a new sign-in is 503 with a problem response naming it (D137). | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-413 Create the repository ConnectSoft.AI.SoftwareFactory.StudioBff and scaffold it from the ConnectSoft.ApiGatewayTemplate template with the role BackendForFrontend |
implementation | The repository exists by the repository checklist of feature repository-and-pipeline-conventions; the output of dotnet new connectsoft-apigateway -n ConnectSoft.AI.SoftwareFactory.StudioBff with the Factory profile and the gateway role BackendForFrontend from the pinned template package is committed unchanged with the one exemption file of the template, which lists with a reason each of StudioSession, SavedView, their mappings and migrations, the published events StudioSessionStarted and SavedViewChanged with the outbox registration, and the view-refresh inbox handlers; the repository records the template version, the solution builds and the template tests pass in the repository pipeline, which publishes the container image. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-414 Domain model: StudioSession, SavedView |
implementation | The aggregates hold the fields and the invariants of the model: a switcher changes the scope a session reads under and never grants a permission, a composed response is never widened by the BFF, and a shared view carries a filter definition and no data; unit tests cover every invariant. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-415 Persistence in studio-sql: StudioSessions, SavedViews |
implementation | Mappings and migrations for the two modelled tables with the tenant filter and the indexes IX_Sessions_User and IX_Views_Screen; mapping tests run against an isolated test database, never a shared one. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-416 API hosting skeleton: 9 REST operations with scope enforcement, problem responses and the OpenAPI document |
implementation | The nine REST routes are hosted on GW-02, and StudioHealth on GW-01, with JWT validation, scope enforcement per route (factory.studio.use, factory.health.read), the Idempotency-Key filter of ForwardCommand, problem responses for every modelled refusal code and the OpenAPI document; the three routes of StudioNotificationService that StudioBff fronts are forwarded with the user token unchanged; the behaviour of each operation is delivered by AIFACTORY-US-032, AIFACTORY-US-1361 to AIFACTORY-US-1364 and AIFACTORY-US-037, not here. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-417 Messaging skeleton: outbox of 2 published events and inbox of 111 of the 169 consumed events |
implementation | The outbox writer enlists in the session and view transactions and the dispatcher publishes StudioSessionStarted and SavedViewChanged under the canonical envelope; the inbox registers, with idempotency on the event id, the handlers of the 111 consumed events whose producers are first delivered in I1 to I3, AttemptCheckpointed of AgentRuntimeService with its handler RefreshExecutionAttemptView among them (D137), each invalidating the cached compositions of the scope of its subject, and no handler of a producer first delivered in I4 to I8. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-419 Security, tenancy and telemetry of StudioBff |
implementation | Scopes and roles of the model are enforced, every query is tenant-filtered, the user token is exchanged at the identity platform for a token of each gateway audience, the workload token of StudioBff carries the service scope that names ProjectService, the secrets studio-sql and studio-signing come from key-vault references, and the metrics screen_latency, commands_forwarded, sessions_active and source_degraded, traces and health checks follow the observability conventions. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-741 Verify studio-session-and-scope by running the scenario acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario~SCN-StudioBff" in the pipeline of ConnectSoft.AI.SoftwareFactory.StudioBff; a filter that discovers no test counts as a failure; it passes and proves AC1 to AC3 of AIFACTORY-US-032 through SCN-StudioBff-001 and SCN-StudioBff-010, and the scenario part of AC4, a passing test for each of the eleven scenarios of model/scenarios/StudioBff.yaml. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5507 Verify the build, the template version and the published image of StudioBff through the pipeline run |
verification | A pipeline run of ConnectSoft.AI.SoftwareFactory.StudioBff on its main branch passes dotnet build -c Release and dotnet test -c Release --no-build, including the architecture test of the template against the one exemption file, and its run record names the recorded template version and the digest of the published container image; that record is the evidence of the build and publication part of AC4 of AIFACTORY-US-032. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5508 Verify the inbox registrations, the secrets and the metrics of StudioBff |
verification | Run dotnet test -c Release --filter "Category=Registration\|Category=Telemetry"; a zero-match filter counts as a failure; the tests compare the inbox registrations with the 111 consumed events of producers first delivered in I1 to I3 in model/services/factory-studio/StudioBff.yaml, AttemptCheckpointed included, check the tenant row filter, the key-vault references of studio-sql and studio-signing and the four metrics with their dimensions, and prove AC5 of AIFACTORY-US-032. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-US-1361: Switch the tenant, project or environment of a Studio session without gaining a right¶
behavior · persona requester
As a requester, I want to switch the tenant, project or environment my Studio session reads under, so that I work in another scope I hold a role in, and a switcher never grants me what my roles do not.
A signed-in user whose token carries factory.studio.use switches the scope of the active Studio session through StudioBff/SetStudioScope on GW-02, naming the tenant, the project and the environment to read under. The trusted tenant comes only from the claim tid of a validated token, never from the body (ADR-0015): a switch to another tenant obtains from the identity platform, through the token exchange StudioBff already uses for downstream calls, a token of the user for the named tenant, which the identity platform issues only when it grants the user that tenant; the tenantId of the session becomes the claim of that token, and the later requests of the session run under it. A tenant named in the body is never trusted on its own. The roles of the user in the project are resolved through ProjectService/Projects.ResolveScope, which StudioBff calls with its own workload token holding the service scope that names ProjectService, the tenant of the trusted token, the user as callerId with callerKind user and the active platform policy revision (D114); the new scope and the permissions snapshot resolved for it are then written to the StudioSession. A switcher changes only the scope the session reads under; it never grants a permission the identity platform and the Control plane did not grant (invariant of StudioSession). The command SetStudioScope has no result event, so nothing is published, and repeating the same scope changes nothing (natural idempotency). A caller without the scope, a tenant the identity platform does not grant the user and a project of the trusted tenant in which the user holds no role are refused with 403; a project or an environment outside the tenant of the trusted token, whether absent or of another tenant, is answered 404, which never confirms that it exists (D113). When ControlPlaneApi or the identity platform cannot be reached, the switch is answered 503 with a problem response naming the dependency that did not answer (D137) and the session keeps its previous scope. Every screen composed afterwards reads under the new scope.
Acceptance criteria
| AC1 | Given an active session and a project of the trusted tenant in which the user holds a role, when StudioBff/SetStudioScope is called with that project and one of its environments, then ProjectService/Projects.ResolveScope is called with the workload token of StudioBff, the user as callerId and callerKind user, the response is 200 with the session under the new scope and the permissions snapshot it returned, the StudioBff/StudioSession row is updated, nothing is published, and a repeat with the same scope changes nothing (SCN-StudioBff-002, D114). |
| AC2 | Given a switch to another tenant, when StudioBff/SetStudioScope is called, then StudioBff obtains from the identity platform a token of the user for that tenant and the session takes its tenantId from the claim tid of that token; a tenant the identity platform does not grant the user, a caller without factory.studio.use or a project of the trusted tenant in which the user holds no role is refused with 403, the session keeps its previous scope and no permission is granted (SCN-StudioBff-002, ADR-0015, FUX-01). |
| AC3 | Given a project or an environment outside the tenant of the trusted token, whether it does not exist or exists only in another tenant, when StudioBff/SetStudioScope is called with it, then the response is 404 in both cases, the same problem response, and the session keeps its previous scope (SCN-StudioBff-002, D113). |
| AC4 | Given ControlPlaneApi or the identity platform cannot be reached, when StudioBff/SetStudioScope is called, then the switch is answered 503 with a problem response naming the dependency that did not answer, and the session keeps its previous scope and permissions snapshot (SCN-StudioBff-002, D137, model/services/factory-studio/StudioBff.yaml). |
| Traces: services | StudioBff, ControlPlaneApi, ProjectService |
| Traces: aggregates | StudioBff/StudioSession |
| Traces: apis | StudioBff/SetStudioScope, ProjectService/Projects.ResolveScope |
| Traces: descriptors | execution-scope-v1 |
| Traces: adrs | ADR-0015 |
| Traces: requirements | FR-01, FUX-01 |
| Traces: scenarios | SCN-StudioBff-002 |
| Relates: screens | my-work |
| Relates: nfrs | NFR-01 |
| Depends on | feature:control-plane-api, feature:project-service |
| Sources | model/services/factory-studio/StudioBff.yaml, model/services/control-plane/ProjectService.yaml, docs/architecture/adr/0015-factory-tenancy-under-canonical-adr-0100.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-5481 SetStudioScope under the tenant of a token issued for it and the roles of Projects.ResolveScope |
implementation | SetStudioScope obtains from the identity platform a token of the user for a newly named tenant and takes the tenant of the session from its claim tid, resolves the roles in the project through Projects.ResolveScope called with the workload token of StudioBff, the user as callerId with callerKind user and the active platform policy revision, writes the new scope and permissions snapshot to the StudioSession and publishes nothing; 403 for a missing scope, an ungranted tenant or a project without a role, 404 alike for a project or environment that is absent or outside the tenant of the trusted token, and an unreachable dependency is answered 503 with a problem response naming it and leaves the previous scope in place (D137). | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5482 Verify the scope switch through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-StudioBff-002"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-1361 with a fake identity platform that issues or refuses a token for a tenant and a fake Projects.ResolveScope endpoint that records the workload token and the caller fields and can answer roles, no role, not found and unavailable. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-US-1362: Keep my locale, theme and motion preferences, and end an idle session¶
behavior · persona requester
As a requester, I want my locale, theme, reduced-motion and default work area kept, and an idle session ended for me, so that the Studio opens the way I left it and an abandoned session stops counting as active.
A signed-in user whose token carries factory.studio.use sets the preferences of the active session through StudioBff/SetStudioPreferences on GW-02, from the notification preferences screen of the Studio among others: a locale of Studio:Bff:SupportedLocales (en, he or ru; Hebrew renders right to left), a theme (light, dark or system), the reduced-motion preference and a default work area of WorkArea. The preferences are written to the StudioSession of the user in studio-sql; the command publishes no event and repeating the same preferences changes nothing. As a design choice of this PBI, a new session of the user takes its preferences from the latest session row of the user (index IX_Sessions_User), so the next session starts with them. When studio-sql is unavailable the call fails fast with 503 and a problem response naming studio-sql (D137), and the preferences stay as they were. The worker SessionSweeper runs every fifteen minutes, partitioned by tenant with at most two in parallel and idempotent on sessionId: it expires each session whose lastSeenAt is older than Studio:Bff:SessionIdleMinutes (120 by default), clears the subscriptions field of the session and lowers connectsoft.factory.studio.sessions_active; the retry policy is none, and a session the sweeper missed is expired on its next run. The model names no notice from StudioBff to StudioRealtimeGateway, so the sweeper does not close the live subscriptions of the gateway: the gateway closes them only at the next confirmation of the session, which StudioBff refuses for an expired session (AIFACTORY-US-1371), and how long an expired session can keep receiving pushes until then is reported as an open question. A later request of an expired session starts a new one through StudioBff/GetStudioSession.
Acceptance criteria
| AC1 | Given an active session, when StudioBff/SetStudioPreferences is called with the locale he, the theme dark, reduced motion on and the work area Assets, then the response is 200 with the session carrying them, the StudioBff/StudioSession row holds them, nothing is published, and a repeat with the same values changes nothing (SCN-StudioBff-003, FUX-12). |
| AC2 | Given preferences were saved and the session ended, when the user starts a new session through StudioBff/GetStudioSession, then the new session starts with the saved locale, theme, reduced-motion preference and work area (SCN-StudioBff-003). |
| AC3 | Given studio-sql is unavailable, when StudioBff/SetStudioPreferences is called, then the call fails fast with 503 and a problem response naming studio-sql, and the preferences stay as they were (SCN-StudioBff-003, D137). |
| AC4 | Given a session whose lastSeenAt is older than Studio:Bff:SessionIdleMinutes, when SessionSweeper runs, then the StudioBff/StudioSession is expired, its subscriptions field is cleared and connectsoft.factory.studio.sessions_active falls, a second run for the same sessionId has no second effect, and a later confirmation of that session for StudioRealtimeGateway is refused (model/services/factory-studio/StudioBff.yaml). |
| Traces: services | StudioBff |
| Traces: aggregates | StudioBff/StudioSession |
| Traces: apis | StudioBff/SetStudioPreferences, StudioBff/GetStudioSession |
| Traces: requirements | FUX-12 |
| Traces: scenarios | SCN-StudioBff-003 |
| Relates: screens | my-work, notification-preferences |
| Sources | model/services/factory-studio/StudioBff.yaml, docs/planes/experience/studio/services/studio-bff/index.md#workers-and-jobs, docs/planes/experience/studio/localization-accessibility.md |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-514 Preferences for locale, theme, reduced motion and work area |
implementation | SetStudioPreferences validates the locale against Studio:Bff:SupportedLocales, the theme and the WorkArea value, writes them to the StudioSession and publishes nothing; a new session takes the preferences of the latest session row of the user; an unavailable studio-sql fails the call fast with 503 and a problem response naming it (D137). | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-515 Session expiry after the idle limit |
implementation | The sweeper expires every session whose lastSeenAt is older than Studio:Bff:SessionIdleMinutes, clears the subscriptions field of the session and lowers connectsoft.factory.studio.sessions_active; the confirmation of an expired session for StudioRealtimeGateway is refused, so the gateway closes its live subscriptions at their next confirmation. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-418 Worker hosting: SessionSweeper with its schedule, partitioning and idempotency key |
implementation | SessionSweeper is hosted with the schedule every fifteen minutes, the retry policy none, at most two in parallel partitioned by TenantId and the idempotency key sessionId; a duplicate trigger has no second effect. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5483 Verify preferences and idle expiry through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-StudioBff-003\|Category=SessionSweeper)"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-1362, including the preferences carried into a new session, the cleared subscriptions field, the second sweep without effect and the refused confirmation of an expired session. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-US-1363: Compose a screen from the read models of the platforms with the freshness of each source¶
behavior · persona operator
As an operator, I want each Studio screen built from the read models of the owning platforms with the freshness of every source, so that I see the truth of each platform under my scope, and a source that is down is shown, never hidden.
A signed-in user whose token carries factory.studio.use opens a screen; the Studio calls StudioBff/GetScreenModel with a screenId of model/ux/screens.yaml. StudioBff checks that the roles list of the screen names a role of the permissions snapshot of the session, calls the read models the screen names through the public gateway of each owning platform delivered in I1 to I3 (ControlPlaneApi, TemplateCatalogHost, KnowledgeHost, GovernanceHost, IntegrationHost, ModelGatewayHost, ToolExecutorHost, RuntimeCloudHost, DeliveryHost and ObservabilityHost) with the user token exchanged for that gateway and under the session's scope, and composes the screen-shaped response with the freshness of each source (Fresh, Stale, Degraded or Unknown, model/ux/states.yaml) and the actions the role may take. Each of these is a REST call, as the outbound dependencies of model/services/factory-studio/StudioBff.yaml state for every gateway, TemplateCatalogHost included (D140), made through the typed client package of that gateway, which StudioBff pins from the ConnectSoft feed and writes no client of its own for: the control plane client of the user-token layout and the clients of the template catalog, knowledge, governance and integration gateways of feature typed-gateway-clients, and the clients of DeliveryHost, RuntimeCloudHost and ObservabilityHost that the features delivery-host, runtime-cloud-host and observability-host publish (AIFACTORY-TASK-6601, AIFACTORY-TASK-6602, AIFACTORY-TASK-6603). Each package receives the token exchanged for its own gateway and no other. Feature typed-gateway-clients publishes the clients of ModelGatewayHost and ToolExecutorHost in the workload layout only, which cannot carry the exchanged token of a person, so this PBI needs both packages in the user-token layout from that feature and is not done before they are on the feed; that addition is reported to the owner. Every result set is the one the owning platform filtered; the BFF never widens it (invariant of StudioSession). A composition is cached for Studio:Bff:ScreenCacheSeconds keyed by scope, and the inbox handlers of AIFACTORY-US-032 invalidate it. When one source platform is down, the composition renders the other sources and marks the missing one Degraded with its last freshness (connectsoft.factory.studio.source_degraded); a source not delivered in I3, the static stubs of FleetOperationsHost and DataEventFoundations among them, shows Unknown. A caller without the scope, or a screen whose roles list names no role of the session, is refused with 403; a screenId that is not a screen of the model is answered 404, and a subject the screen addresses that is absent or of another tenant is the 404 of the owning platform, returned unchanged (D113). Nothing is written. The internal probe StudioBff/StudioHealth on GW-01 under factory.health.read reports liveness and readiness with the health of each dependency. It answers 503 only while studio-sql is unreachable or while no cached signing key validates tokens; while the identity platform is unreachable and a cached signing key still validates tokens, it answers 200 and reports the identity platform as degraded, so existing sessions continue until their tokens expire (ADR-0015 amendment D117), and a degraded source gateway keeps it 200 as well.
Acceptance criteria
| AC1 | Given a session whose role is named by the roles list of the screen run-detail in model/ux/screens.yaml, when StudioBff/GetScreenModel is called for it, then the response is 200 with the composition read through RunControlService/GetRun behind ControlPlaneApi under the session's scope, the freshness of each source and the actions the role may take, a second call within Studio:Bff:ScreenCacheSeconds is served from the cache keyed by scope, and nothing is written (SCN-StudioBff-004, FUX-04). |
| AC2 | Given a caller without factory.studio.use, a screen whose roles list names no role of the session, an unknown screenId, or a runId of another tenant, when StudioBff/GetScreenModel is called, then the response is 403 for the first two and 404 for the last two, the 404 for the foreign run being the answer of the owning platform returned unchanged, each with a problem response and no state change (SCN-StudioBff-004, ADR-0015). |
| AC3 | Given one source platform of a screen is down and another source is served by a static stub in I3, when StudioBff/GetScreenModel is called, then the other sources render, the missing source is marked Degraded with its last freshness and counted in connectsoft.factory.studio.source_degraded, and the stubbed source shows Unknown (SCN-StudioBff-004, FUX-04). |
| AC4 | Given a caller with factory.health.read, when StudioBff/StudioHealth is called, then the response is 200 with liveness, readiness and the health of each dependency while the service is ready; with a source gateway down, or with the identity platform unreachable while a cached signing key still validates tokens, it stays 200 and lists that dependency as degraded; while studio-sql is unreachable or no cached signing key validates tokens, the response is 503 with a problem response that names the failing dependency (SCN-StudioBff-009, ADR-0015). |
| AC5 | Given the solution of StudioBff, when its build and its architecture test run, then every call to a public REST route of a gateway goes through a typed client package restored from the ConnectSoft feed at a pinned version, the packages of ControlPlaneApi, TemplateCatalogHost, KnowledgeHost, GovernanceHost, IntegrationHost, ModelGatewayHost, ToolExecutorHost, DeliveryHost, RuntimeCloudHost and ObservabilityHost among them, each package receives only the token exchanged for its own gateway, and no other HTTP client of a gateway is declared in the repository than the two static stubs of FleetOperationsHost and DataEventFoundations (model/services/factory-studio/StudioBff.yaml, ADR-0015). |
| Traces: services | StudioBff, ControlPlaneApi, RunControlService |
| Traces: apis | StudioBff/GetScreenModel, StudioBff/StudioHealth, RunControlService/GetRun |
| Traces: adrs | ADR-0015 |
| Traces: requirements | FUX-04, FUX-12 |
| Traces: scenarios | SCN-StudioBff-004, SCN-StudioBff-009 |
| Relates: screens | run-detail, my-work, template-catalog |
| Relates: nfrs | NFR-01 |
| Depends on | feature:control-plane-api, feature:run-control-service, feature:template-catalog-host, feature:knowledge-host, feature:governance-host, feature:integration-host, feature:model-gateway-host, feature:tool-executor-host, feature:runtime-cloud-host, feature:delivery-host, feature:observability-host, feature:typed-gateway-clients |
| Sources | model/services/factory-studio/StudioBff.yaml, model/ux/screens.yaml, model/ux/states.yaml, model/backlog/pbis/engineering-readiness/typed-gateway-clients.yaml, docs/planes/experience/studio/services/studio-bff/index.md#failure-and-recovery |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-6605 Typed client packages of the gateways pinned from the ConnectSoft feed in place of hand-written gateway clients |
implementation | StudioBff restores from the ConnectSoft feed, at versions pinned in the repository and recorded on the Runbook pages of the client repository, the control plane client of the user-token layout, the clients of TemplateCatalogHost, KnowledgeHost, GovernanceHost and IntegrationHost of feature typed-gateway-clients, the clients of DeliveryHost, RuntimeCloudHost and ObservabilityHost of AIFACTORY-TASK-6601, AIFACTORY-TASK-6602 and AIFACTORY-TASK-6603, and the clients of ModelGatewayHost and ToolExecutorHost in the user-token layout once feature typed-gateway-clients publishes it; each client is registered with the base address of its gateway and given only the user token exchanged at the identity platform for that gateway; GetScreenModel, ForwardCommand and StudioSearch call the public REST routes through these clients alone; an architecture test fails on any other HTTP client of a gateway than the two static stubs of AIFACTORY-TASK-5485. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5484 GetScreenModel composition from the read models a screen names, with freshness and role checks |
implementation | GetScreenModel checks the roles list of the screen against the permissions snapshot, calls each read model the screen names in model/ux/screens.yaml through the pinned client package of the gateway of its platform (AIFACTORY-TASK-6605), TemplateCatalogHost included, with the exchanged user token, returns the composition with the freshness of each source and the permitted actions, caches it for Studio:Bff:ScreenCacheSeconds by scope, marks a down source Degraded with its last freshness and returns the 404 of the owning platform unchanged; 403 and 404 refusals are covered by acceptance tests. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5485 Static stubs of FleetOperationsHost and DataEventFoundations |
implementation | The clients of FleetOperationsHost and DataEventFoundations ship in the service as static stubs that answer no data and the freshness Unknown, so a screen whose source arrives in I4 or I7 renders that source as Unknown; each stub names the increment that replaces it, and the stub of DataEventFoundations names the client package of AIFACTORY-TASK-6604 of feature data-event-foundations (I4) as its replacement. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5486 StudioHealth with the health of each dependency |
implementation | StudioHealth reports liveness and readiness with the identity platform, the cached signing keys, studio-sql, the messaging transport and each source gateway; it answers 503 naming the dependency only while studio-sql is unreachable or no cached signing key validates tokens, and stays 200 with the identity platform listed degraded while a cached key still validates and with a degraded source gateway listed as such. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5487 Verify screen composition and health through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-StudioBff-004\|Scenario=SCN-StudioBff-009)"; a zero-match filter counts as a failure; the tests prove AC1 to AC4 of AIFACTORY-US-1363 with fake gateways that can answer data, 404 and unavailable and a fake identity platform that can be unreachable with and without a cached signing key; AC5 is proven by the build and the architecture test of AIFACTORY-TASK-6605 in the same pipeline. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-US-1364: Forward a Studio command to the owning platform with my token, my scope and the idempotency key¶
behavior · persona requester
As a requester, I want the commands I take in the Studio forwarded to the platform that owns them, with my own token and scope, so that the gates of the owning service decide, a repeated click does nothing twice and the Studio never acts beyond my rights.
A signed-in user whose token carries factory.studio.use takes a command on a screen; the Studio calls StudioBff/ForwardCommand with a commandId that a screen of model/ux/screens.yaml names, a body valid for that command and an Idempotency-Key. StudioBff forwards the command to the owning platform through its public gateway, as a REST call through the pinned client package of that gateway (AIFACTORY-TASK-6605), the control plane client of feature typed-gateway-clients for ControlPlaneApi and the client of AIFACTORY-TASK-6601 for DeliveryHost, with the user token exchanged for that gateway, the session's scope and the Idempotency-Key unchanged, and for a gated class the approval binding the screen showed, the approval id and the request version. In I3 that covers submitting, cancelling and deciding on a run through ControlPlaneApi (RunControlService/SubmitRun, RunControlService/CancelRun, RunControlService/DecideApproval), answering a decision a waiting attempt asks for, missing input or an escalation choice, through the public route RunControlService/AnswerDecision behind ControlPlaneApi from the workflow run graph screen, with the user token that holds factory.runs.operate (D137), and requesting a promotion through DeliveryHost (EnvironmentPromotionService/RequestPromotion) from the promotions screen. Run Control passes the answer to the attempt; the Studio never calls Runtime.AnswerDecision of AgentRuntimeService itself, and an approval is never answered through AnswerDecision. The operations of StudioBff itself (SetStudioScope, SetStudioPreferences, SaveView) and the routes of StudioNotificationService it fronts (SetNotificationPreferences among them) are not commands of the catalog and are never forwarded through it. The class and the gates of the owning service apply, never the BFF's: the BFF stores no command and decides no gate. The response is 202, the envelope of the BFF around the answer of the owning service, which it carries unchanged, the 200 of DecideApproval included, and a repeat under the same key returns the answer the owning service gives for the repeat, the same result, and changes nothing. The refusals of the owning service are returned unchanged with their codes, as D137 rules for every Studio route: the 409 of RunControlService for a reused key with another input, for a request version that is stale or was changed by a concurrent decision and for a request already decided, its 410 for a request past its expiry and its 400 for an invalid decision, the 409 of AnswerDecision for a decision already answered or an approval, its 404 for a decision the open attempt did not ask for and its 503 when AgentRuntimeService does not answer, the 412 of EnvironmentPromotionService/RequestPromotion for a withdrawn release, and the 404 of either for a subject of another tenant (D113). A caller without the scope is refused with 403; a commandId that no screen names, or a body that fails the schema of the command, is refused with 422. A command to a platform that is down, or whose route has no live service in I3 such as acknowledging an alert, is refused with 503 and a problem response naming the dependency (D137), and is never queued or retried by the BFF. connectsoft.factory.studio.commands_forwarded counts each command by outcome.
Acceptance criteria
| AC1 | Given a session in a project where the user is a requester and a valid run-submission-v1 body, when StudioBff/ForwardCommand is called for SubmitRun with an Idempotency-Key, then RunControlService/SubmitRun receives the exchanged user token, the session's scope and the key unchanged, the response is 202 carrying the answer of RunControlService, and a repeat under the same key returns the same run and changes nothing (SCN-StudioBff-005, FUX-04). |
| AC2 | Given an approval card that showed a request version, when StudioBff/ForwardCommand is called for DecideApproval with approval-decision-v1, then the approval binding with that version is forwarded to RunControlService/DecideApproval, its 200 is carried in the 202 of the BFF, a version that is stale or was changed by a concurrent decision is answered with the 409 of RunControlService returned unchanged, and a request past its expiry with its 410 returned unchanged, the decision being the one of the owning service and never of the BFF (SCN-StudioBff-005, XL-05). |
| AC3 | Given a caller without factory.studio.use, a commandId named by no screen of model/ux/screens.yaml, or a body that fails the schema of the command, when StudioBff/ForwardCommand is called, then the response is 403 or 422 with a problem response, nothing is forwarded and no state changes (SCN-StudioBff-005). |
| AC4 | Given EnvironmentPromotionService/RequestPromotion answers 412 for a withdrawn release, RunControlService answers 409 for a reused key with another input or 404 for a run of another tenant, or the platform is down, when StudioBff/ForwardCommand is called, then the 412, the 409 and the 404 are returned unchanged, the command to the platform that is down is refused with 503 and a problem response naming that platform and is neither queued nor retried, and connectsoft.factory.studio.commands_forwarded counts each outcome (SCN-StudioBff-005, ADR-0015, D137). |
| AC5 | Given a waiting attempt of a run that asks for a decision and a user holding factory.runs.operate, when StudioBff/ForwardCommand is called for AnswerDecision from the workflow run graph screen, then RunControlService/AnswerDecision receives the exchanged user token and the answer, its 200 is carried in the 202 of the BFF, and its 404 for a decision the attempt did not ask for, its 409 for an answered decision or an approval and its 503 when AgentRuntimeService does not answer are returned unchanged (SCN-StudioBff-005, D137). |
| Traces: services | StudioBff, ControlPlaneApi, DeliveryHost, RunControlService, EnvironmentPromotionService |
| Traces: apis | StudioBff/ForwardCommand, RunControlService/SubmitRun, RunControlService/CancelRun, RunControlService/DecideApproval, RunControlService/AnswerDecision, EnvironmentPromotionService/RequestPromotion |
| Traces: descriptors | run-submission-v1, approval-decision-v1 |
| Traces: adrs | ADR-0014, ADR-0015 |
| Traces: requirements | FR-01, FUX-04, XL-05 |
| Traces: scenarios | SCN-StudioBff-005 |
| Relates: screens | run-submit, run-detail, approval-card, promotions, workflow-run-graph |
| Depends on | AIFACTORY-US-1363, feature:control-plane-api, feature:run-control-service, feature:delivery-host, feature:environment-promotion-service, feature:typed-gateway-clients |
| Sources | model/services/factory-studio/StudioBff.yaml, model/ux/screens.yaml, docs/planes/experience/studio/services/studio-bff/index.md#sagas-and-long-running-flows |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-5488 Command catalog of the Studio from the commands the screens name |
contract | The command catalog of the service lists each command a screen of model/ux/screens.yaml names and another platform owns, with its owning gateway, its route, its body schema, whether it carries an approval binding, and its side-effect class; the operations of StudioBff itself (SetStudioScope, SetStudioPreferences, SaveView) and the fronted routes of StudioNotificationService (SetNotificationPreferences) are left out; a commandId outside the catalog is refused with 422. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5489 ForwardCommand with the exchanged user token, the session scope, the key and the approval binding |
implementation | ForwardCommand forwards the command through the pinned client package of the gateway of the owning platform (AIFACTORY-TASK-6605) with the exchanged user token, the session scope, the Idempotency-Key unchanged and the approval binding for a gated class, returns 202 carrying the answer of the owning service, returns its 400, 404, 409, 410, 412 and 503 unchanged (409 and 410 of DecideApproval for a stale or expired request, 404, 409 and 503 of AnswerDecision, 412 of RequestPromotion for a withdrawn release) under D137, forwards AnswerDecision to the public route of RunControlService behind ControlPlaneApi and never to Runtime.AnswerDecision, refuses with 403 and 422 before forwarding, refuses a command to a platform that is down with 503 and a problem response naming it without queueing or retrying it, and counts commands_forwarded by outcome. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-5490 Verify command forwarding through the acceptance suite |
verification | Run dotnet test -c Release --filter "Category=Acceptance&Scenario=SCN-StudioBff-005"; a zero-match filter counts as a failure; the tests prove AC1 to AC5 of AIFACTORY-US-1364 with fake ControlPlaneApi and DeliveryHost routes that record the forwarded token, scope, key and binding, whose SubmitRun answers 202, 404 and 409, whose DecideApproval answers 200, 409 and 410, whose AnswerDecision answers 200, 404, 409 and 503, whose RequestPromotion answers 202 and 412, and which can be unavailable. |
ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-US-037: I keep my views of a list and find things within my scope¶
behavior · persona operator
As an operator, I want to save the filter and layout of a list, share it with my tenant and search across the Studio, so that I return to the same view and find a run, an asset or an approval quickly, and only within my scope.
A signed-in user whose token carries factory.studio.use saves the filter and layout of a list screen (runs, approvals, assets, alerts, fleet) through StudioBff/SaveView on GW-02 with the screenId, a name, the definition and sharedWith (private, project or tenant). A new viewId creates the SavedView with the caller as owner and answers 201; a view the caller owns is updated and answers 200; in both cases the SavedViewChanged outbox record is written in the same transaction, and saving the same definition again changes nothing and publishes nothing. A view owned by another user is refused with 403 and a view of another tenant is answered 404 (D113). StudioBff/ListSavedViews returns, for a screen, the caller's own views and the views shared with the tenant of the session; private views of other users and views of other tenants never appear. The SavedView of the model has no project field and its index IX_Views_Screen covers no project, so the project a view is shared with can be neither recorded nor queried: as an explicit assumption of this PBI, a view saved with sharedWith project is stored and treated as private to its owner until the model gains a project field, which is reported as an open question. A shared view carries a filter definition and no data, so the results of a view stay scoped per viewer (invariant of SavedView). StudioBff/StudioSearch is the command palette: it queries the list read models of runs, assets, projects, environments and alerts through the public gateways of their platforms, by REST through the pinned client packages of ControlPlaneApi and ObservabilityHost (AIFACTORY-TASK-6605), with the exchanged user token under the session's scope, adds the screens whose roles list names a role of the session, and merges the results; a source that is down or not delivered in I3, such as alerts, is named as not searched. When studio-sql is unavailable the view operations fail fast, and when the identity platform cannot exchange the token the search fails fast; both answer 503 with a problem response naming the dependency that did not answer (D137). SavedViewChanged reaches StudioRealtimeGateway, which refreshes the views shared with the tenant in the sessions of that tenant.
Acceptance criteria
| AC1 | Given a list screen, when the user calls StudioBff/SaveView with a new viewId, then the response is 201 and StudioBff/ListSavedViews lists the view for that screen with the same definition; an update of the user's own view answers 200; each write and its StudioBff/SavedViewChanged outbox record share one transaction (SCN-StudioBff-007, SCN-StudioBff-006). |
| AC2 | Given a view shared with the tenant, a view saved with sharedWith project, views private to other users and a view of another tenant, when another user of the tenant calls StudioBff/ListSavedViews, then only the tenant-shared view is offered, the project-shared view being treated as private to its owner; given a view owned by another user or a viewId of another tenant, when StudioBff/SaveView is called, then the response is 403 or 404 with no change and nothing published (SCN-StudioBff-006, SCN-StudioBff-007, D113). |
| AC3 | Given a search term, when the user calls StudioBff/StudioSearch, then only items inside the scope of the session are returned with their kind and reference, screens are offered only when their roles list names a role of the session, and a source that is down or not delivered in I3 is named as not searched; given the identity platform cannot exchange the token, then the call fails fast with 503 and a problem response naming the identity platform, with no state change (SCN-StudioBff-008, D137). |
| AC4 | Given a saved view was created or changed, when the outbox dispatcher publishes StudioBff/SavedViewChanged on studio.views.v1.saved-view-changed, then the event is sent under the canonical envelope with viewId, tenantId, screenId and sharedWith, and a transport outage is retried with backoff so the event is neither lost nor duplicated under its event id (SCN-StudioBff-011, ADR-0012). |
| AC5 | Given studio-sql is unavailable, when StudioBff/ListSavedViews or StudioBff/SaveView is called, then the call fails fast with 503 and a problem response naming studio-sql, no view changes and nothing is published (SCN-StudioBff-006, SCN-StudioBff-007, D137). |
| Traces: services | StudioBff |
| Traces: aggregates | StudioBff/SavedView |
| Traces: apis | StudioBff/ListSavedViews, StudioBff/SaveView, StudioBff/StudioSearch |
| Traces: events | StudioBff/SavedViewChanged |
| Traces: adrs | ADR-0012, ADR-0015 |
| Traces: requirements | FUX-04 |
| Traces: scenarios | SCN-StudioBff-006, SCN-StudioBff-007, SCN-StudioBff-008, SCN-StudioBff-011 |
| Relates: screens | approvals-list |
| Relates: nfrs | NFR-01 |
| Depends on | AIFACTORY-US-1363, feature:control-plane-api, feature:observability-host, feature:typed-gateway-clients |
| Sources | model/services/factory-studio/StudioBff.yaml, docs/planes/experience/studio/services/studio-bff/index.md#apis |
Tasks
| Task | Kind | Expected output | Repository |
|---|---|---|---|
AIFACTORY-TASK-528 Saved views with sharing scope and the SavedViewChanged outbox record |
implementation | SaveView creates (201) or updates (200) a SavedView of the caller with screen, name, definition and sharedWith and writes SavedViewChanged in the same transaction; a repeat of the same definition writes and publishes nothing; 403 for a view of another user and 404 for a view of another tenant; ListSavedViews returns own views and views shared with the tenant of the session, and treats a view saved with sharedWith project as private to its owner while the model has no project field. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-529 Search across the composed read models |
implementation | StudioSearch queries the list read models of runs, assets, projects, environments and alerts through the pinned client packages of their gateways (AIFACTORY-TASK-6605) with the exchanged user token under the scope of the session, adds the screens the roles of the session may open, merges the results and names each source that was not searched. | ConnectSoft.AI.SoftwareFactory.StudioBff |
AIFACTORY-TASK-742 Verify studio-saved-views-and-search by running the declared command |
verification | Run dotnet test -c Release --filter "Category=Acceptance&(Scenario=SCN-StudioBff-006\|Scenario=SCN-StudioBff-007\|Scenario=SCN-StudioBff-008\|Scenario=SCN-StudioBff-011)"; a zero-match filter counts as a failure; it passes and proves AC1 to AC5 of AIFACTORY-US-037, including the project-shared view treated as private and the publication and payload of SavedViewChanged; consumer handling is proven by the suite of StudioRealtimeGateway. |
ConnectSoft.AI.SoftwareFactory.StudioBff |