@jetthai/cuora 1.1.485-dev.0 → 1.1.485-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 +61 -27
- package/AGENTS.md +61 -27
- package/AI_PROMPT_SOURCE.md +61 -27
- package/CHANGELOG.md +7 -0
- package/CLAUDE.md +61 -27
- package/GEMINI.md +61 -27
- package/package.json +1 -1
- package/src/util/constant.js +2 -1
- package/e2e/feature-map.md +0 -61
- package/prepare-for-pr/JT-1776243420.md +0 -85
- package/prepare-for-pr/TI-16026/STATE.md +0 -17
- package/prepare-for-pr/TI-16026/after-prepare-authorization.md +0 -3
- package/prepare-for-pr/TI-16026/analysis.md +0 -38
- package/prepare-for-pr/TI-16026/answer-analyze-01.md +0 -1
- package/prepare-for-pr/TI-16026/answer-commit-01.md +0 -2
- package/prepare-for-pr/TI-16026/answer-commit-02.md +0 -1
- package/prepare-for-pr/TI-16026/bundle.json +0 -18
- package/prepare-for-pr/TI-16026/checklist.md +0 -39
- package/prepare-for-pr/TI-16026/claude-after-model +0 -1
- package/prepare-for-pr/TI-16026/claude-commit-session +0 -1
- package/prepare-for-pr/TI-16026/claude-harvest-session +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/01-analyze.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/01-analyze.out +0 -2
- package/prepare-for-pr/TI-16026/claude-hops/02-analyze.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/02-analyze.out +0 -4
- package/prepare-for-pr/TI-16026/claude-hops/03-dev.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/03-dev.out +0 -4
- package/prepare-for-pr/TI-16026/claude-hops/04-dev.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/04-dev.out +0 -4
- package/prepare-for-pr/TI-16026/claude-hops/05-dev.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/05-dev.out +0 -3
- package/prepare-for-pr/TI-16026/claude-hops/06-after.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/06-after.out +0 -2
- package/prepare-for-pr/TI-16026/claude-hops/07-commit.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/07-commit.out +0 -2
- package/prepare-for-pr/TI-16026/claude-hops/08-commit.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/08-commit.out +0 -2
- package/prepare-for-pr/TI-16026/claude-hops/09-commit.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/09-commit.out +0 -8
- package/prepare-for-pr/TI-16026/claude-hops/10-harvest.err +0 -1
- package/prepare-for-pr/TI-16026/claude-hops/10-harvest.out +0 -3
- package/prepare-for-pr/TI-16026/commit-note.md +0 -5
- package/prepare-for-pr/TI-16026/feature-map.before.md +0 -61
- package/prepare-for-pr/TI-16026/harvest-redaction.out +0 -1
- package/prepare-for-pr/TI-16026/harvest.md +0 -37
- package/prepare-for-pr/TI-16026/lessons.md +0 -5
- package/prepare-for-pr/TI-16026/open-questions.md +0 -6
- package/prepare-for-pr/TI-16026/publish.md +0 -28
- package/prepare-for-pr/TI-16026/review-convergence-response.md +0 -3
- package/prepare-for-pr/TI-16026/review-input/scope.md +0 -18
- package/prepare-for-pr/TI-16026/review-log.md +0 -57
- package/prepare-for-pr/TI-16026/review-notes.md +0 -97
- package/prepare-for-pr/TI-16026/review-response-r1.md +0 -7
- package/prepare-for-pr/TI-16026/spec-proposal.md +0 -34
- package/prepare-for-pr/TI-16026/spec-snapshot.md +0 -291
- package/prepare-for-pr/TI-16026/state-log.md +0 -35
- package/prepare-for-pr/TI-16026/user-messages/01.md +0 -12
- package/prepare-for-pr/TI-16026/user-messages/02.md +0 -20
- package/prepare-for-pr/TI-16026/user-messages/03.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/04.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/05.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/06.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/07.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/08.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/09.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/10.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/11.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/12.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/13.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/14.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/15.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/16.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/17.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/18.md +0 -10
- package/prepare-for-pr/TI-16026/user-messages/19.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/20.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/21.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/22.md +0 -1
- package/prepare-for-pr/TI-16026/user-messages/23.md +0 -8
- package/prepare-for-pr/TI-16026/user-question.md +0 -24
- package/prepare-for-pr/TI-16026/verify-after.md +0 -15
- package/prepare-for-pr/TI-16026.md +0 -408
|
@@ -1 +0,0 @@
|
|
|
1
|
-
A:允許 Claude CLI 提交
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"formatVersion": 2,
|
|
3
|
-
"taskId": "TI-16026",
|
|
4
|
-
"title": "[優化][前台] 存出款 Pending 畫面依 WebSocket 即時刷新狀態",
|
|
5
|
-
"spec": { "source": "notion", "ref": "https://app.notion.com/p/3f8b399ad8b5801d81e9fb0675e50907", "externalId": "TI-16026" },
|
|
6
|
-
"delivery": { "target": "local", "ref": null },
|
|
7
|
-
"repo": "cuora-module",
|
|
8
|
-
"adapter": "none",
|
|
9
|
-
"branch": "feat/stone/JT-1791856380-ws-refresh",
|
|
10
|
-
"baseCommit": "c9186b6b3f424d74a9fe1363e64b17eb63809b58",
|
|
11
|
-
"submodules": {},
|
|
12
|
-
"runtime": [],
|
|
13
|
-
"viewports": [],
|
|
14
|
-
"locales": [],
|
|
15
|
-
"dataSource": "none: SDK without UI; proved by node:test unit tests with a stubbed request (user choice A, 2026-11-17). Screen evidence lives in the client-pwa-cash TI-16026 bundle.",
|
|
16
|
-
"createdBy": "claude /ui-baseline-codex",
|
|
17
|
-
"createdAt": "2026-11-17T00:00:00+08:00"
|
|
18
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Checklist — TI-16026 (cuora-module)
|
|
2
|
-
|
|
3
|
-
Mode: unit-test proof (user choice A). No captures, no showcase, no frame. Cascade sweep: skipped — the diff is one XState transition in `src/machine/withdraw/withdraw_manual_cash.js`; no CSS, class, style, DOM or stacking code exists in this repo.
|
|
4
|
-
|
|
5
|
-
## Spec trace
|
|
6
|
-
|
|
7
|
-
| Spec row | Location | Items |
|
|
8
|
-
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
9
|
-
| 現行問題說明 › 問題描述 / 原因分析 | notion https://app.notion.com/p/3f8b399ad8b5801d81e9fb0675e50907 § 現行問題說明 | — (no acceptance statement; cause 2 is fixed by U1) |
|
|
10
|
-
| 優化內容 › 流程 1–2 (socket push, applyId match) | notion … § 優化內容 › 流程 | — (client-pwa-cash) |
|
|
11
|
-
| 優化內容 › 流程 3「重新抓取狀態…無處理中訂單則回到出款表單,有則更新畫面」 | notion … § 優化內容 › 流程 step 3 | U1, U2, U3 |
|
|
12
|
-
| 前端需調整 › cuora「`submitted` 需可接受 `REFRESH` 回到 `loading`」 | notion … § 前端需調整 › @jetthai/cuora bullet 1 | U1, U4 |
|
|
13
|
-
| 前端需調整 › cuora「`websocket.js`…放寬此條件」 | notion … § 前端需調整 › @jetthai/cuora bullet 2 | — (already satisfied: `src/machine/websocket.js:296-302`) |
|
|
14
|
-
| 前端需調整 › client-pwa-cash | notion … § 前端需調整 › client-pwa-cash | — (client-pwa-cash) |
|
|
15
|
-
| 翻譯 | notion … § 翻譯 | — (empty) |
|
|
16
|
-
|
|
17
|
-
## Items
|
|
18
|
-
|
|
19
|
-
- U1 — `submitted` + `REFRESH` re-runs loading
|
|
20
|
-
- origin: spec
|
|
21
|
-
- proof: measure (unit test)
|
|
22
|
-
- expected: from `submitted`, sending `REFRESH` enters `loading` and calls `getPendingOrder` a second time.
|
|
23
|
-
- files: src/machine/withdraw/withdraw_manual_cash.js, test/withdraw_manual_cash.test.js
|
|
24
|
-
- result: unit pass — `node --test test/withdraw_manual_cash.test.js`, 2026-11-17
|
|
25
|
-
- U2 — refresh with no pending order returns to the form
|
|
26
|
-
- origin: spec
|
|
27
|
-
- proof: measure
|
|
28
|
-
- expected: second `getPendingOrder` returns `[]` → state `loaded`, `context.processing` is `undefined`.
|
|
29
|
-
- result: unit pass — `node --test test/withdraw_manual_cash.test.js`, 2026-11-17
|
|
30
|
-
- U3 — refresh with an order still pending updates it
|
|
31
|
-
- origin: spec
|
|
32
|
-
- proof: measure
|
|
33
|
-
- expected: second `getPendingOrder` returns a different order object → state `submitted`, `context.processing` equals the new object (distinct `applyId` from the first).
|
|
34
|
-
- result: unit pass — `node --test test/withdraw_manual_cash.test.js`, 2026-11-17
|
|
35
|
-
- U4 — REFRESH elsewhere unchanged
|
|
36
|
-
- origin: ripple, via: root `on.REFRESH` `cond: 'hasNoBank'` (`withdraw_manual_cash.js:156`)
|
|
37
|
-
- proof: measure
|
|
38
|
-
- expected: in `loaded` with a bound bank, `REFRESH` is ignored (no new `getPendingOrder` call, state stays `loaded`).
|
|
39
|
-
- result: unit pass — `node --test test/withdraw_manual_cash.test.js`, 2026-11-17
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
sonnet medium
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5B674676-0F2B-458D-9F34-0F31F96DB57C
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
66D21B14-F9F3-4DBA-B5BA-A75445989965
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
BLOCKED-ON-USER: cuora-module is a UI-less SDK with no e2e/review-playbook.md; should it skip the screenshot flow (unit test + review, screen evidence from client-pwa-cash), get a playbook first, or be folded into the client-pwa-cash bundle?
|
|
2
|
-
prepare-for-pr/TI-16026/user-question.md
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
NEXT: committed
|
|
2
|
-
219a415070e8c9ee23615b60a9942d6c4dc1b02c
|
|
3
|
-
|
|
4
|
-
I committed only `src/machine/withdraw/withdraw_manual_cash.js` and `test/withdraw_manual_cash.test.js`, with `[TI-16026]` in the message. The tracked tree is clean afterwards. I did not push, merge, publish, or run any npm command.
|
|
5
|
-
|
|
6
|
-
`HUSKY=0` did not stop the pre-commit hook. `npm run format` (`prettier --write .`) still ran over the whole tree, including the ignored `prepare-for-pr/` files. That includes the protected review reports `prepare-for-pr/TI-16026.md` and `prepare-for-pr/JT-1776243420.md`. Any change prettier made to them is formatting only, but check the TI-16026 report before relying on it.
|
|
7
|
-
|
|
8
|
-
I rewrote `STATE.md` (`phase: done`) and appended this hop to `state-log.md`.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Ignoring 17 permissions.allow entries from .claude/settings.local.json: this workspace has not been trusted. Run Claude Code interactively here once and accept the trust dialog, or set projects["/Users/agentstone/Desktop/workspace/JT/cuora-module"].hasTrustDialogAccepted: true in /Users/agentstone/.claude.json.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
The answer file records the user's exact prior authorization and their 「完成」 after the token setup instructions. Treat it as authorization to commit this reviewed change and complete the documented shared-dev release flow after npm authentication succeeds.
|
|
2
|
-
|
|
3
|
-
Commit only these current product paths: `src/machine/withdraw/withdraw_manual_cash.js` and `test/withdraw_manual_cash.test.js`, with task key `TI-16026` in the commit message. Do not push, merge, publish, or run npm commands in this hop: npm whoami returned E401 and the token needs correction first.
|
|
4
|
-
|
|
5
|
-
Pre-commit evidence: `node --test test/*.test.js` passed 22/22; `git diff --check` is clean. Full-tree `prettier --list-different .` reported only files inside the globally ignored `prepare-for-pr/` task bundle (verified by `git check-ignore`); it reported no product source or test files. The repo's pre-commit hook runs `npm run format` (`prettier --write .`) and would rewrite the ignored task artifacts, including the protected review report. `HUSKY=0` is set for this commit hop only to preserve those task files; the non-mutating full-tree format check is the formatting evidence. Do not edit product code or any review report.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Feature map — per-repo scenario knowledge that outlives a bundle
|
|
2
|
-
|
|
3
|
-
A task bundle is removed after delivery and commit (bundle-contract.md "Retention"), and with it everything the task learned about reaching its screens: routes, preconditions, selectors that held, states a site can or cannot show, and the methods that wasted runs. The feature map keeps that knowledge, per repo, for the next task. Model: pstack create-verification-skill "feature map" / control adapter.
|
|
4
|
-
|
|
5
|
-
## Where
|
|
6
|
-
|
|
7
|
-
`<repoRoot>/e2e/feature-map.md`, beside `e2e/review-playbook.md`. Local only, never tracked: the repo's `.gitignore` or the global excludes file must ignore it. `call-claude.sh --stage harvest` refuses to run when `git check-ignore` does not report it ignored.
|
|
8
|
-
|
|
9
|
-
The map holds per-feature knowledge. Repo-wide rules the review relies on stay in `e2e/review-playbook.md`, which the harvest never edits; a harvest finding that contradicts the playbook is reported, not written there.
|
|
10
|
-
|
|
11
|
-
## Format
|
|
12
|
-
|
|
13
|
-
```markdown
|
|
14
|
-
# Feature map — <repo>
|
|
15
|
-
|
|
16
|
-
Hints, not facts: verify any line you rely on with this task's own BEFORE capture.
|
|
17
|
-
Each line ends with (observed YYYY-MM-DD <TASK-id>) = the last task that confirmed it.
|
|
18
|
-
|
|
19
|
-
## Repo-wide
|
|
20
|
-
|
|
21
|
-
- <runtime gotcha that affects every feature: cause → workaround> (observed …)
|
|
22
|
-
|
|
23
|
-
## <screen or route> e.g. `/main` lobby — game cards
|
|
24
|
-
|
|
25
|
-
- Entry: <route or menu path>; site <CONFIG_NAME>; viewport <w×h> (observed …)
|
|
26
|
-
- Preconditions: <guest | logged-in, account kind only>; backend <dev|qa>; data <API path or fixture boundary> (observed …)
|
|
27
|
-
- Selectors: <stable anchor> — `<file:line>` (observed …)
|
|
28
|
-
- States: <state> — <how it is reached (fixture, fault, menu)> | unreachable on <site>: <evidence> (observed …)
|
|
29
|
-
- Gotchas: <what failed, its proven cause> → <what works>; see measurement-recipes.md "<row>" when it applies (observed …)
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
- One `##` section per screen or route; `## Repo-wide` first. Section keys use the screen names `repos.md` uses, so the analyze hop can find them.
|
|
33
|
-
- Size cap: about 300 lines for the file, 25 lines per section.
|
|
34
|
-
- Only what a capture, a measurement or the code showed. A guess, a plan not run, or "not found" without saying how far the search went (e.g. sub-menus not expanded) is either written with that limit or left out.
|
|
35
|
-
|
|
36
|
-
## Credentials (README hard rule 5a, text rule)
|
|
37
|
-
|
|
38
|
-
The map is text evidence: no account value, password, token, test display name, or any value from `e2e/test-accounts.local.json`. Name an account by its kind ("logged-in member with a wallet", "the site's test account via `--auth accounts`"). The harvest stage runs `runner/redaction-check.mjs` on the map after Claude writes it and restores the previous map on any hit.
|
|
39
|
-
|
|
40
|
-
## Who reads it
|
|
41
|
-
|
|
42
|
-
| Reader | When | How |
|
|
43
|
-
| ------------------------------------------------ | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
-
| Claude analyze hop (`/ui-baseline-codex` Step 1) | before writing `scenarios.mjs`, fixtures and selectors | read `## Repo-wide` and the sections for the screens in this repo's `repos.md` row; list the lines used under `## Feature map lines used` in `analysis.md` (section + line text) |
|
|
45
|
-
| Claude verify-before hop (Step 2) | a capture failed | check the matching Gotchas before writing a Retake basis; a known cause with a known workaround is the Retake basis |
|
|
46
|
-
| `/qa-fix` | writing "How to verify" | entry, site and preconditions for the screen; read only, never written (no runtime observation happens there) |
|
|
47
|
-
|
|
48
|
-
## Who writes it — the harvest hop
|
|
49
|
-
|
|
50
|
-
Driver: after `NEXT: committed` (and after a supplement's delivery), **before** the bundle removal, Codex runs `call-claude.sh --stage harvest`. Always a new Claude session. Claude reads the bundle's text files and updates the map; the script backs the map up into the bundle, allows only the map to change, and runs the redaction check. Claude command "Harvest" holds the procedure. The same hop routes the run's other lessons (Codex's `lessons.md`) to a script check, `measurement-recipes.md` or a flow-file line — as proposals in `harvest.md` `## Lesson routing` for the user to approve; it writes nothing but the map. The bundle stays until the user has answered each proposal (bundle-contract.md Retention "When the removal runs").
|
|
51
|
-
|
|
52
|
-
## Pruning
|
|
53
|
-
|
|
54
|
-
In this order, on every harvest, within the sections this task touched (and `## Repo-wide`):
|
|
55
|
-
|
|
56
|
-
1. **Invalidated by evidence** — a line this task's capture or code contradicts is replaced by the new observation (never kept beside it); a `file:line` that no longer exists is fixed or the line removed; a screen the code no longer has loses its section.
|
|
57
|
-
2. **Confirmed** — a line listed under `## Feature map lines used` in `analysis.md` that this task's BEFORE capture bore out gets this task's date and ID.
|
|
58
|
-
3. **Merged** — duplicates and lines that say the same thing are merged into one.
|
|
59
|
-
4. **Over the cap** — only then, remove the lines unconfirmed for longest (oldest `observed`). Age alone is a weak signal, so this is the last step, not the first.
|
|
60
|
-
|
|
61
|
-
Claude writes `prepare-for-pr/{TASK-id}/harvest.md`: lines added, lines confirmed, every line removed with its reason (1, 3 or 4), and any contradiction with `e2e/review-playbook.md`. Codex copies it into the final report before the bundle is removed, so a removal stays visible.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e2e/test-accounts.local.json not found
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Harvest — TI-16026
|
|
2
|
-
|
|
3
|
-
## Map lines added
|
|
4
|
-
|
|
5
|
-
- Repo-wide: SDK has no UI / no e2e playbook; evidence is unit tests + review.
|
|
6
|
-
- Repo-wide: pre-commit hook runs prettier over ignored `prepare-for-pr/` even with `HUSKY=0`.
|
|
7
|
-
- Repo-wide: `npm whoami` E401 with `NPM_TOKEN_WRITE` set.
|
|
8
|
-
- New section `withdraw_manual_cash machine`: entry, selectors (`:40`, `:100`, `:159`), gotcha on failed REFRESH.
|
|
9
|
-
|
|
10
|
-
## Lines confirmed
|
|
11
|
-
|
|
12
|
-
None (`analysis.md` listed no feature-map lines used; the map was a copy of the shared contract text).
|
|
13
|
-
|
|
14
|
-
## Lines removed
|
|
15
|
-
|
|
16
|
-
- Whole previous content of `e2e/feature-map.md` (a verbatim copy of the shared `feature-map.md` contract, not repo knowledge; invalidated, rule 1). Backup: `feature-map.before.md`.
|
|
17
|
-
|
|
18
|
-
## Playbook contradictions
|
|
19
|
-
|
|
20
|
-
None (`e2e/review-playbook.md` does not exist in this repo).
|
|
21
|
-
|
|
22
|
-
## Lesson routing
|
|
23
|
-
|
|
24
|
-
1. `HUSKY=0` does not stop the pre-commit `prettier --write .`, which rewrites ignored `prepare-for-pr/` files — home: map (Repo-wide, written). A script check (a commit hop that compares `prepare-for-pr/` hashes before and after) is possible but overlaps the existing guard; discarded as one-off for this repo.
|
|
25
|
-
2. Claude's `Bash(HUSKY=0 git commit:*)` pattern did not match an env-prefixed command — proposal below.
|
|
26
|
-
3. `NPM_TOKEN_WRITE` set but `npm whoami` E401 — home: map (Repo-wide, written); project-specific, no shared-file change.
|
|
27
|
-
|
|
28
|
-
### Proposal for 2
|
|
29
|
-
|
|
30
|
-
白話:這次提交時,Claude 被允許執行 `git commit`,但實際指令前面多了 `HUSKY=0`,權限比對不到,使用者批准後還要手動補一條允許規則才能提交。建議在呼叫 Claude 提交階段的腳本裡,直接把允許規則寫成同時涵蓋有環境變數前綴與沒有前綴的 `git commit`,這樣提交階段不會因為格式不同被擋住。不改的話,每個會用 `HUSKY=0` 的 repo 提交時都可能再卡一次。
|
|
31
|
-
|
|
32
|
-
- Lesson: env-prefixed `HUSKY=0 git commit` is not matched by the `git commit` allow pattern.
|
|
33
|
-
- Evidence: `user-question.md`, `answer-commit-02.md`, `claude-hops/09-commit.out`.
|
|
34
|
-
- Target: `call-claude.sh` commit-stage `--allowedTools`.
|
|
35
|
-
- Text: add `Bash(HUSKY=0 git commit:*)` next to `Bash(git commit:*)`.
|
|
36
|
-
- Why no cheaper home: it is a permission flag, not a judgement; a script change is the cheapest.
|
|
37
|
-
- Overlap: none known.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Lessons — TI-16026 (cuora-module)
|
|
2
|
-
|
|
3
|
-
- The commit hop's `HUSKY=0` did not prevent the repository's pre-commit hook from running `npm run format` over the whole tree. It formatted globally ignored `prepare-for-pr/` files, including this task's review report and a report from another task. Evidence: `claude-hops/09-commit.out` and `STATE.md`. Do not rely on `HUSKY=0` to suppress repository hooks in a Claude tool subprocess; a future task needs a hook-safe, non-mutating format check or an explicit safe hook configuration before commit.
|
|
4
|
-
- Claude's commit tool permission pattern did not match the environment-prefixed `HUSKY=0 git commit` command. After the user approved the commit, the `Bash(HUSKY=0 git commit:*)` allowance had to be added explicitly. Evidence: `user-question.md`, `answer-commit-02.md`, and `claude-hops/09-commit.out`.
|
|
5
|
-
- A set `NPM_TOKEN_WRITE` variable did not establish usable npm authorization: `npm whoami` returned E401. Verify registry authentication before beginning the shared-dev release flow; evidence: `publish.md` and `STATE.md`.
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
# Open questions — TI-16026 (cuora-module)
|
|
2
|
-
|
|
3
|
-
None open.
|
|
4
|
-
|
|
5
|
-
- Q1 (answered 2026-11-17): how to verify this UI-less SDK repo. User: "A,不過修改後需要 publish cash 才有辦法驗證,而且 publish token 有改,有需要 publish 再叫我,或是先給我指令,我更新之後你就可以直接走到底". Meaning: no screenshot flow here; unit test + Codex review; a published version is needed before client-pwa-cash can verify; the publish command goes to the user now (`publish.md`).
|
|
6
|
-
- Spec L3 second bullet (relax `windowType === 'toast'` in `websocket.js`): already satisfied, no change. `src/machine/websocket.js:296-302` forwards every `payment-info` as `ACTIVITY_INFO` + `PUSH_ANALYTICS` with no `windowType` check (`rg windowType src` = 0 hits). The CLAUDE.md §2.6 table row saying "Conditional: when `windowType === 'toast'`" is stale; fixing that doc row is out of scope unless asked.
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Publish plan — TI-16026 (cuora-module)
|
|
2
|
-
|
|
3
|
-
The user has authorized using the new cuora dev build for cash verification and asked to be told when publishing is needed or given the command. Publishing is performed by the user because the npm credential is not currently verified in Codex.
|
|
4
|
-
|
|
5
|
-
## Release steps
|
|
6
|
-
|
|
7
|
-
1. Update the local environment variable `NPM_TOKEN_WRITE` used by `.npmrc`; do not send the token in chat. In a new shell, run `npm whoami` from this repo. It must succeed before proceeding.
|
|
8
|
-
2. The reviewed fix is commit `219a415070e8c9ee23615b60a9942d6c4dc1b02c` on `feat/stone/JT-1791856380-ws-refresh`. This feature branch was cut from `master` and has diverged from `dev`; cherry-pick only this commit onto `dev`, rather than merging the whole feature branch.
|
|
9
|
-
3. In `cuora-module`, run:
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
git switch dev
|
|
13
|
-
git cherry-pick 219a415070e8c9ee23615b60a9942d6c4dc1b02c
|
|
14
|
-
git push origin dev
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
The `post-checkout` hook pulls the latest `origin/dev`. The `pre-push` hook calculates the next `{master_version}-dev.N`, runs `standard-version`, pushes the release commit and tag, then runs `npm publish --tag dev`. It exits 1 after its internal push; `Released 1.1.485-dev.N on dev` indicates release success.
|
|
18
|
-
|
|
19
|
-
4. If the hook reports that `npm publish` failed after pushing the release commit, run `npm publish --tag dev` from the release commit on `dev`; do not repeat the push. Confirm the successful published version and send Codex the exact `1.1.485-dev.N`.
|
|
20
|
-
5. Codex then pins the exact version in `client-pwa-cash/package.json` and lockfile, reviews the package delta, runs `npm install`, and continues AFTER verification.
|
|
21
|
-
|
|
22
|
-
The direct command `npm publish --tag dev` from the feature branch is not the normal release path: it does not run the `dev` branch prerelease-version hook. The README and `scripts/auto-version.sh` / `.husky/pre-push` define the release path above.
|
|
23
|
-
|
|
24
|
-
## Authorization and gate
|
|
25
|
-
|
|
26
|
-
The user said: 「A,不過修改後需要 publish cash 才有辦法驗證,而且 publish token 有改,有需要 publish 再叫我,或是先給我指令,我更新之後你就可以直接走到底」. This authorizes completing the cuora dev release workflow after the credential is usable; no further authorization is needed for those steps. The stored token must remain local. An earlier `npm whoami` returned E401; the latest sandbox registry check did not return a result, so authentication is still unverified. Do not push or publish until the user's local `npm whoami` succeeds.
|
|
27
|
-
|
|
28
|
-
The user also confirmed: 「A:依既有規則修改」 — cash handles only `withdraw_success` and `withdraw_rejected`, requires `subType === 'payment'` and strict `applyId` / `transactionId` match, and excludes `withdraw_returned`. The subtype is inferred from the existing cash deposit filter; TI-7046 does not document it.
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
The driver ran `~/.agents/shared/ui-evidence/check-review.sh prepare-for-pr/TI-16026/review-log.md` after round r2 and it returned `converged`. A fresh whole-change convergence reviewer independently checked the base-to-working-tree change, verified F-r1-01 remains `ACCEPT` + `verified in r2: yes`, found 0 new findings, rewrote the r2 Impact block, reran the 6-case suite and read back the report/log/notes. The driver has updated STATE.md to `phase: review-response`.
|
|
2
|
-
|
|
3
|
-
Please finish the developer response/loop closure per the review protocol and next-phase guidance. This SDK follows user choice A: no BEFORE/AFTER capture or Notion self-test page. Do not commit, merge, push, publish, or run npm commands in this hop. The user reported the local publish-token setup complete; the shared-dev merge/push authorization remains open in STATE.md/publish.md and must be resolved at the publish gate. After review closure, return the next action via the required first-line protocol.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Review scope — TI-16026 (cuora-module)
|
|
2
|
-
|
|
3
|
-
## Spec
|
|
4
|
-
|
|
5
|
-
https://app.notion.com/p/3f8b399ad8b5801d81e9fb0675e50907
|
|
6
|
-
|
|
7
|
-
## Base
|
|
8
|
-
|
|
9
|
-
c9186b6b3f424d74a9fe1363e64b17eb63809b58 (diff: base..working tree; the new test file is untracked)
|
|
10
|
-
|
|
11
|
-
## Consuming files
|
|
12
|
-
|
|
13
|
-
Command: `rg -n withdraw_manual_cash src`
|
|
14
|
-
|
|
15
|
-
- src/machine/withdraw/index.js:1
|
|
16
|
-
- src/machine/withdraw/index.js:4
|
|
17
|
-
|
|
18
|
-
Downstream consumer outside this repo: client-pwa-cash (sends `REFRESH`; its own TI-16026 bundle).
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# TI-16026 review log
|
|
2
|
-
|
|
3
|
-
## Round r1 — Codex — 2026-11-17 — reviewed c9186b6 working tree (base c9186b6)
|
|
4
|
-
|
|
5
|
-
Comparison: `c9186b6b3f424d74a9fe1363e64b17eb63809b58` to the working tree on `feat/stone/JT-1791856380-ws-refresh`, including untracked `test/withdraw_manual_cash.test.js`. HEAD equals the base; the product change is uncommitted.
|
|
6
|
-
|
|
7
|
-
No new product-code findings in the reviewed scope. Targeted tests: 4 passed, 0 failed, exit 0. The root REFRESH bank/no-bank pure-transition probe passed. A memory-only negative control forcing `hasNoBank=true` made the existing bound-bank regression test fail as expected (3 passed, 1 failed, exit 1). Commands, raw output, traced paths and exclusions are recorded in `prepare-for-pr/TI-16026.md` and `review-notes.md`.
|
|
8
|
-
|
|
9
|
-
The initial `check-review.sh` returned exit 2 because this log did not yet exist; this is a new r1 log, with no earlier findings or decisions to reconcile. The driver explicitly prohibited reading STATE/checklist/author analysis and limited writes to this log, review notes and the report; those boundaries take precedence over the generic loop defaults.
|
|
10
|
-
|
|
11
|
-
### F-r1-01 [medium] A failed submitted refresh exits Pending and prevents a bound-bank retry
|
|
12
|
-
|
|
13
|
-
- class: product-code
|
|
14
|
-
- where: src/machine/withdraw/withdraw_manual_cash.js:101 (new path to loading.onError at :39–40)
|
|
15
|
-
- trigger: submitted with an existing processing order and a bound bank; REFRESH is accepted, then getPendingOrder rejects ERR_998.
|
|
16
|
-
- expected / actual: a failed status read must preserve Pending or expose a recoverable error until an empty pending-order response is confirmed / loading.onError enters loaded with the old processing object; a subsequent REFRESH is ignored because hasNoBank is false.
|
|
17
|
-
- evidence: independent convergence reproduction E5 in prepare-for-pr/TI-16026.md uses the real initializer and a local request stub: first pendingOrder returns W-1, the second rejects ERR_998; observed loaded plus processing W-1, with pendingOrder calls remaining at 2 after retry. Path: :101 → :34/:277 → :39–40; no setInitData at :173 on failure; retry reaches :160/:227. Request ERR_998 rethrows without errorHandler at src/request/request.js:337–338.
|
|
18
|
-
- proof: L4 ran
|
|
19
|
-
- risk: a transient read failure exposes the form state even when an order may still be pending, and the cash consumer's submitted-only refresh path can no longer recover it. No duplicate transaction or downstream rendering was executed or claimed.
|
|
20
|
-
- suggested action: preserve the previous pending state on refresh failure, or use an explicit retryable error state; distinguish a failed status read from a confirmed empty response and add a rejection-path regression test.
|
|
21
|
-
|
|
22
|
-
#### Claude response
|
|
23
|
-
|
|
24
|
-
- decision: ACCEPT
|
|
25
|
-
- reason: reproduced the path as described; a rejected refresh must not be read as "no pending order".
|
|
26
|
-
- fix: uncommitted — src/machine/withdraw/withdraw_manual_cash.js:39-40 `loading.onError` is now `[{ target: 'submitted', cond: 'isProcessing' }, { target: 'loaded' }]`. A refresh from `submitted` that rejects returns to `submitted` with the previous `processing` (setInitData does not run on error), where `submitted.on.REFRESH` accepts the retry regardless of `hasNoBank`. The first load has `processing: null`, so its failure still goes to `loaded` (unchanged). State names and the spec's `REFRESH → loading` are kept, so downstream `state.matches(...)` checks are unaffected. Regression tests in test/withdraw_manual_cash.test.js: "a failed refresh in submitted keeps the pending order and a later REFRESH retries" (2nd pendingOrder rejects ERR_998 → submitted + processing W-1; 3rd REFRESH → pendingOrder call 3 → loaded) and "a failed first load without a pending order still shows the form". `node --test test/*.test.js`: 22 pass, 0 fail.
|
|
27
|
-
|
|
28
|
-
#### Codex follow-up (round r2)
|
|
29
|
-
|
|
30
|
-
- verified in r2: yes (node --test test/withdraw_manual_cash.test.js: 6 passed, 0 failed, exit 0; bound-bank pending W-1 -> second pendingOrder rejects ERR_998 -> submitted retains W-1 -> next REFRESH makes call 3 and reaches loaded. loading.onError at src/machine/withdraw/withdraw_manual_cash.js:40 uses isProcessing (:229-230); failure skips setInitData (:172-184). First-load failure retains null processing and reaches loaded. A memory-only old-onError negative control fails exactly the new retry test: 5 passed, 1 failed, exit 1, Timed out waiting for submitted. Full r2 evidence is in prepare-for-pr/TI-16026.md.)
|
|
31
|
-
- verified in r2: yes (fresh whole-change convergence reviewer independently traced the base-to-working-tree change before reading prior records, then reran all six targeted tests, the memory-only old-onError negative control and the root bank/no-bank probe. Results remain 6/6 pass, expected 5/6 negative-control pass with only retry failing, and both root boundaries pass. See C2-E1–C2-E4 in prepare-for-pr/TI-16026.md.)
|
|
32
|
-
|
|
33
|
-
### Impact
|
|
34
|
-
|
|
35
|
-
- src/machine/withdraw/index.js:4 — unaffected: this direct consumer only exports the unchanged factory; no signature, event name or export mapping changes are required here.
|
|
36
|
-
- src/machine/index.js:18 — unaffected: the import and spread at :54 forward the same withdrawal factory; this aggregation layer makes no state or error-handling decision.
|
|
37
|
-
- src/index.js:2 — unaffected: the public machine export at :7 retains its object contract; the runtime risk to callers is recorded as F-r1-01 rather than an export-wiring defect.
|
|
38
|
-
|
|
39
|
-
Round r1 result: 1 new findings (0 high, 1 medium, 0 low, 0 nit); re-raised: 0; out-of-scope dropped: 0
|
|
40
|
-
|
|
41
|
-
## Round r2 — Codex — 2026-11-17 — reviewed c9186b6 working tree (incremental after r1)
|
|
42
|
-
|
|
43
|
-
Scope: verify the ACCEPT fix for F-r1-01 and affected successful paths only. HEAD remains c9186b6b3f424d74a9fe1363e64b17eb63809b58; r1 reviewed an uncommitted working tree. The r1 log/notes identify the previous loading.onError as unconditional loaded; r2 delta is the guarded onError and two error tests, not the original submitted REFRESH addition. Read review-log.md, review-notes.md and STATE.md in full before reviewing. Driver supplied the starting check-review result: not-converged: F-r1-01:accept-not-verified r1:1-new-findings.
|
|
44
|
-
|
|
45
|
-
F-r1-01 verified yes above. No new product-code findings. Targeted suite: 6 passed, 0 failed, exit 0. Memory-only old-onError negative control: expected 5 passed, 1 failed (new retry case), exit 1. Read-only root REFRESH probe: no bank -> loading; bound bank -> loaded, exit 0. Normal loading, empty-order and replacement-order cases passed in the targeted suite. Commands and output are in the report; trace details and limits are in review-notes.md. No product files changed.
|
|
46
|
-
|
|
47
|
-
Fresh convergence check: the reviewer first formed independent observations from the raw spec, scope input, full base-to-working-tree diff, complete untracked test and source, then read the full STATE/log/notes. Whole-change review found no additional product-code defect. Both submitted REFRESH success paths, guarded failure/retry, initial failure and root hasNoBank behavior were rechecked. The following Impact block replaces the incremental inventory with the complete internal consumer inventory for the full change; the external cash runtime remains outside this review. The driver owns the next check-review.sh call and STATE update.
|
|
48
|
-
|
|
49
|
-
### Impact
|
|
50
|
-
|
|
51
|
-
- src/machine/withdraw/index.js:1/:4 — unaffected: directly forwards the same factory under withdraw_manual_cash; the full change adds submitted REFRESH and guards loading failure inside that factory without changing its parameters, export name or required wrapper behavior.
|
|
52
|
-
- src/machine/index.js:18/:54 — unaffected: imports the withdrawal object and spreads its unchanged factory key; neither the new submitted transition nor retained processing on failure requires aggregation or event adaptation.
|
|
53
|
-
- src/index.js:2/:7 — unaffected: exports the same machine object and therefore exposes the refreshed factory behavior without changing the public object shape; this layer has no state selection, order cache or error handling to update.
|
|
54
|
-
|
|
55
|
-
Round r2 result: 0 new findings (0 high, 0 medium, 0 low, 0 nit); re-raised: 0; out-of-scope dropped: 0
|
|
56
|
-
|
|
57
|
-
REVIEW CONVERGED — 2026-11-17, after r2 (driver check-review.sh: `converged`; checked by hand in this hop: r2 has 0 new findings, 0 re-raises, an Impact block, and F-r1-01 is ACCEPT with last verified = yes).
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# TI-16026 review notes
|
|
2
|
-
|
|
3
|
-
## Round r1 — 2026-11-17
|
|
4
|
-
|
|
5
|
-
### Spec Proposal and Validation Plan
|
|
6
|
-
|
|
7
|
-
Target: `feat/stone/JT-1791856380-ws-refresh`, HEAD/base `c9186b6b3f424d74a9fe1363e64b17eb63809b58`; compare base to working tree, including the untracked test. The driver already presented and saved `spec-proposal.md`; this round uses that plan and independently derives behavior from the raw ticket snapshot and code.
|
|
8
|
-
|
|
9
|
-
- Confirmed: submitted accepts REFRESH, enters loading and calls getPendingOrder again. Source: `spec-snapshot.md:76`.
|
|
10
|
-
- Confirmed: successful empty response yields loaded; a remaining pending order replaces processing and yields submitted. Source: `spec-snapshot.md:71`.
|
|
11
|
-
- Inferred regression expectation: non-submitted REFRESH retains the root hasNoBank condition; the ticket adds a submitted-only handler and does not request changing other states. Source: `spec-snapshot.md:55`, `spec-snapshot.md:76`, base diff and root handler.
|
|
12
|
-
- Excluded: cash frontend strict ID matching, websocket payload windowType classification, visible form/pending screen rendering and published package integration. The driver confirms adapter=none and no SDK screenshots by user choice A; the client-pwa-cash bundle owns UI evidence.
|
|
13
|
-
|
|
14
|
-
Checks: submitted + pending→empty; submitted + pending→distinct pending; loaded + bound bank (existing unit suite); loaded + no bank (pure-transition boundary probe); memory-only forced hasNoBank=true (negative control proving the existing regression test can fail). The last two bounded probes directly support the requested root-guard regression check; no repository files or remote state were changed.
|
|
15
|
-
|
|
16
|
-
### Traced paths
|
|
17
|
-
|
|
18
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:99`: submitted-local REFRESH targets sibling loading without hasNoBank; XState selects this handler before the root handler.
|
|
19
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:32`: loading invokes fetchInitData; onDone assigns data and enters checking; onError keeps the existing loaded fallback.
|
|
20
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:45`: checking selects submitted if processing is truthy, otherwise loaded.
|
|
21
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:160`: root REFRESH retains external loading transition and hasNoBank; local change cannot override this handler outside submitted.
|
|
22
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:173`: setInitData assigns the new processing value, including undefined for an empty order list; it also refreshes bank/rule data via the existing initializer.
|
|
23
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:227`: hasNoBank checks userBanks.length; userBanks combines bank, ewallet and crypto bindings at line 175.
|
|
24
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:247`: existing initialization and both double-wallet branches remain unchanged; pending order requests occur at lines 264/277 with transferType WITHDRAW; orders[0] is assigned at lines 270/284.
|
|
25
|
-
- `src/api/payment.js:195`: getPendingOrder retains its descriptor contract.
|
|
26
|
-
- `src/machine/withdraw/index.js:4`: unchanged exported factory consumer; `rg -n 'withdraw_manual_cash' src` found no other non-target direct named consumer.
|
|
27
|
-
- `test/withdraw_manual_cash.test.js:54`, `:68`, `:82`, `:98`: test observable loading, query count, empty result, replacement order and bound-bank ignore behavior; every interpreter stops in finally.
|
|
28
|
-
|
|
29
|
-
### Executed evidence and limits
|
|
30
|
-
|
|
31
|
-
See `prepare-for-pr/TI-16026.md` E1–E4 for full commands and raw results. Target suite: 4/4 passed. Bank/no-bank pure transitions: passed. Memory-only guard mutation: expected 1/4 failure at the bound-bank state assertion. git diff --check: exit 0.
|
|
32
|
-
|
|
33
|
-
No product-code findings. No evidence/checklist coverage findings were raised. No full-suite, real requests, transactions, browser, package publishing or cash runtime execution. Non-submitted states other than loaded were inspected through unchanged root/state definitions, not individually executed. OTP, both other wallet gate configurations and API rejection paths were not exercised. The SDK bundle exists; it has no UI runtime/BEFORE baseline. Process listing was denied (`ps: operation not permitted`); no server or background process was started, and all test/probe commands exited.
|
|
34
|
-
|
|
35
|
-
This is the fresh independent review of the author's change. The additional review-loop convergence pass is the driver's next step, not claimed by this r1 report. No author analysis, checklist, STATE, publish or user-question file was read.
|
|
36
|
-
|
|
37
|
-
## Independent convergence check — 2026-11-17
|
|
38
|
-
|
|
39
|
-
The fresh reviewer first read the raw spec snapshot, review-input/scope.md, the base-to-working-tree diff, the complete untracked test and relevant source. Before opening the earlier log/notes/STATE, the reviewer recorded independent observations to the driver: normal refresh paths look correct; the complete internal export chain needs impact coverage; the new loading error path can enter loaded with stale processing and prevent retry. The reviewer then read STATE.md, review-log.md and review-notes.md in full and found that r1 explicitly excluded API-error execution. Author analysis, checklist, publish and user-question files were not opened. No product files were edited.
|
|
40
|
-
|
|
41
|
-
### Additional traced paths
|
|
42
|
-
|
|
43
|
-
- `src/machine/withdraw/withdraw_manual_cash.js:101` newly makes loading.onError at :39–40 reachable from a known pending order, including a user with a bound bank. The failure skips setInitData (:173), so processing remains stale. Root REFRESH (:160) then fails hasNoBank (:227).
|
|
44
|
-
- `src/request/request.js:337` rethrows ERR_998 without errorHandler, so this counterexample does not depend on a global error handler navigating away.
|
|
45
|
-
- `src/machine/withdraw/index.js:1/:4` directly exports the factory; `src/machine/index.js:18/:54` aggregates it; `src/index.js:2/:7` exports the public machine object. All three unchanged consumer files are now in r1 Impact.
|
|
46
|
-
- `src/machine/websocket.js:296–301` already forwards payment-info without a windowType toast condition at this base. The raw ticket's conditional websocket change therefore does not require an additional patch here; real payloads and downstream handling remain unverified.
|
|
47
|
-
- External scope names client-pwa-cash without a concrete current consumer path. The raw spec :79 names two possible integration locations; no other repo was read, and candidate paths were not represented as confirmed consumers. The report records the external contract and F-r1-01 risk without claiming a complete downstream file inventory.
|
|
48
|
-
|
|
49
|
-
### Additional execution and result
|
|
50
|
-
|
|
51
|
-
- E5, exact command and output in the report: local request stub + real XState interpreter reproduced pendingOrder ERR_998 → loaded with stale W-1; a further REFRESH stayed loaded and pendingOrder calls stayed 2. Assertions passed, exit 0, interpreter stopped in finally. This is a reproduced defect, not a passing acceptance check.
|
|
52
|
-
- `node --test test/withdraw_manual_cash.test.js`: 4 passed, 0 failed, exit 0. The existing suite does not exercise E5's failure state.
|
|
53
|
-
- Added `F-r1-01 [medium]` to the same r1 and updated its counts-only result. No re-raise, product fix, transaction, browser, publish or Notion write. The driver owns the next check-review.sh call and loop state; this reviewer does not declare convergence.
|
|
54
|
-
- `ps -eo pid,rss,command` was denied (`operation not permitted`). No persistent process was started; both Node commands exited. Pre-edit backups were supplied by the driver at `/var/folders/s8/rjb4nddx2f1c_nl7p_wwz8kh0000gn/T/TI-16026-cuora-r1-convergence.alMsEv2Bjy/`.
|
|
55
|
-
|
|
56
|
-
## Round r2 — 2026-11-17 — ACCEPT fix verification
|
|
57
|
-
|
|
58
|
-
Read the complete log, notes and STATE first. Only review-input/scope.md was read from author review inputs; no analysis/checklist/other repo was read. The driver ran the initial check-review.sh and supplied its open F-r1-01 result. Do not recalculate or declare loop convergence in this reviewer hop; driver owns the next check.
|
|
59
|
-
|
|
60
|
-
### Delta and traces
|
|
61
|
-
|
|
62
|
-
- r1 snapshot is the recorded working tree, not HEAD (HEAD remains c9186b6). The accepted response identifies onError -> loaded as old behavior. The new guarded onError at src/machine/withdraw/withdraw_manual_cash.js:40 is the only product delta after r1; the submitted handler at :98-101 is the prior reviewed addition.
|
|
63
|
-
- Error path :34 -> fetchInitData :246/:273-276 reject -> :40 -> isProcessing :229-230 -> submitted. onError has no assignment; :172-184 is onDone only, so W-1 is preserved. submitted :100 accepts REFRESH without root hasNoBank :159/:226-227; the third request can succeed and assign undefined processing, then checking :44 goes loaded.
|
|
64
|
-
- First initialization starts processing=null (:21); onError's first guard is false and fallback remains loaded. Success still uses onDone setInitData (:35-38), checking (:43-44), and orders[0] (:283). No success action/guard/service changed.
|
|
65
|
-
- test/withdraw_manual_cash.test.js:31 binds a bank; :106-121 rejects the second pendingOrder with ERR_998, asserts retained firstOrder then call 3 and loaded. :123-133 asserts first-load failure -> loaded with null processing. Existing :58-100 and :135-149 cover successful reload, empty/new order and bound-bank root ignore.
|
|
66
|
-
- Impact inventory rerun: rg -n 'withdraw_manual_cash|withdraw/index|\.\.\.withdraw|machine/index' src. Internal unchanged consumers are withdraw/index.js:4, machine/index.js:18/:54, index.js:2/:7. No additional internal consumer found. External cash filenames remain unconfirmed; no other repo was accessed.
|
|
67
|
-
|
|
68
|
-
### Execution
|
|
69
|
-
|
|
70
|
-
- node --test test/withdraw_manual_cash.test.js: 6 passed, 0 failed, exit 0 (real factory/initializer, injected local responses, no network).
|
|
71
|
-
- Negative control: recreate factory config in memory with loading.invoke.onError={target:'loaded'} and execute the same suite. Exactly the new failed-refresh retry case times out waiting for submitted: 5 passed, 1 failed, exit 1 expected. No repository file edited/restored. This validates the rejection regression assertion against the original defect.
|
|
72
|
-
- Pure transition root boundary: loaded + empty userBanks -> loading; loaded + bank -> loaded; assertions passed, exit 0; request stub throws if called, no requests occurred.
|
|
73
|
-
- git diff --check: empty output, exit 0. Product SHA256 13cfd851560c1b60c1bdf206d1c67d1db04d2f2db6652dde698659a34ec391f9; untracked test SHA256 fecacc81d718bc118f791d125768c0ee0204d89b9d3762d0ca15c45725c29268. Only assigned review files written.
|
|
74
|
-
|
|
75
|
-
F-r1-01 verified in r2: yes. New findings: 0. Impact block includes all three internal consumers. No full suite, real transport/backend, cash UI/WebSocket, package publish, OTP or alternate wallet-gate execution. Other non-submitted states were traced through unchanged definitions, not separately interpreted. ps -eo pid,rss,command denied (operation not permitted); no persistent process started and all Node commands exited. Backups supplied by driver: /var/folders/s8/rjb4nddx2f1c_nl7p_wwz8kh0000gn/T/TI-16026-cuora-r2-review.SAXN9BgVO3/.
|
|
76
|
-
|
|
77
|
-
## Independent r2 convergence check — 2026-11-17
|
|
78
|
-
|
|
79
|
-
The fresh reviewer read spec-snapshot.md, the sole review-input/scope.md, the entire base-to-working-tree product diff, the complete untracked test and relevant source before reading any prior reviewer record. Independent observations were written to the driver first: submitted REFRESH now precedes the root bank guard; success reuses setInitData/checking to replace or clear processing; failure conservatively preserves submitted when processing exists; the unchanged three-layer export chain needs no adaptation. No new defect was identified. Only then were STATE.md, review-log.md and review-notes.md read in full. No author analysis, checklist, publish or user-question file, other repository or Notion page was read.
|
|
80
|
-
|
|
81
|
-
### Whole-change trace and Impact inventory
|
|
82
|
-
|
|
83
|
-
- Comparison remains c9186b6b3f424d74a9fe1363e64b17eb63809b58 to the working tree, including test/withdraw_manual_cash.test.js; HEAD equals base and does not represent the product changes.
|
|
84
|
-
- src/machine/withdraw/withdraw_manual_cash.js:98-101 adds submitted-local REFRESH -> loading; :32-44 invokes initialization, assigns only on success and selects submitted/loaded. :172-184 assigns the new order, including undefined after an empty order list. :246-284 retains the existing CASH/ACTIVITY initialization services and getPendingOrder parameters.
|
|
85
|
-
- Failure at :40 uses isProcessing (:229-230), with no assignment, preserving W-1; the next submitted REFRESH bypasses root hasNoBank (:159/:226-227). Initial processing is null (:21), so initial failure still reaches loaded. This independently supports F-r1-01 verified yes.
|
|
86
|
-
- src/request/request.js:337-338 rethrows ERR_998 without calling errorHandler. Local rejection stubs therefore match the relevant Request failure path; no real transport was exercised.
|
|
87
|
-
- src/machine/websocket.js:296-301 already forwards payment-info without a windowType toast restriction. No conditional websocket patch is needed on that static criterion; deduplication, real payload delivery and cash ID matching were not executed.
|
|
88
|
-
- Searches: rg -n 'withdraw_manual_cash|withdrawManualCash|withdrawManual|REFRESH|isProcessing' src/machine/withdraw src/machine/index.js src/index.js; rg -n 'withdraw|machine/index|machine/withdraw|\.\.\/src\/machine\/withdraw|\bmachine\b' src --glob '\*.js'. Followed imports and spreads explicitly. Whole-change unchanged consumers: src/machine/withdraw/index.js:1/:4, src/machine/index.js:18/:54, src/index.js:2/:7. Rewrote r2 Impact with one line per consumer covering both the original submitted handler and failure fix. No external filename was inferred as confirmed.
|
|
89
|
-
|
|
90
|
-
### Independent execution and boundaries
|
|
91
|
-
|
|
92
|
-
- C2-E1: node --test test/withdraw_manual_cash.test.js; 6 passed, 0 failed, exit 0. Covers entered loading/query 2, empty/updated order, retained Pending and retry after ERR_998, initial error and bound-bank root ignore.
|
|
93
|
-
- C2-E2: independently reran the R2-E2 command with only loading.onError restored to unconditional loaded in memory. Expected exit 1: 5 passed, 1 failed; only the new retry test timed out waiting for submitted. Product/test files were never mutated.
|
|
94
|
-
- C2-E3: independently reran the R2-E3 pure-transition probe; empty userBanks -> loading, bound bank -> loaded; exit 0, no requests.
|
|
95
|
-
- C2-E4: git diff --check produced no output; product SHA256 13cfd851560c1b60c1bdf206d1c67d1db04d2f2db6652dde698659a34ec391f9 and test SHA256 fecacc81d718bc118f791d125768c0ee0204d89b9d3762d0ca15c45725c29268 match the r2 artifacts. ps -eo pid,rss,command was denied (operation not permitted); no persistent process was started and all test/probe processes exited.
|
|
96
|
-
|
|
97
|
-
No new finding or re-raise; F-r1-01 remains ACCEPT + verified in r2 yes. No full suite, alternate wallet gate, OTP, other error-code execution, browser, real backend, transaction, external consumer, package release or Notion verification. Non-submitted states beyond loaded were inspected through their unchanged root/state definitions. The driver owns loop status and STATE. Before editing, all three assigned review files were backed up with preserved permissions in /var/folders/s8/rjb4nddx2f1c_nl7p_wwz8kh0000gn/T/TI-16026-cuora-r2-convergence.iivyDMK8Pm/.
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Review r1 is not converged. `check-review.sh` output: `not-converged: F-r1-01:no-decision r1:1-new-findings`.
|
|
2
|
-
|
|
3
|
-
Finding F-r1-01 [medium], recorded in `prepare-for-pr/TI-16026/review-log.md` and reproduced as E5 in the report: when `submitted` accepts `REFRESH`, the real initializer re-enters `loading`; if the second `getPendingOrder` rejects with ERR_998, existing `loading.onError` enters `loaded` without a confirmed empty result. The old processing object remains in context, and a user with a bound bank cannot retry REFRESH because the unchanged root guard requires `hasNoBank`.
|
|
4
|
-
|
|
5
|
-
Expected behavior: do not present the form as if the pending order ended unless the refresh response confirms an empty list; preserve Pending or provide a recoverable error/retry state. Add an error-path regression test. Review evidence traces the new path at `src/machine/withdraw/withdraw_manual_cash.js:101` to the existing handler at `:39-40`, then retry to `:160/:227`; see report E5 for the local stub reproduction and exact results.
|
|
6
|
-
|
|
7
|
-
Please inspect the full finding and review protocol yourself, implement a safe fix within the accepted SDK scope, run the targeted unit suite, update STATE.md, and reply according to the dev-stage protocol. User choice A still applies: no screenshots or Notion page for this SDK; visual behavior remains in the client-pwa-cash flow. No publish or shared-branch action is authorized by this note.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Spec Proposal and Validation Plan — TI-16026 (cuora-module)
|
|
2
|
-
|
|
3
|
-
## Target
|
|
4
|
-
|
|
5
|
-
Branch: `feat/stone/JT-1791856380-ws-refresh`
|
|
6
|
-
Base: `c9186b6b3f424d74a9fe1363e64b17eb63809b58`
|
|
7
|
-
Spec snapshot: `prepare-for-pr/TI-16026/spec-snapshot.md`
|
|
8
|
-
|
|
9
|
-
## Confirmed spec
|
|
10
|
-
|
|
11
|
-
1. In the `withdraw_manual_cash` state machine, `submitted` accepts `REFRESH` and returns to `loading` to fetch the pending-order state again. Source: ticket, 「優化內容」 flow step 3 and 「前端需調整」 → `@jetthai/cuora`.
|
|
12
|
-
2. If the refreshed order list has no processing order, the withdraw form is shown; if one remains, the processing order is updated. Source: ticket, 「優化內容」 flow step 3. The visible screen behavior is verified in the `client-pwa-cash` task bundle.
|
|
13
|
-
3. The `applyId` / `transactionId` match belongs to the cash frontend event handling, as the ticket assigns that work to `client-pwa-cash`; this SDK review checks the machine's `REFRESH` behavior only.
|
|
14
|
-
|
|
15
|
-
## Inferred regression expectation
|
|
16
|
-
|
|
17
|
-
Outside `submitted`, preserve the existing root-level `REFRESH` behavior, including its `hasNoBank` condition. The ticket adds refresh handling to `submitted` and does not request a broader change to other machine states.
|
|
18
|
-
|
|
19
|
-
## Material alternative
|
|
20
|
-
|
|
21
|
-
Moving the socket ID match into cuora or removing the root-level `hasNoBank` guard would widen this SDK change beyond the ticket's stated ownership and acceptance behavior; those alternatives are out of scope for this review.
|
|
22
|
-
|
|
23
|
-
## Validation plan
|
|
24
|
-
|
|
25
|
-
| Risk/spec | Input or state | Expected result | Evidence |
|
|
26
|
-
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
27
|
-
| Confirmed: refresh re-fetches the order | Machine starts with a pending withdrawal, reaches `submitted`, then receives `REFRESH` | Enters `loading` and makes a second `getPendingOrder` request | `node --test test/withdraw_manual_cash.test.js`; inspect machine transition and test assertions |
|
|
28
|
-
| Confirmed: no pending withdrawal returns to form | The second pending-order response is empty | State becomes `loaded` | Unit test result and state assertion |
|
|
29
|
-
| Confirmed: pending withdrawal is refreshed | The second response contains a distinct pending order | State stays `submitted` and `context.processing` is the new order | Unit test result and object assertion |
|
|
30
|
-
| Inferred regression: other states retain existing behavior | A bound bank exists; send `REFRESH` while outside `submitted` | Root guard remains in effect; no extra pending-order request | Unit test plus review of the state-level and root-level handlers |
|
|
31
|
-
|
|
32
|
-
## Exclusions and limits
|
|
33
|
-
|
|
34
|
-
This SDK has no UI, dev server, screenshot, or BEFORE baseline. No browser capture or Notion self-test page will be created for this repo, per the user's choice. The published cuora version and the cash frontend's visible behavior will be validated in the `client-pwa-cash` task flow.
|