feat(mcp): 核销记录读面 list_attendances(谁来了 × 押金去向)(#508) - #665
Merged
Merged
Conversation
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#508 残余:核销记录读面
list_attendancesissue 的验收第 6 条「核销记录可导出」此前无任何读面(
Attendance刻意不注册 GraphQL query/mutation)——本 PR 以 MCP 读面补齐,导出 = 运营 agent 拉数据落 CSV(repo 的 agent-first 数据回收文化),SDL 零扰动。admission/attendance.exread从仅 PlatformAdmin 拓宽为 Owner/Admin(本租户,multitenancy 过滤)+ PlatformAdmin 并联(Rbac.manage?/2不认 PA 的语义分层,沿用check_in同款注释);check_inpolicy 零改动mcp/tools/list_attendances.ex(新)event_id必填(核销天然按场;全台汇总走 stats);member 门 +Rbac.manage?/2工具层判定;行 = 核销事实(checked_in_at/method/operator)+ 报名人摘要(id/email/display_name,沿用list_enrollments的authorize?: false批量投影纪律)+ 报名状态 + 押金单状态(DISTINCT ON活跃单优先、终态单回退——active_deposit_order/1的批量版;免费场nil,不编造)server.ex+ 契约守卫course_tools/wrapper_gate计数 83→84;@member_only增list_attendances(豁免面 39 不变——member-only 组)一屏对账:「谁来了 × 押金去向」——Owner 可直接看到某场谁核销、怎么核销(扫码/手输)、由谁操作、以及对应押金单当前状态(含核销即退后的
refunding)。验证
mix precommit→ 2413/2413 passed;WorkspaceActorIsOwnerOrAdmin子句收回 → 3 用例红(35/38)→ 恢复 38/38 绿;deposit_order_status=nil);押金场核销即退 → 行带refunding(对账闭环);非管理成员 → forbidden(owner or admin required);非成员调他台 → Wrapper member 门先拒(fail-closed);域 policy 直测 Owner 本租户 2 行、他租户 Owner → 空集(filter-based policy 的「读不到」与 Forbidden 同为不泄露语义,断言已按此钉住);schema.graphql变更 → web/小程序 codegen 工件零影响。check 自检
无 hard stop;advisory 0(两处测试断言形状在编写期已对齐真实语义并注释);既有
check_in的 Forbidden 钉测零冲突(policy 只动 read)。