Move the official stdlib text modules to their unique source authority and freeze the bundle-root paths (std:text, std:text/utf8). text.utf8编码 becomes a thin wrapper over the single UTF-8 implementation in text/utf8.mq.md. Carry the pre-migration product assertions into component-owned cases with the baseline observation terminal values, plus an explicit-input test entry point (MARQDO_BIN + MARQDO_STDLIB_DIR). No parser, host or CLI change. Refs cflmy/marqdo#9, cflmy/marqdo-std-text#1
2.1 KiB
2.1 KiB
marqdo-std-text
本仓负责 Unicode 文本、字节值与 UTF-8。当前处于标准库源码归位迁移阶段:源码与断言已迁入本仓,等待父仓候选组合验收(父仓工单 marqdo#9,本仓工单 #1)。
唯一公开入口(Bundle 根相对路径)
| 发布路径 | 公开导入 | 职责 |
|---|---|---|
text/utf8.mq.md |
std:text/utf8 |
UTF-8 编解码的唯一实现 |
text.mq.md |
std:text |
utf8编码 的公开名称,薄封装调用 std:text/utf8,不复制算法 |
modules/ 保存将来 Bundle 根下的相对路径;Bundle 与 stdlib.json 由父仓唯一生产者生成,本仓不维护第二份官方 manifest。
目录
modules/:对外发布的模块源码(Bundle 根相对路径)。tests/:迁移期保留的.mq.md自测源与tests/cases/期望(observation 终值、stdout、参数、环境)。scripts/:独立验收入口。
独立验收
只接受显式传入的已验证制品,不读取兄弟仓物理路径或浮动分支:
MARQDO_BIN=/path/to/verified/marqdo \
MARQDO_STDLIB_DIR=/path/to/installed/bundle \
scripts/test.sh
MARQDO_BIN:真实 CLI 二进制;MARQDO_STDLIB_DIR:已安装且通过 manifest digest 校验、包含本仓模块的 Bundle。tests/cases/*.json的期望值来自迁移前 CLI Bundle 基线的真实执行结果;修改期望值等于声明公开行为变化,必须单独评审。- 测试覆盖 UTF-8 字节序列、中文/多字节/emoji、空串和边界 Memory;非法 UTF-8 行为以基线断言为准。
边界
不实现语言内核、Host 权限、资源原语或其他标准库;UTF-8 算法只存在于 text/utf8.mq.md。标准库聚合(marqdo-stdlib)尚未建立,本仓保持父仓 catalog 的 planned 状态,直到同候选组合验收通过。