migration: freeze the stdlib relocation ledger and add the unique Bundle producer #11

Merged
cflmy merged 1 commits from migration/stdlib-m0-ledger into main 2026-11-26 23:58:13 +08:00
Owner

范围

父仓工单 cflmy/marqdo#9 的 M0 与 MIG-BUNDLE:

  • 冻结标准库源码归位台账:基线身份、20 个模块/151 个公开函数、冻结 Bundle 根路径、20 份原测试断言归属、9 个接收仓子工单链接。
  • 作废旧路径规划(system/clock.mq.md、io/index.mq.md 等会改公开 std: 路径),冻结为原样路径。
  • 记录 Table 切分、Text 去重、io 别名目标、三个领域模块退出默认 Bundle、demo 转组合 fixture 等取舍。
  • 新增根唯一 Bundle 生产者 scripts/build-stdlib.py + scripts/stdlib-bundle.json:只收 active stdlib 组件的 modules/**/*.mq.md,拒绝 symlink/子模块/大小写与 NFC 冲突/tests/越界路径,生成现行 stdlib.json,内容变化必须显式升版本。
  • 新增根组合验收 scripts/acceptance-stdlib.py:显式 --cli/--bundle,独立复核摘要、跑 active 组件 entry、跨仓组合 fixture、失败负例与两次确定性打包。
  • 新增 tests/integration/test_build_stdlib.py(真实临时 Git 仓 + gitlink 身份路径)与 tests/integration/composition/(别名、Table 跨模块、默认 Bundle smoke)。

本 PR 不修改任何子仓 gitlink、不激活组件、不动 CLI;接收仓候选在每个责任仓自己的 PR 中。

验证(本候选)

  • python3 scripts/check-layout.py 与 --checkouts:PASS(33 个直属/领域子树固定提交一致)。
  • python3 -m unittest discover -s tests/integration:Ran 56 tests,OK(含新增 9 个生产者契约测试)。
  • 组合 fixture 期望值由候选 staging Bundle + 候选 CLI 真实执行捕获;Table 跨模块终值与迁移前原测试终值逐字节一致。

取舍

  • Bundle 只收模块不收 tests/,因此官方 Bundle 内容会变化;版本 0.2.0 明示变更,摘要算法不变(由 CLI 权威实现与根实现各算一次)。
  • 根不复制模块源码;组件仓拥有源码与测试,根只组合、锁定与验收。

Refs cflmy/marqdo#9

M0/MIG-BUNDLE 候选;根组合验收在后续 M2 候选 PR 执行。

## 范围 父仓工单 cflmy/marqdo#9 的 M0 与 MIG-BUNDLE: - 冻结标准库源码归位台账:基线身份、20 个模块/151 个公开函数、冻结 Bundle 根路径、20 份原测试断言归属、9 个接收仓子工单链接。 - 作废旧路径规划(`system/clock.mq.md`、`io/index.mq.md` 等会改公开 `std:` 路径),冻结为原样路径。 - 记录 Table 切分、Text 去重、io 别名目标、三个领域模块退出默认 Bundle、`demo` 转组合 fixture 等取舍。 - 新增根唯一 Bundle 生产者 `scripts/build-stdlib.py` + `scripts/stdlib-bundle.json`:只收 active stdlib 组件的 `modules/**/*.mq.md`,拒绝 symlink/子模块/大小写与 NFC 冲突/tests/越界路径,生成现行 `stdlib.json`,内容变化必须显式升版本。 - 新增根组合验收 `scripts/acceptance-stdlib.py`:显式 `--cli`/`--bundle`,独立复核摘要、跑 active 组件 entry、跨仓组合 fixture、失败负例与两次确定性打包。 - 新增 `tests/integration/test_build_stdlib.py`(真实临时 Git 仓 + gitlink 身份路径)与 `tests/integration/composition/`(别名、Table 跨模块、默认 Bundle smoke)。 本 PR 不修改任何子仓 gitlink、不激活组件、不动 CLI;接收仓候选在每个责任仓自己的 PR 中。 ## 验证(本候选) - `python3 scripts/check-layout.py` 与 `--checkouts`:PASS(33 个直属/领域子树固定提交一致)。 - `python3 -m unittest discover -s tests/integration`:Ran 56 tests,OK(含新增 9 个生产者契约测试)。 - 组合 fixture 期望值由候选 staging Bundle + 候选 CLI 真实执行捕获;Table 跨模块终值与迁移前原测试终值逐字节一致。 ## 取舍 - Bundle 只收模块不收 `tests/`,因此官方 Bundle 内容会变化;版本 0.2.0 明示变更,摘要算法不变(由 CLI 权威实现与根实现各算一次)。 - 根不复制模块源码;组件仓拥有源码与测试,根只组合、锁定与验收。 Refs cflmy/marqdo#9 M0/MIG-BUNDLE 候选;根组合验收在后续 M2 候选 PR 执行。
cflmy added 1 commit 2026-11-26 23:44:50 +08:00
M0 of cflmy/marqdo#9: the root ledger now records the verified baseline, the
151 public functions of the 20 pre-migration modules, the frozen Bundle-root
paths, the test/assertion ownership and the decisions that replace the earlier
path-plan (which would have changed public std: imports). Nine receiving-repo
sub-issues are linked.

One producer owns Bundle composition from the exact component gitlinks
(scripts/build-stdlib.py + scripts/stdlib-bundle.json): it publishes only
modules/**/*.mq.md of active stdlib components, rejects symlinks, submodules,
case/NFC collisions, tests/ and unsafe paths, generates the current
stdlib.json digest and requires an explicit version bump when content changes.

scripts/acceptance-stdlib.py is the root composition gate with explicit
--cli/--bundle inputs: it verifies the manifest independently, runs each active
component entry, runs the cross-repository composition fixtures (official
aliases, Table split, default-Bundle smoke), enforces fail-closed negatives and
optionally proves deterministic packaging with the CLI packer.

Contract tests build real temporary Git repositories and cover the gitlink
identity path, determinism, all rejection cases and the explicit version bump.

Refs cflmy/marqdo#9
cflmy merged commit 7475c79cb2 into main 2026-11-26 23:58:13 +08:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cflmy/marqdo#11