@webex/plugin-meetings 3.13.0-next.13 → 3.13.0-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.repo-context.json +577 -0
- package/.sdd/manifest.json +1320 -428
- package/AGENTS.md +528 -72
- package/dist/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/webinar/index.js +1 -1
- package/docs/adr/0001-migrate-existing-docs-into-sdd.md +141 -0
- package/docs/adr/index.md +26 -0
- package/docs/architecture.md +816 -0
- package/docs/getting-started.md +177 -0
- package/docs/index.md +53 -0
- package/docs/specs/README.md +126 -0
- package/package.json +21 -21
- package/schemas/repo-context.schema.json +796 -0
- package/src/aiEnableRequest/docs/README.md +376 -0
- package/src/annotation/docs/README.md +402 -0
- package/src/breakouts/docs/README.md +643 -0
- package/src/controls-options-manager/docs/README.md +365 -0
- package/src/hashTree/docs/README.md +566 -0
- package/src/interceptors/docs/README.md +434 -0
- package/src/interpretation/docs/README.md +420 -0
- package/src/locus-info/docs/README.md +609 -0
- package/src/media/docs/README.md +488 -0
- package/src/meeting/docs/README.md +834 -0
- package/src/meeting-info/docs/README.md +352 -0
- package/src/meetings/docs/README.md +549 -0
- package/src/member/docs/README.md +347 -0
- package/src/members/docs/README.md +514 -0
- package/src/metrics/docs/README.md +287 -0
- package/src/multistream/docs/README.md +523 -0
- package/src/personal-meeting-room/docs/README.md +322 -0
- package/src/reachability/docs/README.md +548 -0
- package/src/reactions/docs/README.md +296 -0
- package/src/reconnection-manager/docs/README.md +485 -0
- package/src/recording-controller/docs/README.md +335 -0
- package/src/roap/docs/README.md +444 -0
- package/src/webinar/docs/README.md +425 -0
- package/.sdd/templates/.source.json +0 -30
- package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +0 -111
- package/.sdd/templates/component-repo/module-docs/module-spec.template.md +0 -321
- package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +0 -59
- package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +0 -49
- package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +0 -42
- package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +0 -120
- package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +0 -206
- package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +0 -90
- package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +0 -68
- package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +0 -111
- package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +0 -57
- package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +0 -69
- package/.sdd/templates/component-repo/standing-docs/RULES.template.md +0 -96
- package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +0 -84
- package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +0 -82
- package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +0 -94
- package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +0 -64
- package/.sdd/templates/component-repo/template-map.json +0 -112
- package/ai-docs/ARCHITECTURE.md +0 -208
- package/ai-docs/CONTRACTS.md +0 -267
- package/ai-docs/DATA_MODEL.md +0 -64
- package/ai-docs/GETTING_STARTED.md +0 -73
- package/ai-docs/GLOSSARY.md +0 -56
- package/ai-docs/REVIEW_CHECKLIST.md +0 -45
- package/ai-docs/RULES.md +0 -79
- package/ai-docs/SECURITY.md +0 -74
- package/ai-docs/SERVICE_STATE.md +0 -59
- package/ai-docs/SPEC_INDEX.md +0 -85
- package/ai-docs/TEST_INDEX.md +0 -45
- package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +0 -61
- package/ai-docs/patterns/defensive-error-propagation.md +0 -55
- package/ai-docs/patterns/event-scope-emission.md +0 -46
- package/ai-docs/patterns/source-to-test-path-mirroring.md +0 -45
- package/ai-docs/patterns/stateless-plugin-request-classes.md +0 -53
- package/ai-docs/patterns/typed-constants-and-enum-values.md +0 -47
- package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +0 -223
- package/src/annotation/ai-docs/annotation-spec.md +0 -236
- package/src/breakouts/ai-docs/breakouts-spec.md +0 -324
- package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +0 -243
- package/src/hashTree/ai-docs/hash-tree-spec.md +0 -267
- package/src/interceptors/ai-docs/interceptors-spec.md +0 -247
- package/src/interpretation/ai-docs/interpretation-spec.md +0 -256
- package/src/locus-info/ai-docs/locus-info-spec.md +0 -293
- package/src/media/ai-docs/media-spec.md +0 -267
- package/src/meeting/ai-docs/meeting-spec.md +0 -404
- package/src/meeting-info/ai-docs/meeting-info-spec.md +0 -261
- package/src/meetings/ai-docs/meetings-spec.md +0 -298
- package/src/member/ai-docs/member-spec.md +0 -196
- package/src/members/ai-docs/members-spec.md +0 -256
- package/src/metrics/ai-docs/metrics-spec.md +0 -185
- package/src/multistream/ai-docs/multistream-spec.md +0 -295
- package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +0 -234
- package/src/reachability/ai-docs/reachability-spec.md +0 -261
- package/src/reactions/ai-docs/reactions-spec.md +0 -198
- package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +0 -272
- package/src/recording-controller/ai-docs/recording-controller-spec.md +0 -223
- package/src/roap/ai-docs/roap-spec.md +0 -241
- package/src/webinar/ai-docs/webinar-spec.md +0 -243
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Module Spec
|
|
3
|
+
title: 'Recording controller specification'
|
|
4
|
+
description: Responsibilities, boundaries, design, state, invariants, and verification for the meeting recording controller that gates and sends start, stop, pause, and resume actions.
|
|
5
|
+
tags: [module, specification]
|
|
6
|
+
---
|
|
7
|
+
<!-- sdd-generated-metadata
|
|
8
|
+
doc_kind: module-spec
|
|
9
|
+
generated_from: module-spec@0.3.0
|
|
10
|
+
generated_by: claude-code
|
|
11
|
+
approved_by: rarajes2@cisco.com
|
|
12
|
+
updated_at: 2026-11-17T03:14:21Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Recording controller
|
|
17
|
+
|
|
18
|
+
This source-local document at `src/recording-controller/docs/README.md` owns the stable canonical
|
|
19
|
+
specification for the **recording controller**: `RecordingController`, the per-meeting object behind
|
|
20
|
+
`meeting.startRecording()`, `stopRecording()`, `pauseRecording()`, and `resumeRecording()`. Ground
|
|
21
|
+
every claim in repository evidence and link to the
|
|
22
|
+
[package architecture](../../../docs/architecture.md) instead of repeating broader facts. No service
|
|
23
|
+
specification exists because this package is a library.
|
|
24
|
+
|
|
25
|
+
Start here: root [package agent instructions](../../../AGENTS.md) · router
|
|
26
|
+
[documentation index](../../../docs/index.md) · system
|
|
27
|
+
[package architecture](../../../docs/architecture.md) · registry
|
|
28
|
+
[module registry](../../../docs/specs/README.md).
|
|
29
|
+
|
|
30
|
+
## Metadata
|
|
31
|
+
|
|
32
|
+
| Field | Value |
|
|
33
|
+
| ----------------- | ----- |
|
|
34
|
+
| Owner | @webex/web-client, @webex/web-sdk |
|
|
35
|
+
| Source path | `src/recording-controller` |
|
|
36
|
+
| Resource kind | module |
|
|
37
|
+
| Status | Draft |
|
|
38
|
+
| Last verified | 2026-11-16 at `0b8c34db7f` |
|
|
39
|
+
| Module id | `plugin-meetings/recording-controller` |
|
|
40
|
+
| Parent spec | — |
|
|
41
|
+
| Doc kind | Module spec |
|
|
42
|
+
| Coverage score | Pending coverage assessment |
|
|
43
|
+
| Validation status | not-run |
|
|
44
|
+
|
|
45
|
+
## Applicability
|
|
46
|
+
|
|
47
|
+
| Condition ID | Status | Evidence or reason | Owned section |
|
|
48
|
+
| ------------------------------------ | ---------- | ------------------ | ------------- |
|
|
49
|
+
| `module.has_tiers` | N/A | No tier policy exists in `package.json` | Tier |
|
|
50
|
+
| `module.has_ui` | N/A | `src/recording-controller/index.ts` returns promises; it renders nothing | UI use-case flow |
|
|
51
|
+
| `module.crosses_service_boundaries` | Applicable | `src/recording-controller/index.ts` sends the recording-service PUT or the Locus controls PATCH | Cross-boundary use-case flow |
|
|
52
|
+
| `module.holds_client_state` | Applicable | `src/recording-controller/index.ts` keeps the request context, display hints, and self policies | Client state model |
|
|
53
|
+
| `module.enforces_domain_rules` | Applicable | Display-hint and policy checks in `src/recording-controller/util.ts` | Business rules and invariants |
|
|
54
|
+
| `module.is_concurrent_async` | Applicable | Each action returns the request promise (`src/recording-controller/index.ts`) | Concurrency and reactive flow |
|
|
55
|
+
| `module.owns_persistence` | N/A | Nothing is stored; recording state is owned remotely | Data, schema, and migration discipline |
|
|
56
|
+
| `module.stateful_transitions` | N/A | No recording status is held in `src/recording-controller/index.ts` | State machine |
|
|
57
|
+
| `module.exposes_wire_protocol` | N/A | The two request bodies are listed under Cross-boundary use-case flow; no versioned format is owned here | Protocol and wire format |
|
|
58
|
+
| `module.ui_multi_screen` | N/A | No UI | UI flow |
|
|
59
|
+
| `module.large_data_model` | N/A | Seven private fields in `src/recording-controller/index.ts` | Data model |
|
|
60
|
+
| `module.returns_caller_errors` | Applicable | Denied actions reject with PermissionError and request failures propagate (`src/recording-controller/index.ts`) | Caller-visible failure modes |
|
|
61
|
+
| `module.module_specific_conventions` | N/A | No convention beyond the package rules in `src/recording-controller/index.ts` | Module-specific rules |
|
|
62
|
+
| `module.published_package` | N/A | Reached through Meeting methods; export stability is owned by the package architecture (`package.json`) | Export stability |
|
|
63
|
+
| `module.embedded_in_host` | N/A | No host embedding | Host integration and theming |
|
|
64
|
+
| `module.has_design_tradeoff` | N/A | No recorded trade-off in `src/recording-controller/index.ts` | Key design trade-off |
|
|
65
|
+
| `module.has_submodules` | N/A | The directory has no child module | Sub-modules |
|
|
66
|
+
|
|
67
|
+
## Evidence register
|
|
68
|
+
|
|
69
|
+
Requirements cite current source and mirrored tests. Current code wins over retained prose when they
|
|
70
|
+
conflict; commit and PR history are excluded. Missing evidence stays a gap.
|
|
71
|
+
|
|
72
|
+
| Evidence | What it establishes |
|
|
73
|
+
| -------- | ------------------- |
|
|
74
|
+
| `src/recording-controller/index.ts` | `RecordingController` class: constructor, setters and getters, `recordingFacade`, `recordingService`, `recordingControls`, and the four public actions; its JSDoc says there should be one instance per meeting |
|
|
75
|
+
| `src/recording-controller/util.ts` | `canUserStart`, `canUserPause`, `canUserResume`, `canUserStop`, `isPremiseRecordingEnabled`, `deriveRecordingStates`, `extractLocusId` |
|
|
76
|
+
| `src/recording-controller/enums.ts` | `RecordingAction` (`Start`, `Stop`, `Pause`, `Resume`) and `RecordingType` (`premise`, `cloud`) |
|
|
77
|
+
| `src/constants.ts` | `DISPLAY_HINTS.RECORDING_CONTROL_*` and `PREMISE_RECORDING_CONTROL_*`, `SELF_POLICY.SUPPORT_NETWORK_BASED_RECORD` and `SUPPORT_PREMISE_RECORD`, `CONTROLS` |
|
|
78
|
+
| `src/meeting/index.ts` | Meeting constructs the controller with `meetingRequest` and `displayHints: []`, feeds the Locus URL, the record service URL and session id, display hints and self policies, and delegates its four recording methods |
|
|
79
|
+
| `src/meeting/util.ts` | `selfSupportsFeature` returns true when no policies are set |
|
|
80
|
+
| `src/meeting/request.ts` | `MeetingRequest.request` and `locusDeltaRequest` carry the two transports |
|
|
81
|
+
| `src/common/errors/permission.ts` | `PermissionError` used for denied actions |
|
|
82
|
+
| `test/unit/spec/recording-controller/index.js` | Setter and getter case; each action on the Locus route (missing hint, policy false, allowed) and on the service route (missing hint, cloud, premise) |
|
|
83
|
+
| `test/unit/spec/recording-controller/util.js` | Each `canUser*` rule, `deriveRecordingStates`, and `extractLocusId` |
|
|
84
|
+
| Observation, no stated WHY | A missing self-policy object counts as supported, because `MeetingUtil.selfSupportsFeature` returns true without policies (`src/meeting/util.ts`) |
|
|
85
|
+
| Observation, no stated WHY | The Locus controls route sends no recording type; the premise or cloud choice reaches only the recording-service body (`src/recording-controller/index.ts`) |
|
|
86
|
+
|
|
87
|
+
## Purpose and boundary
|
|
88
|
+
|
|
89
|
+
- Responsibility: validates consumer recording actions against display hints/policy, selects cloud or
|
|
90
|
+
premise recording, and returns the owning request method's promise.
|
|
91
|
+
- In scope: the request context (`serviceUrl`, `sessionId`, `locusUrl`, derived `locusId`), display
|
|
92
|
+
hints, self policies, the four action methods, the permission check, and the choice between the
|
|
93
|
+
recording service and the Locus controls route.
|
|
94
|
+
- Out of scope: the recording status shown to users (Locus and the recording service own it); the HTTP
|
|
95
|
+
pipeline and Locus delta handling (`MeetingRequest`, `MeetingUtil`); computing display hints.
|
|
96
|
+
- Consumers: `Meeting` (`src/meeting/index.ts`), which exposes the actions as
|
|
97
|
+
`meeting.startRecording()`, `stopRecording()`, `pauseRecording()`, and `resumeRecording()`.
|
|
98
|
+
|
|
99
|
+
## Structure and key files
|
|
100
|
+
|
|
101
|
+
`src/recording-controller/` contains 3 direct source files and has 2 mirrored unit-test files. This
|
|
102
|
+
spec separates its public operations, runtime data movement, component ownership, state
|
|
103
|
+
applicability, and verification boundary.
|
|
104
|
+
|
|
105
|
+
| File | Holds |
|
|
106
|
+
| ---- | ----- |
|
|
107
|
+
| `src/recording-controller/enums.ts` | declared `RecordingAction` and `RecordingType` enum values |
|
|
108
|
+
| `src/recording-controller/index.ts` | `RecordingController` class: request context, facade, and the two transports |
|
|
109
|
+
| `src/recording-controller/util.ts` | permission helper functions, premise detection, Locus record-state derivation, and Locus id extraction |
|
|
110
|
+
| `test/unit/spec/recording-controller/index.js` and 1 sibling test file (`util.js`) | mirrored unit coverage |
|
|
111
|
+
| `src/recording-controller/docs/README.md` | this module specification |
|
|
112
|
+
|
|
113
|
+
## Public surface
|
|
114
|
+
|
|
115
|
+
| Contract ID | Type | Surface | Purpose | Compatibility / deprecation | Schema / detail link | Root index |
|
|
116
|
+
| ----------- | ---- | ------- | ------- | --------------------------- | -------------------- | ---------- |
|
|
117
|
+
| `recording-controller-api` | SDK / configuration | `RecordingController.set()`, `setLocusUrl()`, `setDisplayHints()`, `setUserPolicy()`, `setSessionId()`, `setServiceUrl()`, `getLocusUrl()`, `getLocusId()`, `getSessionId()`, `getServiceUrl()`, and `getDisplayHints()` | Refresh/read the request context and capability inputs used by later recording actions. | Preserve derived Locus id and getter/setter behavior; `set()` replaces every field it names; no recording status is stored. | `src/recording-controller/index.ts` | [architecture](../../../docs/architecture.md#public-and-consumer-surfaces) |
|
|
118
|
+
| `recording-controller-api` | SDK / remote | `startRecording()` | Validate the current start capability and send a `Start` action with the selected `RecordingType`. | Preserve action/type values and selected service-vs-Locus route. | `src/recording-controller/index.ts` | [architecture](../../../docs/architecture.md#public-and-consumer-surfaces) |
|
|
119
|
+
| `recording-controller-api` | SDK / remote | `pauseRecording()` and `resumeRecording()` | Map pause/resume intent to the permitted recording action under current display hints/policy. | Rejections remain the selected facade promise; the controller applies no response state. | `src/recording-controller/index.ts` | [architecture](../../../docs/architecture.md#public-and-consumer-surfaces) |
|
|
120
|
+
| `recording-controller-api` | SDK / remote | `stopRecording()` | Send the permitted `Stop` action through the current recording route. | Preserve caller-visible rejection and remote-authority ownership of final status. | `src/recording-controller/index.ts` | [architecture](../../../docs/architecture.md#public-and-consumer-surfaces) |
|
|
121
|
+
| `recording-controller-api` | module enums | `RecordingAction` and `RecordingType` | Define the exact action/type vocabulary serialized by controller operations. | Existing raw enum values are request contracts; additions must be compatible. The package root does not re-export them. | `src/recording-controller/enums.ts` | [architecture](../../../docs/architecture.md#public-and-consumer-surfaces) |
|
|
122
|
+
|
|
123
|
+
Contract ID `recording-controller-api` is indexed in the
|
|
124
|
+
[package architecture](../../../docs/architecture.md#public-and-consumer-surfaces) and registered in
|
|
125
|
+
`.sdd/manifest.json`; it requires `locus-http`.
|
|
126
|
+
|
|
127
|
+
Compatibility notes:
|
|
128
|
+
|
|
129
|
+
- Prefer additive fields/options and preserve current return and rejection semantics. Internal
|
|
130
|
+
helpers are not public merely because they are exported within the source directory; the
|
|
131
|
+
`util.ts` default export and the private `recordingFacade`, `recordingService`, and
|
|
132
|
+
`recordingControls` methods are internal.
|
|
133
|
+
|
|
134
|
+
## Dependencies
|
|
135
|
+
|
|
136
|
+
The module requires Meeting request access, Locus URL/state, recording action/type enums, capability
|
|
137
|
+
state, and utility validation.
|
|
138
|
+
|
|
139
|
+
| Dependency | Why it is required | Failure behavior |
|
|
140
|
+
| ---------- | ------------------ | ---------------- |
|
|
141
|
+
| `MeetingRequest` (`src/meeting/request.ts`), contract `locus-http` | `request` for the recording-service PUT; `locusDeltaRequest` for the Locus controls PATCH | Rejections are returned unchanged |
|
|
142
|
+
| `Meeting` (`src/meeting/index.ts`) | Supplies the initial context and later updates: LOCUS_INFO_UPDATE_URL, LINKS_SERVICES `services.record.url` and the session id, MEETING_INFO_UPDATED display hints and self policies | Until updated, the constructor values apply |
|
|
143
|
+
| `MeetingUtil.selfSupportsFeature` (`src/meeting/util.ts`) | Policy lookup inside each permission helper | Undefined policies count as supported |
|
|
144
|
+
| `PermissionError`, `LoggerProxy`, `src/constants.ts` | The denial error, action logs, display-hint and policy names | — |
|
|
145
|
+
|
|
146
|
+
## Requirements
|
|
147
|
+
|
|
148
|
+
| ID | WHAT | WHY | Source evidence | Test / example evidence | Assumptions / gaps | Confidence |
|
|
149
|
+
| --- | ---- | --- | --------------- | ----------------------- | ------------------ | ---------- |
|
|
150
|
+
| `MOD-001` | `startRecording`, `pauseRecording`, `resumeRecording`, and `stopRecording` call `recordingFacade()` immediately. The facade derives the recording type, checks the corresponding display hint/self policy (`canUser<Action>`: the network hint with `supportNetworkBasedRecord`, or the premise hint with `supportPremiseRecord`), rejects a denied action before transport, and otherwise returns the selected request promise. | The permission decision belongs inside the facade, while accepted actions must preserve the actual request result without inventing local state application. | `src/recording-controller/index.ts`, `src/recording-controller/util.ts` | `test/unit/spec/recording-controller/index.js`, `test/unit/spec/recording-controller/util.js` | none | Present |
|
|
151
|
+
| `MOD-002` | select recording type/action payload: the type is `premise` when any premise recording hint is present and `supportPremiseRecord` holds, else `cloud`; with a `serviceUrl` the PUT to `<serviceUrl>/loci/<locusId>/recording` carries `{meetingInfo: {locusSessionId}, recording: {action: <lowercase action>}, recordingType}`; without one the PATCH to `<locusUrl>/controls` carries `{record: {recording, paused}}` from `deriveRecordingStates`. | Recording action/type pairs choose the remote transition and cannot be generalized without changing service behavior. | `src/recording-controller/index.ts`, `src/recording-controller/util.ts` | `test/unit/spec/recording-controller/index.js` | service and Locus paths need the same action/type rejection matrix | Present |
|
|
152
|
+
| `MOD-003` | Denied capability inputs or request failures reject the returned promise; this controller allocates no independent listener, lock, or timer. | Remote recording state remains authoritative, so rejection cannot be masked by a fabricated local transition. | `src/recording-controller/index.ts` | `test/unit/spec/recording-controller/index.js` | a missing display-hint array throws synchronously instead (see Caller-visible failure modes) | Present |
|
|
153
|
+
| `MOD-004` | `setLocusUrl(url)` stores the URL and sets `locusId` to its last path segment; `set(options)` replaces `serviceUrl`, `sessionId`, `displayHints`, and `locusUrl` (and so `locusId`) from `options`. | The recording-service route is addressed by the Locus id (`/loci/<locusId>/recording`), so it must follow every Locus URL change. | `src/recording-controller/index.ts`, `src/recording-controller/util.ts` | `test/unit/spec/recording-controller/index.js`, `test/unit/spec/recording-controller/util.js` | none | Present |
|
|
154
|
+
|
|
155
|
+
## Design overview
|
|
156
|
+
|
|
157
|
+
`RecordingController` stores request context, validates actions through `util.ts`, selects cloud or
|
|
158
|
+
premise recording, and delegates either to `request.request` for the recording service or
|
|
159
|
+
`request.locusDeltaRequest` for legacy Locus controls. It returns that promise and does not inspect
|
|
160
|
+
the response or apply recording state. It owns no listeners or timers.
|
|
161
|
+
|
|
162
|
+
The implementation is TypeScript/JavaScript in the Node 22.14 Yarn workspace, built on the Webex
|
|
163
|
+
core/plugin abstractions through `MeetingRequest` and tested with Mocha/Sinon/`@webex/test-helper-chai`.
|
|
164
|
+
It is a plain class, not a WebexPlugin; Meeting creates one per meeting (the class JSDoc says there
|
|
165
|
+
should be only one per meeting) and keeps it current from Locus events. The facade looks up the
|
|
166
|
+
permission helper by name (`canUser${action}`), which relies on the proper-cased `RecordingAction`
|
|
167
|
+
values (code comment: assumes action is proper cased).
|
|
168
|
+
|
|
169
|
+
## Data flow and sequence coverage
|
|
170
|
+
|
|
171
|
+
Call style: in-process method calls from `Meeting`; outbound HTTPS through `MeetingRequest.request`
|
|
172
|
+
(recording service) or `MeetingRequest.locusDeltaRequest` (Locus controls).
|
|
173
|
+
The module has one asynchronous operation group, the recording mutation (start, stop, pause, resume); context refresh is synchronous setters, so one sequence diagram covers it.
|
|
174
|
+
|
|
175
|
+
```mermaid
|
|
176
|
+
flowchart LR
|
|
177
|
+
Consumer[Meeting recording API] --> Controller[index.ts]
|
|
178
|
+
Enums[enums.ts action/type values] --> Controller
|
|
179
|
+
Controller --> Util[util.ts permission checks and Locus record payload]
|
|
180
|
+
Util --> Controller
|
|
181
|
+
Controller --> Meeting[owning Meeting request method]
|
|
182
|
+
Meeting --> Service[recording service when serviceUrl is set]
|
|
183
|
+
Meeting --> Locus[Locus controls otherwise]
|
|
184
|
+
Service --> Meeting
|
|
185
|
+
Locus --> Meeting
|
|
186
|
+
Meeting --> Controller
|
|
187
|
+
Controller --> Consumer
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Sequence coverage:
|
|
191
|
+
|
|
192
|
+
| Operation group | Diagram | Failure coverage |
|
|
193
|
+
| --------------- | ------- | ---------------- |
|
|
194
|
+
| UC-002, UC-003 — recording control operation groups | Recording control sequence | missing display hint or self policy (PermissionError before transport), service-vs-Locus request rejection, and no local state application |
|
|
195
|
+
| UC-001 — context refresh | `src/recording-controller/index.ts` (synchronous setters, MOD-004) | a `set()` without display hints leaves them undefined |
|
|
196
|
+
|
|
197
|
+
### Recording control sequence
|
|
198
|
+
|
|
199
|
+
```mermaid
|
|
200
|
+
sequenceDiagram
|
|
201
|
+
participant C as Meeting consumer
|
|
202
|
+
participant R as RecordingController
|
|
203
|
+
participant U as util.ts
|
|
204
|
+
participant M as Meeting request owner
|
|
205
|
+
C->>R: start / pause / resume / stop
|
|
206
|
+
R->>R: call recordingFacade(action)
|
|
207
|
+
R->>U: derive recording type and test capability
|
|
208
|
+
U-->>R: premise or cloud, allowed or denied
|
|
209
|
+
alt action is allowed
|
|
210
|
+
R->>M: send service request (serviceUrl set) or Locus request
|
|
211
|
+
M-->>R: request result or rejection
|
|
212
|
+
R-->>C: same request promise outcome
|
|
213
|
+
else action is not allowed
|
|
214
|
+
R--xC: PermissionError promise rejection before transport
|
|
215
|
+
end
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## Class and component relationships
|
|
219
|
+
|
|
220
|
+
```mermaid
|
|
221
|
+
classDiagram
|
|
222
|
+
class Controller {
|
|
223
|
+
-request
|
|
224
|
+
-displayHints
|
|
225
|
+
-selfUserPolicies
|
|
226
|
+
-serviceUrl
|
|
227
|
+
-sessionId
|
|
228
|
+
-locusUrl
|
|
229
|
+
-locusId
|
|
230
|
+
+set(options)
|
|
231
|
+
+startRecording()
|
|
232
|
+
+stopRecording()
|
|
233
|
+
+pauseRecording()
|
|
234
|
+
+resumeRecording()
|
|
235
|
+
}
|
|
236
|
+
class Consumer["Meeting"]
|
|
237
|
+
class Enums["RecordingAction and RecordingType"]
|
|
238
|
+
class Util["util.ts"]
|
|
239
|
+
class Request["MeetingRequest"]
|
|
240
|
+
class Locus["Locus controls or recording service"]
|
|
241
|
+
Consumer --> Controller : owns one
|
|
242
|
+
Enums --> Controller
|
|
243
|
+
note for Controller "RecordingController"
|
|
244
|
+
Controller --> Util : permission and payload
|
|
245
|
+
Controller --> Request : request or locusDeltaRequest
|
|
246
|
+
Request --> Locus
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
The arrows identify ownership and delegation inside `src/recording-controller/`; `enums.ts` only
|
|
250
|
+
declares values and is not presented as a transport.
|
|
251
|
+
|
|
252
|
+
## Use cases and flows
|
|
253
|
+
|
|
254
|
+
| Use case | Actor or caller | Primary steps and outcome | Failure or boundary behavior | Evidence |
|
|
255
|
+
| -------- | --------------- | ------------------------- | ---------------------------- | -------- |
|
|
256
|
+
| `UC-001` | Meeting | Refresh Locus/service/session/display-hint/policy context without creating a local recording-status projection | — | `src/recording-controller/index.ts`, `src/meeting/index.ts` |
|
|
257
|
+
| `UC-002` | Application through Meeting | Map start, pause, resume, and stop to the exact `RecordingAction`/`RecordingType` payload allowed by current hints and policy | Denied actions reject with PermissionError | `src/recording-controller/index.ts`, `test/unit/spec/recording-controller/index.js` |
|
|
258
|
+
| `UC-003` | Application through Meeting | Route through the recording service when `serviceUrl` is present; otherwise send the derived `record` body through `locusDeltaRequest`, returning the selected dependency promise unchanged | Request rejections propagate | `src/recording-controller/index.ts`, `test/unit/spec/recording-controller/index.js` |
|
|
259
|
+
|
|
260
|
+
### Cross-boundary use-case flow
|
|
261
|
+
|
|
262
|
+
| Boundary | Transport and ordering | Compatibility | Timeout, retry, and recovery |
|
|
263
|
+
| -------- | ---------------------- | ------------- | ---------------------------- |
|
|
264
|
+
| Recording service (`UC-003`) | PUT `<serviceUrl>/loci/<locusId>/recording` through `MeetingRequest.request` | Body `{meetingInfo: {locusSessionId}, recording: {action: 'start' / 'stop' / 'pause' / 'resume'}, recordingType: 'premise' / 'cloud'}` | No retry here |
|
|
265
|
+
| Locus controls (`UC-003`) | PATCH `<locusUrl>/controls` through `locusDeltaRequest` | Body `{record: {recording, paused}}`: Start and Resume `{true, false}`, Pause `{true, true}`, Stop `{false, false}` | No retry here; the Locus delta helper applies the response |
|
|
266
|
+
|
|
267
|
+
## Client state model
|
|
268
|
+
|
|
269
|
+
The controller stores `serviceUrl`, `sessionId`, `locusUrl`, derived `locusId`, `displayHints`, and
|
|
270
|
+
`selfUserPolicies`. It does not store current recording status or apply a response projection; the
|
|
271
|
+
recording service/Locus remains authoritative.
|
|
272
|
+
|
|
273
|
+
| State or slice | Owner | Initial state | Transition triggers | Reset or persistence boundary |
|
|
274
|
+
| -------------- | ---------- | ------------- | ------------------- | ----------------------------- |
|
|
275
|
+
| `serviceUrl`, `sessionId` | `RecordingController` | Meeting's record service URL and session id at construction | `setServiceUrl`, `setSessionId`, `set` | Instance memory |
|
|
276
|
+
| `locusUrl`, `locusId` | `RecordingController` | Meeting's Locus URL | `setLocusUrl`, `set` | Instance memory |
|
|
277
|
+
| `displayHints` | `RecordingController` | `[]` from Meeting | `setDisplayHints`, `set` | Instance memory |
|
|
278
|
+
| `selfUserPolicies` | `RecordingController` | undefined | `setUserPolicy` | Instance memory |
|
|
279
|
+
|
|
280
|
+
## Business rules and invariants
|
|
281
|
+
|
|
282
|
+
| ID | Invariant | WHY | Enforcement source | Test evidence |
|
|
283
|
+
| --- | --------- | --- | ------------------ | ------------- |
|
|
284
|
+
| `INV-001` | Only actions allowed by the current display hints/self policy are sent. | The permission decision belongs inside the facade (MOD-001). | `src/recording-controller/index.ts`, `src/recording-controller/util.ts` | `test/unit/spec/recording-controller/index.js` |
|
|
285
|
+
| `INV-002` | Presence of `serviceUrl` selects the recording-service PUT; absence selects the Locus controls PATCH. | Recording action/type pairs choose the remote transition (MOD-002). | `src/recording-controller/index.ts` | `test/unit/spec/recording-controller/index.js` |
|
|
286
|
+
| `INV-003` | The controller itself makes no recording-state change. | Remote recording state remains authoritative (MOD-003). | `src/recording-controller/index.ts` | `test/unit/spec/recording-controller/index.js` |
|
|
287
|
+
|
|
288
|
+
## Concurrency and reactive flow
|
|
289
|
+
|
|
290
|
+
- Each accepted action returns an independent request promise. The controller has no queue,
|
|
291
|
+
cancellation, response ordering, or supersession guard; callers and the remote recording authority
|
|
292
|
+
determine the outcome of overlapping actions.
|
|
293
|
+
- Execution model: one JavaScript event loop; the permission check and route choice are synchronous
|
|
294
|
+
and use the context current at the call.
|
|
295
|
+
|
|
296
|
+
## Caller-visible failure modes
|
|
297
|
+
|
|
298
|
+
| Condition | Signal | Caller recovery |
|
|
299
|
+
| --------- | ------ | --------------- |
|
|
300
|
+
| Display hint/self policy does not permit the requested operation | The public method calls `recordingFacade()`; the facade returns a rejected `PermissionError` promise before selecting either transport request. | Refresh recording controls and issue only a currently allowed action. |
|
|
301
|
+
| `recordingFacade` request rejects | The controller returns that rejected promise; it does not apply a fabricated local recording state. | Handle the request failure and wait for authoritative recording state. |
|
|
302
|
+
| Recording action is accepted | The caller receives the facade request result for the selected typed payload. | Continue from service/Locus-projected recording state. |
|
|
303
|
+
| `displayHints` is undefined (a `set()` call without `displayHints`) | The permission helpers throw a `TypeError` synchronously; no promise is returned. | Always pass `displayHints` to `set()`. |
|
|
304
|
+
|
|
305
|
+
Evidence: `src/recording-controller/index.ts`, `src/recording-controller/util.ts`, and the rejection
|
|
306
|
+
cases in `test/unit/spec/recording-controller/index.js`.
|
|
307
|
+
|
|
308
|
+
## Pitfalls and constraints
|
|
309
|
+
|
|
310
|
+
- Action names and recording types are separate enums. Conflating them produces a syntactically valid
|
|
311
|
+
request with the wrong server meaning.
|
|
312
|
+
- Verify both typed constants/enums and raw wire values before changing a logical condition in this
|
|
313
|
+
legacy package: the service body lowercases the proper-cased `RecordingAction`, and the facade looks
|
|
314
|
+
up `canUser${action}` by that proper-cased name.
|
|
315
|
+
- `recordingControls` logs the derived `record` object through a template string, so the log shows
|
|
316
|
+
`[object Object]`.
|
|
317
|
+
- The PermissionError message always says the action is not allowed "due to moderator property",
|
|
318
|
+
whichever hint or policy was missing.
|
|
319
|
+
|
|
320
|
+
## Verification
|
|
321
|
+
|
|
322
|
+
Use the current mirrored suites: `test/unit/spec/recording-controller/index.js`,
|
|
323
|
+
`test/unit/spec/recording-controller/util.js`. Characterize the recording-controller-specific use
|
|
324
|
+
cases above and each listed failure condition; add cleanup or transition cases only for resources and
|
|
325
|
+
state this module actually owns.
|
|
326
|
+
|
|
327
|
+
| Behavior / Requirement | Existing test evidence | Gap |
|
|
328
|
+
| ---------------------- | ---------------------- | --- |
|
|
329
|
+
| `MOD-001`, `INV-001` | `test/unit/spec/recording-controller/index.js` covers each recording action on service and Locus routes; `test/unit/spec/recording-controller/util.js` covers each permission rule | the service-route suite has no policy-false case |
|
|
330
|
+
| `MOD-002`, `INV-002` | `test/unit/spec/recording-controller/index.js` covers every action on the Locus route and every action with cloud and premise types on the service route | none |
|
|
331
|
+
| `MOD-003`, `INV-003` | `test/unit/spec/recording-controller/index.js` | assert facade rejection is returned unchanged and no local recording status is applied |
|
|
332
|
+
| `MOD-004` | `test/unit/spec/recording-controller/index.js` set-and-extract case; `test/unit/spec/recording-controller/util.js` extractLocusId cases | the set-and-extract case uses truthiness asserts, so values are not compared |
|
|
333
|
+
|
|
334
|
+
Coverage state and the contracts baseline are recorded in `.sdd/manifest.json`. Coverage measurement
|
|
335
|
+
is pending; the module stays Partial until coverage review and independent validation run.
|