Skip to content

fix(alibaba): update China mainland RPC endpoint and fix macOS build compatibility#712

Merged
steipete merged 2 commits intosteipete:mainfrom
hezhongtang:fix/macOS-info
Apr 18, 2026
Merged

fix(alibaba): update China mainland RPC endpoint and fix macOS build compatibility#712
steipete merged 2 commits intosteipete:mainfrom
hezhongtang:fix/macOS-info

Conversation

@hezhongtang
Copy link
Copy Markdown
Contributor

@hezhongtang hezhongtang commented Apr 14, 2026

Summary / 摘要

EN:

  • Update Alibaba China mainland RPC endpoint from bailian-beijing-cs.aliyuncs.com to bailian-cs.console.aliyun.com
  • Update consoleSite identifier from BAILIAN_CONSOLE to BAILIAN_ALIYUN
  • Add new cookie domain for the updated endpoint while retaining the old one for backward compatibility
  • Move Linux test target behind #if os(Linux) conditional compilation in Package.swift
  • Revert @Entry macro to explicit EnvironmentKey pattern for macOS build compatibility

中文:

  • 更新阿里云中国大陆区 RPC 端点:bailian-beijing-cs.aliyuncs.combailian-cs.console.aliyun.com
  • 更新 consoleSite 标识符:BAILIAN_CONSOLEBAILIAN_ALIYUN
  • 新增端点对应的 cookie 域名,同时保留旧域名以确保向后兼容
  • 在 Package.swift 中将 Linux 测试 target 移至 #if os(Linux) 条件编译内
  • @Entry 宏还原为显式 EnvironmentKey 模式,修复 macOS 构建兼容性问题

Changes / 变更明细

Alibaba Endpoint Migration / 阿里云端点迁移

File / 文件 Change / 变更
AlibabaCodingPlanAPIRegion.swift Update rpcBaseURL and consoleSite for .chinaMainland
AlibabaCodingPlanCookieImporter.swift Add bailian-cs.console.aliyun.com to cookie domains
AlibabaCodingPlanProviderTests.swift Add new domain to test stub allowlist

Build & Compatibility Fixes / 构建与兼容性修复

File / 文件 Change / 变更
Package.swift Gate CodexBarLinuxTests behind #if os(Linux)
MenuHighlightStyle.swift Revert @Entry to EnvironmentKey pattern

Code Review / 代码审查

Severity Count Status
CRITICAL 0 ✅ Pass
HIGH 0 ✅ Pass
MEDIUM 1 ℹ️ Info — SwiftTesting experimental flag inconsistency (follow-up)
LOW 1 📝 Note — old domain retained for backward compatibility

Verdict / 结论: APPROVE / 通过

Test Plan / 测试计划

  • Build succeeds locally (swift build + compile_and_run.sh)
  • CodexBar.app launches and runs correctly after rebuild
  • Cookie import covers both old and new domains
  • Test stubs updated to match new domain list
  • Manual verification: Alibaba China mainland usage data loads correctly via new endpoint
  • Manual verification: Cookie authentication works with the new bailian-cs.console.aliyun.com domain

hezhongtang and others added 2 commits April 18, 2026 21:39
…e.aliyun.com

- Change consoleRPCBaseURLString from bailian-beijing-cs.aliyuncs.com to
  bailian-cs.console.aliyun.com (the old domain causes TLS errors)
- Update consoleSite from BAILIAN_CONSOLE to BAILIAN_ALIYUN to match
  actual browser request payload
- Add new domain to cookie importer allowlist and test stub
@steipete steipete merged commit aae3003 into steipete:main Apr 18, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Owner

Landed via temp rebase onto main.

  • Gate: swiftformat Sources Tests; swiftlint --strict; pnpm check; swift build; swift test -q; ./Scripts/compile_and_run.sh
  • Land commit: 9c66ed3
  • Merge commit: aae3003

Thanks @hezhongtang!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants