Skip to content

test(hub): 对齐设备与 OIDC 夹具 - #1486

Merged
DeliciousBuding merged 1 commit into
masterfrom
fix/hub-device-fixtures
Aug 1, 2026
Merged

test(hub): 对齐设备与 OIDC 夹具#1486
DeliciousBuding merged 1 commit into
masterfrom
fix/hub-device-fixtures

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

变更

  • 让集成测试像生产 OIDC 回调一样先持久化 device,再签发/写入 access 与 refresh token
  • 用确定性 UUID 替换失效的 OIDC device fixture
  • 将 OIDC SQLite schema 对齐 migration 0021 的同类型多设备语义
  • 固定内存 SQLite 的连接生命周期,修复并发登录偶发空 schema
  • 对齐当前 openid profile email scope,并让并发 mock code 真正生成不同 subject

验证

  • go test ./tests/ -run '^(TestTokenDanceOIDC_E2E_|TestAuth|TestRefreshAllowsMultipleDesktopDevicesForSameUser|TestDeviceRegisterRejectsDeviceIDOwnedByAnotherUser|TestSetupRegisterCreatesHubSession)' -count=1
  • 真实 PostgreSQL 16 + Redis 7:通过
  • 反向证明:临时移除 refresh fixture 的 device upsert 后,TestRefreshAllowsMultipleDesktopDevicesForSameUser 稳定因
    efresh_tokens_device_id_fkey 失败;恢复后通过
  • 完整 go test ./tests/ 的失败数从此前 55 降到 38;剩余失败属于附件好友关系、旧大写错误码断言、TeamRun 请求 fixture 等独立分片

证据边界

  • 这是测试夹具修复,不修改生产业务逻辑
  • Windows 本机 -race 因 ThreadSanitizer 地址空间分配失败无法运行;非 race 真实 PG/Redis 目标集已通过

Copilot AI review requested due to automatic review settings August 1, 2026 11:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DeliciousBuding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c0bf204-060c-4a32-a173-6adcc98e7693

📥 Commits

Reviewing files that changed from the base of the PR and between 2a9d34e and 1eb5e56.

📒 Files selected for processing (2)
  • hub-server/tests/setup_test.go
  • hub-server/tests/tokendance_oidc_e2e_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DeliciousBuding
DeliciousBuding force-pushed the fix/hub-device-fixtures branch from faa5c51 to 1eb5e56 Compare August 1, 2026 17:45
@DeliciousBuding
DeliciousBuding merged commit 5a995f7 into master Aug 1, 2026
20 of 21 checks passed
@DeliciousBuding
DeliciousBuding deleted the fix/hub-device-fixtures branch August 1, 2026 18:00
DeliciousBuding added a commit that referenced this pull request Aug 11, 2026
Co-authored-by: Codex <codex@vectorcontrol.tech>
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