feat: 補齊 provider-verification 可見性缺口——子端點過濾與預約入口檢查 #31

Merged
a620906209 merged 1 commits from feat/provider-verification-gaps into master 2026-06-11 14:52:55 +00:00
Owner

摘要

實作 openspec change provider-verification-gaps(8/8 tasks 完成),堵住可見性機制的三個繞過路徑。

變更內容

  • schedules / reviews 公開子端點publicList 套用 visibleToPublic scope,未驗證教練課程回 404(各一行修正)
  • 預約入口MemberBookingController::store Layer 1 檢查課程可預約性,未驗證教練課程回 422 此課程目前不開放預約(最關鍵——原本可用 schedule_id 完全繞過可見性)
  • 政策決定(design.md D2):教練被取消驗證時只擋新預約,既有 pending/confirmed/completed 的聊天、完課、評價照常——懲罰落在教練不落在會員
  • 主規格 provider-verification 的 Notes 已知限制轉為正式 Requirements
  • 測試 +5:可見性子端點 3、預約入口 2(含取消驗證後既有預約存續);既有 booking/review 測試 helper 補 verified ProviderProfile

驗證

  • 容器內全套件 151 passed / 388 assertions
  • Demo 資料端到端實測:已驗證教練課程 detail/schedules/reviews = 200/200/200;未驗證 = 404/404/404

備註

  • 開發 DB 發現為空,已重跑 DemoSeeder(冪等)
  • merge 後 openspec change 可歸檔:openspec/changes/provider-verification-gaps/archive/

🤖 Generated with Claude Code

## 摘要 實作 openspec change `provider-verification-gaps`(8/8 tasks 完成),堵住可見性機制的三個繞過路徑。 ## 變更內容 - **schedules / reviews 公開子端點**:`publicList` 套用 `visibleToPublic` scope,未驗證教練課程回 404(各一行修正) - **預約入口**:`MemberBookingController::store` Layer 1 檢查課程可預約性,未驗證教練課程回 422 `此課程目前不開放預約`(最關鍵——原本可用 schedule_id 完全繞過可見性) - **政策決定**(design.md D2):教練被取消驗證時**只擋新預約**,既有 pending/confirmed/completed 的聊天、完課、評價照常——懲罰落在教練不落在會員 - 主規格 `provider-verification` 的 Notes 已知限制轉為正式 Requirements - 測試 +5:可見性子端點 3、預約入口 2(含取消驗證後既有預約存續);既有 booking/review 測試 helper 補 verified ProviderProfile ## 驗證 - 容器內全套件 **151 passed / 388 assertions** - Demo 資料端到端實測:已驗證教練課程 detail/schedules/reviews = 200/200/200;未驗證 = 404/404/404 ## 備註 - 開發 DB 發現為空,已重跑 `DemoSeeder`(冪等) - merge 後 openspec change 可歸檔:`openspec/changes/provider-verification-gaps/` → `archive/` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
a620906209 added 1 commit 2026-06-11 14:50:06 +00:00
實作 openspec change provider-verification-gaps(8/8 tasks):
- schedules/reviews publicList 套用 visibleToPublic,隱藏課程回 404
- MemberBookingController::store Layer 1 擋未驗證教練課程的新預約(422)
- 政策:教練被取消驗證只擋新預約,既有 pending/confirmed/completed 照常
- 主規格 Notes 已知限制轉為正式 Requirements
- 測試 +5(可見性子端點 3、預約入口 2),既有 booking/review 測試 helper
  補 verified ProviderProfile
- 容器內全套件 151 passed / 388 assertions;另以 demo 資料端到端驗證
  (已驗證教練 200/200/200、未驗證 404/404/404)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
a620906209 merged commit 3384210c5c into master 2026-06-11 14:52:55 +00:00
a620906209 deleted branch feat/provider-verification-gaps 2026-06-11 14:52:55 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: a620906209/CFDivePlatform#31