Files
tdc-rs/scripts/boundary-ledger.txt
T
admin 42cb97cabc refactor(b1b-c4): schema 探针通用化 —— 平台层零业务表名
- ensure_schema 的探针从 `SELECT 1 FROM tdc_identity LIMIT 1` 改成
  `SELECT count(*)::text FROM pg_catalog.pg_tables WHERE schemaname = 'public'`
  ⇒ public 下有表就跳过 migrate.sql(单 schema 布局,base_* 与 tdc_* 同处 public)
- 新增 tests/schema_init.rs(独立测试二进制,自带一个临时 PGlite):
  首启建出 30 张业务表 + 二跑幂等不增删表
- 边界账本删掉已失效条目(CP1 db.rs tdc_identity)
2026-10-26 20:30:46 +08:00

19 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 边界越界账本(ratchet ledger)—— `scripts/check-boundary.sh` 读
#
# 规则:越界不是"一律红",而是"**必须被记账**"。
# · 没记账的越界 ⇒ 尺子当场红(抓新增泄漏)。
# · 账本里已失效的条目 ⇒ 尺子也红(越界已消失 ⇒ 账本只许变短,请删行)。
# · ⇒ B1b 的 C1–C12 做完,标 `B1b` 的条目必须**清空**;标 `永久` 的是**假阳性豁免**,
# 永远保留(但若代码变了导致它失效,同样要删行)。
#
# 列:规则 <TAB> 文件(路径后缀,搬家不失效) <TAB> 命中子串(留空 = 该文件全部) <TAB> 为什么可接受 <TAB> 责任(B1b / 永久)
#
# ── 新布局(src/platform/ + src/tdc/)下的已知越界 ──────────────────
#
# 文件字段按**路径后缀**匹配 ⇒ 搬家(src/auth.rs → src/platform/auth.rs)不会让条目失效。
CP1 auth.rs /api/ssw/tdc/ C5:白名单清单待归业务层 src/tdc/support/public_paths.rs(并剪掉 7 条死路径) B1b
CP2 session.rs Identity 假阳性:SessionKind::Identity 是**会话口径**,不是业务实体 tdc_identity 永久
CP2 auth.rs SessionKind::Identity 假阳性:Principal::Session 分支里的会话种类,不是业务实体 永久
CP4 auth.rs /api/ C5:白名单清单待归业务层(含 /api/oauth/Login 与 /api/health 两条) B1b