feat(performance): new marketplace order, 쿠팡(윙) rename, manual-only 쿠팡(로켓)·애터미아자몰

- Column order: 카페24 · 네이버 · 쿠팡(윙) · 쿠팡(로켓) · 오늘의집 · G마켓 · 카카오 ·
  GS샵 · 11번가 · 롯데ON · 토스 · 애터미아자몰 (registry + migration 003 sort_order)
- Existing coupang (WING API) renamed to 쿠팡(윙)
- New manual-only marketplaces coupang_rocket / atomy (adapters/manual.py,
  manual_only flag): skipped by sync_all, no credentials / connection test in
  settings, status "수동 입력", manual input always on (API refuses turning it off)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 02:35:18 +09:00
parent 22490664d6
commit 6ebf705e27
14 changed files with 140 additions and 26 deletions
@@ -1378,10 +1378,15 @@ def test_elevenst_collect_sales():
def test_registry_and_event_validation():
codes = [a.code for a in all_adapters()]
assert len(codes) == len(set(codes)) == 10
assert len(codes) == len(set(codes)) == 12
assert codes == ["cafe24", "naver", "coupang", "coupang_rocket", "ohouse", "gmarket", "kakao",
"gsshop", "elevenst", "lotteon", "toss", "atomy"]
for a in all_adapters():
keys = [f.key for f in a.credential_fields()]
assert len(keys) == len(set(keys)), a.code
if a.manual_only: # 수동 입력 전용 — 인증 항목 없음
assert not keys and not a.implemented, a.code
continue
assert a.uses_shared_integration or any(f.secret for f in a.visible_fields()), a.code
for bad in (SaleEvent("SALE", "x", "o", date.today(), -1), SaleEvent("CANCEL", "x", "o", date.today(), 5),
SaleEvent("SALE", "x", "o", date.today(), 1.5), SaleEvent("BOGUS", "x", "o", date.today(), 1)):
@@ -1874,6 +1879,21 @@ def test_sync_job_stop_shop():
assert not job.stop_shop("toss") and not job.stop_shop("nope") # 끝난 작업·없는 쇼핑몰
def test_manual_only_marketplaces_skip_sync_and_show_manual_status():
"""쿠팡(로켓)·애터미아자몰 = 수동 입력 전용 — 매출 업데이트 대상이 아니고 연결 상태는 "수동 입력"."""
from app.modules.performance.dashboard import display_status
st = FakeStore()
creds = CredentialService(st, lambda: ring())
res = SyncService(st, creds).sync_all(start=date(2026, 10, 1), end=date(2026, 10, 2),
codes=["coupang_rocket", "atomy"], user="king@x")
assert res == [] and not st.events and not st.status
for code in ("coupang_rocket", "atomy"):
assert display_status({"code": code, "enabled": True}, None, False) == "manual"
assert display_status({"code": "coupang_rocket", "enabled": False}, None, False) == "disabled"
assert display_status({"code": "ohouse", "enabled": True}, None, False) == "not_configured"
if __name__ == "__main__":
os.environ.pop("APP_ENCRYPTION_KEY", None)
n = 0