Skip to content

refactor(managed): converge unpublished protocols on canonical v2 - #85

Draft
zhiiw wants to merge 9 commits into
codex/m5-managed-node-transform-product-v1from
codex/m5-canonical-managed-profile-v2
Draft

refactor(managed): converge unpublished protocols on canonical v2#85
zhiiw wants to merge 9 commits into
codex/m5-managed-node-transform-product-v1from
codex/m5-canonical-managed-profile-v2

Conversation

@zhiiw

@zhiiw zhiiw commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Converge the unpublished managed coding stack on one canonical v2 contract instead of carrying compatibility for abandoned Draft-only protocols.

  • make managed-coding-v2 the only negotiated complete managed profile
  • unify Write/Edit and Node transform under managed_mutation_v2 with explicit operation kinds
  • unify Node test and Node command under managed_observation_v2
  • converge the managed command toolchain manifest on release v2
  • collapse the unpublished SQLite 15/16/17 ladder into one migration from released schema 14 to canonical schema 15
  • reject experimental schema-15 lookalikes through a required capability marker
  • remove obsolete v3/v4 product documents and update the remaining architecture contracts

Main invariant

A managed task has one durable protocol identity before T1. Runtime, Storage, Runtime Host, Desktop, and packaged toolchain admission either agree on canonical v2 or fail closed; no component may silently fall back to an abandoned Draft profile.

Ownership and failure boundary

  • Profile negotiation owner: Runtime Host; advertises canonical v2 only when every required authority is present.
  • Durable fact owner: Runtime/SQLite; only canonical v2 mutation and observation facts are accepted.
  • Toolchain artifact owner: packaged manifest admission; only the canonical v2 manifest/effect set is accepted.
  • Schema owner: SQLite migration 15 plus runtime_managed_workspace_canonical_v2@1.
  • Failure state: unsupported Draft databases/protocols are rejected explicitly. There is no migration, downgrade, dual-read, or mixed-version mode because none of these Draft formats had production consumers.
  • Rollback: revert this stacked Draft slice together with its dependent Draft consumers; released schema-14 data is unchanged until migration is opened by this stack.

Compatibility decision

Compatibility is retained only for formats already present on upstream main, notably released continuation history. Names such as workspace_version_accepted_v1 remain because they are the sole current format, not because a second decoder is maintained. Unpublished managed-coding-v1/v3/v4, observation v1, mutation v3, and toolchain release v4 are deliberately not readable.

An old experimental managed SQLite database should be backed up and removed before running this stack.

Verification

  • Core, Runtime, Storage, Runtime Host, and Desktop builds passed.
  • Focused canonical-profile/schema regression: 151 tests, 149 passed, 2 expected Windows capability skips, 0 failed.
  • Broader focused suite during implementation: 406 tests, 404 passed, 2 expected skips, 0 failed.
  • Modified-file Biome formatting and git diff --check passed.
  • Full-repository format check still reports two pre-existing files outside this diff.
中文说明

摘要

这个 PR 把尚未发布、没有生产用户的 managed coding 栈统一到唯一的 v2 合同,不再为废弃的 Draft 协议支付迁移、双读和协商成本。

  • managed-coding-v2 成为唯一完整 managed profile;
  • Write/Edit 与 Node transform 统一使用 managed_mutation_v2,靠明确的 operation kind 区分;
  • Node test 与 Node command 统一使用 managed_observation_v2
  • managed command toolchain manifest 统一到 release v2;
  • 把未发布的 SQLite 15/16/17 迁移链合并为从已发布 schema 14 到 canonical schema 15 的一次迁移;
  • schema 15 必须带 runtime_managed_workspace_canonical_v2@1 capability,旧实验库即使版本号碰巧相同也会 fail closed;
  • 删除过时的 v3/v4 产品文档并同步其余架构文档。

主要不变量

managed task 必须在 T1 前只有一个 durable protocol identity。Runtime、Storage、Runtime Host、Desktop 和 toolchain admission 要么共同认定 canonical v2,要么明确失败,禁止静默回退到废弃 Draft profile。

兼容策略

只保留已经进入 upstream main、可能存在真实数据的兼容格式,例如 continuation 历史。workspace_version_accepted_v1 之类名称仍保留,是因为它本来就是唯一现行格式,并不存在第二套 decoder。

从未发布的 managed-coding-v1/v3/v4、observation v1、mutation v3 和 toolchain release v4 不再可读,也不提供迁移、降级、双读或混合运行。旧实验 SQLite 库应先备份后删除。

验证

  • Core、Runtime、Storage、Runtime Host、Desktop 构建通过;
  • canonical profile/schema 定向回归共 151 项:149 通过、2 个 Windows 能力预期跳过、0 失败;
  • 实现期间更广的定向套件共 406 项:404 通过、2 个预期跳过、0 失败;
  • 本次改动文件的 Biome 格式和 git diff --check 通过。

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant