hikoutei 0.8.56 → 0.8.57
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/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts +20 -9
- package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js +15 -8
- package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.js.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/constants.d.ts +24 -5
- package/dist/adapter/sheets/providers/google-sheets-api/constants.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/constants.js +24 -5
- package/dist/adapter/sheets/providers/google-sheets-api/constants.js.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/errors.d.ts +7 -1
- package/dist/adapter/sheets/providers/google-sheets-api/errors.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/errors.js +19 -1
- package/dist/adapter/sheets/providers/google-sheets-api/errors.js.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/index.d.ts +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/index.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/index.js +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/index.js.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.d.ts +12 -4
- package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.js +38 -14
- package/dist/adapter/sheets/providers/google-sheets-api/operations/shared.js.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts +13 -0
- package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js +51 -3
- package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.d.ts +9 -4
- package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.d.ts.map +1 -1
- package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.js +9 -4
- package/dist/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.js.map +1 -1
- package/dist/application/sync/sheetsContract/transportOutcome.d.ts +32 -5
- package/dist/application/sync/sheetsContract/transportOutcome.d.ts.map +1 -1
- package/dist/application/sync/sheetsContract/transportOutcome.js +99 -6
- package/dist/application/sync/sheetsContract/transportOutcome.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Full sync provider over the Google Sheets REST API.
|
|
3
3
|
*
|
|
4
4
|
* Implements every provider capability the sync runtime needs with ONE
|
|
5
|
-
* provider instance (one transport, one
|
|
5
|
+
* provider instance (one transport, one shared request-start limiter, one
|
|
6
6
|
* telemetry sink): the outbound effect worker (fast append, applyEffects,
|
|
7
7
|
* postcondition recovery), projection provisioning, values-only table reads,
|
|
8
8
|
* row-anchor assignment, and full metadata snapshots. The service-account
|
|
@@ -20,8 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Request pacing is per transport call: every `getSpreadsheet` (preflight
|
|
22
22
|
* enumeration, preflight data, observation reads, post-reads, table reads,
|
|
23
|
-
* provisioning reads) and every `batchUpdate` acquires
|
|
24
|
-
* emits one redacted telemetry event.
|
|
23
|
+
* provisioning reads) and every `batchUpdate` acquires the ONE shared
|
|
24
|
+
* request-start limiter and emits one redacted telemetry event. Reads and
|
|
25
|
+
* writes serialize against each other, so a combined read+write burst can
|
|
26
|
+
* never outpace the interval. Admission is BOUNDED: a request whose slot
|
|
27
|
+
* lies more than one interval out is refused before any SDK call with the
|
|
28
|
+
* stable delivery-uncertain `google_sheets_api_request_start_refused`
|
|
29
|
+
* error, so an arbitrarily long limiter queue can never make a request
|
|
30
|
+
* wait past its effect lease — the durable worker requeues instead.
|
|
25
31
|
*/
|
|
26
32
|
import type { ApplySyncEffectsRequest, ApplySyncEffectsResult, EnsureSyncRowAnchorsRequest, EnsureSyncRowAnchorsResult, FastAppendRowsRequest, FastAppendRowsResult, ReadSyncEffectPostconditionsRequest, ReadSyncSnapshotRequest, ReadSyncTableRowsRequest, SyncEffectPostcondition, SyncEffectPostconditionResult, SyncEffectWorkerProvider, SyncObservedSnapshot, SyncSheetsObservationBatchProvider, SyncSheetsObservationProvider, SyncSheetsSnapshot, SyncSheetsTableReader, SyncProjectionEffect, SyncTableRowsResult } from "../../../../application/sync/sheetsContract/syncSheets.js";
|
|
27
33
|
import type { RegisteredSyncProjectionDefinition, SyncSheetsProvisioner, SyncSheetsProvisionRoute } from "../../../../application/sync/sheetsContract/sheetsProvisioning.js";
|
|
@@ -50,7 +56,11 @@ export interface GoogleSheetsApiProviderOptions {
|
|
|
50
56
|
* lease.
|
|
51
57
|
*/
|
|
52
58
|
readonly readTimeoutMs?: number;
|
|
53
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Minimum interval between request starts; defaults to 2,500 ms. Also the
|
|
61
|
+
* admission bound: a request whose slot lies more than one interval out is
|
|
62
|
+
* refused before any SDK call (delivery-uncertain, requeued durably).
|
|
63
|
+
*/
|
|
54
64
|
readonly rateLimitIntervalMs?: number;
|
|
55
65
|
/** Serialized batchUpdate byte budget; defaults to ~2 MB. */
|
|
56
66
|
readonly maxBatchBytes?: number;
|
|
@@ -70,11 +80,12 @@ export interface GoogleSheetsApiSyncProviderOptions extends GoogleSheetsApiProvi
|
|
|
70
80
|
* Full sync provider over the Sheets REST API: outbound effects, provisioning,
|
|
71
81
|
* table reads, anchors, and snapshots behind the shared provider contracts.
|
|
72
82
|
*
|
|
73
|
-
* All reads
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
83
|
+
* All reads and writes share ONE request-start limiter, so combined
|
|
84
|
+
* read+write starts are serialized (at most one transport call per
|
|
85
|
+
* interval); the worker-level append throttle stays enabled on top in
|
|
86
|
+
* service mode via the bootstrap's bulk worker options. Provisioning runs
|
|
87
|
+
* at startup before the worker, and observation anchors are the only
|
|
88
|
+
* metadata mutations outside effect batches.
|
|
78
89
|
*
|
|
79
90
|
* The class is a thin facade: every method body lives in an operation module
|
|
80
91
|
* under `operations/` and receives the immutable wiring from `this.deps`.
|
package/dist/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleSheetsApiSyncProvider.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GoogleSheetsApiSyncProvider.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,mCAAmC,EACnC,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACvB,6BAA6B,EAE7B,wBAAwB,EACxB,oBAAoB,EACpB,kCAAkC,EAClC,6BAA6B,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,2DAA2D,CAAC;AAKnE,OAAO,KAAK,EACV,kCAAkC,EAClC,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,mEAAmE,CAAC;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAKlE,OAAO,EAEL,KAAK,wBA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S,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,EAAE,CAAC;QAC7E,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;QAC1C,QAAQ,CAAC,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;KAChD,CAAC;IAQF,sEAAsE;IACzD,QAAQ,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAItF;;;;OAIG;IACU,aAAa,CACxB,QAAQ,EAAE,SAAS,wBAAwB,EAAE,GAC5C,OAAO,CAAC,SAAS,mBAAmB,EAAE,CAAC;IAQ1C;;;;;OAKG;IACU,gBAAgB,CAC3B,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,0BAA0B,CAAC;IAItC,gEAAgE;IACnD,YAAY,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIxF,0EAA0E;IAC7D,eAAe,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAI7F;;;;;OAKG;IACU,gBAAgB,CAC3B,QAAQ,EAAE,SAAS,uBAAuB,EAAE,GAC3C,OAAO,CAAC,SAAS,oBAAoB,EAAE,CAAC;CAG5C"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Full sync provider over the Google Sheets REST API.
|
|
3
3
|
*
|
|
4
4
|
* Implements every provider capability the sync runtime needs with ONE
|
|
5
|
-
* provider instance (one transport, one
|
|
5
|
+
* provider instance (one transport, one shared request-start limiter, one
|
|
6
6
|
* telemetry sink): the outbound effect worker (fast append, applyEffects,
|
|
7
7
|
* postcondition recovery), projection provisioning, values-only table reads,
|
|
8
8
|
* row-anchor assignment, and full metadata snapshots. The service-account
|
|
@@ -20,8 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Request pacing is per transport call: every `getSpreadsheet` (preflight
|
|
22
22
|
* enumeration, preflight data, observation reads, post-reads, table reads,
|
|
23
|
-
* provisioning reads) and every `batchUpdate` acquires
|
|
24
|
-
* emits one redacted telemetry event.
|
|
23
|
+
* provisioning reads) and every `batchUpdate` acquires the ONE shared
|
|
24
|
+
* request-start limiter and emits one redacted telemetry event. Reads and
|
|
25
|
+
* writes serialize against each other, so a combined read+write burst can
|
|
26
|
+
* never outpace the interval. Admission is BOUNDED: a request whose slot
|
|
27
|
+
* lies more than one interval out is refused before any SDK call with the
|
|
28
|
+
* stable delivery-uncertain `google_sheets_api_request_start_refused`
|
|
29
|
+
* error, so an arbitrarily long limiter queue can never make a request
|
|
30
|
+
* wait past its effect lease — the durable worker requeues instead.
|
|
25
31
|
*/
|
|
26
32
|
import { SYNC_SHEETS_ERROR_CODES, SyncSheetsContractError, } from "../../../../application/sync/sheetsContract/errors.js";
|
|
27
33
|
import { GOOGLE_SHEETS_API_DEFAULTS, } from "./constants.js";
|
|
@@ -37,11 +43,12 @@ import { provisionRegistry, } from "./operations/provisioning.js";
|
|
|
37
43
|
* Full sync provider over the Sheets REST API: outbound effects, provisioning,
|
|
38
44
|
* table reads, anchors, and snapshots behind the shared provider contracts.
|
|
39
45
|
*
|
|
40
|
-
* All reads
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
46
|
+
* All reads and writes share ONE request-start limiter, so combined
|
|
47
|
+
* read+write starts are serialized (at most one transport call per
|
|
48
|
+
* interval); the worker-level append throttle stays enabled on top in
|
|
49
|
+
* service mode via the bootstrap's bulk worker options. Provisioning runs
|
|
50
|
+
* at startup before the worker, and observation anchors are the only
|
|
51
|
+
* metadata mutations outside effect batches.
|
|
45
52
|
*
|
|
46
53
|
* The class is a thin facade: every method body lives in an operation module
|
|
47
54
|
* under `operations/` and receives the immutable wiring from `this.deps`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleSheetsApiSyncProvider.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GoogleSheetsApiSyncProvider.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiSyncProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAwBH,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,uDAAuD,CAAC;AAO/D,OAAO,EACL,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,4BAA4B,GAE7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,OAAO,EACL,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,aAAa,EACb,YAAY,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AAgDtC;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,2BAA2B;IAOrB,aAAa,CAAS;IACtB,WAAW,CAAgD;IAC3D,SAAS,CAA2B;IACpC,kBAAkB,CAAS;IAC3B,aAAa,CAAS;IACtB,aAAa,CAAS;IACtB,cAAc,CAAsB;IACrD,yEAAyE;IACxD,qBAAqB,CAAS;IAC9B,GAAG,CAAe;IAClB,SAAS,CAA6D;IACtE,IAAI,CAA8B;IAEnD,YAAmB,OAA2C;QAC5D,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACrC,MAAM,IAAI,uBAAuB,CAC/B,uBAAuB,CAAC,gCAAgC,EACxD,k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,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;IAED,gEAAgE;IACzD,KAAK,CAAC,YAAY,CAAC,OAAgC;QACxD,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED,0EAA0E;IACnE,KAAK,CAAC,eAAe,CAAC,OAAgC;QAC3D,OAAO,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,gBAAgB,CAC3B,QAA4C;QAE5C,OAAO,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -30,12 +30,31 @@ export declare const GOOGLE_SHEETS_API_DEFAULTS: {
|
|
|
30
30
|
/** Upper bound for read timeouts; reads must stay well under the lease. */
|
|
31
31
|
readonly MAX_READ_TIMEOUT_MS: 60000;
|
|
32
32
|
/**
|
|
33
|
-
* Minimum interval between request starts of
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* Minimum interval between request starts of the WHOLE provider: reads and
|
|
34
|
+
* writes share ONE request-start limiter, so at most one Sheets API
|
|
35
|
+
* request can start per interval regardless of class. Google Sheets quota
|
|
36
|
+
* is enforced per 100-second windows; the 2,500 ms default serializes
|
|
37
|
+
* combined read+write starts to about 40 starts per 100 s, leaving
|
|
38
|
+
* headroom inside the default per-user/per-project 100-second quotas for
|
|
39
|
+
* the observation and provisioning reads that run beside the worker. The
|
|
40
|
+
* exact quota stays provider and environment dependent, so operators can
|
|
41
|
+
* override the interval through the internal sync env key
|
|
42
|
+
* (HIKOUTEI_SYNC_RATE_LIMIT_INTERVAL_MS) or the internal provider option;
|
|
43
|
+
* the safe default is intentionally conservative. The interval is part of
|
|
44
|
+
* the effect-lease headroom contract: a worst-case dispatch (two
|
|
45
|
+
* preflight/postcondition reads plus one write, each paced and timed out,
|
|
46
|
+
* with up to one full interval of first-slot wait) must finish inside the
|
|
47
|
+
* lease with the 30-second provider headroom, and the internal service
|
|
48
|
+
* validation rejects an override that would let pacing outlive the lease
|
|
49
|
+
* (the env override is bounded to the largest default-safe interval,
|
|
50
|
+
* ~10 s). Admission is BOUNDED to one interval per request start: a call
|
|
51
|
+
* whose slot lies more than one interval out is refused before any SDK
|
|
52
|
+
* call with the stable delivery-uncertain
|
|
53
|
+
* `google_sheets_api_request_start_refused` error (the durable worker
|
|
54
|
+
* requeues), so an arbitrarily long queue of concurrent lock-free polling
|
|
55
|
+
* reads can never make a write wait past its lease.
|
|
37
56
|
*/
|
|
38
|
-
readonly REQUEST_START_INTERVAL_MS:
|
|
57
|
+
readonly REQUEST_START_INTERVAL_MS: 2500;
|
|
39
58
|
/**
|
|
40
59
|
* The provider stops adding effects to one batchUpdate once the serialized
|
|
41
60
|
* body would exceed this budget and returns `hasMore` for the suffix. The
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,2DAE3B,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,0BAA0B;IACrC,gFAAgF;;;;IAIhF;;;;;OAKG;;IAEH,2EAA2E;;IAE3E
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,2DAE3B,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,0BAA0B;IACrC,gFAAgF;;;;IAIhF;;;;;OAKG;;IAEH,2EAA2E;;IAE3E;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;;IAEH;;;;;OAKG;;IAEH,+EAA+E;;IAE/E,2EAA2E;;CAEnE,CAAC;AAEX,wEAAwE;AACxE,eAAO,MAAM,oCAAoC,4CACN,CAAC;AAE5C,4EAA4E;AAC5E,eAAO,MAAM,iCAAiC,+FAOpC,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,+BAA+B,sBAAsB,CAAC;AAEnE;;;;;;GAMG;AACH,eAAO,MAAM,qCAAqC,iBAAiB,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,6CACb,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,2CAA2C;;;CAG9C,CAAC;AAEX,qEAAqE;AACrE,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;CAanC,CAAC;AAEX,MAAM,MAAM,2BAA2B,GACrC,CAAC,OAAO,gCAAgC,CAAC,CAAC,MAAM,OAAO,gCAAgC,CAAC,CAAC;AAE3F,+EAA+E;AAC/E,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEhE"}
|
|
@@ -32,12 +32,31 @@ export const GOOGLE_SHEETS_API_DEFAULTS = {
|
|
|
32
32
|
/** Upper bound for read timeouts; reads must stay well under the lease. */
|
|
33
33
|
MAX_READ_TIMEOUT_MS: 60_000,
|
|
34
34
|
/**
|
|
35
|
-
* Minimum interval between request starts of
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* Minimum interval between request starts of the WHOLE provider: reads and
|
|
36
|
+
* writes share ONE request-start limiter, so at most one Sheets API
|
|
37
|
+
* request can start per interval regardless of class. Google Sheets quota
|
|
38
|
+
* is enforced per 100-second windows; the 2,500 ms default serializes
|
|
39
|
+
* combined read+write starts to about 40 starts per 100 s, leaving
|
|
40
|
+
* headroom inside the default per-user/per-project 100-second quotas for
|
|
41
|
+
* the observation and provisioning reads that run beside the worker. The
|
|
42
|
+
* exact quota stays provider and environment dependent, so operators can
|
|
43
|
+
* override the interval through the internal sync env key
|
|
44
|
+
* (HIKOUTEI_SYNC_RATE_LIMIT_INTERVAL_MS) or the internal provider option;
|
|
45
|
+
* the safe default is intentionally conservative. The interval is part of
|
|
46
|
+
* the effect-lease headroom contract: a worst-case dispatch (two
|
|
47
|
+
* preflight/postcondition reads plus one write, each paced and timed out,
|
|
48
|
+
* with up to one full interval of first-slot wait) must finish inside the
|
|
49
|
+
* lease with the 30-second provider headroom, and the internal service
|
|
50
|
+
* validation rejects an override that would let pacing outlive the lease
|
|
51
|
+
* (the env override is bounded to the largest default-safe interval,
|
|
52
|
+
* ~10 s). Admission is BOUNDED to one interval per request start: a call
|
|
53
|
+
* whose slot lies more than one interval out is refused before any SDK
|
|
54
|
+
* call with the stable delivery-uncertain
|
|
55
|
+
* `google_sheets_api_request_start_refused` error (the durable worker
|
|
56
|
+
* requeues), so an arbitrarily long queue of concurrent lock-free polling
|
|
57
|
+
* reads can never make a write wait past its lease.
|
|
39
58
|
*/
|
|
40
|
-
REQUEST_START_INTERVAL_MS:
|
|
59
|
+
REQUEST_START_INTERVAL_MS: 2_500,
|
|
41
60
|
/**
|
|
42
61
|
* The provider stops adding effects to one batchUpdate once the serialized
|
|
43
62
|
* body would exceed this budget and returns `hasMore` for the suffix. The
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,8CAA8C;CACtC,CAAC;AAEX,wEAAwE;AACxE,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,gFAAgF;IAChF,kBAAkB,EAAE,MAAM;IAC1B,sBAAsB,EAAE,KAAK;IAC7B,sBAAsB,EAAE,OAAO;IAC/B;;;;;OAKG;IACH,eAAe,EAAE,MAAM;IACvB,2EAA2E;IAC3E,mBAAmB,EAAE,MAAM;IAC3B
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,8CAA8C;CACtC,CAAC;AAEX,wEAAwE;AACxE,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,gFAAgF;IAChF,kBAAkB,EAAE,MAAM;IAC1B,sBAAsB,EAAE,KAAK;IAC7B,sBAAsB,EAAE,OAAO;IAC/B;;;;;OAKG;IACH,eAAe,EAAE,MAAM;IACvB,2EAA2E;IAC3E,mBAAmB,EAAE,MAAM;IAC3B;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,yBAAyB,EAAE,KAAK;IAChC;;;;;OAKG;IACH,uBAAuB,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI;IACxC,+EAA+E;IAC/E,uBAAuB,EAAE,EAAE;IAC3B,2EAA2E;IAC3E,2BAA2B,EAAE,KAAK;CAC1B,CAAC;AAEX,wEAAwE;AACxE,MAAM,CAAC,MAAM,oCAAoC,GAC/C,yCAAyC,CAAC;AAE5C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,UAAU;IACV,aAAa;IACb,QAAQ;IACR,aAAa;IACb,iBAAiB;IACjB,WAAW;CACH,CAAC;AAEX;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,cAAc,CAAC;AAEpE;;;;GAIG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAC/C,kCAAkC,CAAC;AAErC;;;;GAIG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG;IACzD,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,oCAAoC;CACrC,CAAC;AAEX,qEAAqE;AACrE,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,uCAAuC,EAAE,yCAAyC;IAClF,sBAAsB,EAAE,wBAAwB;IAChD,6BAA6B,EAAE,+BAA+B;IAC9D,yBAAyB,EAAE,2BAA2B;IACtD,qBAAqB,EAAE,uBAAuB;IAC9C,sCAAsC,EAAE,wCAAwC;IAChF,sBAAsB,EAAE,wBAAwB;IAChD,wBAAwB,EAAE,0BAA0B;IACpD,qBAAqB,EAAE,uBAAuB;IAC9C,sBAAsB,EAAE,wBAAwB;IAChD,2BAA2B,EAAE,6BAA6B;IAC1D,wBAAwB,EAAE,0BAA0B;CAC5C,CAAC;AAKX,+EAA+E;AAC/E,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,OAAO,GAAG,UAAU,oBAAoB,CAAC;AAC3C,CAAC"}
|
|
@@ -19,7 +19,13 @@ export declare const GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES: {
|
|
|
19
19
|
readonly HTTP_ERROR: "google_sheets_api_http_error";
|
|
20
20
|
/** A 2xx response whose structure cannot prove what was applied. */
|
|
21
21
|
readonly INVALID_RESPONSE: "google_sheets_api_invalid_response";
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The shared request-start limiter refused the admission BEFORE any SDK
|
|
24
|
+
* call: the predicted wait exceeded the bounded queue horizon. No remote
|
|
25
|
+
* request was sent, and the limiter horizon was not advanced, so the
|
|
26
|
+
* durable worker requeues through the CAS/recovery path and a later pass
|
|
27
|
+
* can be admitted again.
|
|
28
|
+
*/
|
|
23
29
|
readonly REQUEST_START_REFUSED: "google_sheets_api_request_start_refused";
|
|
24
30
|
};
|
|
25
31
|
export type GoogleSheetsApiTransportErrorCode = (typeof GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES)[keyof typeof GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAWlE,wEAAwE;AACxE,eAAO,MAAM,uCAAuC;IAClD,6EAA6E;;IAE7E,0DAA0D;;IAE1D,8CAA8C;;IAE9C,oEAAoE;;IAEpE;;;;;;OAMG;;CAEK,CAAC;AAEX,MAAM,MAAM,iCAAiC,GAC3C,CAAC,OAAO,uCAAuC,CAAC,CAAC,MAAM,OAAO,uCAAuC,CAAC,CAAC;AAEzG;;;;;;GAMG;AACH,qBAAa,6BAA8B,SAAQ,kBAAkB,CACnE,2BAA2B,EAC3B,iCAAiC,CAClC;IACC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;gBAGpC,IAAI,EAAE,iCAAiC,EACvC,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,EACxB,UAAU,GAAE,QAAQ,CAAC,MAAM,CAAmC;CAMjE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,CAK5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAe3D"}
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
import { CoreErrorException } from "../../../../domain/errors/index.js";
|
|
11
11
|
import { PRESENCE_KINDS } from "../../../../shared/state/index.js";
|
|
12
12
|
import { SYNC_SHEETS_ERROR_CODES, SyncSheetsContractError, } from "../../../../application/sync/sheetsContract/errors.js";
|
|
13
|
+
import { logHikouteiInternalEvent } from "../../../../shared/observability/internalLog.js";
|
|
14
|
+
import { HIKOUTEI_LOG_COMPONENTS, HIKOUTEI_LOG_EVENTS, } from "../../../../shared/observability/logEvents.js";
|
|
13
15
|
/** Stable transport error categories emitted by the direct provider. */
|
|
14
16
|
export const GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES = {
|
|
15
17
|
/** The request exceeded its timeout; the remote may still have committed. */
|
|
@@ -20,7 +22,13 @@ export const GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES = {
|
|
|
20
22
|
HTTP_ERROR: "google_sheets_api_http_error",
|
|
21
23
|
/** A 2xx response whose structure cannot prove what was applied. */
|
|
22
24
|
INVALID_RESPONSE: "google_sheets_api_invalid_response",
|
|
23
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* The shared request-start limiter refused the admission BEFORE any SDK
|
|
27
|
+
* call: the predicted wait exceeded the bounded queue horizon. No remote
|
|
28
|
+
* request was sent, and the limiter horizon was not advanced, so the
|
|
29
|
+
* durable worker requeues through the CAS/recovery path and a later pass
|
|
30
|
+
* can be admitted again.
|
|
31
|
+
*/
|
|
24
32
|
REQUEST_START_REFUSED: "google_sheets_api_request_start_refused",
|
|
25
33
|
};
|
|
26
34
|
/**
|
|
@@ -58,6 +66,16 @@ export function invalidProviderRequest(label, message) {
|
|
|
58
66
|
* unverified evidence.
|
|
59
67
|
*/
|
|
60
68
|
export function invalidProviderState(message) {
|
|
69
|
+
// Boundary record for malformed 2xx payloads: only the stable code is
|
|
70
|
+
// logged, never the message (it can echo remote payload fragments).
|
|
71
|
+
logHikouteiInternalEvent({
|
|
72
|
+
event: HIKOUTEI_LOG_EVENTS.TRANSPORT_RESPONSE_INVALID,
|
|
73
|
+
level: "warn",
|
|
74
|
+
component: HIKOUTEI_LOG_COMPONENTS.TRANSPORT,
|
|
75
|
+
code: SYNC_SHEETS_ERROR_CODES.INVALID_PROVIDER_RESPONSE,
|
|
76
|
+
errorClass: "SyncSheetsContractError",
|
|
77
|
+
retryable: true,
|
|
78
|
+
});
|
|
61
79
|
throw new SyncSheetsContractError(SYNC_SHEETS_ERROR_CODES.INVALID_PROVIDER_RESPONSE, `Google Sheets API provider: ${message}`);
|
|
62
80
|
}
|
|
63
81
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,uDAAuD,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,EACL,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,+CAA+C,CAAC;AAEvD,wEAAwE;AACxE,MAAM,CAAC,MAAM,uCAAuC,GAAG;IACrD,6EAA6E;IAC7E,OAAO,EAAE,2BAA2B;IACpC,0DAA0D;IAC1D,aAAa,EAAE,iCAAiC;IAChD,8CAA8C;IAC9C,UAAU,EAAE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oogleSheetsApiProviderOptions, GoogleSheetsApiRequestEvent, } from "./GoogleSheetsApiSyncProvider.js";
|
|
10
|
-
export { GoogleSheetsApiHttpTransport, classifyGoogleSheetsApiError, } from "./transport/googleSheetsApiTransport.js";
|
|
10
|
+
export { GoogleSheetsApiHttpTransport, classifyGoogleSheetsApiError, isRetryableTransportStatus, } from "./transport/googleSheetsApiTransport.js";
|
|
11
11
|
export type { GoogleSheetsApiTransport, GoogleSheetsApiGetSpreadsheetRequest, GoogleSheetsApiBatchUpdateRequest, GoogleSheetsApiWriteRequest, GoogleSheetsApiCell, GoogleSheetsApiCellRow, GoogleSheetsApiHttpTransportOptions, } from "./transport/googleSheetsApiTransport.js";
|
|
12
12
|
export { RequestStartLimiter } from "./transport/rateLimiter.js";
|
|
13
13
|
export { GOOGLE_SHEETS_API_DEFAULTS, GOOGLE_SHEETS_API_SCOPES, } from "./constants.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,YAAY,EACV,kCAAkC,EAClC,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,YAAY,EACV,kCAAkC,EAClC,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,yCAAyC,CAAC;AACjD,YAAY,EACV,wBAAwB,EACxB,oCAAoC,EACpC,iCAAiC,EACjC,2BAA2B,EAC3B,mBAAmB,EACnB,sBAAsB,EACtB,mCAAmC,GACpC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,uCAAuC,EACvC,6BAA6B,GAC9B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* application API.
|
|
7
7
|
*/
|
|
8
8
|
export { GoogleSheetsApiSyncProvider } from "./GoogleSheetsApiSyncProvider.js";
|
|
9
|
-
export { GoogleSheetsApiHttpTransport, classifyGoogleSheetsApiError, } from "./transport/googleSheetsApiTransport.js";
|
|
9
|
+
export { GoogleSheetsApiHttpTransport, classifyGoogleSheetsApiError, isRetryableTransportStatus, } from "./transport/googleSheetsApiTransport.js";
|
|
10
10
|
export { RequestStartLimiter } from "./transport/rateLimiter.js";
|
|
11
11
|
export { GOOGLE_SHEETS_API_DEFAULTS, GOOGLE_SHEETS_API_SCOPES, } from "./constants.js";
|
|
12
12
|
export { GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES, GoogleSheetsApiTransportError, } from "./errors.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAM/E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/adapter/sheets/providers/google-sheets-api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAM/E,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,yCAAyC,CAAC;AAUjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,uCAAuC,EACvC,6BAA6B,GAC9B,MAAM,aAAa,CAAC"}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The provider class hands one immutable `GoogleSheetsApiProviderDeps` object
|
|
6
6
|
* to every operation function so the class stays a thin facade. Pacing
|
|
7
|
-
* (
|
|
8
|
-
* against the registered definition, and
|
|
9
|
-
* here because every operation shares
|
|
7
|
+
* (ONE request-start limiter shared by reads and writes), redacted
|
|
8
|
+
* telemetry, route validation against the registered definition, and
|
|
9
|
+
* batchUpdate reply validation live here because every operation shares
|
|
10
|
+
* them.
|
|
10
11
|
*/
|
|
11
12
|
import type { RegisteredSyncProjectionDefinition } from "../../../../../application/sync/sheetsContract/sheetsProvisioning.js";
|
|
12
13
|
import { type Presence } from "../../../../../shared/state/index.js";
|
|
@@ -34,7 +35,14 @@ export interface GoogleSheetsApiProviderDeps {
|
|
|
34
35
|
export declare function runRead<T>(deps: GoogleSheetsApiProviderDeps, task: () => Promise<T>): Promise<T>;
|
|
35
36
|
/** Paces ONE `batchUpdate` transport call and emits one write event. */
|
|
36
37
|
export declare function runWrite<T>(deps: GoogleSheetsApiProviderDeps, task: () => Promise<T>): Promise<T>;
|
|
37
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Emits one redacted telemetry event; diagnostics must never throw.
|
|
40
|
+
*
|
|
41
|
+
* The code is re-sanitized at the sink as defense in depth: every value
|
|
42
|
+
* reaching `onRequest` is either an allowlisted stable code or the fixed
|
|
43
|
+
* `unknown` category, so a future caller can never forward an arbitrary
|
|
44
|
+
* remote string.
|
|
45
|
+
*/
|
|
38
46
|
export declare function emitRequest(deps: GoogleSheetsApiProviderDeps, operation: "getSpreadsheet" | "batchUpdate", operationCount: number, startedAt: number, ok: boolean, httpStatus: Presence<number>, code: Presence<string>): void;
|
|
39
47
|
/** Resolves the registered projection definition for one physical sheet. */
|
|
40
48
|
export declare function definitionForPhysicalSheet(deps: GoogleSheetsApiProviderDeps, physicalSheetId: string): RegisteredSyncProjectionDefinition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/operations/shared.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/operations/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,sEAAsE,CAAC;AAM/H,OAAO,EAA6C,KAAK,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQhH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AACrF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAQlE,4EAA4E;AAC5E,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,EAAE,SAAS,kCAAkC,EAAE,CAAC;IACpE,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC;IAC7C;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM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Q,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACzC,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7C,CAYA;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAkCvF"}
|
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
*
|
|
5
5
|
* The provider class hands one immutable `GoogleSheetsApiProviderDeps` object
|
|
6
6
|
* to every operation function so the class stays a thin facade. Pacing
|
|
7
|
-
* (
|
|
8
|
-
* against the registered definition, and
|
|
9
|
-
* here because every operation shares
|
|
7
|
+
* (ONE request-start limiter shared by reads and writes), redacted
|
|
8
|
+
* telemetry, route validation against the registered definition, and
|
|
9
|
+
* batchUpdate reply validation live here because every operation shares
|
|
10
|
+
* them.
|
|
10
11
|
*/
|
|
11
12
|
import { SYNC_SHEETS_ERROR_CODES, SyncSheetsContractError, } from "../../../../../application/sync/sheetsContract/errors.js";
|
|
12
|
-
import { classifyTransportOutcome } from "../../../../../application/sync/sheetsContract/transportOutcome.js";
|
|
13
|
-
import { presentValue, absentValue } from "../../../../../shared/state/index.js";
|
|
13
|
+
import { classifyTransportOutcome, sanitizeTransportRemoteCode } from "../../../../../application/sync/sheetsContract/transportOutcome.js";
|
|
14
|
+
import { presentValue, absentValue, PRESENCE_KINDS } from "../../../../../shared/state/index.js";
|
|
15
|
+
import { logHikouteiInternalEvent, } from "../../../../../shared/observability/internalLog.js";
|
|
16
|
+
import { HIKOUTEI_LOG_COMPONENTS, HIKOUTEI_LOG_EVENTS, } from "../../../../../shared/observability/logEvents.js";
|
|
14
17
|
import { GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES, GoogleSheetsApiTransportError, invalidProviderState, } from "../errors.js";
|
|
15
18
|
import { batchUpdateResponseShapeSchema } from "../model/rawResponseSchemas.js";
|
|
16
19
|
/**
|
|
@@ -20,20 +23,32 @@ import { batchUpdateResponseShapeSchema } from "../model/rawResponseSchemas.js";
|
|
|
20
23
|
*/
|
|
21
24
|
const REQUEST_START_REFUSED_MESSAGE = "Google Sheets API request start refused before transport: the shared pacing queue exceeds the bounded admission wait.";
|
|
22
25
|
/**
|
|
23
|
-
* Acquires one bounded request-start slot, refusing
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* Acquires one bounded request-start slot, refusing (and logging one
|
|
27
|
+
* redacted event) when the predicted wait exceeds the configured bound.
|
|
28
|
+
* A refusal NEVER advances the limiter horizon and throws the stable
|
|
29
|
+
* delivery-uncertain transport error before any SDK call, so the durable
|
|
30
|
+
* worker requeues instead of firing an unpaced burst.
|
|
27
31
|
*/
|
|
28
|
-
async function admitRequestStart(deps) {
|
|
32
|
+
async function admitRequestStart(deps, operation) {
|
|
29
33
|
const admission = await deps.requestLimiter.waitForSlot(deps.maxRequestStartWaitMs);
|
|
30
34
|
if (admission.status !== "refused")
|
|
31
35
|
return;
|
|
36
|
+
// Boundary record for a locally refused start: only the stable code is
|
|
37
|
+
// logged (retryable, like the other delivery-uncertain buckets), never a
|
|
38
|
+
// message, payload, id, or URL.
|
|
39
|
+
logHikouteiInternalEvent({
|
|
40
|
+
event: HIKOUTEI_LOG_EVENTS.TRANSPORT_REQUEST_FAILED,
|
|
41
|
+
level: "warn",
|
|
42
|
+
component: HIKOUTEI_LOG_COMPONENTS.TRANSPORT,
|
|
43
|
+
code: GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES.REQUEST_START_REFUSED,
|
|
44
|
+
errorClass: "GoogleSheetsApiTransportError",
|
|
45
|
+
retryable: true,
|
|
46
|
+
});
|
|
32
47
|
throw new GoogleSheetsApiTransportError(GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES.REQUEST_START_REFUSED, REQUEST_START_REFUSED_MESSAGE, absentValue(), absentValue());
|
|
33
48
|
}
|
|
34
49
|
/** Paces ONE `getSpreadsheet` transport call and emits one read event. */
|
|
35
50
|
export async function runRead(deps, task) {
|
|
36
|
-
await admitRequestStart(deps);
|
|
51
|
+
await admitRequestStart(deps, "getSpreadsheet");
|
|
37
52
|
const startedAt = deps.now();
|
|
38
53
|
try {
|
|
39
54
|
const result = await task();
|
|
@@ -48,7 +63,7 @@ export async function runRead(deps, task) {
|
|
|
48
63
|
}
|
|
49
64
|
/** Paces ONE `batchUpdate` transport call and emits one write event. */
|
|
50
65
|
export async function runWrite(deps, task) {
|
|
51
|
-
await admitRequestStart(deps);
|
|
66
|
+
await admitRequestStart(deps, "batchUpdate");
|
|
52
67
|
const startedAt = deps.now();
|
|
53
68
|
try {
|
|
54
69
|
const result = await task();
|
|
@@ -61,7 +76,14 @@ export async function runWrite(deps, task) {
|
|
|
61
76
|
throw error;
|
|
62
77
|
}
|
|
63
78
|
}
|
|
64
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Emits one redacted telemetry event; diagnostics must never throw.
|
|
81
|
+
*
|
|
82
|
+
* The code is re-sanitized at the sink as defense in depth: every value
|
|
83
|
+
* reaching `onRequest` is either an allowlisted stable code or the fixed
|
|
84
|
+
* `unknown` category, so a future caller can never forward an arbitrary
|
|
85
|
+
* remote string.
|
|
86
|
+
*/
|
|
65
87
|
export function emitRequest(deps, operation, operationCount, startedAt, ok, httpStatus, code) {
|
|
66
88
|
try {
|
|
67
89
|
deps.onRequest?.({
|
|
@@ -71,7 +93,9 @@ export function emitRequest(deps, operation, operationCount, startedAt, ok, http
|
|
|
71
93
|
durationMs: Math.max(0, deps.now() - startedAt),
|
|
72
94
|
ok,
|
|
73
95
|
httpStatus,
|
|
74
|
-
code
|
|
96
|
+
code: code.kind === PRESENCE_KINDS.PRESENT
|
|
97
|
+
? presentValue(sanitizeTransportRemoteCode(code.value))
|
|
98
|
+
: code,
|
|
75
99
|
});
|
|
76
100
|
}
|
|
77
101
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/operations/shared.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/operations/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EACL,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,oEAAoE,CAAC;AAC3I,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAiB,MAAM,sCAAsC,CAAC;AAChH,OAAO,EACL,wBAAwB,GACzB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,kDAAkD,CAAC;AAI1D,OAAO,EACL,uCAAuC,EACvC,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAoBhF;;;;GAIG;AACH,MAAM,6BAA6B,GACjC,uHAAuH,CAAC;AAE1H;;;;;;GAMG;AACH,KAAK,UAAU,iBAAiB,CAC9B,IAAiC,EACjC,SAA2C;IAE3C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACpF,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO;IAC3C,uEAAuE;IACvE,yEAAyE;IACzE,gCAAgC;IAChC,wBAAwB,CAAC;QACvB,KAAK,EAAE,mBAAmB,CAAC,wBAAwB;QACnD,KAAK,EAAE,MAAM;QACb,SAAS,EAAE,uBAAuB,CAAC,SAAS;QAC5C,IAAI,EAAE,uCAAuC,CAAC,qBAAqB;QACnE,UAAU,EAAE,+BAA+B;QAC3C,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,MAAM,IAAI,6BAA6B,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ACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts
CHANGED
|
@@ -143,6 +143,19 @@ export declare class GoogleSheetsApiHttpTransport implements GoogleSheetsApiTran
|
|
|
143
143
|
* never as a proven pre-mutation rejection.
|
|
144
144
|
*/
|
|
145
145
|
export declare function classifyGoogleSheetsApiError(error: unknown): GoogleSheetsApiTransportError;
|
|
146
|
+
/**
|
|
147
|
+
* True when the status kind marks a transient remote condition.
|
|
148
|
+
*
|
|
149
|
+
* Mirrors the shared `isGoogleSheetsApiDeliveryUncertain` boundary: an
|
|
150
|
+
* absent status (timeout/network), HTTP 408 (request timeout — the proxy or
|
|
151
|
+
* API may still have committed the write), HTTP 429, and every 5xx are
|
|
152
|
+
* retryable/uncertain; the proven pre-mutation 4xx rejections (400, 401,
|
|
153
|
+
* 403, 404) are not. This only buckets telemetry — gaxios auto-retry stays
|
|
154
|
+
* disabled (`retry: false`), so a mutating call is never blindly retried
|
|
155
|
+
* here; the durable worker owns retries through the shared outcome
|
|
156
|
+
* classifier.
|
|
157
|
+
*/
|
|
158
|
+
export declare function isRetryableTransportStatus(status: number | undefined): boolean;
|
|
146
159
|
/**
|
|
147
160
|
* Builds the SDK batchUpdate body from provider write requests. The SDK
|
|
148
161
|
* request union is wider than the provider's narrow shapes; this boundary
|
package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"googleSheetsApiTransport.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"googleSheetsApiTransport.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers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;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI9E;AA6BD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,cAAc,EAAE,CAAA;CAAE,CAInD;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,SAAS,2BAA2B,EAAE,GAC/C,MAAM,CAER"}
|
package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { GoogleAuth } from "google-auth-library";
|
|
12
12
|
import { sheets } from "@googleapis/sheets";
|
|
13
|
-
import { presentValue, absentValue } from "../../../../../shared/state/index.js";
|
|
13
|
+
import { presentValue, absentValue, PRESENCE_KINDS } from "../../../../../shared/state/index.js";
|
|
14
|
+
import { logHikouteiInternalEvent, } from "../../../../../shared/observability/internalLog.js";
|
|
15
|
+
import { HIKOUTEI_LOG_COMPONENTS, HIKOUTEI_LOG_EVENTS, } from "../../../../../shared/observability/logEvents.js";
|
|
14
16
|
import { GOOGLE_SHEETS_API_SCOPES } from "../constants.js";
|
|
15
17
|
import { GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES, GoogleSheetsApiTransportError, } from "../errors.js";
|
|
16
18
|
import { parseRawErrorRecord, parseRawErrorText, parseRawHttpStatus, } from "./rawErrorSchemas.js";
|
|
@@ -46,7 +48,9 @@ export class GoogleSheetsApiHttpTransport {
|
|
|
46
48
|
return response.data;
|
|
47
49
|
}
|
|
48
50
|
catch (error) {
|
|
49
|
-
|
|
51
|
+
const mapped = classifyGoogleSheetsApiError(error);
|
|
52
|
+
logTransportFailure(mapped);
|
|
53
|
+
throw mapped;
|
|
50
54
|
}
|
|
51
55
|
}
|
|
52
56
|
async batchUpdate(request) {
|
|
@@ -61,7 +65,9 @@ export class GoogleSheetsApiHttpTransport {
|
|
|
61
65
|
return response.data;
|
|
62
66
|
}
|
|
63
67
|
catch (error) {
|
|
64
|
-
|
|
68
|
+
const mapped = classifyGoogleSheetsApiError(error);
|
|
69
|
+
logTransportFailure(mapped);
|
|
70
|
+
throw mapped;
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
}
|
|
@@ -91,6 +97,48 @@ export function classifyGoogleSheetsApiError(error) {
|
|
|
91
97
|
? absentValue()
|
|
92
98
|
: presentValue(shape.code));
|
|
93
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Emits one redacted transport-failure event (fail-open, no message text).
|
|
102
|
+
*
|
|
103
|
+
* Timeout, network, 429, 408, and 5xx failures are classified retryable so
|
|
104
|
+
* log consumers can bucket transient Sheets quota/pacing pressure; proven
|
|
105
|
+
* pre-mutation 4xx status codes (400/401/403/404) are not. The HTTP status
|
|
106
|
+
* is carried as a numeric count only; the spreadsheet ID, URL, and response
|
|
107
|
+
* body never reach the log.
|
|
108
|
+
*/
|
|
109
|
+
function logTransportFailure(error) {
|
|
110
|
+
const status = error.status.kind === PRESENCE_KINDS.PRESENT
|
|
111
|
+
? error.status.value
|
|
112
|
+
: undefined;
|
|
113
|
+
logHikouteiInternalEvent({
|
|
114
|
+
event: HIKOUTEI_LOG_EVENTS.TRANSPORT_REQUEST_FAILED,
|
|
115
|
+
level: "warn",
|
|
116
|
+
component: HIKOUTEI_LOG_COMPONENTS.TRANSPORT,
|
|
117
|
+
code: error.code,
|
|
118
|
+
errorClass: "GoogleSheetsApiTransportError",
|
|
119
|
+
retryable: isRetryableTransportStatus(status),
|
|
120
|
+
...(status === undefined ? {} : { counts: { status } }),
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* True when the status kind marks a transient remote condition.
|
|
125
|
+
*
|
|
126
|
+
* Mirrors the shared `isGoogleSheetsApiDeliveryUncertain` boundary: an
|
|
127
|
+
* absent status (timeout/network), HTTP 408 (request timeout — the proxy or
|
|
128
|
+
* API may still have committed the write), HTTP 429, and every 5xx are
|
|
129
|
+
* retryable/uncertain; the proven pre-mutation 4xx rejections (400, 401,
|
|
130
|
+
* 403, 404) are not. This only buckets telemetry — gaxios auto-retry stays
|
|
131
|
+
* disabled (`retry: false`), so a mutating call is never blindly retried
|
|
132
|
+
* here; the durable worker owns retries through the shared outcome
|
|
133
|
+
* classifier.
|
|
134
|
+
*/
|
|
135
|
+
export function isRetryableTransportStatus(status) {
|
|
136
|
+
if (status === undefined)
|
|
137
|
+
return true;
|
|
138
|
+
if (status === 408 || status === 429)
|
|
139
|
+
return true;
|
|
140
|
+
return status >= 500;
|
|
141
|
+
}
|
|
94
142
|
function extractGaxiosErrorShape(error) {
|
|
95
143
|
const record = parseRawErrorRecord(error);
|
|
96
144
|
if (record === undefined) {
|
package/dist/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"googleSheetsApiTransport.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAkB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"googleSheetsApiTransport.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/googleSheetsApiTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAkB,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,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I,CAAC,gBAAgB,EAAE,CAAC;QAC3F,GAAG,CAAC,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,CAAC;KAC/F,CAAC;AACJ,CAAC"}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
* Request-start interval limiter used by the direct Sheets provider.
|
|
3
3
|
*
|
|
4
4
|
* Google Sheets quota windows are per 100 seconds, so bursty request starts
|
|
5
|
-
* can exhaust
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* can exhaust the budget before the worker's own latency/backoff reacts. The
|
|
6
|
+
* provider keeps ONE shared limiter for reads AND writes, so combined
|
|
7
|
+
* read+write request starts are serialized: at most one transport call
|
|
8
|
+
* (getSpreadsheet or batchUpdate) can start per interval no matter how many
|
|
9
|
+
* operations race. An idle provider is never throttled; the limiter only
|
|
10
|
+
* waits the time remaining since the previous request START. Admission is
|
|
11
|
+
* BOUNDED: a caller whose slot lies more than `maxWaitMs` out is refused
|
|
12
|
+
* without reserving anything, so a burst of concurrent callers can never
|
|
13
|
+
* queue an arbitrarily long line of future reservations.
|
|
9
14
|
*/
|
|
10
15
|
export interface RequestStartLimiterOptions {
|
|
11
16
|
/** Minimum interval between two request starts of this limiter class. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,MAAM,WAAW,0BAA0B;IACzC,yEAAyE;IACzE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAC5B,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC1D;IACA,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEJ;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgC;IACtD,OAAO,CAAC,WAAW,CAAqB;gBAErB,OAAO,EAAE,0BAA0B;IAStD,gEAAgE;IACzD,SAAS,IAAI,MAAM,GAAG,SAAS;IAItC;;;;;;;;;;;;OAYG;IACI,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IACrC;;;;;;;;;;;OAWG;IACI,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;CA+BtE"}
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
* Request-start interval limiter used by the direct Sheets provider.
|
|
3
3
|
*
|
|
4
4
|
* Google Sheets quota windows are per 100 seconds, so bursty request starts
|
|
5
|
-
* can exhaust
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* can exhaust the budget before the worker's own latency/backoff reacts. The
|
|
6
|
+
* provider keeps ONE shared limiter for reads AND writes, so combined
|
|
7
|
+
* read+write request starts are serialized: at most one transport call
|
|
8
|
+
* (getSpreadsheet or batchUpdate) can start per interval no matter how many
|
|
9
|
+
* operations race. An idle provider is never throttled; the limiter only
|
|
10
|
+
* waits the time remaining since the previous request START. Admission is
|
|
11
|
+
* BOUNDED: a caller whose slot lies more than `maxWaitMs` out is refused
|
|
12
|
+
* without reserving anything, so a burst of concurrent callers can never
|
|
13
|
+
* queue an arbitrarily long line of future reservations.
|
|
9
14
|
*/
|
|
10
15
|
const DEFAULT_SLEEP = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
11
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../../../../../../src/adapter/sheets/providers/google-sheets-api/transport/rateLimiter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,aAAa,GAAG,CAAC,EAAU,EAAiB,EAAE,CAClD,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AA6B1D;;;;;GAKG;AACH,MAAM,OAAO,mBAAmB;IACb,UAAU,CAAS;IACnB,GAAG,CAAe;IAClB,KAAK,CAAgC;IAC9C,WAAW,CAAqB;IAExC,YAAmB,OAAmC;QACpD,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;YACxE,MAAM,IAAI,UAAU,CAAC,4DAA4D,CAAC,CAAC;QACrF,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI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E,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -11,10 +11,14 @@
|
|
|
11
11
|
* - `delivery_uncertain`: the transport gave no usable answer (timeout,
|
|
12
12
|
* network error, non-JSON/404 response, lost connection). The remote may or
|
|
13
13
|
* may not have committed the write, so the effect must be recovered through
|
|
14
|
-
* a postcondition probe rather than immediately redriven.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* a postcondition probe rather than immediately redriven. A locally REFUSED
|
|
15
|
+
* request start (the shared pacing limiter queue exceeds its bound) is also
|
|
16
|
+
* delivery-uncertain: no remote call ran, but the durable worker still
|
|
17
|
+
* requeues through the same probe/redrive path rather than trusting an
|
|
18
|
+
* unverified "nothing happened". Per-effect guard/schema/identity
|
|
19
|
+
* rejections are not transport errors at all: they arrive as per-effect
|
|
20
|
+
* result statuses in a successful envelope and keep their existing terminal
|
|
21
|
+
* handling.
|
|
18
22
|
*
|
|
19
23
|
* This boundary lets future durable `delivery_uncertain` state and recovery
|
|
20
24
|
* barriers classify a thrown transport error without re-deriving the rules at
|
|
@@ -34,10 +38,33 @@ export type TransportOutcomeKind = (typeof TRANSPORT_OUTCOME_KINDS)[keyof typeof
|
|
|
34
38
|
export interface TransportOutcome {
|
|
35
39
|
readonly kind: TransportOutcomeKind;
|
|
36
40
|
readonly httpStatus: Presence<number>;
|
|
37
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Remote/network code after runtime sanitization: either an allowlisted
|
|
43
|
+
* stable value or the fixed `unknown` category, never an arbitrary
|
|
44
|
+
* remote string.
|
|
45
|
+
*/
|
|
38
46
|
readonly code: Presence<string>;
|
|
39
47
|
readonly message: string;
|
|
40
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Fixed safe category that replaces any remote code not on the allowlist.
|
|
51
|
+
*
|
|
52
|
+
* Remote API error bodies are untrusted input: their `status` field could
|
|
53
|
+
* carry an arbitrary string (an id, URL, or secret) instead of a canonical
|
|
54
|
+
* Google API status name. Telemetry consumers must never see raw remote
|
|
55
|
+
* text, so anything that is not an explicitly allowlisted stable code
|
|
56
|
+
* collapses to this category.
|
|
57
|
+
*/
|
|
58
|
+
export declare const TRANSPORT_OUTCOME_UNKNOWN_CODE = "unknown";
|
|
59
|
+
/**
|
|
60
|
+
* Sanitizes one untrusted remote code before it can reach telemetry.
|
|
61
|
+
*
|
|
62
|
+
* Returns the candidate unchanged only when it is an allowlisted stable
|
|
63
|
+
* code; every other value — including non-string input and secret-like or
|
|
64
|
+
* malformed remote text — maps to the fixed `unknown` category. Never
|
|
65
|
+
* returns the raw candidate for unallowlisted input.
|
|
66
|
+
*/
|
|
67
|
+
export declare function sanitizeTransportRemoteCode(candidate: unknown): string;
|
|
41
68
|
/**
|
|
42
69
|
* Classifies a value thrown by the provider transport.
|
|
43
70
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transportOutcome.d.ts","sourceRoot":"","sources":["../../../../src/application/sync/sheetsContract/transportOutcome.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"transportOutcome.d.ts","sourceRoot":"","sources":["../../../../src/application/sync/sheetsContract/transportOutcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,6BAA6B,EAA2C,MAAM,+DAA+D,CAAC;AAEvJ,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE/D,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAC9B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,YAAY,CAAC;AA6DxD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAItE;AASD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CA6BzE;AAED,sEAAsE;AACtE,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAE7E;AAED;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAgBT"}
|
|
@@ -11,10 +11,14 @@
|
|
|
11
11
|
* - `delivery_uncertain`: the transport gave no usable answer (timeout,
|
|
12
12
|
* network error, non-JSON/404 response, lost connection). The remote may or
|
|
13
13
|
* may not have committed the write, so the effect must be recovered through
|
|
14
|
-
* a postcondition probe rather than immediately redriven.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
14
|
+
* a postcondition probe rather than immediately redriven. A locally REFUSED
|
|
15
|
+
* request start (the shared pacing limiter queue exceeds its bound) is also
|
|
16
|
+
* delivery-uncertain: no remote call ran, but the durable worker still
|
|
17
|
+
* requeues through the same probe/redrive path rather than trusting an
|
|
18
|
+
* unverified "nothing happened". Per-effect guard/schema/identity
|
|
19
|
+
* rejections are not transport errors at all: they arrive as per-effect
|
|
20
|
+
* result statuses in a successful envelope and keep their existing terminal
|
|
21
|
+
* handling.
|
|
18
22
|
*
|
|
19
23
|
* This boundary lets future durable `delivery_uncertain` state and recovery
|
|
20
24
|
* barriers classify a thrown transport error without re-deriving the rules at
|
|
@@ -23,12 +27,99 @@
|
|
|
23
27
|
* reclassified as a retryable transport error.
|
|
24
28
|
*/
|
|
25
29
|
import { GoogleSheetsApiTransportError, GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES } from "../../../adapter/sheets/providers/google-sheets-api/errors.js";
|
|
26
|
-
import { PRESENCE_KINDS } from "../../../shared/state/index.js";
|
|
30
|
+
import { PRESENCE_KINDS, presentValue } from "../../../shared/state/index.js";
|
|
27
31
|
export const TRANSPORT_OUTCOME_KINDS = {
|
|
28
32
|
SUCCESS: "success",
|
|
29
33
|
EXPLICIT_REMOTE_FAILURE: "explicit_remote_failure",
|
|
30
34
|
DELIVERY_UNCERTAIN: "delivery_uncertain",
|
|
31
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* Fixed safe category that replaces any remote code not on the allowlist.
|
|
38
|
+
*
|
|
39
|
+
* Remote API error bodies are untrusted input: their `status` field could
|
|
40
|
+
* carry an arbitrary string (an id, URL, or secret) instead of a canonical
|
|
41
|
+
* Google API status name. Telemetry consumers must never see raw remote
|
|
42
|
+
* text, so anything that is not an explicitly allowlisted stable code
|
|
43
|
+
* collapses to this category.
|
|
44
|
+
*/
|
|
45
|
+
export const TRANSPORT_OUTCOME_UNKNOWN_CODE = "unknown";
|
|
46
|
+
/**
|
|
47
|
+
* Allowlisted remote/network codes that may reach telemetry.
|
|
48
|
+
*
|
|
49
|
+
* Covers the canonical Google API status names (`error.status` of API
|
|
50
|
+
* error bodies), well-known Node/gaxios network error codes, and the
|
|
51
|
+
* provider's own stable transport codes (defensive: a locally produced
|
|
52
|
+
* code is never treated as unknown). Anything else — a malformed,
|
|
53
|
+
* secret-like, or novel remote string — is replaced by
|
|
54
|
+
* `TRANSPORT_OUTCOME_UNKNOWN_CODE`.
|
|
55
|
+
*/
|
|
56
|
+
const SAFE_TRANSPORT_REMOTE_CODES = new Set([
|
|
57
|
+
// Canonical google.rpc.Code status names.
|
|
58
|
+
"OK",
|
|
59
|
+
"CANCELLED",
|
|
60
|
+
"UNKNOWN",
|
|
61
|
+
"INVALID_ARGUMENT",
|
|
62
|
+
"DEADLINE_EXCEEDED",
|
|
63
|
+
"NOT_FOUND",
|
|
64
|
+
"ALREADY_EXISTS",
|
|
65
|
+
"PERMISSION_DENIED",
|
|
66
|
+
"UNAUTHENTICATED",
|
|
67
|
+
"RESOURCE_EXHAUSTED",
|
|
68
|
+
"FAILED_PRECONDITION",
|
|
69
|
+
"ABORTED",
|
|
70
|
+
"OUT_OF_RANGE",
|
|
71
|
+
"UNIMPLEMENTED",
|
|
72
|
+
"INTERNAL",
|
|
73
|
+
"UNAVAILABLE",
|
|
74
|
+
"DATA_LOSS",
|
|
75
|
+
// Well-known Node/gaxios network and timeout error codes.
|
|
76
|
+
"ECONNRESET",
|
|
77
|
+
"ECONNREFUSED",
|
|
78
|
+
"ECONNABORTED",
|
|
79
|
+
"ENOTFOUND",
|
|
80
|
+
"EAI_AGAIN",
|
|
81
|
+
"ETIMEDOUT",
|
|
82
|
+
"ESOCKETTIMEDOUT",
|
|
83
|
+
"EHOSTUNREACH",
|
|
84
|
+
"ENETUNREACH",
|
|
85
|
+
"ENETDOWN",
|
|
86
|
+
"ENETRESET",
|
|
87
|
+
"EPIPE",
|
|
88
|
+
"EADDRINUSE",
|
|
89
|
+
"EADDRNOTAVAIL",
|
|
90
|
+
"ENOBUFS",
|
|
91
|
+
"ESHUTDOWN",
|
|
92
|
+
"EPROTO",
|
|
93
|
+
"ERR_SOCKET_CLOSED",
|
|
94
|
+
"UND_ERR_SOCKET",
|
|
95
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
96
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
97
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
98
|
+
"UND_ERR_ABORTED",
|
|
99
|
+
"UND_ERR_DESTROYED",
|
|
100
|
+
"UND_ERR_TIMEOUT",
|
|
101
|
+
// Local provider stable codes (defensive; never emitted as unknown).
|
|
102
|
+
...Object.values(GOOGLE_SHEETS_API_TRANSPORT_ERROR_CODES),
|
|
103
|
+
]);
|
|
104
|
+
/**
|
|
105
|
+
* Sanitizes one untrusted remote code before it can reach telemetry.
|
|
106
|
+
*
|
|
107
|
+
* Returns the candidate unchanged only when it is an allowlisted stable
|
|
108
|
+
* code; every other value — including non-string input and secret-like or
|
|
109
|
+
* malformed remote text — maps to the fixed `unknown` category. Never
|
|
110
|
+
* returns the raw candidate for unallowlisted input.
|
|
111
|
+
*/
|
|
112
|
+
export function sanitizeTransportRemoteCode(candidate) {
|
|
113
|
+
return typeof candidate === "string" && SAFE_TRANSPORT_REMOTE_CODES.has(candidate)
|
|
114
|
+
? candidate
|
|
115
|
+
: TRANSPORT_OUTCOME_UNKNOWN_CODE;
|
|
116
|
+
}
|
|
117
|
+
/** Sanitizes a presence-wrapped remote code, preserving absence. */
|
|
118
|
+
function sanitizeRemoteCodePresence(presence) {
|
|
119
|
+
return presence.kind === PRESENCE_KINDS.PRESENT
|
|
120
|
+
? presentValue(sanitizeTransportRemoteCode(presence.value))
|
|
121
|
+
: presence;
|
|
122
|
+
}
|
|
32
123
|
/**
|
|
33
124
|
* Classifies a value thrown by the provider transport.
|
|
34
125
|
*
|
|
@@ -53,7 +144,9 @@ export function classifyTransportOutcome(error) {
|
|
|
53
144
|
return {
|
|
54
145
|
kind,
|
|
55
146
|
httpStatus: error.status,
|
|
56
|
-
code
|
|
147
|
+
// The remote code is untrusted input (it can echo arbitrary API
|
|
148
|
+
// error-body text); only allowlisted stable codes may pass through.
|
|
149
|
+
code: sanitizeRemoteCodePresence(error.remoteCode),
|
|
57
150
|
message: error.message,
|
|
58
151
|
};
|
|
59
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transportOutcome.js","sourceRoot":"","sources":["../../../../src/application/sync/sheetsContract/transportOutcome.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"transportOutcome.js","sourceRoot":"","sources":["../../../../src/application/sync/sheetsContract/transportOutcome.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,6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jF,CAAC;AACJ,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,0BAA0B,CAAC,OAAyB;IAClE,OAAO,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,kBAAkB,CAAC;AACrE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kCAAkC,CAChD,KAAoC;IAEpC,IACE,KAAK,CAAC,IAAI,KAAK,uCAAuC,CAAC,OAAO;QAC9D,KAAK,CAAC,IAAI,KAAK,uCAAuC,CAAC,aAAa;QACpE,KAAK,CAAC,IAAI,KAAK,uCAAuC,CAAC,gBAAgB;QACvE,KAAK,CAAC,IAAI,KAAK,uCAAuC,CAAC,qBAAqB,EAC5E,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC9D,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;IAClC,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACzE,uEAAuE;QACvE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hikoutei",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.57",
|
|
4
4
|
"description": "Typed repository and safe write layer for Google Sheets-backed MVPs. SQLite-authoritative entity lifecycle with asynchronous Google Sheets projection.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|