Task Summary
amber/src/main/scala/org/apache/texera/web/ has 124 production Scala files and only 11 specs, so the bulk of the websocket / state-store / auth helpers ship with no direct unit coverage. Cover a self-contained cluster of pure-logic files in one PR:
storage/StateStore.scala — observable state with diff-handler registry and ReentrantLock; emits websocket events only on actual state changes
storage/WorkflowStateStore.scala and storage/ExecutionStateStore.scala — thin wrappers that enumerate child stores via getAllStores
SubscriptionManager.scala — trait that owns a list of Disposables and disposes them in bulk
WebsocketInput.scala — type-discriminated rx pub/sub that routes callback exceptions through a user-supplied error handler
auth/UserRoleAuthorizer.scala — single-method authorizer that delegates to SessionUser.isRoleOf
Out of scope for this issue (heavier mocking, separate follow-ups):
WorkflowLifecycleManager — needs AmberRuntime actor-system scheduling
SessionState — needs a javax.websocket.Session double
ExecutionStateStore.updateWorkflowState — touches ExecutionsMetadataPersistService and the DB
Task Type
Task Summary
amber/src/main/scala/org/apache/texera/web/has 124 production Scala files and only 11 specs, so the bulk of the websocket / state-store / auth helpers ship with no direct unit coverage. Cover a self-contained cluster of pure-logic files in one PR:storage/StateStore.scala— observable state with diff-handler registry and ReentrantLock; emits websocket events only on actual state changesstorage/WorkflowStateStore.scalaandstorage/ExecutionStateStore.scala— thin wrappers that enumerate child stores viagetAllStoresSubscriptionManager.scala— trait that owns a list ofDisposables and disposes them in bulkWebsocketInput.scala— type-discriminated rx pub/sub that routes callback exceptions through a user-supplied error handlerauth/UserRoleAuthorizer.scala— single-method authorizer that delegates toSessionUser.isRoleOfOut of scope for this issue (heavier mocking, separate follow-ups):
WorkflowLifecycleManager— needsAmberRuntimeactor-system schedulingSessionState— needs ajavax.websocket.SessiondoubleExecutionStateStore.updateWorkflowState— touchesExecutionsMetadataPersistServiceand the DBTask Type