Files
ssw-platform/crates/sspf-compat-msg/Cargo.toml
T
admin e821770f58 refactor(arch): M4 契约面下沉 —— 14 模块 / ~49,000 行迁入 6 个 crate
把 src/backend/src/platform/compat/ 下的 14 个契约面模块拆进 6 个 crate,
原路径全部变成 5 行转发壳 ⇒ 上层 import 零感知,695 个测试一个没改。

新 crate(按官方模块名切,实测依赖图定分组):
- sspf-compat-system     system + scheduletask + core
- sspf-compat-permission permission(单向依赖 system,4 符号)
- sspf-compat-msg        message + msg_center
- sspf-compat-workflow   workflow + report + visualdata
- sspf-compat-ext        extend + teamwork + ai + mobile(单向依赖 system + msg)
- sspf-compat-online_dev online_dev(🔴 Rust 包名不能带连字符)

闸门改造:
- check-arch.sh 新增 PLAT_SRC_DIRS(动态 glob)⇒ AR9/AR10 扫真源
- check-arch.sh 新增 AR12(契约面各包彼此独立,Cargo.toml 级判据 + 3 条单向白名单)
- check-contract-scan.py 动态收编所有 crates/sspf-compat-*/src(不写死列表)
- check-boundary.sh 新增动态 COMPAT_DIRS ⇒ CP1/CP2 纳入契约面包
- 修 8 条引文路径(行号 1:1 未变 ⇒ 迁移是纯搬运)

🔴 三个「尺子是假的」的坑(都是反自证抓出来的):
1. CC6 守卫推导静默失效 —— compat_dirs 只收了 sspf-compat-core,六包真源没收
   ⇒ 改动态 glob;反向验证:改坏真源 EN_ROLE ⇒ CC6 精确报出
2. CP1 业务标识符未扫契约面包 ⇒ 加 COMPAT_DIRS;反向验证:插 LEAK_PROBE ⇒ 精确报出
3. macOS 的 BSD grep 不支持 \s(POSIX ERE)⇒ AR11/AR12 的 Cargo.toml 级判据
   永远匹配不到 ⇒ 永远「通过」(AR11 从 M3 起就没真正生效过)
   ⇒ 改 [[:space:]];全仓扫过 scripts/*.sh 确认只有这一处

数字:cargo build 零警告;cargo test 695/0(与 M1 基线完全一致);
check-arch 15/15;--self-test 7/7;check-boundary 11/11;check-contract 10/10
(反自证 12 例全过);check-module 123/123;check-citations 4/4;
check-naming 3/0/1;verify.sh --smoke 14 步全绿(300.9s)
2026-11-03 18:57:00 +08:00

29 lines
1.2 KiB
TOML
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.
[package]
name = "sspf-compat-msg"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
# 🔴 **契约面「msg」域**(M4 起从 `src/backend/src/platform/compat/` 下沉到这里)。
#
# 装什么:消息域(官方 `api/message/**` + `api/msgCenter/**`):站内信 / 公告 / 消息模板
#
# 🔴 **依赖纪律**:
# - 允许:契约面底座(`sspf-compat-core`)+ 平台核心(`sspf-core`)+ 契约层 + axum/serde。
# - 禁止:**业务包**(`sspf_pack_*`)—— 契约面不许认识任何业务。
# - 禁止:**其它契约面包** —— 各包彼此独立(AR12),唯一的例外见下方依赖段。
[dependencies]
# 契约面公共底座(判别头 / 守卫 / 分页信封 / 通用单表资源引擎)
sspf-compat-core = { path = "../sspf-compat-core" }
# 平台核心(auth / 权限 / CRUD / 信封 / 会话 / AppState)
sspf-core = { path = "../sspf-core" }
# 契约层(判别头 / 码表)
sspf-contract = { path = "../sspf-contract" }
# 时间戳(审计时间 / 消息过期时间)
chrono = { workspace = true }
axum = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }