mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-12 14:15:00 +00:00
* feat(pancake): add Shopee platform support - Fix Accept header for JSON response negotiation (Shopee GETs) - Platform-prefix-aware pageID parsing (spo_ convID format) - 500-char message limit for Shopee DMs - Rune-safe truncation with slog.Warn on truncation Phase 3 (integration smoke) pending: requires real credentials. * fix(pancake): address PR review feedback - Add RegisterPlatformPrefix() for extensibility (issue #1) - Rename setCommonHeaders → setAcceptJSONHeader (issue #2) - Add testdata fixture with page_id for priority testing (issue #3) * chore: retrigger CI * fix(permissions): classify sessions.compact in RBAC policy Add MethodSessionsCompact to isWriteMethod to fix drift coverage test. Method was added in #958 but missing from permissions classification. * fix(tests): use strings.Contains to avoid redeclaration Remove duplicate contains helper in tts_gemini_live_test.go that conflicts with mcp_grant_revoke_test.go in same package. * refactor(pancake): guard platformPrefixes with RWMutex for concurrent safety RegisterPlatformPrefix is exported for future use (Lazada, Tokopedia) but webhook handler reads the map concurrently. Protect with sync.RWMutex so callers can register prefixes at any time without data races. - Add platformPrefixesMu sync.RWMutex - Wrap RegisterPlatformPrefix with write lock - Extract isKnownPlatformPrefix helper with read lock - Document that RegisterPlatformPrefix is currently unused (extension point) --------- Co-authored-by: viettranx <viettranx@gmail.com>