@jetthai/cuora 1.1.476-dev.0 → 1.1.476-dev.1
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/.github/copilot-instructions.md +8 -3
- package/AGENTS.md +8 -3
- package/AI_PROMPT_SOURCE.md +8 -3
- package/CHANGELOG.md +21 -0
- package/CLAUDE.md +8 -3
- package/GEMINI.md +8 -3
- package/package.json +1 -1
- package/src/machine/activity/activity_cash.js +2 -3
- package/src/machine/roulette_v2.js +16 -25
- package/prepare-for-pr/JT-1776243420.md +0 -85
|
@@ -53,9 +53,9 @@ You are a senior full-stack engineer with world-class capability across UI/UX, A
|
|
|
53
53
|
Before delivering any code change, verify each of the following yourself:
|
|
54
54
|
|
|
55
55
|
- [ ] **Follows existing conventions**: clear four-layer separation, XState v4 factory pattern (`export default function (request) { return createMachine(...) }`), naming conventions, no TypeScript
|
|
56
|
-
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
56
|
+
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData?, silent? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
57
57
|
- [ ] **V1→V2 path conversion**: new V2 endpoints must be added to `supportVersion2List` **manually**; use the `:param` form for dynamic parameters; put non-standard paths in the `specifyingPath` mapping
|
|
58
|
-
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information
|
|
58
|
+
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information; validate response shapes inside the service and reject there — never throw inside `assign()`
|
|
59
59
|
- [ ] **Memory safety**: `setInterval` / `socket.on()` / `addEventListener` registered inside an XState callback service **must return a cleanup function** (e.g. `() => clientSocket.off(event, handler)`) to avoid accumulating listeners across reconnects; listeners registered inside a Promise must also be cleaned up after resolve / reject
|
|
60
60
|
- [ ] **Token lifecycle**: token operations go through `getToken()` and the `extendToken` action, never bypass the interceptor to inject manually; prefer the existing TTL constants; when `fetchUserInfo` fails, let the session terminate naturally rather than retrying on your own
|
|
61
61
|
- [ ] **Error handling**: forward through `request.errorHandler` to the error machine, with correct branches for each special code (see "Error Code System")
|
|
@@ -113,6 +113,7 @@ state machine service → request.send(api.xxx(params)) → Request class → AP
|
|
|
113
113
|
isPublic?: boolean, // true = no auth token required
|
|
114
114
|
headers?: object, // Custom headers (e.g. reCAPTCHA)
|
|
115
115
|
isFormData?: boolean, // true = multipart/form-data
|
|
116
|
+
silent?: boolean, // true = on failure, don't forward to errorHandler (still throws)
|
|
116
117
|
}
|
|
117
118
|
```
|
|
118
119
|
|
|
@@ -232,6 +233,8 @@ loading (always + setInitData: takes paymentDetail from the factory context para
|
|
|
232
233
|
> return { calculation: data || event.data }
|
|
233
234
|
> })
|
|
234
235
|
> ```
|
|
236
|
+
>
|
|
237
|
+
> This pattern assumes `event.data` is always an object; `send()` may resolve `undefined`, and destructuring it inside an assign throws and stalls the machine (see item 13 of 2.9).
|
|
235
238
|
|
|
236
239
|
**processing state check**: `manual_cash.js` and `virtual_bank_cash.js` use an `isProcessing` guard to check whether there is an in-progress deposit order, and if so jump straight to `submitted` to prevent duplicate submission.
|
|
237
240
|
|
|
@@ -336,7 +339,7 @@ io(`${socketURL}/frontend`, {
|
|
|
336
339
|
7. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
|
|
337
340
|
8. axios.request(config)
|
|
338
341
|
9. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
|
|
339
|
-
10. Error handling: ERR_F108 → isBlocked; ERR_800 (cancelled) → silent; everything else → errorHandler
|
|
342
|
+
10. Error handling: ERR_F108 → isBlocked + errorHandler; ERR_998 → thrown directly; ERR_800 (cancelled) → silent; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown)
|
|
340
343
|
```
|
|
341
344
|
|
|
342
345
|
**V1→V2 conversion**: `supportVersion2List` supports dynamic paths (e.g. `payment/v2/:paymentType/transaction`, where `:param` is replaced by `[^/]+`); special paths are hard-coded in `specifyingPath`, and the rest are auto-converted via `/([a-z])([A-Z])/g`. **When adding an endpoint that needs V2 conversion, it must be added to the list manually.**
|
|
@@ -354,6 +357,8 @@ io(`${socketURL}/frontend`, {
|
|
|
354
357
|
9. **Unfinished-game infinite retry**: the `unfinishedGame` state in `error.js` returns to itself on `onError`, with **no backoff strategy and no retry cap** (a known issue, see "Known Technical Debt").
|
|
355
358
|
10. **`isMobile` is a string, not a boolean**: in `common.js`, `isMobile = userAgent?.device?.type` returns `'mobile'`/`'tablet'`/`undefined`, so comparisons must be string-based (e.g. `isMobile === 'mobile' ? 'y' : null`).
|
|
356
359
|
11. **Requests carry no CancelToken by default**: the cancellation feature of `send(req, customToken)` is **opt-in**. In axios <0.22 the cancel handler is never unsubscribed — a shared long-lived token accumulates one handler per request, causing overnight OOM when left running (TI-15555). **Do not "helpfully" add the CancelToken back onto the shared path.**
|
|
360
|
+
12. **`silent: true` only skips errorHandler**: the error is still thrown to the caller's `onError`, and `ERR_F108` is still routed as usual; but every other error code — **including logout-class codes such as `ERR_A104`, and `ERR_G106` insufficient balance** — never reaches the error machine. Use it only for background requests whose session invalidation is already covered by `fetchUserInfo` polling; never add it to user-initiated requests.
|
|
361
|
+
13. **`send()` does not guarantee an object, and `assign()` must never throw**: non-config requests during maintenance (`isBlocked`) and `ERR_800` cancellations make `send()` **resolve `undefined`** (they never reach `onError`); a 200 response with a non-JSON body resolves a string, so destructuring `{ data }` yields `undefined`. When an `assign()` throws, XState v4 clears the event queue and the state is not updated — the machine stays in the current invoke state and `after`-based polling stops until an external event (e.g. `REFRESH`) moves it out. **Validate response shapes inside the service and `throw` there (reject → `onError`)**; every assign in `onDone` must handle every value the service can resolve, including deliberate `return null` early exits.
|
|
357
362
|
|
|
358
363
|
---
|
|
359
364
|
|
package/AGENTS.md
CHANGED
|
@@ -53,9 +53,9 @@ You are a senior full-stack engineer with world-class capability across UI/UX, A
|
|
|
53
53
|
Before delivering any code change, verify each of the following yourself:
|
|
54
54
|
|
|
55
55
|
- [ ] **Follows existing conventions**: clear four-layer separation, XState v4 factory pattern (`export default function (request) { return createMachine(...) }`), naming conventions, no TypeScript
|
|
56
|
-
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
56
|
+
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData?, silent? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
57
57
|
- [ ] **V1→V2 path conversion**: new V2 endpoints must be added to `supportVersion2List` **manually**; use the `:param` form for dynamic parameters; put non-standard paths in the `specifyingPath` mapping
|
|
58
|
-
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information
|
|
58
|
+
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information; validate response shapes inside the service and reject there — never throw inside `assign()`
|
|
59
59
|
- [ ] **Memory safety**: `setInterval` / `socket.on()` / `addEventListener` registered inside an XState callback service **must return a cleanup function** (e.g. `() => clientSocket.off(event, handler)`) to avoid accumulating listeners across reconnects; listeners registered inside a Promise must also be cleaned up after resolve / reject
|
|
60
60
|
- [ ] **Token lifecycle**: token operations go through `getToken()` and the `extendToken` action, never bypass the interceptor to inject manually; prefer the existing TTL constants; when `fetchUserInfo` fails, let the session terminate naturally rather than retrying on your own
|
|
61
61
|
- [ ] **Error handling**: forward through `request.errorHandler` to the error machine, with correct branches for each special code (see "Error Code System")
|
|
@@ -113,6 +113,7 @@ state machine service → request.send(api.xxx(params)) → Request class → AP
|
|
|
113
113
|
isPublic?: boolean, // true = no auth token required
|
|
114
114
|
headers?: object, // Custom headers (e.g. reCAPTCHA)
|
|
115
115
|
isFormData?: boolean, // true = multipart/form-data
|
|
116
|
+
silent?: boolean, // true = on failure, don't forward to errorHandler (still throws)
|
|
116
117
|
}
|
|
117
118
|
```
|
|
118
119
|
|
|
@@ -232,6 +233,8 @@ loading (always + setInitData: takes paymentDetail from the factory context para
|
|
|
232
233
|
> return { calculation: data || event.data }
|
|
233
234
|
> })
|
|
234
235
|
> ```
|
|
236
|
+
>
|
|
237
|
+
> This pattern assumes `event.data` is always an object; `send()` may resolve `undefined`, and destructuring it inside an assign throws and stalls the machine (see item 13 of 2.9).
|
|
235
238
|
|
|
236
239
|
**processing state check**: `manual_cash.js` and `virtual_bank_cash.js` use an `isProcessing` guard to check whether there is an in-progress deposit order, and if so jump straight to `submitted` to prevent duplicate submission.
|
|
237
240
|
|
|
@@ -336,7 +339,7 @@ io(`${socketURL}/frontend`, {
|
|
|
336
339
|
7. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
|
|
337
340
|
8. axios.request(config)
|
|
338
341
|
9. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
|
|
339
|
-
10. Error handling: ERR_F108 → isBlocked; ERR_800 (cancelled) → silent; everything else → errorHandler
|
|
342
|
+
10. Error handling: ERR_F108 → isBlocked + errorHandler; ERR_998 → thrown directly; ERR_800 (cancelled) → silent; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown)
|
|
340
343
|
```
|
|
341
344
|
|
|
342
345
|
**V1→V2 conversion**: `supportVersion2List` supports dynamic paths (e.g. `payment/v2/:paymentType/transaction`, where `:param` is replaced by `[^/]+`); special paths are hard-coded in `specifyingPath`, and the rest are auto-converted via `/([a-z])([A-Z])/g`. **When adding an endpoint that needs V2 conversion, it must be added to the list manually.**
|
|
@@ -354,6 +357,8 @@ io(`${socketURL}/frontend`, {
|
|
|
354
357
|
9. **Unfinished-game infinite retry**: the `unfinishedGame` state in `error.js` returns to itself on `onError`, with **no backoff strategy and no retry cap** (a known issue, see "Known Technical Debt").
|
|
355
358
|
10. **`isMobile` is a string, not a boolean**: in `common.js`, `isMobile = userAgent?.device?.type` returns `'mobile'`/`'tablet'`/`undefined`, so comparisons must be string-based (e.g. `isMobile === 'mobile' ? 'y' : null`).
|
|
356
359
|
11. **Requests carry no CancelToken by default**: the cancellation feature of `send(req, customToken)` is **opt-in**. In axios <0.22 the cancel handler is never unsubscribed — a shared long-lived token accumulates one handler per request, causing overnight OOM when left running (TI-15555). **Do not "helpfully" add the CancelToken back onto the shared path.**
|
|
360
|
+
12. **`silent: true` only skips errorHandler**: the error is still thrown to the caller's `onError`, and `ERR_F108` is still routed as usual; but every other error code — **including logout-class codes such as `ERR_A104`, and `ERR_G106` insufficient balance** — never reaches the error machine. Use it only for background requests whose session invalidation is already covered by `fetchUserInfo` polling; never add it to user-initiated requests.
|
|
361
|
+
13. **`send()` does not guarantee an object, and `assign()` must never throw**: non-config requests during maintenance (`isBlocked`) and `ERR_800` cancellations make `send()` **resolve `undefined`** (they never reach `onError`); a 200 response with a non-JSON body resolves a string, so destructuring `{ data }` yields `undefined`. When an `assign()` throws, XState v4 clears the event queue and the state is not updated — the machine stays in the current invoke state and `after`-based polling stops until an external event (e.g. `REFRESH`) moves it out. **Validate response shapes inside the service and `throw` there (reject → `onError`)**; every assign in `onDone` must handle every value the service can resolve, including deliberate `return null` early exits.
|
|
357
362
|
|
|
358
363
|
---
|
|
359
364
|
|
package/AI_PROMPT_SOURCE.md
CHANGED
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
每次交付程式碼異動前,請自行逐項確認:
|
|
52
52
|
|
|
53
53
|
- [ ] **符合現有規範**:四層架構分層清楚、XState v4 工廠模式(`export default function (request) { return createMachine(...) }`)、命名慣例、無 TypeScript
|
|
54
|
-
- [ ] **API 描述物件正確**:回傳 `{ url, method, params?, isPublic?, headers?, isFormData? }` 結構;HTTP method 統一小寫;`isPublic: true` 端點需檢查是否需 `appSecret`;URL 不加前導斜線(除非刻意繞過 `url-join` 的 `baseURL`,且需註解原因)
|
|
54
|
+
- [ ] **API 描述物件正確**:回傳 `{ url, method, params?, isPublic?, headers?, isFormData?, silent? }` 結構;HTTP method 統一小寫;`isPublic: true` 端點需檢查是否需 `appSecret`;URL 不加前導斜線(除非刻意繞過 `url-join` 的 `baseURL`,且需註解原因)
|
|
55
55
|
- [ ] **V1→V2 路徑轉換**:新增 V2 端點需**手動**加入 `supportVersion2List`;含動態參數時用 `:param` 樣式;非標準路徑放 `specifyingPath` 映射表
|
|
56
|
-
- [ ] **狀態機規範**:context 修改一律用 `assign()` 不直接 mutate;深層物件用 `JSON.parse(JSON.stringify())` clone;初始狀態名稱依語意選用;`onError` 不要靜默轉 `idle`
|
|
56
|
+
- [ ] **狀態機規範**:context 修改一律用 `assign()` 不直接 mutate;深層物件用 `JSON.parse(JSON.stringify())` clone;初始狀態名稱依語意選用;`onError` 不要靜默轉 `idle` 而遺失錯誤資訊;回應格式驗證放 service 內 reject,`assign()` 內不可拋錯
|
|
57
57
|
- [ ] **記憶體安全**:XState callback service 註冊的 `setInterval` / `socket.on()` / `addEventListener` 等,**必須回傳清理函式**(如 `() => clientSocket.off(event, handler)`),避免重連時累積監聽器;Promise 內註冊的監聽器在 resolve / reject 後也要清理
|
|
58
58
|
- [ ] **Token 生命週期**:Token 操作走 `getToken()` 與 `extendToken` action,不繞過攔截器自行注入;TTL 常數優先用既有定義;`fetchUserInfo` 失敗時讓 session 自然終止,不自行重試
|
|
59
59
|
- [ ] **錯誤處理**:透過 `request.errorHandler` 轉發至 error machine,各特殊碼有正確分支(見「錯誤代碼系統」)
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
isPublic?: boolean, // true = 不需認證 Token
|
|
112
112
|
headers?: object, // 自訂 headers(如 reCAPTCHA)
|
|
113
113
|
isFormData?: boolean, // true = multipart/form-data
|
|
114
|
+
silent?: boolean, // true = 失敗時不轉發 errorHandler(仍會 throw)
|
|
114
115
|
}
|
|
115
116
|
```
|
|
116
117
|
|
|
@@ -230,6 +231,8 @@ loading(always + setInitData:從工廠 context 參數取出 paymentDetail
|
|
|
230
231
|
> return { calculation: data || event.data }
|
|
231
232
|
> })
|
|
232
233
|
> ```
|
|
234
|
+
>
|
|
235
|
+
> 此寫法假設 `event.data` 必為物件;`send()` 可能 resolve `undefined`,在 assign 內解構會拋錯卡死 machine(見 2.9 第 13 點)。
|
|
233
236
|
|
|
234
237
|
**processing 狀態檢查**:`manual_cash.js`、`virtual_bank_cash.js` 以 `isProcessing` guard 檢查是否有進行中的存款訂單,有則直接跳至 `submitted`,防止重複提交。
|
|
235
238
|
|
|
@@ -334,7 +337,7 @@ io(`${socketURL}/frontend`, {
|
|
|
334
337
|
7. 自訂 paramsSerializer:q 參數特殊編碼(避免雙重編碼)
|
|
335
338
|
8. axios.request(config)
|
|
336
339
|
9. 回應攔截器:response.data.error 存在 → reject;Network Error / 404 → ERR_998 + Sentry
|
|
337
|
-
10. 錯誤處理:ERR_F108 → isBlocked;ERR_800(取消)→ 靜默;其餘 → errorHandler
|
|
340
|
+
10. 錯誤處理:ERR_F108 → isBlocked + errorHandler;ERR_998 → 直接 throw;ERR_800(取消)→ 靜默;其餘 → errorHandler(描述物件帶 silent: true 則略過,仍 throw)
|
|
338
341
|
```
|
|
339
342
|
|
|
340
343
|
**V1→V2 轉換**:`supportVersion2List` 支援動態路徑(如 `payment/v2/:paymentType/transaction`,`:param` 替換為 `[^/]+`);特殊路徑由 `specifyingPath` 硬編碼映射,其餘用 `/([a-z])([A-Z])/g` 自動轉換。**新增需要 V2 轉換的端點時必須手動加入清單。**
|
|
@@ -352,6 +355,8 @@ io(`${socketURL}/frontend`, {
|
|
|
352
355
|
9. **unfinished game 無限重試**:`error.js` 的 `unfinishedGame` 狀態在 `onError` 時回到自身,**無退避策略也無重試上限**(已知問題,見「已知技術債」)。
|
|
353
356
|
10. **`isMobile` 是字串非布林值**:`common.js` 中 `isMobile = userAgent?.device?.type`,回傳 `'mobile'`/`'tablet'`/`undefined`,判斷時需比較字串(如 `isMobile === 'mobile' ? 'y' : null`)。
|
|
354
357
|
11. **請求預設不附加 CancelToken**:`send(req, customToken)` 的取消功能為**選擇性啟用**。axios <0.22 的取消 handler 永不退訂——共用長壽命 token 會隨請求數累積 handler,導致掛機過夜 OOM(TI-15555)。**不要「順手」把 CancelToken 加回共用路徑。**
|
|
358
|
+
12. **`silent: true` 只略過 errorHandler**:錯誤仍會 throw 給呼叫端的 `onError`,`ERR_F108` 也照常路由;但其餘錯誤碼——**包含 `ERR_A104` 等登出類、`ERR_G106` 餘額不足**——都不會進 error machine。只用於背景呼叫、且 session 失效另有 `fetchUserInfo` 輪詢兜底的請求;使用者主動觸發的請求不可加。
|
|
359
|
+
13. **`send()` 不保證回傳物件,`assign()` 內不可拋錯**:維護中(`isBlocked`)的非 config 請求與 `ERR_800` 取消會讓 `send()` **resolve `undefined`**(不進 `onError`);200 但 body 非 JSON 時 resolve 字串,解構 `{ data }` 得到 `undefined`。XState v4 在 `assign()` 內拋錯會清空事件佇列且狀態不更新——machine 停在當前 invoke 狀態、`after` 輪詢中止,直到外部事件(如 `REFRESH`)才離開。**回應格式驗證放 service 內 `throw`(reject → `onError`)**;`onDone` 的每個 assign 都必須承受 service 所有可能的 resolve 值,含刻意 `return null` 的早退路徑。
|
|
355
360
|
|
|
356
361
|
---
|
|
357
362
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.476-dev.1](https://github.com/jetthai/cuora-module/compare/v1.1.476-dev.0...v1.1.476-dev.1) (2026-10-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **activity:** activity_cash 明細略過(resolve null)時 setProgressSummary 不再拋錯卡死 machine ([67cd813](https://github.com/jetthai/cuora-module/commit/67cd8137f1cbb310d43d02c068ed0a896e2c6623))
|
|
11
|
+
|
|
12
|
+
### [1.1.476](https://github.com/jetthai/cuora-module/compare/v1.1.475...v1.1.476) (2026-10-13)
|
|
13
|
+
|
|
14
|
+
### [1.1.475](https://github.com/jetthai/cuora-module/compare/v1.1.473...v1.1.475) (2026-10-12)
|
|
15
|
+
|
|
5
16
|
### [1.1.476-dev.0](https://github.com/jetthai/cuora-module/compare/v1.1.473-dev.0...v1.1.476-dev.0) (2026-10-13)
|
|
6
17
|
|
|
7
18
|
|
|
@@ -54,6 +65,16 @@ Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
54
65
|
* **export:** 移除四個無消費者的對外符號 ([55afe6f](https://github.com/jetthai/cuora-module/commit/55afe6fbfadca8944dd9820d6333ee5b93e0ed25))
|
|
55
66
|
* **machine:** 移除 client-pwa-cash 未使用的 bonus、vip_table 與 util/max ([f49977b](https://github.com/jetthai/cuora-module/commit/f49977bfd480d961f5dc37435b3c60447eb198c0))
|
|
56
67
|
|
|
68
|
+
### [1.1.476](https://github.com/jetthai/cuora-module/compare/v1.1.475...v1.1.476) (2026-10-13)
|
|
69
|
+
|
|
70
|
+
### Bug Fixes
|
|
71
|
+
|
|
72
|
+
- **activity:** activity_cash 列表與明細回應格式異常時改走 onError,避免 machine 卡死 ([fea8494](https://github.com/jetthai/cuora-module/commit/fea8494d8c0ff084f8994cb58b8f1f7e3800024a))
|
|
73
|
+
|
|
74
|
+
### [1.1.475](https://github.com/jetthai/cuora-module/compare/v1.1.472...v1.1.475) (2026-10-12)
|
|
75
|
+
|
|
76
|
+
### [1.1.474](https://github.com/jetthai/cuora-module/compare/v1.1.473...v1.1.474) (2026-10-08)
|
|
77
|
+
|
|
57
78
|
### [1.1.473](https://github.com/jetthai/cuora-module/compare/v1.1.472...v1.1.473) (2026-10-05)
|
|
58
79
|
|
|
59
80
|
### [1.1.472-dev.2](https://github.com/jetthai/cuora-module/compare/v1.1.472-dev.1...v1.1.472-dev.2) (2026-10-01)
|
package/CLAUDE.md
CHANGED
|
@@ -53,9 +53,9 @@ You are a senior full-stack engineer with world-class capability across UI/UX, A
|
|
|
53
53
|
Before delivering any code change, verify each of the following yourself:
|
|
54
54
|
|
|
55
55
|
- [ ] **Follows existing conventions**: clear four-layer separation, XState v4 factory pattern (`export default function (request) { return createMachine(...) }`), naming conventions, no TypeScript
|
|
56
|
-
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
56
|
+
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData?, silent? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
57
57
|
- [ ] **V1→V2 path conversion**: new V2 endpoints must be added to `supportVersion2List` **manually**; use the `:param` form for dynamic parameters; put non-standard paths in the `specifyingPath` mapping
|
|
58
|
-
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information
|
|
58
|
+
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information; validate response shapes inside the service and reject there — never throw inside `assign()`
|
|
59
59
|
- [ ] **Memory safety**: `setInterval` / `socket.on()` / `addEventListener` registered inside an XState callback service **must return a cleanup function** (e.g. `() => clientSocket.off(event, handler)`) to avoid accumulating listeners across reconnects; listeners registered inside a Promise must also be cleaned up after resolve / reject
|
|
60
60
|
- [ ] **Token lifecycle**: token operations go through `getToken()` and the `extendToken` action, never bypass the interceptor to inject manually; prefer the existing TTL constants; when `fetchUserInfo` fails, let the session terminate naturally rather than retrying on your own
|
|
61
61
|
- [ ] **Error handling**: forward through `request.errorHandler` to the error machine, with correct branches for each special code (see "Error Code System")
|
|
@@ -113,6 +113,7 @@ state machine service → request.send(api.xxx(params)) → Request class → AP
|
|
|
113
113
|
isPublic?: boolean, // true = no auth token required
|
|
114
114
|
headers?: object, // Custom headers (e.g. reCAPTCHA)
|
|
115
115
|
isFormData?: boolean, // true = multipart/form-data
|
|
116
|
+
silent?: boolean, // true = on failure, don't forward to errorHandler (still throws)
|
|
116
117
|
}
|
|
117
118
|
```
|
|
118
119
|
|
|
@@ -232,6 +233,8 @@ loading (always + setInitData: takes paymentDetail from the factory context para
|
|
|
232
233
|
> return { calculation: data || event.data }
|
|
233
234
|
> })
|
|
234
235
|
> ```
|
|
236
|
+
>
|
|
237
|
+
> This pattern assumes `event.data` is always an object; `send()` may resolve `undefined`, and destructuring it inside an assign throws and stalls the machine (see item 13 of 2.9).
|
|
235
238
|
|
|
236
239
|
**processing state check**: `manual_cash.js` and `virtual_bank_cash.js` use an `isProcessing` guard to check whether there is an in-progress deposit order, and if so jump straight to `submitted` to prevent duplicate submission.
|
|
237
240
|
|
|
@@ -336,7 +339,7 @@ io(`${socketURL}/frontend`, {
|
|
|
336
339
|
7. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
|
|
337
340
|
8. axios.request(config)
|
|
338
341
|
9. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
|
|
339
|
-
10. Error handling: ERR_F108 → isBlocked; ERR_800 (cancelled) → silent; everything else → errorHandler
|
|
342
|
+
10. Error handling: ERR_F108 → isBlocked + errorHandler; ERR_998 → thrown directly; ERR_800 (cancelled) → silent; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown)
|
|
340
343
|
```
|
|
341
344
|
|
|
342
345
|
**V1→V2 conversion**: `supportVersion2List` supports dynamic paths (e.g. `payment/v2/:paymentType/transaction`, where `:param` is replaced by `[^/]+`); special paths are hard-coded in `specifyingPath`, and the rest are auto-converted via `/([a-z])([A-Z])/g`. **When adding an endpoint that needs V2 conversion, it must be added to the list manually.**
|
|
@@ -354,6 +357,8 @@ io(`${socketURL}/frontend`, {
|
|
|
354
357
|
9. **Unfinished-game infinite retry**: the `unfinishedGame` state in `error.js` returns to itself on `onError`, with **no backoff strategy and no retry cap** (a known issue, see "Known Technical Debt").
|
|
355
358
|
10. **`isMobile` is a string, not a boolean**: in `common.js`, `isMobile = userAgent?.device?.type` returns `'mobile'`/`'tablet'`/`undefined`, so comparisons must be string-based (e.g. `isMobile === 'mobile' ? 'y' : null`).
|
|
356
359
|
11. **Requests carry no CancelToken by default**: the cancellation feature of `send(req, customToken)` is **opt-in**. In axios <0.22 the cancel handler is never unsubscribed — a shared long-lived token accumulates one handler per request, causing overnight OOM when left running (TI-15555). **Do not "helpfully" add the CancelToken back onto the shared path.**
|
|
360
|
+
12. **`silent: true` only skips errorHandler**: the error is still thrown to the caller's `onError`, and `ERR_F108` is still routed as usual; but every other error code — **including logout-class codes such as `ERR_A104`, and `ERR_G106` insufficient balance** — never reaches the error machine. Use it only for background requests whose session invalidation is already covered by `fetchUserInfo` polling; never add it to user-initiated requests.
|
|
361
|
+
13. **`send()` does not guarantee an object, and `assign()` must never throw**: non-config requests during maintenance (`isBlocked`) and `ERR_800` cancellations make `send()` **resolve `undefined`** (they never reach `onError`); a 200 response with a non-JSON body resolves a string, so destructuring `{ data }` yields `undefined`. When an `assign()` throws, XState v4 clears the event queue and the state is not updated — the machine stays in the current invoke state and `after`-based polling stops until an external event (e.g. `REFRESH`) moves it out. **Validate response shapes inside the service and `throw` there (reject → `onError`)**; every assign in `onDone` must handle every value the service can resolve, including deliberate `return null` early exits.
|
|
357
362
|
|
|
358
363
|
---
|
|
359
364
|
|
package/GEMINI.md
CHANGED
|
@@ -53,9 +53,9 @@ You are a senior full-stack engineer with world-class capability across UI/UX, A
|
|
|
53
53
|
Before delivering any code change, verify each of the following yourself:
|
|
54
54
|
|
|
55
55
|
- [ ] **Follows existing conventions**: clear four-layer separation, XState v4 factory pattern (`export default function (request) { return createMachine(...) }`), naming conventions, no TypeScript
|
|
56
|
-
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
56
|
+
- [ ] **Correct API descriptor object**: returns the `{ url, method, params?, isPublic?, headers?, isFormData?, silent? }` structure; HTTP method consistently lowercase; `isPublic: true` endpoints checked for whether they need `appSecret`; URLs carry no leading slash (unless deliberately bypassing `url-join`'s `baseURL`, in which case comment the reason)
|
|
57
57
|
- [ ] **V1→V2 path conversion**: new V2 endpoints must be added to `supportVersion2List` **manually**; use the `:param` form for dynamic parameters; put non-standard paths in the `specifyingPath` mapping
|
|
58
|
-
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information
|
|
58
|
+
- [ ] **State machine conventions**: always modify context via `assign()`, never mutate directly; clone deep objects with `JSON.parse(JSON.stringify())`; choose the initial state name by semantics; don't let `onError` silently fall back to `idle` and lose the error information; validate response shapes inside the service and reject there — never throw inside `assign()`
|
|
59
59
|
- [ ] **Memory safety**: `setInterval` / `socket.on()` / `addEventListener` registered inside an XState callback service **must return a cleanup function** (e.g. `() => clientSocket.off(event, handler)`) to avoid accumulating listeners across reconnects; listeners registered inside a Promise must also be cleaned up after resolve / reject
|
|
60
60
|
- [ ] **Token lifecycle**: token operations go through `getToken()` and the `extendToken` action, never bypass the interceptor to inject manually; prefer the existing TTL constants; when `fetchUserInfo` fails, let the session terminate naturally rather than retrying on your own
|
|
61
61
|
- [ ] **Error handling**: forward through `request.errorHandler` to the error machine, with correct branches for each special code (see "Error Code System")
|
|
@@ -113,6 +113,7 @@ state machine service → request.send(api.xxx(params)) → Request class → AP
|
|
|
113
113
|
isPublic?: boolean, // true = no auth token required
|
|
114
114
|
headers?: object, // Custom headers (e.g. reCAPTCHA)
|
|
115
115
|
isFormData?: boolean, // true = multipart/form-data
|
|
116
|
+
silent?: boolean, // true = on failure, don't forward to errorHandler (still throws)
|
|
116
117
|
}
|
|
117
118
|
```
|
|
118
119
|
|
|
@@ -232,6 +233,8 @@ loading (always + setInitData: takes paymentDetail from the factory context para
|
|
|
232
233
|
> return { calculation: data || event.data }
|
|
233
234
|
> })
|
|
234
235
|
> ```
|
|
236
|
+
>
|
|
237
|
+
> This pattern assumes `event.data` is always an object; `send()` may resolve `undefined`, and destructuring it inside an assign throws and stalls the machine (see item 13 of 2.9).
|
|
235
238
|
|
|
236
239
|
**processing state check**: `manual_cash.js` and `virtual_bank_cash.js` use an `isProcessing` guard to check whether there is an in-progress deposit order, and if so jump straight to `submitted` to prevent duplicate submission.
|
|
237
240
|
|
|
@@ -336,7 +339,7 @@ io(`${socketURL}/frontend`, {
|
|
|
336
339
|
7. Custom paramsSerializer: special encoding for the q parameter (avoids double-encoding)
|
|
337
340
|
8. axios.request(config)
|
|
338
341
|
9. Response interceptor: response.data.error present → reject; Network Error / 404 → ERR_998 + Sentry
|
|
339
|
-
10. Error handling: ERR_F108 → isBlocked; ERR_800 (cancelled) → silent; everything else → errorHandler
|
|
342
|
+
10. Error handling: ERR_F108 → isBlocked + errorHandler; ERR_998 → thrown directly; ERR_800 (cancelled) → silent; everything else → errorHandler (skipped when the descriptor carries silent: true, still thrown)
|
|
340
343
|
```
|
|
341
344
|
|
|
342
345
|
**V1→V2 conversion**: `supportVersion2List` supports dynamic paths (e.g. `payment/v2/:paymentType/transaction`, where `:param` is replaced by `[^/]+`); special paths are hard-coded in `specifyingPath`, and the rest are auto-converted via `/([a-z])([A-Z])/g`. **When adding an endpoint that needs V2 conversion, it must be added to the list manually.**
|
|
@@ -354,6 +357,8 @@ io(`${socketURL}/frontend`, {
|
|
|
354
357
|
9. **Unfinished-game infinite retry**: the `unfinishedGame` state in `error.js` returns to itself on `onError`, with **no backoff strategy and no retry cap** (a known issue, see "Known Technical Debt").
|
|
355
358
|
10. **`isMobile` is a string, not a boolean**: in `common.js`, `isMobile = userAgent?.device?.type` returns `'mobile'`/`'tablet'`/`undefined`, so comparisons must be string-based (e.g. `isMobile === 'mobile' ? 'y' : null`).
|
|
356
359
|
11. **Requests carry no CancelToken by default**: the cancellation feature of `send(req, customToken)` is **opt-in**. In axios <0.22 the cancel handler is never unsubscribed — a shared long-lived token accumulates one handler per request, causing overnight OOM when left running (TI-15555). **Do not "helpfully" add the CancelToken back onto the shared path.**
|
|
360
|
+
12. **`silent: true` only skips errorHandler**: the error is still thrown to the caller's `onError`, and `ERR_F108` is still routed as usual; but every other error code — **including logout-class codes such as `ERR_A104`, and `ERR_G106` insufficient balance** — never reaches the error machine. Use it only for background requests whose session invalidation is already covered by `fetchUserInfo` polling; never add it to user-initiated requests.
|
|
361
|
+
13. **`send()` does not guarantee an object, and `assign()` must never throw**: non-config requests during maintenance (`isBlocked`) and `ERR_800` cancellations make `send()` **resolve `undefined`** (they never reach `onError`); a 200 response with a non-JSON body resolves a string, so destructuring `{ data }` yields `undefined`. When an `assign()` throws, XState v4 clears the event queue and the state is not updated — the machine stays in the current invoke state and `after`-based polling stops until an external event (e.g. `REFRESH`) moves it out. **Validate response shapes inside the service and `throw` there (reject → `onError`)**; every assign in `onDone` must handle every value the service can resolve, including deliberate `return null` early exits.
|
|
357
362
|
|
|
358
363
|
---
|
|
359
364
|
|
package/package.json
CHANGED
|
@@ -101,7 +101,8 @@ export default function (request) {
|
|
|
101
101
|
}
|
|
102
102
|
}),
|
|
103
103
|
setProgressSummary: assign((context, event) => {
|
|
104
|
-
|
|
104
|
+
if (!event.data) return {}
|
|
105
|
+
const { progressSummary } = event.data
|
|
105
106
|
return {
|
|
106
107
|
progressSummary: progressSummary || null,
|
|
107
108
|
}
|
|
@@ -208,7 +209,6 @@ export default function (request) {
|
|
|
208
209
|
|
|
209
210
|
const { activityList = [], detailNeededActivityTypes } = context
|
|
210
211
|
const filteredActivityList = activityList.filter((activity) => detailNeededActivityTypes.includes(activity.activityType))
|
|
211
|
-
|
|
212
212
|
const [activityDetailList, progressSummaryRes] = await Promise.all([
|
|
213
213
|
Promise.all(
|
|
214
214
|
filteredActivityList.map((item) => {
|
|
@@ -217,7 +217,6 @@ export default function (request) {
|
|
|
217
217
|
),
|
|
218
218
|
isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : Promise.resolve(null),
|
|
219
219
|
])
|
|
220
|
-
|
|
221
220
|
// ERR_800/維護中時 send() 回 undefined,進到 setActivityDetailList 讀 item.data 會在 assign 內拋錯而卡死 machine;
|
|
222
221
|
// 整輪 reject 走 onError,保留上一輪明細並於下個 TIMEOUT 重試
|
|
223
222
|
if (!activityDetailList.every((res) => res !== null && typeof res === 'object')) {
|
|
@@ -24,6 +24,7 @@ export default function (request) {
|
|
|
24
24
|
spinResult: {},
|
|
25
25
|
rouletteV2ExchangeAward: [],
|
|
26
26
|
calculatedNewSpinRewards: [],
|
|
27
|
+
isSpinOutOfStock: false,
|
|
27
28
|
awardedCashAmount: 0,
|
|
28
29
|
awardedFreeAmount: 0,
|
|
29
30
|
awardedPointsAmount: 0,
|
|
@@ -209,36 +210,26 @@ export default function (request) {
|
|
|
209
210
|
}),
|
|
210
211
|
setSpinResult: assign((context, event) => {
|
|
211
212
|
const { unCollectRewards = [], newSpinRewards = [], spinLeft = 0 } = JSON.parse(JSON.stringify(event.data || {}))
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
.
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
} else {
|
|
226
|
-
return false
|
|
227
|
-
}
|
|
228
|
-
})
|
|
229
|
-
}
|
|
230
|
-
if (alreadyHave) {
|
|
231
|
-
arr[newIndex].count++
|
|
232
|
-
} else {
|
|
233
|
-
arr.push(spin)
|
|
234
|
-
}
|
|
235
|
-
return arr
|
|
236
|
-
}, [])
|
|
213
|
+
// JT-1780311660:newSpinRewards[].outOfStock === true 代表抽中已無庫存的實體獎,後端不派獎、不進 unCollectRewards,
|
|
214
|
+
// 跑馬燈也不展示;只有嚴格 true 才算缺貨(null / undefined 為非實體獎或舊後端)。合併計數沿用 rewardType + reward 相同才合併
|
|
215
|
+
const isOutOfStock = (spin) => spin?.outOfStock === true
|
|
216
|
+
const calculatedNewSpinRewards = newSpinRewards.reduce((arr, spin) => {
|
|
217
|
+
if (!spin || isOutOfStock(spin)) return arr
|
|
218
|
+
const existing = arr.find((item) => item.rewardType === spin.rewardType && item.reward === spin.reward)
|
|
219
|
+
if (existing) {
|
|
220
|
+
existing.count++
|
|
221
|
+
} else {
|
|
222
|
+
arr.push({ ...spin, count: 1 })
|
|
223
|
+
}
|
|
224
|
+
return arr
|
|
225
|
+
}, [])
|
|
237
226
|
|
|
238
227
|
return {
|
|
239
228
|
spinResult: event.data,
|
|
240
229
|
unCollectRewards,
|
|
241
230
|
calculatedNewSpinRewards,
|
|
231
|
+
// 本次抽獎含缺貨項目(單次 Spin 缺貨或 Spin All 部分/全部缺貨),前台以此決定是否改顯示通用缺貨提示
|
|
232
|
+
isSpinOutOfStock: newSpinRewards.some(isOutOfStock),
|
|
242
233
|
spinLeft,
|
|
243
234
|
}
|
|
244
235
|
}),
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# JT-1776243420: Third-Party Register Carry Phone / Email Payload
|
|
2
|
-
|
|
3
|
-
## Key Changes
|
|
4
|
-
|
|
5
|
-
1. Extended third-party redirect payload assembly to read `tp_phone`, `tp_countryCode`, and `tp_email` from storage.
|
|
6
|
-
2. Preserved existing affiliate code / nickname behavior and appended new fields only when values are valid.
|
|
7
|
-
3. Cleans the temporary third-party storage keys after composing the redirect query.
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Key Findings
|
|
12
|
-
|
|
13
|
-
### Strengths
|
|
14
|
-
|
|
15
|
-
1. The change is tightly scoped to the third-party auth redirect builder in `src/machine/auth.js:477-520`.
|
|
16
|
-
2. Existing affiliate code and nickname logic remains unchanged while phone / email are additive only.
|
|
17
|
-
3. Temporary keys are removed after payload composition, reducing leakage into later unrelated auth flows.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
### Behavior Observed
|
|
22
|
-
|
|
23
|
-
1. Static review confirms `phone`, `countryCode`, and `email` are appended only when storage values are not `undefined` / `null`.
|
|
24
|
-
2. Channel and subchannel fallback logic stays intact after the new fields are added.
|
|
25
|
-
3. No unrelated file changes were present in this repo for the review scope.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## 🔧 Change Type
|
|
30
|
-
|
|
31
|
-
- [ ] 🐛 Bug fix
|
|
32
|
-
- [x] ✨ New feature
|
|
33
|
-
- [ ] 💄 Style
|
|
34
|
-
- [ ] ♻️ Refactor
|
|
35
|
-
- [ ] ⚡ Performance
|
|
36
|
-
- [ ] 🔧 Chore
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 📱 Impact Scope
|
|
41
|
-
|
|
42
|
-
- Third-party register / login redirect query assembly in cuora shared auth machine.
|
|
43
|
-
- Downstream PWA clients that store `tp_phone`, `tp_countryCode`, and `tp_email` before `LOGIN_3PARTY`.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Test Completion Status
|
|
48
|
-
|
|
49
|
-
| Item | Validation Tested | Status |
|
|
50
|
-
| -------------------------- | --------------------------------------------------------------------- | ------- |
|
|
51
|
-
| Diff hygiene | `git diff --check` in `cuora-module` | PASS |
|
|
52
|
-
| Shared auth payload review | Reviewed `src/machine/auth.js:477-520` against ticket intent | PASS |
|
|
53
|
-
| Runtime redirect execution | Not run in this repo directly; validated through client repos instead | NOT RUN |
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## 📋 Spec Validation (Aligned with review-playbook)
|
|
58
|
-
|
|
59
|
-
| Spec Item | Evidence (File/Line/Result) | Status |
|
|
60
|
-
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ------ |
|
|
61
|
-
| Third-party flow can carry phone when client stored it | `src/machine/auth.js:479-520` reads `tp_phone` / `tp_countryCode` and appends them to `referralObj` | PASS |
|
|
62
|
-
| Third-party flow can carry email when client stored it | `src/machine/auth.js:481-520` reads `tp_email` and appends it to `referralObj` | PASS |
|
|
63
|
-
| Affiliate code and nickname keep original logic | `src/machine/auth.js:477-500` keeps `ac` / `nick_name` handling unchanged | PASS |
|
|
64
|
-
| Temporary third-party data does not leak into later unrelated flows | `src/machine/auth.js:518-520` removes the temporary storage keys after composing the redirect URL | PASS |
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## 📋 Standards Checklist (Summary)
|
|
69
|
-
|
|
70
|
-
| Category | Result | Notes |
|
|
71
|
-
| ---------------------- | ------- | --------------------------------------------------------------------------- |
|
|
72
|
-
| Memory Safety | PASS | Simple storage reads and object assembly only. |
|
|
73
|
-
| Rendering Performance | PASS | No rendering code touched. |
|
|
74
|
-
| Network Requests | PASS | Existing redirect flow only; no extra requests added. |
|
|
75
|
-
| Bundle Optimization | PASS | No new imports or heavy logic added. |
|
|
76
|
-
| Code Quality | PASS | Scope is narrow and branch contains only the required file change. |
|
|
77
|
-
| Vue / Nuxt Standards | NOT RUN | Shared module; not a Vue / Nuxt surface. |
|
|
78
|
-
| SSR Security Standards | PASS | Query parameters are assembled from existing client-side storage path only. |
|
|
79
|
-
| Project Conventions | PASS | Matches existing storage-guard pattern used for affiliate / nickname. |
|
|
80
|
-
|
|
81
|
-
## Conclusion
|
|
82
|
-
|
|
83
|
-
This repo’s shared auth-machine change matches the ticket intent and is internally consistent. Runtime behavior was not executed in `cuora-module` directly, but both client repos now pass the new storage keys into this shared payload path.
|
|
84
|
-
|
|
85
|
-
**Overall Result:** PASS (PARTIAL)
|