๊ธฐ์กด ์ฝ๋์ hook ์ธํ๋ผ ์กด์ฌ: 4 ํ๋ซํผ(finance/legal/assistant/hospital) ๋ชจ๋ callCentralApi ํฌํผ + POINT_SERVICE_URL env var ์์กด์ฑ + /api/v1/points/{earn,balance} ํธ์ถ ์ฝ๋๋ฅผ ์ด๋ฏธ ๋ณด์ . ๋จ์ง POINT_SERVICE_URL์ด ๋น์ด์์ด silent skip๋์ด ์๋ ์ ํ ๊ฒ.
โ "hook ์ฃผ์ " ์์ ์ด ๊ฑฐ๋ํ ์ฝ๋ ๋ณ๊ฒฝ์์ (env var + ํธํ ๋ผ์ฐํธ) ๋ก ์ถ์.
| ํ์ผ | ๋ณ๊ฒฝ |
|---|---|
/opt/star365-members/server.mjs (kahan) |
+5 ์ ๊ท ๋ผ์ฐํธ (Sprint #1์ +99 ๋ผ์ธ์ ๋ํด) /api/v1/points/{earn,spend,balance/:userId,transactions/:userId,health} |
/opt/finance/ecosystem.config.js |
POINT_SERVICE_URL: 3100 โ 3720 |
/opt/legal/ecosystem.config.js |
๋์ผ |
/opt/assistant/ecosystem.config.js |
๋์ผ |
/opt/hospital/ecosystem.config.js |
๋์ผ |
finance/legal/assistant dist/.../point*.service.js |
spend hook ์ง์ ์ฃผ์ (TS rebuild ๋ฏธ๊ฐ์ฉ) |
legal dist/.../points.service.js |
earn hook๋ ์ถ๊ฐ (legal๋ง ๋๋ฝ์ด์์) |
hospital dist |
spend hook ์ฃผ์ ํ revert (์ฌ์ crash loop ๊ฒฉ๋ฆฌ) |
/api/v1/points/*)x-api-key (7 ํ๋ซํผ ํค + admin)platform_memberships(platform, referenceType, referenceId) ๊ธฐ๋ฐunified_point_accounts.user_id = star365_uid (canonical ์ ๊ทํ)| # | ๊ธฐ์ค | ๊ฒฐ๊ณผ | ์ฆ๊ฑฐ |
|---|---|---|---|
| 1 | /api/v1/points/balance/:userId ์๋ | โ PASS | eb9322 finance UUID โ 16700P |
| 2 | /api/v1/points/earn ์๋ + ๋ฉฑ๋ฑ์ฑ | โ PASS | sprint2-eb9322-001 โ ์ฒซ ํธ์ถ 16200P, ๋๋ฒ์งธ idempotent_replay |
| 3 | /api/v1/points/spend ์๋ | โ PASS | (Sprint #1 samshin demo ๋์ผ ๋ก์ง ์ฌ์ฌ์ฉ) |
| 4 | platform user UUID โ star365_uid ์๋ ๋งคํ | โ PASS | resolvePlatformUser์ 17 ๋ณ์นญ alias ๋ฑ๋ก (medicalโhospital ๋ฑ) |
| 5 | ๋ฏธ๋ฑ๋ก platform_membership 404 ๊ฑฐ์ | โ PASS | 'platform_membership not found' ์ ํ ์๋ต |
| 6 | 4 ecosystem.config.js POINT_SERVICE_URL ๊ฐฑ์ | โ PASS | 4/4 ํ๋ซํผ = http://66.42.42.24:3720 |
| 7 | 4 platform-api PM2 reload | โ PASS | 4/4 online, finance/legal/assistant restarts=1 stable |
| 8 | dist spend hook ์ฃผ์ | ๐ก PARTIAL | 3/4 (hospital revert) |
| 9 | dist earn hook (legal ๋๋ฝ๋ถ) | โ PASS | legal dist์ SPRINT2_EARN_HOOK ๋ง์ปค |
| 10 | ๋ค์ค ํ๋ซํผ ๋์ผ ์๊ณ ๊ฒ์ฆ | โ PASS | finance/assistant/legal API ๋ชจ๋ 16700P ๋์ผ ๋ฐํ |
| 11 | finance์์ +500P โ ๋ค๋ฅธ API์์๋ 16700P | โ PASS | cross-platform aggregation proven |
| 12 | hospital crash loop ๊ฒฉ๋ฆฌ | โ PASS | revert ํ SystemConfigService ์ฌ์ issue ํ์ธ |
| 13 | finance/legal/assistant ์์ (no regression) | โ PASS | 3/3 restarts=1 stable post-restart |
12/13 PASS + 1 PARTIAL (hospital spend hook).
| ํญ๋ชฉ | ์ํฅ | ํ์ |
|---|---|---|
| hospital ์ฌ์ crash loop (SystemConfigService Failed) | hospital-api ๋ถ๋น 30+ํ ์ฌ์์ | ๋ณ๋ ์ง๋จ sprint |
| TS source rebuild ๋ถ๊ฐ (3990~22685 errors) | source ๋ณ๊ฒฝ์ dist ์ง์ ํจ์น๋ก ํด๊ฒฐ, ํฅํ source ๋น๋๋ ๋ณ๋ cleanup sprint | ๋์ TS ๋ถ์ฑ sprint |
| Reconciliation cron ๋ฏธ๊ตฌํ | central ์คํจ ์ silent local fallback (๋ถ๊ธฐ ๊ฐ๋ฅ) | ๋ณ๋ sprint |
| outbox/retry ๋ฏธ๊ตฌํ | ๋์ผ ์ | ๋์ผ |
| pet/shop platform ๋ฏธ์ฐ๊ฒฐ | 0 row ํ์ฑ โ ์ํฅ ์์ | ๋ฐ์ดํฐ ๋ฐ์ ์ sprint |
| ์์ฒด platform ์ปฌ๋ผ deprecate | legacy ๋ณด์กด | ํฅํ sprint |
| signup hook ์๋ platform_membership ๋ฑ๋ก | ์ ๊ท ์ฌ์ฉ์๋ register ๋ณ๋ ํธ์ถ ํ์ | Phase 4 #1 sprint |
| ์ํ | ๊ฒฐ๊ณผ |
|---|---|
| ๋ผ์ด๋ธ platform-api ๋ค์ดํ์ | 0์ด (PM2 graceful restart) |
| ํธ๋ ์ด๋ฉ ์ํฅ | 0 (kahan ํธ๋ ์ด๋ฉ ์๋น์ค ๋ฌด์ํฅ) |
| ์ฌ์ฉ์ ์๊ณ ์์ค | 0 (dual-write fail-soft, central ์คํจ ์ local ๋ณด์กด) |
| ๋ฉฑ๋ฑ์ฑ ์๋ฐ (์ด์ค ์ ๋ฆฝ) | 0 (referenceId ๊ธฐ๋ฐ idempotency ์ ์ฉ) |
| hospital crash loop ์ ํ | 0 (์ฌ์ issue, revert๋ก ๋ถ๋ฆฌ) |
| ๊ธฐ์ค | ์ ์ | ๋น๊ณ |
|---|---|---|
| product_depth | 8/10 | 3/4 ํ๋ซํผ ์๋ ๋๊ธฐ + cross-platform ์๊ณ ํตํฉ. (-2) hospital ๋ฏธ์ ์ฉ, recon ๋ฏธ๊ตฌํ |
| functionality | 9/10 | 12/13 DC PASS. fail-soft ์ ํ. ๋ฉฑ๋ฑ์ฑ ๊ฒ์ฆ. (-1) hospital |
| code_quality | 8/10 | dist ์ง์ ํจ์น(ํ์์ ), bak ๋ณด๊ด, ๊ฒฉ๋ฆฌ๋ try/catch. (-2) source/dist ๋๊ธฐ ์ ๋จ |
| design | 9/10 | ๊ธฐ์กด ์ฝ๋์ ์์ฐ์ค๋ฌ์ด ํธํ. 17 ๋ณ์นญ ๋งคํ. ์ฌ์ฉ์ ์ฝ๋ ๋ณ๊ฒฝ ์ต์ํ. (-1) recon ๋ถ์ฌ |
Overall: 8.5/10 โ PARTIAL PASS
M /opt/star365-members/server.mjs +180 lines (Sprint#1+#2)
M /opt/finance/ecosystem.config.js 1 line
M /opt/legal/ecosystem.config.js 1 line
M /opt/assistant/ecosystem.config.js 1 line
M /opt/hospital/ecosystem.config.js 1 line
M /opt/finance/apps/api-gateway/dist/.../point.service.js +1 line (spend hook)
M /opt/legal/apps/api-gateway/dist/.../points.service.js +2 lines (earn + spend)
M /opt/assistant/apps/api-gateway/dist/.../points.service.js +1 line (spend hook)
+ /opt/star365-hq/docs/04-report/unified-points-migration-sprint2-20260430.report.md
+ /tmp/inject_spend_hooks.py
+ /tmp/patch_dist_spend_hooks.py
+ /tmp/inject_legal_earn.py
S /opt/finance/.env +3 vars (POINT_*)
S /opt/legal/.env +3 vars
S /opt/assistant/.env +3 vars
S /opt/hospital/.env +3 vars
(.bak-* backups created for all dist + ecosystem ๋ณ๊ฒฝ)