@webex/storage-adapter-spec 3.12.0-next.1 → 3.12.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 +403 -0
- package/.sdd/manifest.json +282 -0
- package/AGENTS.md +225 -0
- package/docs/adr/index.md +27 -0
- package/docs/architecture.md +278 -0
- package/docs/getting-started.md +129 -0
- package/docs/index.md +51 -0
- package/docs/specs/README.md +108 -0
- package/package.json +6 -6
- package/schemas/repo-context.schema.json +796 -0
- package/src/docs/README.md +501 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"repository": {
|
|
4
|
+
"name": "@webex/storage-adapter-spec",
|
|
5
|
+
"purpose": "Defines the behavioral contract every Webex storage adapter must satisfy, as an executable conformance suite that consumer packages run against their own adapter.",
|
|
6
|
+
"category": "cat2-legacy",
|
|
7
|
+
"primary_languages": [
|
|
8
|
+
"javascript"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"topology": "Orchestrator-plus-components",
|
|
12
|
+
"commands": {
|
|
13
|
+
"install": {
|
|
14
|
+
"command": "yarn install",
|
|
15
|
+
"source_file": "workspace:package.json",
|
|
16
|
+
"role": "install"
|
|
17
|
+
},
|
|
18
|
+
"compile": "[NEEDS HUMAN INPUT] -- no standalone compile step exists; transpilation happens inside the build:src command, which also emits the distributable output rather than compiling sources on their own.",
|
|
19
|
+
"unit-test": "[NEEDS HUMAN INPUT] -- this package defines no test:unit script and owns no test file; it ships the shared conformance suite that sibling workspace packages execute. The command that actually runs the suite is contract-verify below. Confirmed intentional by the package owner during bootstrap onboarding.",
|
|
20
|
+
"contract-verify": {
|
|
21
|
+
"command": "yarn workspace @webex/webex-core test:unit --targets storage/storage-adapter.js",
|
|
22
|
+
"source_file": "workspace:packages/@webex/webex-core/package.json",
|
|
23
|
+
"role": "unit-test",
|
|
24
|
+
"verified_at": "2026-10-01T04:15:02Z"
|
|
25
|
+
},
|
|
26
|
+
"build": {
|
|
27
|
+
"command": "yarn workspace @webex/storage-adapter-spec build",
|
|
28
|
+
"source_file": "package.json",
|
|
29
|
+
"role": "package"
|
|
30
|
+
},
|
|
31
|
+
"lint": {
|
|
32
|
+
"command": "yarn workspace @webex/storage-adapter-spec test:style",
|
|
33
|
+
"source_file": "package.json",
|
|
34
|
+
"role": "lint"
|
|
35
|
+
},
|
|
36
|
+
"deploy": {
|
|
37
|
+
"command": "yarn workspace @webex/storage-adapter-spec deploy:npm",
|
|
38
|
+
"source_file": "package.json",
|
|
39
|
+
"role": "deploy"
|
|
40
|
+
},
|
|
41
|
+
"browser-test": {
|
|
42
|
+
"command": "yarn workspace @webex/storage-adapter-spec test:browser",
|
|
43
|
+
"source_file": "package.json",
|
|
44
|
+
"role": "other"
|
|
45
|
+
},
|
|
46
|
+
"test": {
|
|
47
|
+
"command": "yarn workspace @webex/storage-adapter-spec test",
|
|
48
|
+
"source_file": "package.json"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"toolchain": [
|
|
52
|
+
{
|
|
53
|
+
"name": "node",
|
|
54
|
+
"version": ">=18",
|
|
55
|
+
"origin": "repo-config",
|
|
56
|
+
"source_file": "package.json"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"tests": {
|
|
60
|
+
"unit": {
|
|
61
|
+
"command_ref": "contract-verify",
|
|
62
|
+
"dir": "workspace:packages/@webex/webex-core/test/unit/spec/storage",
|
|
63
|
+
"framework": "jest"
|
|
64
|
+
},
|
|
65
|
+
"qa": {
|
|
66
|
+
"location": "Sibling workspace packages in the same repository: @webex/webex-core executes the suite under Node against MemoryStoreAdapter. @webex/storage-adapter-local-storage and @webex/storage-adapter-session-storage define test:unit but wrap their suite calls in skipInNode. @webex/storage-adapter-local-forage also uses skipInNode in its test source but defines only a browser test command, not test:unit.",
|
|
67
|
+
"notes": "This package owns no test file, so its unit tier is satisfied entirely by a sibling package. Verified 2026-10-01: contract-verify executed 21 of 21 cases and passed; the local-storage and session-storage test:unit commands each exited zero with all 21 cases skipped; and local-forage test:unit failed before collection because that script is not defined. The package-level test script is stale: it invokes test:unit and test:integration, neither of which this package.json defines."
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"quality_gates": {
|
|
71
|
+
"code_coverage": {
|
|
72
|
+
"origin": "none",
|
|
73
|
+
"declared_by": "repository owner via bootstrap questionnaire, 2026-09-23: no coverage gate applies to this package"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"coverage_status_definitions": {
|
|
77
|
+
"specced": ">=80% public surface specced, drift <5% \u2014 spec is authoritative",
|
|
78
|
+
"partial": "40-80% specced \u2014 spec is a hint, cross-check code",
|
|
79
|
+
"untracked": "<40% specced \u2014 code is the source of truth"
|
|
80
|
+
},
|
|
81
|
+
"spec_source_policy": {
|
|
82
|
+
"mode": "keep-separate",
|
|
83
|
+
"migrated_source_disposition": "retain",
|
|
84
|
+
"disposition_decided_by": "rsarika@cisco.com",
|
|
85
|
+
"disposition_decided_at": "2026-09-23T06:45:42Z",
|
|
86
|
+
"decided_by": "rsarika@cisco.com",
|
|
87
|
+
"decided_at": "2026-09-23T06:45:42Z",
|
|
88
|
+
"decision_record": "No prior intent or design spec existed in this package. README.md is a repository-owned governance/usage document, preserved untouched and used only as corroborating evidence; it is not routed as spec source material."
|
|
89
|
+
},
|
|
90
|
+
"spec_sources": [],
|
|
91
|
+
"modules": [
|
|
92
|
+
{
|
|
93
|
+
"path": "src/",
|
|
94
|
+
"coverage_status": "Untracked",
|
|
95
|
+
"coverage_evidence": "Field measurement complete 2026-09-23, revised after independent validation: 95%, 21 of 22 mandatory spec fields PRESENT, test strategy WEAK. The canonical spec at src/docs/README.md records 14 requirements and 5 invariants, three of which carry Weak confidence: MOD-010 and MOD-013 have no case that observes them at all, and MOD-014 is partially verified - a case proves the single-key result while namespace-wide scope and the clear argument contract remain unresolved. INV-005 carries the same gap as MOD-010. The suite's declared cases are executed in this repository by the sibling package @webex/webex-core (21 of 21 passing, reverified 2026-10-01); the remaining gap is that nothing pins the number or shape of the declarations, so deleting a case would reduce the contract without failing any run. Status is held at Untracked pending the human promotion decision recorded in the first coverage review, not because coverage is unmeasured.",
|
|
96
|
+
"canonical_spec": "src/docs/README.md",
|
|
97
|
+
"contracts": {
|
|
98
|
+
"provides": [
|
|
99
|
+
"storage-adapter-spec-suite"
|
|
100
|
+
],
|
|
101
|
+
"requires": []
|
|
102
|
+
},
|
|
103
|
+
"last_assessed": "2026-09-23",
|
|
104
|
+
"section_profile": {
|
|
105
|
+
"has_ui": false,
|
|
106
|
+
"crosses_service_boundaries": false,
|
|
107
|
+
"enforces_domain_rules": true,
|
|
108
|
+
"is_concurrent_async": true,
|
|
109
|
+
"owns_persistence": false,
|
|
110
|
+
"returns_caller_errors": true,
|
|
111
|
+
"has_design_tradeoff": true,
|
|
112
|
+
"stateful_transitions": false,
|
|
113
|
+
"exposes_wire_protocol": false,
|
|
114
|
+
"ui_multi_screen": false,
|
|
115
|
+
"large_data_model": false,
|
|
116
|
+
"has_tiers": false,
|
|
117
|
+
"module_specific_conventions": true,
|
|
118
|
+
"published_package": true,
|
|
119
|
+
"embedded_in_host": false,
|
|
120
|
+
"holds_client_state": false,
|
|
121
|
+
"has_submodules": false,
|
|
122
|
+
"has_submodules_computed_by": "scripts/module_tree.py",
|
|
123
|
+
"has_submodules_computed_at": "2026-09-23T06:52:47Z",
|
|
124
|
+
"resolved_by": "claude-code/claude-opus-5[1m] (host metadata; bootstrap questionnaire)",
|
|
125
|
+
"resolved_at": "2026-09-23T06:45:42Z"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"contract_catalog": {
|
|
130
|
+
"index_path": "docs/architecture.md",
|
|
131
|
+
"definitions": {
|
|
132
|
+
"storage-adapter-spec-suite": {
|
|
133
|
+
"kind": "sdk",
|
|
134
|
+
"publication": "published",
|
|
135
|
+
"source_kind": "repository-path",
|
|
136
|
+
"source": "package.json",
|
|
137
|
+
"summary": "The package's single published surface: the default export runAbstractStorageAdapterSpec, invoked by consumer packages inside their own test declarations, together with the storage adapter interface it requires of its argument - bind(namespace, options) resolving to a handle owning put, get, del, and clear. package.json is the ecosystem-native manifest declaring the published entry points. The interface half has no machine-readable artifact of its own, so src/index.js remains its authoritative definition and the owning module spec specifies it in full."
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"spec_policy": {
|
|
142
|
+
"require_what_and_why": true,
|
|
143
|
+
"require_provenance": true,
|
|
144
|
+
"protected_specs": [
|
|
145
|
+
"src/docs/README.md"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
"validation": {
|
|
149
|
+
"generator_runtime": "claude-code",
|
|
150
|
+
"generator_model": "claude-opus-5[1m]",
|
|
151
|
+
"generator_runtime_source": "host-metadata",
|
|
152
|
+
"validator_runtime": "codex",
|
|
153
|
+
"validator_model": "gpt-5",
|
|
154
|
+
"validator_runtime_source": "host-metadata",
|
|
155
|
+
"runtime_fallback_tier": "different-runtime",
|
|
156
|
+
"minimum_independence": "different-runtime",
|
|
157
|
+
"blocking_severities": [
|
|
158
|
+
"Blocking"
|
|
159
|
+
],
|
|
160
|
+
"source_commit": "bc61c78ba5",
|
|
161
|
+
"base_ref": "next",
|
|
162
|
+
"head_ref": "next"
|
|
163
|
+
},
|
|
164
|
+
"layout": {
|
|
165
|
+
"sdd_root": ".sdd",
|
|
166
|
+
"docs_root": "docs",
|
|
167
|
+
"agent_entry_path": "AGENTS.md",
|
|
168
|
+
"standing_docs_root": "docs",
|
|
169
|
+
"spec_index_path": "docs/specs/README.md",
|
|
170
|
+
"module_docs_strategy": "source-local",
|
|
171
|
+
"module_docs_relative_path": "docs/README.md",
|
|
172
|
+
"module_docs_decision": {
|
|
173
|
+
"basis": "repo-standards-default",
|
|
174
|
+
"reason": "The default source-local route was confirmed with the owner because src/ is the transpile input for the published output and the lint command globs all of src/. Both were checked: the build processes only js/ts sources, and the resolved eslint configuration ignores markdown, so the default route is safe and was kept.",
|
|
175
|
+
"decided_by": "rsarika@cisco.com (bootstrap questionnaire)",
|
|
176
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
177
|
+
},
|
|
178
|
+
"repo_context_decision": {
|
|
179
|
+
"path": ".repo-context.json",
|
|
180
|
+
"schema_path": "schemas/repo-context.schema.json",
|
|
181
|
+
"action": "create",
|
|
182
|
+
"schema_action": "create",
|
|
183
|
+
"reason": "Neither the repository operational-context manifest nor its schema existed at its fixed path in this package; both were created from verified repository evidence.",
|
|
184
|
+
"decided_by": "claude-code (bootstrap questionnaire)",
|
|
185
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
186
|
+
},
|
|
187
|
+
"artifact_decisions": [
|
|
188
|
+
{
|
|
189
|
+
"path": "docs/service.md",
|
|
190
|
+
"action": "omit",
|
|
191
|
+
"reason": "This package is a library published to npm, not a deployable service. package.json declares no container, deployment manifest, or start command.",
|
|
192
|
+
"decided_by": "claude-code (code evidence)",
|
|
193
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"path": "mkdocs.yml",
|
|
197
|
+
"action": "omit",
|
|
198
|
+
"reason": "No docs-site publishing workflow exists in this package, and the owner chose to leave documentation-site ownership at the monorepo root.",
|
|
199
|
+
"decided_by": "rsarika@cisco.com (bootstrap questionnaire)",
|
|
200
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"path": "api-specs/openapi.yaml",
|
|
204
|
+
"action": "omit",
|
|
205
|
+
"reason": "The package exposes no HTTP surface. Its published contract is an npm/SDK surface whose ecosystem-native authoritative source is src/index.js.",
|
|
206
|
+
"decided_by": "claude-code (code evidence)",
|
|
207
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"path": "SECURITY.md",
|
|
211
|
+
"action": "omit",
|
|
212
|
+
"reason": "Security policy is owned at the monorepo root; a package-local copy would duplicate or contradict it.",
|
|
213
|
+
"decided_by": "rsarika@cisco.com (bootstrap questionnaire)",
|
|
214
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"path": "CONTRIBUTING.md",
|
|
218
|
+
"action": "omit",
|
|
219
|
+
"reason": "Contribution instructions are owned at the monorepo root; a package-local copy would duplicate or contradict them.",
|
|
220
|
+
"decided_by": "rsarika@cisco.com (bootstrap questionnaire)",
|
|
221
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"path": "CHANGELOG.md",
|
|
225
|
+
"action": "omit",
|
|
226
|
+
"reason": "The workspace generates its changelog through its release tooling at the monorepo root; a package-local changelog would not be maintained by it.",
|
|
227
|
+
"decided_by": "rsarika@cisco.com (bootstrap questionnaire)",
|
|
228
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"path": "CTO_CHECKLIST.yml",
|
|
232
|
+
"action": "omit",
|
|
233
|
+
"reason": "The CTO readiness checklist is selected only for a deployable service; this package is a library.",
|
|
234
|
+
"decided_by": "claude-code (code evidence)",
|
|
235
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"path": "schemas/cto-checklist.schema.json",
|
|
239
|
+
"action": "omit",
|
|
240
|
+
"reason": "Omitted together with CTO_CHECKLIST.yml, which the contract requires to be selected as a pair.",
|
|
241
|
+
"decided_by": "claude-code (code evidence)",
|
|
242
|
+
"decided_at": "2026-09-23T06:45:42Z"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"template_roots": {
|
|
246
|
+
"canonical": ".sdd/templates/repo-standards"
|
|
247
|
+
},
|
|
248
|
+
"repo_skills_root": ".sdd/skills",
|
|
249
|
+
"contract_index_path": "docs/architecture.md"
|
|
250
|
+
},
|
|
251
|
+
"substrate": {
|
|
252
|
+
"source": "WebexTools/repo-standards@d89a7fe59126ae3ad9bac9ca352aa7f12b4c85dc",
|
|
253
|
+
"consumed": [
|
|
254
|
+
"package-local eslint configuration extending the workspace lint config",
|
|
255
|
+
"package-local babel configuration re-exported from the workspace build config",
|
|
256
|
+
"package-local jest configuration re-exported from the workspace test config",
|
|
257
|
+
"the existing package README as repository-owned governance evidence"
|
|
258
|
+
],
|
|
259
|
+
"compliance_tier": "baseline"
|
|
260
|
+
},
|
|
261
|
+
"section_profiles": {
|
|
262
|
+
"repo": {
|
|
263
|
+
"owns_datastore": false,
|
|
264
|
+
"holds_client_state": false,
|
|
265
|
+
"components_interact": false,
|
|
266
|
+
"domain_data_across_components": false,
|
|
267
|
+
"caches_data": false,
|
|
268
|
+
"observability_convention": false,
|
|
269
|
+
"deploys_to_infra": false,
|
|
270
|
+
"shared_base_libs": true,
|
|
271
|
+
"is_monorepo": true,
|
|
272
|
+
"multi_platform": true,
|
|
273
|
+
"published_package": true,
|
|
274
|
+
"embedded_in_host": false,
|
|
275
|
+
"cross_repo_deps_material": false,
|
|
276
|
+
"security_arch_warranted": false,
|
|
277
|
+
"exposes_commands_or_artifacts": true
|
|
278
|
+
},
|
|
279
|
+
"resolved_by": "claude-code/claude-opus-5[1m] (host metadata; bootstrap questionnaire)",
|
|
280
|
+
"resolved_at": "2026-09-23T06:45:42Z"
|
|
281
|
+
}
|
|
282
|
+
}
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: agent-entry
|
|
3
|
+
generated_from: agents@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rsarika@cisco.com
|
|
6
|
+
updated_at: 2026-10-01T04:15:02Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# AI Agent Instructions
|
|
11
|
+
|
|
12
|
+
Instructions for AI coding assistants working in `@webex/storage-adapter-spec`.
|
|
13
|
+
|
|
14
|
+
This package is the shared, executable conformance suite for Webex storage adapters. It holds no test
|
|
15
|
+
file of its own: it *is* the test suite, exported as a function that sibling workspace packages invoke
|
|
16
|
+
inside their own test runs. Changing anything here changes the contract every storage adapter must
|
|
17
|
+
satisfy.
|
|
18
|
+
|
|
19
|
+
## Working Method
|
|
20
|
+
|
|
21
|
+
- Read the relevant repository files before editing. Do not edit blind.
|
|
22
|
+
- Understand the task and affected surfaces before writing code.
|
|
23
|
+
- Prefer focused edits over rewriting whole files.
|
|
24
|
+
- Do not invent commands, paths, exports, or behavior. Verify them from repository-local source.
|
|
25
|
+
- Test or validate before declaring done.
|
|
26
|
+
- Keep output concise. If something is uncertain, say so instead of guessing.
|
|
27
|
+
|
|
28
|
+
## Canonical Repository Documentation
|
|
29
|
+
|
|
30
|
+
Before changing code or documentation, start with:
|
|
31
|
+
|
|
32
|
+
- `docs/index.md` for repository documentation navigation;
|
|
33
|
+
- `docs/architecture.md` for repository boundaries and interactions;
|
|
34
|
+
- `docs/specs/README.md` for the manifest-backed module and contract registry;
|
|
35
|
+
- the affected module's manifest-routed `<module-path>/docs/README.md`; and
|
|
36
|
+
- `docs/adr/index.md` plus applicable concrete ADRs for durable decisions.
|
|
37
|
+
|
|
38
|
+
Follow `.sdd/manifest.json` for each contract's publication state and canonical source. Published
|
|
39
|
+
repository-owned HTTP APIs use their linked OpenAPI document; internal HTTP surfaces may link route
|
|
40
|
+
code, and published SDKs use their ecosystem-native API artifact. The manifest remains authoritative
|
|
41
|
+
for canonical paths and artifact decisions.
|
|
42
|
+
|
|
43
|
+
## 1. Commands (Run First)
|
|
44
|
+
|
|
45
|
+
Use only documented commands. Do not invent alternatives when a command is missing.
|
|
46
|
+
|
|
47
|
+
| Task | Command |
|
|
48
|
+
| ---------------------- | ------------------- |
|
|
49
|
+
| Install dependencies | `yarn install` (run from the workspace root) |
|
|
50
|
+
| Start dev environment | Not applicable — this package has no runnable process; it is a library consumed by other packages' test suites. |
|
|
51
|
+
| Run tests | `yarn workspace @webex/webex-core test:unit --targets storage/storage-adapter.js` — runs this package's suite; verified 21/21 on 2026-10-01 |
|
|
52
|
+
| Run linters | `yarn workspace @webex/storage-adapter-spec test:style` |
|
|
53
|
+
| Build/release artifact | `yarn workspace @webex/storage-adapter-spec build` |
|
|
54
|
+
| Format code | Not applicable — no dedicated format script; `prettier` is a devDependency used through lint tooling. |
|
|
55
|
+
|
|
56
|
+
If a required command is unknown, stop and ask for the exact command.
|
|
57
|
+
|
|
58
|
+
Three commands must not be used to verify a change:
|
|
59
|
+
|
|
60
|
+
- `test` invokes `test:unit` and `test:integration`, neither of which this package defines. It fails
|
|
61
|
+
after the lint step. This is a known stale aggregate script, not a missing dependency.
|
|
62
|
+
- `test:browser` is defined, but there is no test file in this package for a browser runner to
|
|
63
|
+
collect.
|
|
64
|
+
- `yarn workspace @webex/storage-adapter-local-storage test:unit` and
|
|
65
|
+
`yarn workspace @webex/storage-adapter-session-storage test:unit` **look** like they verify the
|
|
66
|
+
suite and exit zero, but both consumers wrap their calls in a Node skip: measured 2026-10-01, each
|
|
67
|
+
reported 21 tests and skipped all 21.
|
|
68
|
+
- `yarn workspace @webex/storage-adapter-local-forage test:unit` cannot run because that package has
|
|
69
|
+
no `test:unit` script. Measured 2026-10-01, Yarn stopped before collection. Its test source also
|
|
70
|
+
uses `skipInNode`, so its defined conformance route is browser-only.
|
|
71
|
+
|
|
72
|
+
Do not treat any of those three packages as Node verification evidence.
|
|
73
|
+
|
|
74
|
+
## 2. Agent Persona and Scope
|
|
75
|
+
|
|
76
|
+
You are the Webex JS SDK storage engineering assistant for `@webex/storage-adapter-spec`.
|
|
77
|
+
|
|
78
|
+
Primary outcomes:
|
|
79
|
+
|
|
80
|
+
- Deliver production-safe changes with passing tests.
|
|
81
|
+
- Preserve existing behavior unless a change request explicitly requires a behavior change.
|
|
82
|
+
- Keep docs and configuration aligned with code changes.
|
|
83
|
+
|
|
84
|
+
Definition of done:
|
|
85
|
+
|
|
86
|
+
1. Requested change is implemented.
|
|
87
|
+
2. Relevant tests/lint/build checks pass locally.
|
|
88
|
+
3. Updated docs/config cover new behavior.
|
|
89
|
+
4. PR summary includes risks and rollback notes.
|
|
90
|
+
|
|
91
|
+
For this package, step 2 means running the sibling `@webex/webex-core` storage test, because this
|
|
92
|
+
package holds no test file of its own.
|
|
93
|
+
|
|
94
|
+
## 3. Repository Knowledge
|
|
95
|
+
|
|
96
|
+
### Tech Stack
|
|
97
|
+
|
|
98
|
+
Document concrete versions so assistants choose compatible APIs.
|
|
99
|
+
|
|
100
|
+
| Area | Tooling | Version |
|
|
101
|
+
| ---------------- | ----------- | ----------- |
|
|
102
|
+
| Language runtime | Node.js | `>=18` (declared in `package.json` `engines`) |
|
|
103
|
+
| Build tool | `webex-legacy-tools build` via `@webex/legacy-tools`, configured by `babel.config.js` | `workspace:*` |
|
|
104
|
+
| Test framework | None in this package. The suite is written against Jest globals (`describe`, `it`, `beforeAll`) and asserts through `@webex/test-helper-chai`. | `workspace:*` |
|
|
105
|
+
| Lint/format | ESLint via `@webex/eslint-config-legacy`, with `prettier` | `eslint ^8.24.0`, `prettier ^2.7.1` |
|
|
106
|
+
|
|
107
|
+
### Project Map
|
|
108
|
+
|
|
109
|
+
- `src/index.js`: the entire module — the default-exported conformance suite. This is the contract.
|
|
110
|
+
- `package.json`: the published surface (`main`, `devMain`), commands, dependencies, and the browser
|
|
111
|
+
build transform.
|
|
112
|
+
- `process`: declares `{browser: true}`, marking this package as browser-targeted.
|
|
113
|
+
- `.eslintrc.js`, `babel.config.js`, `jest.config.js`: package-local toolchain configuration; each is
|
|
114
|
+
a thin re-export of a workspace configuration package.
|
|
115
|
+
- `dist/`: build output produced by `build:src`. Never edit it; it is git-ignored and regenerated.
|
|
116
|
+
|
|
117
|
+
### Critical Constraints
|
|
118
|
+
|
|
119
|
+
- **Every assertion in `src/index.js` is a contract clause.** Adding, removing, or loosening one
|
|
120
|
+
changes what every Webex storage adapter must implement. Four sibling packages consume this suite,
|
|
121
|
+
so a change here can break adapters that this package's own commands will never exercise.
|
|
122
|
+
- **Only one consumer verifies the contract under Node.** `@webex/webex-core` runs it; the three
|
|
123
|
+
browser-backed adapters skip under Node and only exercise it in a browser runner.
|
|
124
|
+
- **The suite injects test declarations into the caller's runner.** It calls `describe`, `it`, and
|
|
125
|
+
the Jest-specific `beforeAll` when invoked, rather than exporting assertions the caller composes.
|
|
126
|
+
Consumers must therefore run it under a runner that provides those globals.
|
|
127
|
+
- **Backward compatibility of the default export.** `runAbstractStorageAdapterSpec(adapter)` is
|
|
128
|
+
published to npm; its parameter shape and invocation style are a public API.
|
|
129
|
+
|
|
130
|
+
## 4. Testing Workflow
|
|
131
|
+
|
|
132
|
+
Run checks in this order:
|
|
133
|
+
|
|
134
|
+
1. `yarn workspace @webex/storage-adapter-spec test:style` — the only verification command this
|
|
135
|
+
package owns.
|
|
136
|
+
2. `yarn workspace @webex/storage-adapter-spec build` — confirms the source still transpiles.
|
|
137
|
+
3. `yarn workspace @webex/webex-core test:unit --targets storage/storage-adapter.js` — the only Node
|
|
138
|
+
route that actually executes the suite. Confirm the output says 21 passed, not 21 skipped.
|
|
139
|
+
|
|
140
|
+
Testing rules:
|
|
141
|
+
|
|
142
|
+
- Add or update tests for every behavior change.
|
|
143
|
+
- Cover failure paths and edge cases, not only happy paths.
|
|
144
|
+
- Do not remove tests to make CI pass.
|
|
145
|
+
|
|
146
|
+
In this package, "add a test" means adding a case to the exported suite, which adds a requirement to
|
|
147
|
+
every adapter. Confirm that all consumers can satisfy a new case before adding it — and check the run
|
|
148
|
+
output, since three of the four consumers skip silently under Node.
|
|
149
|
+
|
|
150
|
+
## 5. Code Style and Patterns
|
|
151
|
+
|
|
152
|
+
Coding expectations:
|
|
153
|
+
|
|
154
|
+
- Follow repository style rules and static analysis output.
|
|
155
|
+
- Prefer small, composable functions over large procedural blocks.
|
|
156
|
+
- Make error handling explicit at system boundaries.
|
|
157
|
+
- Keep public interfaces stable unless a breaking change is requested.
|
|
158
|
+
- Before adding a literal path, filename, command, workflow identifier, status,
|
|
159
|
+
or other policy value, search the repository for exact and semantically
|
|
160
|
+
equivalent uses. When repeated production values represent one shared
|
|
161
|
+
contract, move them to the narrowest owning shared module or catalog as one
|
|
162
|
+
canonical named constant, enum, or type and update consumers. Keep incidental
|
|
163
|
+
similarities, one-off implementation details, and independent test fixtures
|
|
164
|
+
local.
|
|
165
|
+
- Do not import a default, named, object, or namespace binding and immediately
|
|
166
|
+
re-export it. Consumers should import from the owning module; package barrels
|
|
167
|
+
should use direct named re-exports.
|
|
168
|
+
- Do not write inline runtime `typeof` checks outside descriptively named guard
|
|
169
|
+
implementations. Import and reuse the owning guard instead; TypeScript
|
|
170
|
+
type-position `typeof` queries remain allowed.
|
|
171
|
+
|
|
172
|
+
Pattern example:
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
Preferred:
|
|
176
|
+
- Validate external input close to the boundary.
|
|
177
|
+
- Return typed/structured results.
|
|
178
|
+
- Include actionable error messages.
|
|
179
|
+
|
|
180
|
+
Avoid:
|
|
181
|
+
- Passing unvalidated payloads deep into the system.
|
|
182
|
+
- Swallowing exceptions or returning ambiguous null values.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## 6. Git Workflow
|
|
186
|
+
|
|
187
|
+
- Branch naming: `[feature|fix|chore]/[short-description]`
|
|
188
|
+
- Commit format: conventional commits (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`)
|
|
189
|
+
- Keep commits focused and reversible.
|
|
190
|
+
- Rebase on the target branch before opening PR.
|
|
191
|
+
|
|
192
|
+
PR checklist:
|
|
193
|
+
|
|
194
|
+
- What changed and why.
|
|
195
|
+
- Tests run and results.
|
|
196
|
+
- Risk/impact areas.
|
|
197
|
+
- Rollback approach.
|
|
198
|
+
|
|
199
|
+
State in the PR which consumer packages were run and how many cases actually executed, since this
|
|
200
|
+
package's own commands cannot execute the suite and three consumers skip under Node.
|
|
201
|
+
|
|
202
|
+
## 7. Boundaries and Escalation
|
|
203
|
+
|
|
204
|
+
### Always
|
|
205
|
+
|
|
206
|
+
- Prefer existing patterns over introducing new architecture.
|
|
207
|
+
- Keep changes minimal for the requested scope.
|
|
208
|
+
- Call out assumptions and unknowns explicitly.
|
|
209
|
+
|
|
210
|
+
### Ask First
|
|
211
|
+
|
|
212
|
+
- Adding new dependencies or external services.
|
|
213
|
+
- Large refactors or schema migrations.
|
|
214
|
+
- Security-sensitive changes (auth, encryption, secrets handling).
|
|
215
|
+
- Any destructive data or infrastructure operation.
|
|
216
|
+
- Adding, removing, or weakening any assertion in `src/index.js`, because it changes the contract for
|
|
217
|
+
every consuming adapter.
|
|
218
|
+
|
|
219
|
+
### Never
|
|
220
|
+
|
|
221
|
+
- Commit secrets, keys, or credentials.
|
|
222
|
+
- Bypass required checks by disabling tests or linters.
|
|
223
|
+
- Rewrite history on shared branches.
|
|
224
|
+
- Change unrelated files "while here" without clear need.
|
|
225
|
+
- Edit `dist/`; it is generated from `src/` and git-ignored.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- sdd-generated-metadata
|
|
2
|
+
doc_kind: standing-doc
|
|
3
|
+
generated_from: adr-index@0.3.0
|
|
4
|
+
generated_by: claude-code
|
|
5
|
+
approved_by: rsarika@cisco.com
|
|
6
|
+
updated_at: 2026-10-01T04:15:02Z
|
|
7
|
+
validation_status: pass-with-warnings
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Architectural decision records
|
|
11
|
+
|
|
12
|
+
Numbered, append-only records of structural decisions affecting this repository
|
|
13
|
+
and its documentation. Add a concrete ADR (for example, `0042-cache-policy.md`) when a decision
|
|
14
|
+
is non-obvious, hard to reverse, or worth explaining to a future contributor.
|
|
15
|
+
Do not edit an accepted decision in place when its outcome changes; supersede it
|
|
16
|
+
with a new ADR and link both records.
|
|
17
|
+
|
|
18
|
+
## Index
|
|
19
|
+
|
|
20
|
+
No architectural decisions are registered yet. Replace this sentence with links to concrete,
|
|
21
|
+
accepted ADRs as decisions are recorded.
|
|
22
|
+
|
|
23
|
+
Add new entries as ADRs are accepted. Keep this list in numeric order.
|
|
24
|
+
|
|
25
|
+
Each ADR should state its context, decision, alternatives, consequences, and
|
|
26
|
+
the condition that would cause the team to revisit it. Record the deciders,
|
|
27
|
+
any superseded decision, and the constraint future changes must preserve.
|