@webex/internal-plugin-task 3.13.0-next.1 → 3.13.0-next.11
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 +566 -0
- package/.sdd/manifest.json +393 -0
- package/AGENTS.md +206 -0
- package/dist/task.js +1 -1
- package/docs/adr/0001-retain-product-readme.md +93 -0
- package/docs/adr/index.md +22 -0
- package/docs/architecture.md +294 -0
- package/docs/getting-started.md +120 -0
- package/docs/index.md +47 -0
- package/docs/specs/README.md +73 -0
- package/package.json +10 -10
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +496 -0
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Module Spec
|
|
3
|
+
title: 'Task plugin specification'
|
|
4
|
+
description: Responsibilities, boundaries, design, invariants, and verification for the Task internal plugin module.
|
|
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-cowork
|
|
11
|
+
approved_by: akulakum@cisco.com
|
|
12
|
+
updated_at: 2026-11-12T12:59:34Z
|
|
13
|
+
validation_status: pass-with-warnings
|
|
14
|
+
-->
|
|
15
|
+
|
|
16
|
+
# Task plugin
|
|
17
|
+
|
|
18
|
+
This source-local document at `src/docs/README.md` owns the stable specification for **the Task
|
|
19
|
+
plugin**: the `webex.internal.task` client for the Raindrop task service. Ground every claim in
|
|
20
|
+
package evidence and link to the [package architecture](../../docs/architecture.md) instead of
|
|
21
|
+
repeating broader facts. No service specification exists because this package is a library.
|
|
22
|
+
|
|
23
|
+
Related context: [documentation index](../../docs/index.md) ·
|
|
24
|
+
[package agent instructions](../../AGENTS.md)
|
|
25
|
+
|
|
26
|
+
## Metadata
|
|
27
|
+
|
|
28
|
+
| Field | Value |
|
|
29
|
+
| ----------------- | ----- |
|
|
30
|
+
| Owner | @webex/web-sdk (CODEOWNERS default rule) |
|
|
31
|
+
| Source path | `src` |
|
|
32
|
+
| Resource kind | package |
|
|
33
|
+
| Status | Draft |
|
|
34
|
+
| Last verified | 2026-10-12 at `619c672463` |
|
|
35
|
+
| Module id | `internal-plugin-task` |
|
|
36
|
+
| Parent spec | — |
|
|
37
|
+
| Doc kind | Module spec |
|
|
38
|
+
| Coverage score | 93.3% assessed 2026-10-09 — 14 of 15 mandatory fields PRESENT, critical 8 of 8; test strategy is WEAK (gaps listed under Verification) and no characterization baseline exists. Independent validation: see the Validation status row |
|
|
39
|
+
| Validation status | pass-with-warnings; assessed 2026-11-12 by validator `current-session` at `e30d9f6298b48349c0a9133618272b093ac67e8b`. Blocking: 0; Important: 0; Medium: 0; Minor: 4 (TOOL-WRAPPER: manual validator fallback, TOOL-MERMAID: seven diagrams checked manually without parser, TOOL-BROWSERSLIST: stale browser data, PR-TEMPLATE: extra heading in the live PR description) |
|
|
40
|
+
|
|
41
|
+
## Applicability
|
|
42
|
+
|
|
43
|
+
| Condition ID | Status | Evidence or reason | Owned section |
|
|
44
|
+
| ------------------------------------ | ---------- | ------------------ | ------------- |
|
|
45
|
+
| `module.has_tiers` | N/A | No tier policy exists in this package or its `package.json` | Tier |
|
|
46
|
+
| `module.has_ui` | N/A | No view or screen. The module issues requests and transforms their payloads. | UI use-case flow |
|
|
47
|
+
| `module.crosses_service_boundaries` | Applicable | Every task method calls the Raindrop service through webex.request; register calls the device and Mercury plugins; the helpers call the encryption plugin | Cross-boundary use-case flow |
|
|
48
|
+
| `module.holds_client_state` | Applicable | The plugin keeps the in-memory registered flag across calls in `src/task.js`; Task DTOs are returned to the caller, not kept | Client state model |
|
|
49
|
+
| `module.enforces_domain_rules` | Applicable | Which task fields are encrypted, how the key is chosen, and which responses are decrypted, in `src/helpers/encrypt.helper.js` and `src/helpers/decrypt.helper.js` | Business rules and invariants |
|
|
50
|
+
| `module.is_concurrent_async` | Applicable | Public methods return promises, except that createTask and updateTask throw synchronously without data and unregister throws synchronously when a task:unregistered listener throws (see Caller-visible failure modes); field encryption and decryption run in parallel | Concurrency and reactive flow |
|
|
51
|
+
| `module.owns_persistence` | N/A | Nothing is stored by this package | Data, schema, and migration |
|
|
52
|
+
| `module.stateful_transitions` | Applicable | register and unregister move the plugin between unregistered and registered and emit events | State machine |
|
|
53
|
+
| `module.exposes_wire_protocol` | Applicable | Raindrop request shapes, the encrypted title and notes fields, encryptionKeyUrl, and the plugin event names | Protocol and wire format |
|
|
54
|
+
| `module.ui_multi_screen` | N/A | No UI | UI flow |
|
|
55
|
+
| `module.large_data_model` | N/A | The task DTO is passed through. Only items, title, notes, and encryptionKeyUrl are read or written. | Data model |
|
|
56
|
+
| `module.returns_caller_errors` | Applicable | register rejects with its own error; other failures propagate from the encryption plugin and webex.request; createTask and updateTask can throw synchronously, and unregister throws synchronously when a task:unregistered listener throws | Caller-visible failure modes |
|
|
57
|
+
| `module.module_specific_conventions` | Applicable | Resolving the whole response, decrypting every task-bearing response, and the Task->method#LEVEL log prefix | Module-specific rules |
|
|
58
|
+
| `module.published_package` | Applicable | `package.json` names the package @webex/internal-plugin-task and deploy:npm publishes it | Export stability |
|
|
59
|
+
| `module.embedded_in_host` | N/A | No host theme or embed API | Host integration and theming |
|
|
60
|
+
| `module.has_design_tradeoff` | Applicable | Field encryption in helpers instead of payload transformers, and stub event hooks | Key design trade-off |
|
|
61
|
+
| `module.has_submodules` | N/A | Computed false by the Repo Annotation module_tree.py script: the manifest has one module | Sub-modules |
|
|
62
|
+
|
|
63
|
+
## Evidence register
|
|
64
|
+
|
|
65
|
+
| Evidence | What it establishes |
|
|
66
|
+
| -------- | ------------------- |
|
|
67
|
+
| `src/index.js` | Side-effect imports of the device, encryption, and conversation plugins; registration as internal plugin `task` with config and empty payload-transformer lists; the default export |
|
|
68
|
+
| `src/task.js` | The `Task` plugin: the `registered` flag, `register`, `unregister`, the empty event hooks, and the seven REST methods |
|
|
69
|
+
| `src/helpers/encrypt.helper.js` | Title and notes encryption and the unbound-key fallback |
|
|
70
|
+
| `src/helpers/decrypt.helper.js` | Title and notes decryption for one task and for a list body |
|
|
71
|
+
| `src/constants.js` | The `task:registered` and `task:unregistered` event names |
|
|
72
|
+
| `src/config.js` | The plugin config `{task: {}}` |
|
|
73
|
+
| `package.json` | Name, entry points, dependencies, and scripts |
|
|
74
|
+
| `test/unit/spec/task.js` | Unit cases for `register`, `unregister`, and every REST method except `acceptTask` and `rejectTask`, against a hand-built webex object |
|
|
75
|
+
| `test/unit/spec/helpers/encrypt.helper.js` | One case: both fields set, encrypted with a newly created key |
|
|
76
|
+
| `test/unit/spec/helpers/decrypt.helper.js` | Seven cases for empty inputs, a missing key URL, and decryption of one task and a list |
|
|
77
|
+
| `test/integration/spec/task.js` | A mocha spec that builds its own `MockTask` and never imports this package |
|
|
78
|
+
| `README.md` | Retained product documentation, not the behavioral authority. See ADR 0001. |
|
|
79
|
+
| Sibling package webex-core, file src/lib/webex-plugin.js | `WebexPlugin#request` delegates to `webex.request`; `logger` is `webex.logger` or `console`; `this.config` is `webex.config` under the plugin namespace |
|
|
80
|
+
| Sibling package webex-core, file src/lib/webex-internal-core-plugin-mixin.js | How `registerInternalPlugin` merges `config` and concatenates payload-transformer predicates and transforms |
|
|
81
|
+
| Sibling package webex-core, file src/lib/credentials/credentials.js | `canAuthorize` is true with an authorizing supertoken or when the credentials can refresh |
|
|
82
|
+
| Sibling package webex-core, files src/webex-core.js, src/config.js, src/lib/interceptors/service.js, and src/interceptors/ | The default interceptor set, its replacement by `config.interceptors`, service URL resolution, auth, the catalog check, and redirects |
|
|
83
|
+
| Sibling package internal-plugin-encryption, files src/index.js, src/encryption.js, and src/kms.js | `encryptText`, `decryptText`, `kms.createUnboundKeys`, and the Mercury import that registers Mercury |
|
|
84
|
+
| Sibling package internal-plugin-device, SDD module spec src/docs/README.md | `register()` behavior, including the shared in-flight registration |
|
|
85
|
+
| Sibling package internal-plugin-mercury, SDD module spec src/docs/README.md | `connect()` behavior, including in-flight deduplication |
|
|
86
|
+
| Sibling package legacy-tools, file src/models/package/package.ts | Which spec directories each runner collects |
|
|
87
|
+
|
|
88
|
+
## Purpose and boundary
|
|
89
|
+
|
|
90
|
+
- Responsibility: give SDK code one client for the Raindrop task service that hides the encryption
|
|
91
|
+
of task `title` and `notes`, and a register call that brings up the device and Mercury connection
|
|
92
|
+
the task service will need for events.
|
|
93
|
+
- In scope: the `Task` plugin in `src/task.js`, the two helpers in `src/helpers/`, the event names in
|
|
94
|
+
`src/constants.js`, the empty config in `src/config.js`, and the registration side effect in
|
|
95
|
+
`src/index.js`.
|
|
96
|
+
- Out of scope: HTTP transport, service URL resolution, authorization, and error classes (sibling
|
|
97
|
+
packages webex-core and http-core); KMS key management and JWE encryption (sibling package
|
|
98
|
+
internal-plugin-encryption); device registration (sibling package internal-plugin-device); the
|
|
99
|
+
Mercury connection (sibling package internal-plugin-mercury); conversation behavior (sibling
|
|
100
|
+
package internal-plugin-conversation, imported for its side effect only). Task event delivery is
|
|
101
|
+
not implemented (see Key design trade-off).
|
|
102
|
+
- Consumers: code that reaches `webex.internal.task`. In this workspace the sibling package webex
|
|
103
|
+
lists this package as a dependency and requires it in its file src/webex.js.
|
|
104
|
+
|
|
105
|
+
## Structure and key files
|
|
106
|
+
|
|
107
|
+
| Path | Responsibility |
|
|
108
|
+
| ---- | -------------- |
|
|
109
|
+
| `src/index.js` | Imports the device, encryption, and conversation plugins for their side effects, calls `registerInternalPlugin('task', Task, …)`, and re-exports `Task` as default |
|
|
110
|
+
| `src/task.js` | The `Task` plugin built with `WebexPlugin.extend` and namespace `Task` |
|
|
111
|
+
| `src/helpers/encrypt.helper.js` | `EncryptHelper.encryptTaskRequest` and the private `_encryptTextProp` |
|
|
112
|
+
| `src/helpers/decrypt.helper.js` | `DecryptHelper.decryptTaskResponse`, `DecryptHelper.decryptTasksResponse`, and the private `_decryptTextProp` and `_decryptTaskFields` |
|
|
113
|
+
| `src/constants.js` | `TASK_REGISTERED` and `TASK_UNREGISTERED` |
|
|
114
|
+
| `src/config.js` | Default export `{task: {}}` |
|
|
115
|
+
| `test/unit/spec/task.js`, `test/unit/spec/helpers/encrypt.helper.js`, `test/unit/spec/helpers/decrypt.helper.js` | Jest specs for the plugin and the two helpers |
|
|
116
|
+
| `test/integration/spec/task.js` | Mocha spec over an in-file mock |
|
|
117
|
+
| `process` | Legacy-tools browser-testing file containing `module.exports = {browser: true};` (see Pitfalls) |
|
|
118
|
+
|
|
119
|
+
## Public surface
|
|
120
|
+
|
|
121
|
+
Declarations live in `src/index.js` and `src/task.js`; the rows name each surface and route its
|
|
122
|
+
behavior to a requirement.
|
|
123
|
+
|
|
124
|
+
| Surface | Consumer | Compatibility commitment | Source |
|
|
125
|
+
| ------- | -------- | ------------------------ | ------ |
|
|
126
|
+
| Registration side effect | Every importer | Importing installs `webex.internal.task` (`MOD-001`) | `src/index.js` |
|
|
127
|
+
| Default export `Task` | Importers and the unit spec | The plugin constructor (`MOD-002`) | `src/index.js` |
|
|
128
|
+
| `register`, `unregister` | Code that wants the plugin registered | Promise; state per State machine (`MOD-003`, `MOD-004`) | `src/task.js` |
|
|
129
|
+
| `registered` | Readers of the plugin | Boolean, see State machine | `src/task.js` |
|
|
130
|
+
| `task:registered`, `task:unregistered` events | Listeners on `webex.internal.task` | Event names (`MOD-011`) | `src/constants.js` |
|
|
131
|
+
| `listMyTasks`, `getTask` | Readers | Resolve the response with decrypted fields (`MOD-005`, `MOD-006`) | `src/task.js` |
|
|
132
|
+
| `createTask`, `updateTask` | Writers | Encrypt, send, and decrypt (`MOD-007`, `MOD-008`) | `src/task.js` |
|
|
133
|
+
| `deleteTask` | Writers | Resolve the response (`MOD-009`) | `src/task.js` |
|
|
134
|
+
| `acceptTask`, `rejectTask` | Assignees | Resolve the response, decrypting a keyed body when present (`MOD-010`) | `src/task.js` |
|
|
135
|
+
| `listenForEvents`, `stopListeningForEvents` | None; JSDoc-private | Empty (`MOD-003`, `MOD-004`) | `src/task.js` |
|
|
136
|
+
|
|
137
|
+
Contract `task-sdk` is published with native artifact `package.json`. Required contracts:
|
|
138
|
+
`raindrop-tasks-http`, `webex-core-plugin-host`, `encryption-sdk`, `webex-device-registration`,
|
|
139
|
+
`mercury-sdk`, `conversation-sdk`, and `lodash`.
|
|
140
|
+
|
|
141
|
+
## Dependencies
|
|
142
|
+
|
|
143
|
+
| Dependency | Why it is required | Failure behavior |
|
|
144
|
+
| ---------- | ------------------ | ---------------- |
|
|
145
|
+
| `@webex/webex-core` (`webex-core-plugin-host`) | `WebexPlugin`, `registerInternalPlugin`, `request`, `logger`, and `canAuthorize` | Error classes (`WebexHttpError` subtypes through `HttpStatusInterceptor`), service URL resolution, host checks, auth, and redirects assume webex-core's default interceptor set. A host-supplied `config.interceptors` set replaces it, and then the HTTP rows under Caller-visible failure modes depend on the interceptors that host lists. Pipeline security is described in the architecture Security architecture |
|
|
146
|
+
| Raindrop service (`raindrop-tasks-http`) | Every REST method | Rejections from `webex.request` propagate; this package does not catch them |
|
|
147
|
+
| `webex.internal.encryption` (`encryption-sdk`) | `encryptText`, `decryptText`, and `kms.createUnboundKeys` in the helpers | Propagates; see Caller-visible failure modes |
|
|
148
|
+
| `webex.internal.device` (`webex-device-registration`) | `register()` calls `device.register()` first | Propagates; see Caller-visible failure modes |
|
|
149
|
+
| `webex.internal.mercury` (`mercury-sdk`) | `register()` calls `mercury.connect()` after the device | Not a declared dependency; it is registered transitively because the encryption index imports `@webex/internal-plugin-mercury` (sibling package internal-plugin-encryption, file src/index.js). Rejections propagate; see Caller-visible failure modes |
|
|
150
|
+
| `@webex/internal-plugin-conversation` (`conversation-sdk`) | Side-effect import only | Load-time only; Task calls no conversation API |
|
|
151
|
+
| `lodash` | `isArray` in the encrypt helper | — |
|
|
152
|
+
| `uuid` | Listed under `dependencies` | Not imported by `src/` |
|
|
153
|
+
|
|
154
|
+
## Requirements
|
|
155
|
+
|
|
156
|
+
| ID | WHAT | WHY | Source evidence | Test or example evidence | Assumptions or gaps | Confidence |
|
|
157
|
+
| -- | ---- | --- | --------------- | ------------------------ | ------------------- | ---------- |
|
|
158
|
+
| `MOD-001` | Importing the package imports the device, encryption, and conversation plugins and registers `Task` as internal plugin `task` with config `{task: {}}` and empty payload-transformer `predicates` and `transforms`. | Webex instances built after the import get `webex.internal.task` with its dependencies registered. | `src/index.js`, `src/config.js` | none found; the unit spec builds Task as a child of a plain object instead | The config adds an empty `webex.config.task` object (the plugin's `this.config`), and `src/` reads no key from it | Present |
|
|
159
|
+
| `MOD-002` | The barrel exports only `Task` as default. The event-name constants are not re-exported. | Callers reach the plugin through `webex.internal.task`; the class export exists for tests and extension. | `src/index.js` | `test/unit/spec/task.js` imports Task from the package | Listeners must use the literal event names or import `src/constants.js` by path | Present |
|
|
160
|
+
| `MOD-003` | `register()` checks `INV-005`, then registers the device, connects Mercury, calls `listenForEvents`, emits `task:registered`, and sets `registered`. A failure in that chain is logged and rejects with the same error. | Task events would arrive over Mercury, which needs a registered device and an authorized user. | `src/task.js` | `test/unit/spec/task.js` #register() cases (device called once, registered true, event fired) | No test for the authorization gate, the already-registered path, or a failure | Present |
|
|
161
|
+
| `MOD-004` | `unregister()` resolves at once when not registered; otherwise it calls `stopListeningForEvents`, emits `task:unregistered`, clears `registered`, and resolves. It does not disconnect Mercury or unregister the device. | Other plugins share the device and Mercury connection. | `src/task.js` | `test/unit/spec/task.js` #unregister() cases (event fired; mercury.off not called) | No test for the not-registered path | Present |
|
|
162
|
+
| `MOD-005` | `listMyTasks(options)` sends the list request with the caller's options as the query, or an empty query when `options` is falsy, decrypts the list body by `INV-003`, and resolves the response (`INV-004`). | Lists the user's tasks, with `title` and `notes` decrypted for each task that carries `encryptionKeyUrl`. | `src/task.js`, `src/helpers/decrypt.helper.js` | `test/unit/spec/task.js` #listMyTasks() (request shape with an empty query) | The option names in the JSDoc (orderBy, offset, limit) are passed through and not checked | Present |
|
|
163
|
+
| `MOD-006` | `getTask(id)` sends the get request, decrypts the body by `INV-003`, and resolves the response. | Reads one task. | `src/task.js` | `test/unit/spec/task.js` #getTask() (request shape and decrypted title) | The JSDoc says it resolves an array; it resolves one response | Present |
|
|
164
|
+
| `MOD-007` | `createTask(data)` encrypts `data` by `INV-001` and `INV-002`, then sends the create request with `data` as the body, decrypts the response body by `INV-003`, and resolves the response. | `title` and `notes`, when set, are sent only as ciphertext. | `src/task.js`, `src/helpers/encrypt.helper.js` | `test/unit/spec/task.js` #createTask() (request shape); `test/unit/spec/helpers/encrypt.helper.js` (new key path) | The test asserts against the same object the helper changed, so it does not check the encrypted values | Present |
|
|
165
|
+
| `MOD-008` | `updateTask(id, data)` does the same as `MOD-007` with the update request. | Same as `MOD-007` for edits. | `src/task.js` | `test/unit/spec/task.js` #updateTask() (request shape) | Key choice per `INV-002`; see Pitfalls | Present |
|
|
166
|
+
| `MOD-009` | `deleteTask(id)` sends the delete request and resolves the response without decryption. | Deletes a task. | `src/task.js` | `test/unit/spec/task.js` #deleteTask() (request shape) | Whether Raindrop returns a task body on delete is not in this repository | Present |
|
|
167
|
+
| `MOD-010` | `acceptTask(id)` and `rejectTask(id)` send the accept and reject requests, decrypt the response body by `INV-003`, and resolve the response. | An assignee accepts or declines a task assigned to them. | `src/task.js` | none found | No unit test; the response body shape is unverified | Present |
|
|
168
|
+
| `MOD-011` | The plugin emits `task:registered` and `task:unregistered` on itself, with no payload. | Callers can wait for registration without polling `registered`. | `src/constants.js`, `src/task.js` | `test/unit/spec/task.js` should-trigger cases assert that each event fires once | The tests do not assert the absence of a payload | Present |
|
|
169
|
+
|
|
170
|
+
## Design overview
|
|
171
|
+
|
|
172
|
+
`Task` is created with `WebexPlugin.extend`. Its only state is the plain `registered` property,
|
|
173
|
+
specified under Client state model and State machine.
|
|
174
|
+
|
|
175
|
+
Every REST method follows one shape: optionally run the encrypt helper over the caller's object,
|
|
176
|
+
send one request through `this.request`, run the matching decrypt helper over the body, and resolve
|
|
177
|
+
the response (`INV-004`). `listMyTasks` calls `this.webex.request`, the function that `this.request`
|
|
178
|
+
delegates to, so the behavior is the same. The helpers change the objects they receive, and Task
|
|
179
|
+
ignores their resolved values: arrays from `Promise.all` when fields are encrypted or decrypted, or
|
|
180
|
+
`undefined` when decryption is skipped.
|
|
181
|
+
|
|
182
|
+
Field encryption is done by the helpers rather than by payload transformers; the cost of that choice
|
|
183
|
+
is under Key design trade-off.
|
|
184
|
+
|
|
185
|
+
## Data flow and sequence coverage
|
|
186
|
+
|
|
187
|
+
Transport: HTTP through `webex.request` to the Raindrop service; in-process promise calls to the
|
|
188
|
+
encryption, device, and Mercury plugins.
|
|
189
|
+
|
|
190
|
+
| Operation group | Entry and outcome | Diagram or evidence | Failure and recovery coverage |
|
|
191
|
+
| --------------- | ----------------- | ------------------- | ----------------------------- |
|
|
192
|
+
| Registration | `register`, `unregister` → device, Mercury, event, flag | Registration diagram below for call order; guards and transitions in State machine | Device or Mercury rejection; guard outcomes in State machine |
|
|
193
|
+
| Encrypted writes | `createTask`, `updateTask` → encrypt, send, decrypt | Encrypted writes diagram below | Missing `data`, key creation or encryption failure, HTTP rejection, decryption failure after success |
|
|
194
|
+
| Reads and actions | `listMyTasks`, `getTask`, `acceptTask`, `rejectTask`, `deleteTask` → response | Reads and actions diagram below | HTTP rejection, decryption failure after success, delete without decryption |
|
|
195
|
+
|
|
196
|
+
Registration, when the guards in `INV-005` pass:
|
|
197
|
+
|
|
198
|
+
```mermaid
|
|
199
|
+
sequenceDiagram
|
|
200
|
+
participant Caller
|
|
201
|
+
participant Task
|
|
202
|
+
participant Device as webex.internal.device
|
|
203
|
+
participant Mercury as webex.internal.mercury
|
|
204
|
+
Caller->>Task: register()
|
|
205
|
+
Task->>Device: register()
|
|
206
|
+
alt device rejects
|
|
207
|
+
Task-->>Caller: log, reject with the device error
|
|
208
|
+
else device resolves
|
|
209
|
+
Task->>Mercury: connect()
|
|
210
|
+
alt Mercury rejects
|
|
211
|
+
Task-->>Caller: log, reject with the Mercury error
|
|
212
|
+
else Mercury resolves
|
|
213
|
+
Task->>Task: listenForEvents, trigger task:registered, set registered
|
|
214
|
+
Task-->>Caller: resolve
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Encrypted writes:
|
|
220
|
+
|
|
221
|
+
```mermaid
|
|
222
|
+
sequenceDiagram
|
|
223
|
+
participant Caller
|
|
224
|
+
participant Task
|
|
225
|
+
participant Enc as webex.internal.encryption
|
|
226
|
+
participant Request as webex.request
|
|
227
|
+
participant Raindrop as Raindrop service
|
|
228
|
+
Caller->>Task: createTask(data) or updateTask(id, data)
|
|
229
|
+
alt data is missing
|
|
230
|
+
Task-->>Caller: throws TypeError synchronously
|
|
231
|
+
else data present
|
|
232
|
+
opt data.encryptionKeyUrl is not set
|
|
233
|
+
Task->>Enc: kms.createUnboundKeys with count 1
|
|
234
|
+
Enc-->>Task: keys, and Task sets data.encryptionKeyUrl
|
|
235
|
+
end
|
|
236
|
+
Task->>Enc: encryptText for title and notes
|
|
237
|
+
alt key creation or encryption rejects
|
|
238
|
+
Enc-->>Caller: reject, no request sent
|
|
239
|
+
else encrypted
|
|
240
|
+
Task->>Request: create or update request with data
|
|
241
|
+
Request->>Raindrop: HTTP
|
|
242
|
+
alt HTTP error
|
|
243
|
+
Request-->>Caller: reject
|
|
244
|
+
else success
|
|
245
|
+
Raindrop-->>Task: response
|
|
246
|
+
Task->>Enc: decryptText for title and notes
|
|
247
|
+
alt decryption rejects
|
|
248
|
+
Enc-->>Caller: reject, although the write succeeded
|
|
249
|
+
else decrypted
|
|
250
|
+
Task-->>Caller: resolve the response
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Reads and actions:
|
|
258
|
+
|
|
259
|
+
```mermaid
|
|
260
|
+
sequenceDiagram
|
|
261
|
+
participant Caller
|
|
262
|
+
participant Task
|
|
263
|
+
participant Request as webex.request
|
|
264
|
+
participant Raindrop as Raindrop service
|
|
265
|
+
participant Enc as webex.internal.encryption
|
|
266
|
+
Caller->>Task: listMyTasks, getTask, acceptTask, rejectTask, or deleteTask
|
|
267
|
+
Task->>Request: list, get, accept, reject, or delete request
|
|
268
|
+
Request->>Raindrop: HTTP
|
|
269
|
+
alt HTTP error
|
|
270
|
+
Request-->>Caller: reject
|
|
271
|
+
else deleteTask succeeds
|
|
272
|
+
Raindrop-->>Task: response
|
|
273
|
+
Task-->>Caller: resolve the response
|
|
274
|
+
else other method succeeds
|
|
275
|
+
Raindrop-->>Task: response
|
|
276
|
+
Task->>Enc: decryptText for each task that has encryptionKeyUrl
|
|
277
|
+
alt decryption rejects
|
|
278
|
+
Enc-->>Caller: reject
|
|
279
|
+
else decrypted
|
|
280
|
+
Task-->>Caller: resolve the response
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Class and component relationships
|
|
286
|
+
|
|
287
|
+
```mermaid
|
|
288
|
+
classDiagram
|
|
289
|
+
class WebexPlugin {
|
|
290
|
+
+webex
|
|
291
|
+
+logger
|
|
292
|
+
+request(options)
|
|
293
|
+
+trigger(event)
|
|
294
|
+
}
|
|
295
|
+
class Task {
|
|
296
|
+
+registered
|
|
297
|
+
+register()
|
|
298
|
+
+unregister()
|
|
299
|
+
+listMyTasks(options)
|
|
300
|
+
+getTask(id)
|
|
301
|
+
+createTask(data)
|
|
302
|
+
+updateTask(id, data)
|
|
303
|
+
+deleteTask(id)
|
|
304
|
+
+acceptTask(id)
|
|
305
|
+
+rejectTask(id)
|
|
306
|
+
}
|
|
307
|
+
class EncryptHelper {
|
|
308
|
+
+encryptTaskRequest(ctx, data)
|
|
309
|
+
}
|
|
310
|
+
class DecryptHelper {
|
|
311
|
+
+decryptTaskResponse(ctx, data)
|
|
312
|
+
+decryptTasksResponse(ctx, data)
|
|
313
|
+
}
|
|
314
|
+
WebexPlugin <|-- Task
|
|
315
|
+
Task ..> EncryptHelper : createTask, updateTask
|
|
316
|
+
Task ..> DecryptHelper : decrypting methods
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
| Component | Relationship |
|
|
320
|
+
| --------- | ------------ |
|
|
321
|
+
| `Task` | Plugin holding every public method; extends `WebexPlugin` |
|
|
322
|
+
| `EncryptHelper` | Plain object; receives the plugin as `ctx` and reaches `ctx.webex.internal.encryption` |
|
|
323
|
+
| `DecryptHelper` | Plain object; same `ctx` pattern |
|
|
324
|
+
| `TASK_REGISTERED`, `TASK_UNREGISTERED` | String constants imported by `src/task.js` |
|
|
325
|
+
|
|
326
|
+
## Use cases and flows
|
|
327
|
+
|
|
328
|
+
| Use case | Actor or caller | Primary steps and outcome | Failure or boundary behavior | Evidence |
|
|
329
|
+
| -------- | --------------- | ------------------------- | ---------------------------- | -------- |
|
|
330
|
+
| `UC-001` | Client creating a task | Calls `createTask({title, notes, dueDate})`; a key is created, the text is encrypted, the task is posted, and the response is decrypted when it carries `encryptionKeyUrl` | See Caller-visible failure modes and Pitfalls | `src/task.js`, `src/helpers/encrypt.helper.js` |
|
|
331
|
+
| `UC-002` | Client editing a task | Calls `updateTask(id, {title, encryptionKeyUrl})` with the task's existing key URL so the same key is reused | See Pitfalls | `src/task.js`, `src/helpers/encrypt.helper.js` |
|
|
332
|
+
| `UC-003` | Task list view | Calls `listMyTasks({orderBy: 'createdAt:desc'})` and reads `response.body.items` | A task without `encryptionKeyUrl` is returned as received | `src/task.js`, `src/helpers/decrypt.helper.js`, `README.md` |
|
|
333
|
+
| `UC-004` | Assignee | Calls `acceptTask(id)` or `rejectTask(id)` and receives the response; its body shape is not documented here (see Protocol and wire format) | HTTP rejection propagates | `src/task.js` |
|
|
334
|
+
| `UC-005` | Client that wants task events | Calls `register()` after authentication and listens for `task:registered` | No task event is delivered afterwards (see Key design trade-off) | `src/task.js` |
|
|
335
|
+
|
|
336
|
+
### Cross-boundary use-case flow
|
|
337
|
+
|
|
338
|
+
| Boundary | Transport | Ordering | Timeout and retry | Recovery |
|
|
339
|
+
| -------- | --------- | -------- | ----------------- | -------- |
|
|
340
|
+
| Raindrop service | HTTP through `webex.request`, catalog service `raindrop` | One request per call, after encryption for writes | No retry here; any retry or timeout belongs to the webex-core request pipeline | None here |
|
|
341
|
+
| Encryption plugin and KMS | In-process promises; the KMS exchange is owned by internal-plugin-encryption | Key creation, then encryption, before the request; decryption after the response | None here | None here |
|
|
342
|
+
| Device plugin | In-process promise | First step of `register` | None here | See Caller-visible failure modes |
|
|
343
|
+
| Mercury plugin | In-process promise | After the device | None here | See Caller-visible failure modes |
|
|
344
|
+
|
|
345
|
+
## Client state model
|
|
346
|
+
|
|
347
|
+
| State or slice | Owner | Initial state | Transition triggers | Reset or persistence boundary |
|
|
348
|
+
| -------------- | ----- | ------------- | ------------------- | ----------------------------- |
|
|
349
|
+
| `registered` | The `Task` plugin instance (`webex.internal.task`) | `false` | A successful `register` and an acting `unregister`; transitions and guards are in State machine | Memory only, never persisted; a new plugin instance starts at `false`. Logout does not reset it, because `src/index.js` registers no `onBeforeLogout` hook |
|
|
350
|
+
|
|
351
|
+
## Business rules and invariants
|
|
352
|
+
|
|
353
|
+
| ID | Invariant | WHY | Enforcement source | Test evidence |
|
|
354
|
+
| -- | --------- | --- | ------------------ | ------------- |
|
|
355
|
+
| `INV-001` | Only `title` and `notes` are encrypted, and each only when its value is truthy; every other field is sent as given. | These are the free-text fields; other task fields are sent in the clear. | `src/helpers/encrypt.helper.js` | `test/unit/spec/helpers/encrypt.helper.js` (both fields set only) |
|
|
356
|
+
| `INV-002` | When `data.encryptionKeyUrl` is set, it is the encryption key. Otherwise one unbound key is created with `kms.createUnboundKeys({count: 1})`, its `uri` is written to `data.encryptionKeyUrl`, and that key is used. | The server needs the key URL to let recipients decrypt. | `src/helpers/encrypt.helper.js` | `test/unit/spec/helpers/encrypt.helper.js` (new key only) |
|
|
357
|
+
| `INV-003` | A task is decrypted only when it has a truthy `encryptionKeyUrl`; then its truthy `title` and `notes` are replaced with plaintext using that key. A list body is decrypted item by item from `items`; a missing body or empty `items` is left alone. | A task without a key URL cannot be decrypted here, so it is returned unchanged; that such tasks carry plaintext is a service assumption not verified in this repository. | `src/helpers/decrypt.helper.js` | `test/unit/spec/helpers/decrypt.helper.js` (the missing-key case sets `encryptionKeyUrl` to undefined and asserts only that the promise resolves undefined; it does not assert that `title` and `notes` are unchanged) |
|
|
358
|
+
| `INV-004` | Every REST method resolves the whole response object; for the decrypting methods, the decrypted values are written into `response.body`. | Callers read `body` and can also read status and headers. | `src/task.js` | `test/unit/spec/task.js` (reads of res.body) |
|
|
359
|
+
| `INV-005` | `register` checks first that `webex.canAuthorize` is true and rejects with `Error('SDK cannot authorize')` when it is false, even when already registered; it then resolves with no work when `registered` is true, and proceeds otherwise. | Device registration needs credentials, and a second registration is not needed. | `src/task.js` | Gap: no test |
|
|
360
|
+
| `INV-006` | Every request uses service `raindrop`, and its resource is `tasks` or `tasks/{id}` with an optional `/accept` or `/reject`. `{id}` is the caller's value, inserted without encoding. | Raindrop is the task service in the catalog. | `src/task.js` | `test/unit/spec/task.js` (request shapes for five methods) |
|
|
361
|
+
|
|
362
|
+
## Concurrency and reactive flow
|
|
363
|
+
|
|
364
|
+
- Execution model: single JavaScript event loop. Every public method returns a promise, except the
|
|
365
|
+
synchronous throws listed under Caller-visible failure modes.
|
|
366
|
+
- Ordering guarantees: `title` and `notes` are encrypted, and decrypted, in parallel with
|
|
367
|
+
`Promise.all`; a list body is decrypted for all items in parallel. No ordering across calls.
|
|
368
|
+
- Idempotency and retry: no retry or deduplication in this module; see Pitfalls for concurrent
|
|
369
|
+
`register` calls and for retrying a write.
|
|
370
|
+
- Shared-state protection: none; `registered` is written only at the end of the register chain and
|
|
371
|
+
in `unregister`.
|
|
372
|
+
- Blocking restrictions: none in this module.
|
|
373
|
+
|
|
374
|
+
## State machine
|
|
375
|
+
|
|
376
|
+
The plugin has two states, held in the `registered` property (see Client state model). Events are
|
|
377
|
+
emitted on the plugin.
|
|
378
|
+
|
|
379
|
+
```mermaid
|
|
380
|
+
stateDiagram-v2
|
|
381
|
+
[*] --> Unregistered
|
|
382
|
+
Unregistered --> Unregistered: register and canAuthorize is false, rejects
|
|
383
|
+
Unregistered --> Unregistered: register and device or Mercury rejects
|
|
384
|
+
Unregistered --> Registered: register succeeds, emits task:registered
|
|
385
|
+
Registered --> Registered: register and canAuthorize is true, resolves with no work
|
|
386
|
+
Registered --> Registered: register and canAuthorize is false, rejects
|
|
387
|
+
Registered --> Unregistered: unregister, emits task:unregistered
|
|
388
|
+
Unregistered --> Unregistered: unregister, resolves with no work
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
- Guards: `INV-005` for `register`; `unregister` acts only when `registered` is true.
|
|
392
|
+
- Terminal state: none; the plugin can be registered again.
|
|
393
|
+
- Event timing: `task:registered` is triggered before `registered` becomes true, and
|
|
394
|
+
`task:unregistered` before it becomes false, so a listener that reads `registered` sees the old
|
|
395
|
+
value. Events are emitted synchronously; a throwing listener's effect is under Caller-visible
|
|
396
|
+
failure modes.
|
|
397
|
+
|
|
398
|
+
## Protocol and wire format
|
|
399
|
+
|
|
400
|
+
| Message or frame | Version | Producer or serializer | Consumer or parser | Compatibility and ordering rule |
|
|
401
|
+
| ---------------- | ------- | ---------------------- | ------------------ | ------------------------------- |
|
|
402
|
+
| List request | Unversioned | `src/task.js` | Raindrop service | GET resource `tasks`; `qs` is the caller's options or `{}`. The code reads `body.items`; the unit-test mock and decrypt helper fixture use `{items: [task]}`, and the fixture also carries `offset`, `limit`, and `hasMore`. No service schema exists in this repository. |
|
|
403
|
+
| Get request | Unversioned | `src/task.js` | Raindrop service | GET `tasks/{id}`; the response body is one task in the unit-test mock. No service schema exists in this repository. |
|
|
404
|
+
| Create request | Unversioned | `src/task.js` | Raindrop service | POST `tasks`; body is the caller's object after `INV-001` and `INV-002`. The response body is one task in the unit-test mock; no service schema exists in this repository. |
|
|
405
|
+
| Update request | Unversioned | `src/task.js` | Raindrop service | PATCH `tasks/{id}`; body as create. |
|
|
406
|
+
| Delete request | Unversioned | `src/task.js` | Raindrop service | DELETE `tasks/{id}`; no body. |
|
|
407
|
+
| Accept and reject requests | Unversioned | `src/task.js` | Raindrop service | POST `tasks/{id}/accept` and `tasks/{id}/reject`; no body. The response shape is not defined in this repository (no test, mock, or API definition); whatever body is returned is decrypted when it has `encryptionKeyUrl`. |
|
|
408
|
+
| Task fields | Unversioned | Caller and Raindrop service | `src/helpers/encrypt.helper.js`, `src/helpers/decrypt.helper.js` | `title` and `notes` travel as the ciphertext strings returned by `encryptText`; `encryptionKeyUrl` is the KMS key URI. Other fields (for example `dueDate` in the README) are not read here. |
|
|
409
|
+
| Plugin events | Unversioned | `src/task.js` | Listeners on the plugin | `task:registered`, `task:unregistered`, no payload. |
|
|
410
|
+
|
|
411
|
+
## Caller-visible failure modes
|
|
412
|
+
|
|
413
|
+
| Condition | Signal or result | Caller behavior | Retry or recovery | Evidence |
|
|
414
|
+
| --------- | ---------------- | --------------- | ----------------- | -------- |
|
|
415
|
+
| `register` while the SDK cannot authorize | Rejects per `INV-005`; logged at error level | Authenticate first | Call again after authorization | `src/task.js` |
|
|
416
|
+
| `register` when the device or Mercury rejects | Rejects with the same error; logged with its message | Inspect the dependency error | Call again; `registered` is still false | `src/task.js` |
|
|
417
|
+
| A `task:registered` or `task:unregistered` listener throws | `register` logs the error and rejects with it, and `registered` stays false; `unregister` throws the error synchronously, not as a rejected promise, and `registered` stays true | Keep listeners from throwing, or wrap `unregister` in try | Fix the listener and call again | `src/task.js` |
|
|
418
|
+
| `createTask` or `updateTask` without `data` | Synchronous TypeError reading `encryptionKeyUrl`, not a rejected promise | Pass an object | None | `src/helpers/encrypt.helper.js` |
|
|
419
|
+
| Key creation or encryption fails | Rejects with the encryption plugin's error; no request is sent | Inspect the error | Retry with a fresh object (see Pitfalls) | `src/helpers/encrypt.helper.js` |
|
|
420
|
+
| HTTP failure status (default interceptor set; see Dependencies) | Rejects with the `WebexHttpError` subtype for the final status (`NetworkOrCORSError` for a network failure), after any 401 refresh-and-replay or redirect that webex-core performs, except the two 404 bodies in the next row | Inspect the class or status | None here | `src/task.js`; sibling package http-core, file src/interceptors/http-status.js |
|
|
421
|
+
| HTTP 404 whose body has errorCode 2000002 or code 404100 (default interceptor set) | HttpStatusInterceptor does not reject it; webex-core's redirect interceptor decides. If it finds no redirect target, the promise resolves with that 404 response after webex-core's inbound payload transforms and, for every method except deleteTask, Task's decrypt helper have run on its body; either can reject (see the decryption row). If it finds one, the caller gets the outcome of the redirected request, including the redirect-limit rejection in the next row. The target rules belong to webex-core | Check `response.statusCode` before reading the body | None here | `src/task.js`, `src/helpers/decrypt.helper.js`; sibling package http-core, file src/interceptors/http-status.js; sibling package webex-core, files src/interceptors/redirect.js and src/interceptors/payload-transformer.js |
|
|
422
|
+
| webex-core retry or redirect limit reached (default interceptor set) | Rejects with a plain `Error`, not a `WebexHttpError`: `Failed after N replay attempts` when 401 replays exceed `maxAuthenticationReplays`, or `Maximum redirects exceeded` when redirects exceed their limit | Treat as an authentication or routing problem | None here | Sibling package webex-core, files src/interceptors/auth.js and src/interceptors/redirect.js |
|
|
423
|
+
| The catalog has no `raindrop` service (default set) | Rejects with a plain `Error` whose message is `service-interceptor: 'raindrop' is not a known service` | Treat as an environment problem | None here | Sibling package webex-core, file src/lib/interceptors/service.js |
|
|
424
|
+
| Decryption of a response fails | Rejects with the encryption plugin's error, even though the server already applied the request | Do not assume the write failed | Read the task again | `src/helpers/decrypt.helper.js` |
|
|
425
|
+
|
|
426
|
+
## Pitfalls and constraints
|
|
427
|
+
|
|
428
|
+
- `createTask` and `updateTask` change the caller's object: `title` and `notes` become ciphertext and
|
|
429
|
+
`encryptionKeyUrl` is added. Retrying with the same object encrypts the ciphertext again, because
|
|
430
|
+
the fields are still truthy. Found by code reading; no test.
|
|
431
|
+
- `updateTask` without `encryptionKeyUrl` creates a new unbound key for every call and encrypts the
|
|
432
|
+
update with it. Callers that want the task's existing key must pass its key URL.
|
|
433
|
+
- The created key is unbound: this package never binds it to a resource. Whether the Raindrop
|
|
434
|
+
service does so is not visible in this repository.
|
|
435
|
+
- `register` has no in-flight guard. Two calls made before the first completes both run the chain;
|
|
436
|
+
the device and Mercury plugins deduplicate the in-flight registration and connection, but Task
|
|
437
|
+
calls `listenForEvents` twice and emits `task:registered` twice.
|
|
438
|
+
- On webex logout the device plugin unregisters and Mercury runs its own logout, through their
|
|
439
|
+
`onBeforeLogout` hooks (sibling packages internal-plugin-device and internal-plugin-mercury, file
|
|
440
|
+
src/index.js of each), but `registered` stays `true` (see Client state model). A later `register`
|
|
441
|
+
on the same instance then resolves without registering the device or connecting Mercury.
|
|
442
|
+
- The JSDoc of `listenForEvents` and `stopListeningForEvents` says they register and unregister task
|
|
443
|
+
events through Mercury; both bodies are empty.
|
|
444
|
+
- The unit test named "should call mercury.unregister and device.unregister" asserts that
|
|
445
|
+
`mercury.off` is called zero times; the name does not match the behavior.
|
|
446
|
+
- No method validates `id`; an undefined id sends `tasks/undefined` (`INV-006`).
|
|
447
|
+
- The package-root `process` file is the browser-testing file that the README of the sibling package
|
|
448
|
+
legacy-tools recommends for consumers; many other workspace packages carry the same file. Nothing in `src/` reads it. Do not remove it without running
|
|
449
|
+
`yarn workspace @webex/internal-plugin-task test:browser`.
|
|
450
|
+
|
|
451
|
+
## Module-specific rules
|
|
452
|
+
|
|
453
|
+
- Do: resolve the whole response from a new REST method (`INV-004`) and run the matching decrypt
|
|
454
|
+
helper on any task-bearing body.
|
|
455
|
+
- Do: run `EncryptHelper.encryptTaskRequest` before sending any task body that can carry `title` or
|
|
456
|
+
`notes`.
|
|
457
|
+
- Do: keep the `Task->method#LEVEL` log prefix (see the architecture Observability patterns).
|
|
458
|
+
- Do not: log task `title` or `notes`; they are the encrypted fields.
|
|
459
|
+
- Do not: add a request outside service `raindrop` without updating `INV-006` and the
|
|
460
|
+
`raindrop-tasks-http` contract.
|
|
461
|
+
|
|
462
|
+
## Export stability
|
|
463
|
+
|
|
464
|
+
| Export or entry point | Consumer | Stability | Versioning and deprecation rule | Declaration or API report |
|
|
465
|
+
| --------------------- | -------- | --------- | ------------------------------- | ------------------------- |
|
|
466
|
+
| default Task | Tests and importers | Internal plugin | README states the package does not strictly follow semver | `src/index.js` |
|
|
467
|
+
| Registration as task | Code reading webex.internal.task | Stable | Renaming is breaking | `src/index.js` |
|
|
468
|
+
| Event names | Listeners on the plugin | Stable | Renaming is breaking | `src/constants.js` |
|
|
469
|
+
|
|
470
|
+
No TypeScript declaration or API report exists for this package.
|
|
471
|
+
|
|
472
|
+
## Key design trade-off
|
|
473
|
+
|
|
474
|
+
| Chosen trade-off | Preserved invariant or benefit | Cost or limitation | Decision evidence |
|
|
475
|
+
| ---------------- | ------------------------------ | ------------------ | ----------------- |
|
|
476
|
+
| Field encryption in helpers called by each method, with empty payload-transformer lists at registration | Encryption logic stays inside this package and is simple to test | Each method must call the matching helper itself; the helper comments call this a backup solution and say interceptors are the better place, pending a migration | `src/helpers/encrypt.helper.js`, `src/helpers/decrypt.helper.js`, `src/index.js` |
|
|
477
|
+
| `register` connects Mercury while `listenForEvents` and `stopListeningForEvents` are empty | The registration contract exists for future task events | No task event reaches callers after `register`, yet they pay for device registration and a socket | `src/task.js` |
|
|
478
|
+
|
|
479
|
+
## Verification
|
|
480
|
+
|
|
481
|
+
| Requirement or invariant | Test level | Positive evidence | Negative or boundary evidence | Gap |
|
|
482
|
+
| ------------------------ | ---------- | ----------------- | ----------------------------- | --- |
|
|
483
|
+
| `MOD-003`, `MOD-011` | Unit | `test/unit/spec/task.js` #register() cases | none found | Authorization gate, already registered, failures, concurrent calls |
|
|
484
|
+
| `MOD-004`, `MOD-011` | Unit | `test/unit/spec/task.js` #unregister() cases | none found | Not-registered path |
|
|
485
|
+
| `MOD-005` to `MOD-009`, `INV-006` | Unit | `test/unit/spec/task.js` request-shape cases | none found | HTTP rejection; caller-object change |
|
|
486
|
+
| `MOD-010` | none | none found | none found | No test for accept or reject |
|
|
487
|
+
| `INV-001`, `INV-002` | Unit | `test/unit/spec/helpers/encrypt.helper.js` | none found | Existing-key path, falsy fields, key-creation failure |
|
|
488
|
+
| `INV-003` | Unit | `test/unit/spec/helpers/decrypt.helper.js` | Missing data, missing key URL, missing or empty items | Decryption failure |
|
|
489
|
+
| `INV-004` | Unit | `test/unit/spec/task.js` | none found | — |
|
|
490
|
+
| `INV-005` | none | none found | none found | No test |
|
|
491
|
+
| `MOD-001`, `MOD-002` | none | none found | none found | No registration test |
|
|
492
|
+
| Integration tier | Integration | `test/integration/spec/task.js` passes | none found | The spec tests its own mock and never imports this package |
|
|
493
|
+
|
|
494
|
+
Unit checks run with `yarn workspace @webex/internal-plugin-task build:src` followed by
|
|
495
|
+
`yarn workspace @webex/internal-plugin-task test:unit`. The reason for building first, the test tiers,
|
|
496
|
+
and the first-run build are described in [Getting started](../../docs/getting-started.md).
|