A 案 · 32 个隔离缺口域逐域适配清单(WIP-330 · 并行交付)

生成时间:2026-09-14 19:4x|执行:小齐|来源:verify_tenant_coverage.py 盘点快照
口径:命中隔离域表但代码中无 destination/tenant 绑定点=缺口;优先级按是否触及核心交易数据划分
本清单是适配任务池输入,不是"已适配"声明
#域(router)端点涉及隔离表优先级建议绑定点
1admin.py2merchant_staffP1查询加 destination_id 过滤;写入侧从上下文回填
2admin_backend.py27analytics_events,fulfillment_items,merchants,ordersP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
3admin_distribution.py22merchant_bills,merchants,ordersP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
4admin_ops.py23merchants,orders,packagesP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
5agent.py9merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
6auth.py4merchant_staff,merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
7content.py3knowledge,pois,routes,rulesP2盘点后确认归属:隔离域加列回填,或明确豁免并注明理由
8demand.py9merchant_staff,merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
9feed.py0merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
10leader_customers.py1ordersP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
11merchant_console.py28fulfillment_items,merchant_staff,merchants,order_itemsP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
12merchants.py1merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
13miniapp_bills.py3merchant_bill_lines,merchant_bills,merchantsP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
14miniapp_distribution.py13merchants,ordersP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
15miniapp_merchant_applications.py7merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
16miniapp_merchants.py4merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
17miniapp_products.py5packagesP1查询加 destination_id 过滤;写入侧从上下文回填
18miniapp_reviews.py2orders,reviewsP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
19miniapp_status.py3merchant_staffP1查询加 destination_id 过滤;写入侧从上下文回填
20miniapp_stories.py9storiesP2盘点后确认归属:隔离域加列回填,或明确豁免并注明理由
21miniapp_workbench_redeem.py7fulfillment_items,merchant_staff,merchants,order_itemsP0orders/pay/redemption 已出样板(tenant.resolve_destination + destination_id 过滤),照此接入
22packages.py16merchant_staff,merchants,packagesP1查询加 destination_id 过滤;写入侧从上下文回填
23promoters.py1merchant_staff,merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
24quotes.py6merchant_staffP1查询加 destination_id 过滤;写入侧从上下文回填
25rooms.py2merchant_staffP1查询加 destination_id 过滤;写入侧从上下文回填
26scenes.py15packagesP1查询加 destination_id 过滤;写入侧从上下文回填
27tasks_api.py1merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
28tasks_full.py5merchant_staff,merchantsP1查询加 destination_id 过滤;写入侧从上下文回填
29workbench_distributors.py1merchantsP1查询加 destination_id 过滤;写入侧从上下文回填

汇总

复用步骤(照样板接入一个新域)

  1. 迁移:目标表加 destination_id BIGINT + 索引,回填当前 active 目的地
  2. 查询:加 AND (destination_id = $n OR destination_id IS NULL)(NULL 兼容存量)
  3. 写入:resolve_destination(user) 取上下文并回填
  4. 校验:请求值与令牌不符 ⇒ 403;不存在 ⇒ 404;未启用 ⇒ 403
  5. 验证:staging 实测同域/跨域/伪造三组用例