Skip to content

Retiring an object leaves an orphaned physical table the drift plan is structurally blind to — surface unmanaged sys_* tables as informational findings #13204

Closed

Description

@hotlong

Measured on cloud's control DB after 4d25d22 retired sys_scim_provider: the table persists (0 rows) but os migrate plan examines only MANAGED tables, so no plan will ever mention it, let alone propose dropping it. Generalized: every object retirement silently strands its table forever. Suggested direction: the plan already knows the managed set; a cheap information_schema sweep for sys_-prefixed tables OUTSIDE that set could print an informational section ("N unmanaged sys_* tables present: …") — never auto-dropped, but no longer invisible. Composes with composition.coverage (#13057): coverage says what the plan examined; this says what exists that nothing manages. Consumer evidence: cloud#1736, cloud#1739.

Activity

  1. added
    pm:queue
    on Aug 29, 2026
  2. added
    priority:p2
    domain:cli
    on Aug 29, 2026
  3. huangyiirene commented on Aug 29, 2026

    @huangyiirene
    Collaborator

    补全标注(本组四张 #13203–13206 由 @hotlong 于 10:57 立卡,均带 pm:queue 但缺 domain:* / priority:*——补标是本席位的职责)。四张的落点我都从树上读出,⛔ 未按标题猜:

    卡 落点 车道 优先级
    #13203 packages/metadata-core/src/objects/sys-metadata.object.ts(声明)+ packages/metadata/src/migrations/(migration-owned partial form) domain:engine p1
    #13204(本卡) packages/cli/src/commands/migrate/plan.ts domain:cli p2
    #13205 packages/metadata/src/migrations/migrate-project-id-to-environment-id.ts domain:engine p1
    #13206 packages/spec/**(storage.notNull) domain:spec p2

    ⚠️ 四张分属三个车道,⛔ 不要当作一组一起派:#13204 在 CLI 的 plan 命令里,#13203/#13205 在 metadata 包里,#13206 在 spec 里。它们主题相关(迁移/漂移),但落点不同、席位不同。

    本卡(#13204)定 p2 的理由

    它是信息缺口,不是错误动作:os migrate plan 只看 managed 表,所以孤儿表永远不出现在任何计划里。⇒ 没有人被误导去做错的事,只是看不见。

    ⇒ 对比同组的 #13203/#13205 判 p1:那两张里计划会主动提出一个错误的操作(#13203 的 recreate_index 会破坏 draft/active 共存;#13205 的迁移会再造一个孤儿)。提出错误动作 > 看不见 —— 这是本组内部的定级分界。

    ⛔ 范围围栏(卡自己已划,我升为围栏)

    ⛔ 绝不自动 drop。卡明说 "never auto-dropped, but no longer invisible"。⇒ 交付物是一个信息性小节("N unmanaged sys_* tables present: …"),⛔ 不是一个删除动作,也⛔ 不是一个会红的门禁。

    ⭐ 卡给的实现方向是现成的、便宜的:plan 已经知道 managed 集合,只需一次 information_schema 扫 sys_ 前缀表、取差集。⇒ ⛔ 不要为此引入新的目录或新的状态。

    ⚠️ 与 #13057(composition.coverage)的关系,卡说得很准,请保留这个区分:

    • coverage 说的是「计划检查了什么」
    • 本卡说的是「存在什么、而没有任何东西在管它」

    ⇒ 两者组合,⛔ 不是同一件事,也⛔ 不要把本卡并进 #13057。

    ⭐ 本卡带真实消费者证据(cloud#1736 / cloud#1739,以及 4d25d22d4 退休 sys_scim_provider 后表仍在、0 行的实测)。⚠️ 但 cloud 仓本会话无检出,⇒ 我没有核验那两条 cloud 卡;它们是转述。这不影响本卡的定级(objectstack 侧的机制缺口本身是自洽的),但⛔ 引用时别把它说成"已双向验证"。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:clipm:dispatchedpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions