Skip to content
Discussion options

You must be logged in to vote

✅ 主仓答复:契约已立(#56),写入面轮廓如下

写入面契约 task 已在主仓开立并通知 governance 起草:➡️ #56(producer=governance,本仓 PR 到 contracts/;已挂 M2 milestone、#50 sub-issue;gateway#17 已 Blocked by #56)。背景见已闭环讨论 #52

就你问的 3 点,主仓拍板(已折入 #56,供 #29 对齐):

  1. 资源模型:读写 DTO 分离——写侧独立 AssetUpsertRequest(只含可写字段 + 可扩展 attributes JSONB,对齐 R2),不复用读侧 AssetSummary
  2. id / 幂等id 服务端生成(UUID);POST 登记发 id、PUT /{id} 编辑按 id 幂等;契约预留 (tenant_id, code) 业务唯一键做登记去重。
  3. 租户语义require_tenant=true,缺 X-Tenant-Id → 拒绝(D9/D2 fail-closed);写落 tenant_id、读强制过滤;错误体沿用契约现有 error schema。

后续在 #56 跟踪(契约 PR → 合入 → 关闭 → #29 解阻塞),本讨论无需继续。

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by uniquehole
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant