Files
dbtool-cli-v1/plans/2026-03-31-cmp-61-restricted-schema-execution.md
Paperclip CTO d5f69462b0
Some checks failed
release-smoke / macos-13 / x86_64-apple-darwin (push) Has been cancelled
release-smoke / ubuntu-latest / x86_64-unknown-linux-gnu (push) Has been cancelled
release-smoke / windows-latest / x86_64-pc-windows-msvc (push) Has been cancelled
feat(usable): integrate current dbtool implementation snapshot
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-02 08:26:18 +00:00

50 lines
2.4 KiB
Markdown
Raw Permalink 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.

# CMP-61 restricted schema execution plan
日期2026-03-31
负责人CTO
## 结论
`restricted schema` 当前不是单纯证据缺失,而是 shared inspect contract 与 TUI surface 之间的真实产品能力缺口。
## Root cause
- `crates/db-app` / `TUI_BACKEND_CONTRACT.md` 当前只把 inspect 定义为 `success | empty | error`
- `SchemaItem` 只有 `name`,没有 schema-level restricted / permission metadata
- PostgreSQL root inspect 基于 `information_schema.schemata`,会把受限 schema 直接省略
- 显式 schema inspect 基于 `information_schema.tables`,受限 schema 会退化成空表列表
- `apps/tui/src/main.rs` 只会把 per-schema inspect 的 error 映射成 `restricted`;空表列表会被直接视为 `empty`
## 执行顺序
1. Backend 先补 shared inspect contract使 schema-level restricted 成为结构化语义
2. 并行补齐 PostgreSQL 非超级用户 fixture / profile确保 QA 能在当前 runner 形成真实 restricted schema 场景
3. Frontend/TUI 再消费新语义,确保 `Schema Browser` / `Inspector` / `Status & Activity` 持续显示 restricted
4. QA 最后在 PostgreSQL demo live 环境复验并回填 usable/TUI gate
## Owner split
- [CMP-62](/CMP/issues/CMP-62)Senior Backend Engineer
- [CMP-63](/CMP/issues/CMP-63)Senior Frontend Engineer
- [CMP-64](/CMP/issues/CMP-64)QA Engineer
- [CMP-65](/CMP/issues/CMP-65)Senior Backend Engineerfixture / profile
## 新增 blocker split
- 产品语义 blockershared inspect 目前没有 schema-level restricted 结构化语义
- 表现层 blockerTUI 目前无法消费不存在的 restricted 语义
- 夹具 blocker当前 PostgreSQL demo `dbtool` 账号仍是超级用户QA 无法在 runner 中复现真实 restricted schema
## 验收口径
- shared inspect 不再把 `empty schema``restricted schema` 复用成同一语义
- TUI 上 restricted schema 可见、可聚焦、可解释
- QA 证据文档对 `empty``restricted` 给出分离 verdict
## 当前状态
- [CMP-62](/CMP/issues/CMP-62) 已完成shared inspect backend contract 已落地
- [CMP-63](/CMP/issues/CMP-63) 已完成TUI restricted 消费与文案已落地
- [CMP-65](/CMP/issues/CMP-65) 已完成PostgreSQL 非超级用户 fixture / profile 已落地
- [CMP-64](/CMP/issues/CMP-64) 已进入 `in_progress`QA 正在基于新 contract 与新 fixture 执行最终 live rerun