@tinycloud/web-sdk 3.3.0-beta.23 → 3.3.0-beta.25
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/README.md +31 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules/tcw.d.ts +3 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -210,6 +210,21 @@ activation, gated and the worker keep their ceilings. It is #582's own row, take
|
|
|
210
210
|
shrink attempt (see the row's `reason`). The ledger's `tc1428Ratchet` row records it and cannot change
|
|
211
211
|
later; whichever PR lands after it re-measures against the new base and updates its own row.
|
|
212
212
|
|
|
213
|
+
TC-1476 (the debug event recorded when the account registry sync is skipped for want of account access, #600) was
|
|
214
|
+
measured on canonical CI against master `c7a379c5`: master 1,474,761 / 1,403,138 B, the PR on source `bf9349ed`
|
|
215
|
+
1,474,808 / 1,403,191 B, identical in both jobs, i.e. +47 / +53, inside Naomi's +62 B +/-20 ruling. It lowers the
|
|
216
|
+
root ceilings to exactly those bytes. The ledger's `tc1476Ratchet` row records it and cannot change later;
|
|
217
|
+
whichever PR lands after it re-measures against the new base and updates its own row.
|
|
218
|
+
|
|
219
|
+
TC-1475 (automatic retry of node 503 busy and request_timeout responses in `ServiceContext.invokeWithRetry`, which
|
|
220
|
+
re-signs the invocation on every attempt, plus the web-sdk and node-sdk `retryPolicy` config, #599) was measured
|
|
221
|
+
against master `5317cc78` and sits on top of TC-1476's root ceilings and TC-1432's first-import, activation and
|
|
222
|
+
worker ceilings. GitHub run 39292038037 on source `092144080` measured the same bytes in both Node jobs: root
|
|
223
|
+
1,475,166 / 1,403,595 B (+358 / +404 over the merge base; ceilings exactly the measured values), first import 51,925 / 67,140 B (0 / +2),
|
|
224
|
+
activation 23,117 / 24,699 B (+11 / +14) and the kv-storage worker 822,667 B (+623). The
|
|
225
|
+
ledger's `tc1475Ratchet` row records it and cannot change later;
|
|
226
|
+
whichever PR lands after it re-measures against the new base and updates its own row.
|
|
227
|
+
|
|
213
228
|
**Ancestry pins and squash merges.** A policy row records the PR-branch commit it
|
|
214
229
|
was reviewed at, and its introduction check requires that literal commit in the
|
|
215
230
|
PR head. js-sdk uses merge commits, which keep that commit reachable, but squash
|
|
@@ -315,6 +330,22 @@ await storage.delete('messages/welcome');
|
|
|
315
330
|
await storage.deleteAll('user');
|
|
316
331
|
```
|
|
317
332
|
|
|
333
|
+
### Automatic retry
|
|
334
|
+
|
|
335
|
+
When the node answers `503` busy (`NODE_BUSY`) or `503` request timeout (`REQUEST_TIMEOUT`), it
|
|
336
|
+
applied nothing, so the SDK retries on its own: up to 4 attempts in about 12 s, waiting the node's
|
|
337
|
+
`Retry-After` when sent, otherwise exponentially with full jitter (250 ms base, 4 s cap). It stops
|
|
338
|
+
early on abort or the per-request `timeout`, and returns the last typed error once the budget is
|
|
339
|
+
spent. `OUTCOME_UNKNOWN` is never retried. Tune or opt out with `retryPolicy`; `{ maxAttempts: 1 }`
|
|
340
|
+
(or `retryableErrors: []`) disables it. Monitors and probes should disable retries. A successful KV response carries
|
|
341
|
+
`retry: { attempts, backoffMs }`, so latency can be split from backoff. The CLI disables retries
|
|
342
|
+
with `--no-retry` or `TINYCLOUD_RETRY=0`, and its `kv get|put|delete --json` output reports
|
|
343
|
+
`attempts` and `backoffMs`.
|
|
344
|
+
|
|
345
|
+
```typescript
|
|
346
|
+
const tcw = new TinyCloudWeb({ retryPolicy: { maxAttempts: 1 } });
|
|
347
|
+
```
|
|
348
|
+
|
|
318
349
|
## Core Values
|
|
319
350
|
|
|
320
351
|
TinyCloud is built on these fundamental principles:
|