Compare commits

..
Author SHA1 Message Date
cflmy 48189243f7 fix(acceptance): pass the explicit negative-gate environment
ci/woodpecker/pr/eco Pipeline was successful
ci/woodpecker/push/eco Pipeline was successful
The fail-closed gates must run with MARQDO_STDLIB_DIR explicitly pointed at a
missing or tampered Bundle; inheriting the caller environment let a CLI with an
adjacent valid Bundle fall back and made the missing-bundle negative pass.
Reproduced with an installed CLI that has stdlib/ next to the binary.

Refs cflmy/marqdo#9
2026-11-27 00:26:57 +08:00
cflmy 4fade3e981 candidate: pin the explicit-package extensions and gate their consumption
ci/woodpecker/push/eco Pipeline was canceled
ci/woodpecker/pr/eco Pipeline failed
Pin ext-http/ext-regex/ext-archive at the merged explicit-Package candidates
(they stay planned, never join the default Bundle) and extend the root
acceptance gate to run any extension checkout that publishes the current
package layout (marqdo.yaml + index.mq.md + scripts/test.sh). Record the actual
package-entry decision in the ledger and evidence: the three domain modules are
consumed through the public @alias import after marqdo lock, with the original
domain tests and baseline terminal values preserved.

Refs cflmy/marqdo#9
2026-11-27 00:10:11 +08:00
cflmy 0c7430ede0 docs: record the stdlib M2 candidate identity, gates and unverified scope
Evidence for the pinned six-component candidate: two byte-identical Bundle
builds (0.2.0, tree digest sha256:db9055...), both verified CLI identities,
component entries, cross-repository composition (including byte-equal Table
split), fail-closed negatives, adjacent offline install and deterministic CLI
packaging. The file explicitly keeps the unchanged main combination, the
existing consumer gates, CLI Phase B and the ext migrations as UNVERIFIED.

Refs cflmy/marqdo#9
2026-11-26 23:51:22 +08:00
cflmy 8fa728b302 candidate: pin the six migrated stdlib components and activate their entries
M2 candidate for cflmy/marqdo#9: pin std-text/std-system/std-io/std-fs/
std-data/std-collections at the exact receiving-repo candidate commits,
activate them in the root catalog with their own scripts/test.sh entry, and
extend integration.sh with the root acceptance-stdlib gate.

The previous requires arrays were design inputs, not real dependencies: the
migrated modules import only CLI language/host builtins and same-repository
siblings, so every active stdlib component now requires only cli (the Table
pair also declares the coordinated checks_with). core/encoding/net stay planned
and do not join the Bundle.
2026-11-26 23:47:57 +08:00
14 changed files with 164 additions and 36 deletions

No files matched your search

+20 -14
View File
@@ -93,23 +93,25 @@ release = "base"
id = "std-collections" id = "std-collections"
path = "stdlib/collections" path = "stdlib/collections"
kind = "stdlib" kind = "stdlib"
state = "planned" state = "active"
owner = "cflmy" owner = "cflmy"
scope = "List、Map 和 Table 值操作" scope = "List、Map 和 Table 值操作"
requires = ["cli", "std-core"] requires = ["cli"]
checks_with = [] checks_with = ["std-data"]
release = "base" release = "base"
entry = "scripts/test.sh"
[[component]] [[component]]
id = "std-text" id = "std-text"
path = "stdlib/text" path = "stdlib/text"
kind = "stdlib" kind = "stdlib"
state = "planned" state = "active"
owner = "cflmy" owner = "cflmy"
scope = "Unicode 文本、字节值与 UTF-8" scope = "Unicode 文本、字节值与 UTF-8"
requires = ["cli", "std-core", "std-collections"] requires = ["cli"]
checks_with = [] checks_with = []
release = "base" release = "base"
entry = "scripts/test.sh"
[[component]] [[component]]
id = "std-encoding" id = "std-encoding"
@@ -126,45 +128,49 @@ release = "base"
id = "std-data" id = "std-data"
path = "stdlib/data" path = "stdlib/data"
kind = "stdlib" kind = "stdlib"
state = "planned" state = "active"
owner = "cflmy" owner = "cflmy"
scope = "JSON、CSV、TOML 与 GFM 数据转换" scope = "JSON、CSV、TOML 与 GFM 数据转换"
requires = ["cli", "std-collections", "std-text", "std-encoding"] requires = ["cli"]
checks_with = [] checks_with = ["std-collections"]
release = "base" release = "base"
entry = "scripts/test.sh"
[[component]] [[component]]
id = "std-io" id = "std-io"
path = "stdlib/io" path = "stdlib/io"
kind = "stdlib" kind = "stdlib"
state = "planned" state = "active"
owner = "cflmy" owner = "cflmy"
scope = "Console、Stream、格式化和官方 print 别名" scope = "Console、Stream、格式化和官方 print 别名"
requires = ["cli", "std-core", "std-text"] requires = ["cli"]
checks_with = [] checks_with = []
release = "base" release = "base"
entry = "scripts/test.sh"
[[component]] [[component]]
id = "std-fs" id = "std-fs"
path = "stdlib/fs" path = "stdlib/fs"
kind = "stdlib" kind = "stdlib"
state = "planned" state = "active"
owner = "cflmy" owner = "cflmy"
scope = "文件、目录与路径" scope = "文件、目录与路径"
requires = ["cli", "std-io", "std-text"] requires = ["cli"]
checks_with = [] checks_with = []
release = "base" release = "base"
entry = "scripts/test.sh"
[[component]] [[component]]
id = "std-system" id = "std-system"
path = "stdlib/system" path = "stdlib/system"
kind = "stdlib" kind = "stdlib"
state = "planned" state = "active"
owner = "cflmy" owner = "cflmy"
scope = "时钟、UTC、环境、进程与随机" scope = "时钟、UTC、环境、进程与随机"
requires = ["cli", "std-text", "std-io"] requires = ["cli"]
checks_with = [] checks_with = []
release = "base" release = "base"
entry = "scripts/test.sh"
[[component]] [[component]]
id = "std-net" id = "std-net"
+10 -10
View File
@@ -101,9 +101,9 @@ Conformance 使用 CLI 已固定的真实 fixture 提交。
| `path.mq.md` | [std-fs#1](https://git.cflmy.cn/cflmy/marqdo-std-fs/issues/1) | `path.mq.md` | 8 | | `path.mq.md` | [std-fs#1](https://git.cflmy.cn/cflmy/marqdo-std-fs/issues/1) | `path.mq.md` | 8 |
| `text.mq.md` | [std-text#1](https://git.cflmy.cn/cflmy/marqdo-std-text/issues/1) | `text.mq.md`(`utf8编码` 薄封装) | 1 | | `text.mq.md` | [std-text#1](https://git.cflmy.cn/cflmy/marqdo-std-text/issues/1) | `text.mq.md`(`utf8编码` 薄封装) | 1 |
| `text/utf8.mq.md` | [std-text#1](https://git.cflmy.cn/cflmy/marqdo-std-text/issues/1) | `text/utf8.mq.md`(唯一编解码实现) | 10 | | `text/utf8.mq.md` | [std-text#1](https://git.cflmy.cn/cflmy/marqdo-std-text/issues/1) | `text/utf8.mq.md`(唯一编解码实现) | 10 |
| `net/http.mq.md` | [ext-http#1](https://git.cflmy.cn/cflmy/marqdo-ext-http/issues/1) | 显式 Package 模块,**不进入默认 Bundle**,不再是 `std:` | 11 | | `net/http.mq.md` | [ext-http#1](https://git.cflmy.cn/cflmy/marqdo-ext-http/issues/1) | 显式 Package 入口 `index.mq.md`,**不进入默认 Bundle**,不再是 `std:` | 11 |
| `regex.mq.md` | [ext-regex#1](https://git.cflmy.cn/cflmy/marqdo-ext-regex/issues/1) | 显式 Package 模块,**不进入默认 Bundle**,不再是 `std:` | 22 | | `regex.mq.md` | [ext-regex#1](https://git.cflmy.cn/cflmy/marqdo-ext-regex/issues/1) | 显式 Package 入口 `index.mq.md`,**不进入默认 Bundle**,不再是 `std:` | 22 |
| `compress.mq.md` | [ext-archive#1](https://git.cflmy.cn/cflmy/marqdo-ext-archive/issues/1) | 显式 Package 模块,**不进入默认 Bundle**,不再是 `std:` | 2 | | `compress.mq.md` | [ext-archive#1](https://git.cflmy.cn/cflmy/marqdo-ext-archive/issues/1) | 显式 Package 入口 `index.mq.md`,**不进入默认 Bundle**,不再是 `std:` | 2 |
| `demo.mq.md` | 不设接收仓;根 Bundle 组合 fixture | 不作为公开安装模块 | 2 | | `demo.mq.md` | 不设接收仓;根 Bundle 组合 fixture | 不作为公开安装模块 | 2 |
`std-core`、`std-encoding`、`std-net` 没有与之对应的旧模块:本轮不发空工单、不激活、不要求补齐未来规划;若已实现模块被本期 Bundle 实际依赖,再按真实依赖补充工单。 `std-core`、`std-encoding`、`std-net` 没有与之对应的旧模块:本轮不发空工单、不激活、不要求补齐未来规划;若已实现模块被本期 Bundle 实际依赖,再按真实依赖补充工单。
@@ -132,7 +132,7 @@ Conformance 使用 CLI 已固定的真实 fixture 提交。
3. **Table 切分**:值操作以 `std:collections/table` 为唯一权威,GFM 序列化以 `std:data/table` 为唯一权威;不保留旧 `std:data/table` 的值操作兼容转发,已知消费者在同一候选内更新。 3. **Table 切分**:值操作以 `std:collections/table` 为唯一权威,GFM 序列化以 `std:data/table` 为唯一权威;不保留旧 `std:data/table` 的值操作兼容转发,已知消费者在同一候选内更新。
4. **Text 去重**:UTF-8 编解码唯一实现在 `text/utf8.mq.md`,`text.mq.md#utf8编码` 为保留公开名称的薄封装。 4. **Text 去重**:UTF-8 编解码唯一实现在 `text/utf8.mq.md`,`text.mq.md#utf8编码` 为保留公开名称的薄封装。
5. **IO 别名**:`io.mq.md` 保持官方 `print`/`打印` 的别名目标 `写值`,签名与 effects 不变;别名元数据仍由 Bundle 生产者生成。 5. **IO 别名**:`io.mq.md` 保持官方 `print`/`打印` 的别名目标 `写值`,签名与 effects 不变;别名元数据仍由 Bundle 生产者生成。
6. **三个领域模块**:HTTP/Regex/Archive 迁入既有扩展仓并退出默认 Bundle,不保留隐藏的 `std:` fallback;CLI 现有 `regex.*`/`compress.*` 宿主请求是历史例外,本轮不删除也不新增同类请求,彻底消除另开工单。 6. **三个领域模块**:HTTP/Regex/Archive 迁入既有扩展仓,按现行 Package 布局以 `index.mq.md` 为唯一公开入口(消费者经 `@alias` 显式依赖),退出默认 Bundle,不保留隐藏的 `std:` fallback;HTTP 的 bundle 内相对 import 改为公开 `std:text/utf8`。CLI 现有 `regex.*`/`compress.*` 宿主请求是历史例外,本轮不删除也不新增同类请求,彻底消除另开工单。
7. **`demo.mq.md`**:不作为公开库模块,转为根 Bundle 组合 fixture,避免为了放置文件创建无独立责任的新仓库。 7. **`demo.mq.md`**:不作为公开库模块,转为根 Bundle 组合 fixture,避免为了放置文件创建无独立责任的新仓库。
8. **staging 不是发行**:迁移期为了隔离测试,允许用基线 Bundle 覆盖组件模块并重算 digest 的 staging 组合;它不是官方发布源,最终只有根唯一生产路径。 8. **staging 不是发行**:迁移期为了隔离测试,允许用基线 Bundle 覆盖组件模块并重算 digest 的 staging 组合;它不是官方发布源,最终只有根唯一生产路径。
9. **CLI 侧最小修改**:Phase A 显式制品输入已落地;Phase B 删除仓内官方源树只在组件替代与根组合验收通过后执行,不同时进行核心重构。 9. **CLI 侧最小修改**:Phase A 显式制品输入已落地;Phase B 删除仓内官方源树只在组件替代与根组合验收通过后执行,不同时进行核心重构。
@@ -143,12 +143,12 @@ Conformance 使用 CLI 已固定的真实 fixture 提交。
| 项 | 状态 | 证据 | | 项 | 状态 | 证据 |
| --- | --- | --- | | --- | --- | --- |
| M0 盘点与派单 | 完成 | 本节、9 个接收仓 issue #1、[marqdo#9](https://git.cflmy.cn/cflmy/marqdo/issues/9) 评论 | | M0 盘点与派单 | 完成 | 本节、9 个接收仓 issue #1、[marqdo#9](https://git.cflmy.cn/cflmy/marqdo/issues/9) 评论 |
| 组件接收(源码+断言) | 候选已推送(6 个 std 仓) | [std-text PR #2](https://git.cflmy.cn/cflmy/marqdo-std-text/pulls/2)、[std-system PR #2](https://git.cflmy.cn/cflmy/marqdo-std-system/pulls/2)、[std-io PR #2](https://git.cflmy.cn/cflmy/marqdo-std-io/pulls/2)、[std-fs PR #2](https://git.cflmy.cn/cflmy/marqdo-std-fs/pulls/2)、[std-data PR #2](https://git.cflmy.cn/cflmy/marqdo-std-data/pulls/2)、[std-collections PR #2](https://git.cflmy.cn/cflmy/marqdo-std-collections/pulls/2) | | 组件接收(源码+断言) | 候选已推送(6 个 std 仓,同候选配对) | [std-text PR #2](https://git.cflmy.cn/cflmy/marqdo-std-text/pulls/2)、[std-system PR #2](https://git.cflmy.cn/cflmy/marqdo-std-system/pulls/2)、[std-io PR #2](https://git.cflmy.cn/cflmy/marqdo-std-io/pulls/2)、[std-fs PR #2](https://git.cflmy.cn/cflmy/marqdo-std-fs/pulls/2)、[std-data PR #2](https://git.cflmy.cn/cflmy/marqdo-std-data/pulls/2)、[std-collections PR #2](https://git.cflmy.cn/cflmy/marqdo-std-collections/pulls/2) |
| 领域模块(http/regex/archive) | 未开始 | ext-http/ext-regex/ext-archive issue #1 | | 领域模块(http/regex/archive) | 候选已合并为显式 Package | [ext-http PR #2](https://git.cflmy.cn/cflmy/marqdo-ext-http/pulls/2)、[ext-regex PR #2](https://git.cflmy.cn/cflmy/marqdo-ext-regex/pulls/2)、[ext-archive PR #2](https://git.cflmy.cn/cflmy/marqdo-ext-archive/pulls/2) |
| Bundle 唯一生产者 | 脚本与契约测试已落地,待根候选验收 | `scripts/build-stdlib.py`、`scripts/stdlib-bundle.json`、`tests/integration/test_build_stdlib.py` | | Bundle 唯一生产者 | 已实现,M2 候选真实构建两次逐字节一致 | `scripts/build-stdlib.py`、`scripts/stdlib-bundle.json`、`tests/integration/test_build_stdlib.py` |
| 组合验收入口 | 已落地,待根候选执行 | `scripts/acceptance-stdlib.py`、`tests/integration/composition/` | | 组合验收入口 | M2 候选 PASS(组件 entry + 跨仓组合 + 负例 + 相邻离线安装 + CLI 确定性打包) | `scripts/acceptance-stdlib.py`、[M2 候选证据](evidence/2026-11-26-stdlib-m2-candidate.md)、[根 PR #11](https://git.cflmy.cn/cflmy/marqdo/pulls/11) |
| CLI 旧源树删除 | 未开始(等待根组合验收) | [marqdo-cli#11](https://git.cflmy.cn/cflmy/marqdo-cli/issues/11) Phase B | | CLI 旧源树删除 | 未开始(等待根组合验收与 CLI PR 合并) | [marqdo-cli#11](https://git.cflmy.cn/cflmy/marqdo-cli/issues/11) Phase B、[CLI PR #12](https://git.cflmy.cn/cflmy/marqdo-cli/pulls/12) |
| 根组合与切换 | 未开始 | 本仓 MIG-RELEASE 候选 | | 根组合与切换 | M2 候选已验证,未晋升;主分支仍为迁移前组合 `484cb10` | M2 候选分支 `migration/stdlib-m2-candidate`、[证据](evidence/2026-11-26-stdlib-m2-candidate.md) |
## v2 功能历史索引 ## v2 功能历史索引
@@ -0,0 +1,72 @@
# 标准库源码归位 M2 候选证据(2026-11-26)
父仓工单:[cflmy/marqdo#9](https://git.cflmy.cn/cflmy/marqdo/issues/9)。本文件记录 **M2 候选组合**的真实执行结果,是候选证据,不是已发布声明。根主分支仍保持迁移前组合(`484cb10`);本候选只有在 CLI Phase A 与六个接收仓 PR 合并、且完整生态门禁通过后才可晋升。
## 候选身份
| 对象 | 身份 |
| --- | --- |
| 根候选分支 | `migration/stdlib-m2-candidate`(本文档提交前树 `8fa728b302fa29caf8268a758eb4b0e90431d780`) |
| 根主分支基线 | `484cb10d66db9b92f0527499642ae6abddb3ef29`(未改动) |
| CLI gitlink(未变) | `cflmy/marqdo-cli@452e9a32bd9e40dba427d4180691c58bab74449e`(RC.4 组合) |
| CLI Phase A 候选(仅用于打包/验证,PR #12) | `cflmy/marqdo-cli@f8b82d414328d92b31865fed05e68223f7bee917` |
| std-text | `cflmy/marqdo-std-text@c2a7d327e5d1914db8952562614707c112a07da1`(PR #2) |
| std-system | `cflmy/marqdo-std-system@053ddb0e59dc016b9c7833f115d14fa04e721d48`(PR #2) |
| std-io | `cflmy/marqdo-std-io@e18b0b1b40fcc6adcb42b5ab9fe1c9c04e9b8263`(PR #2) |
| std-fs | `cflmy/marqdo-std-fs@63bceae58736f13770c7eead02535726d08c19d0`(PR #2) |
| std-data | `cflmy/marqdo-std-data@848af7a357ceda2cfc20721b93406cf4be705889`(PR #2) |
| std-collections | `cflmy/marqdo-std-collections@490765226866ac74b7365471c202e7638187bff8`(PR #2) |
| ext-http(显式 Package) | `cflmy/marqdo-ext-http@368b33d241`(PR #2,合并后精确 SHA 以根 gitlink 为准) |
| ext-regex(显式 Package) | `cflmy/marqdo-ext-regex@6e7e633798`(PR #2) |
| ext-archive(显式 Package) | `cflmy/marqdo-ext-archive@aba6b60934`(PR #2) |
`std-core`、`std-encoding`、`std-net` 保持 `planned`,不加入 Bundle。HTTP/Regex/Archive 已迁为显式 Package(`index.mq.md` + `marqdo.yaml`,消费者经 `@alias` 导入),不进入默认 Bundle;其源码候选已合并到各自仓库 main,根候选固定对应提交并执行显式 Package 消费门禁(`kind = "explicit-package"`)。
## 唯一 Bundle 制品
`scripts/build-stdlib.py` 从上述根 gitlink 组合,两次干净构建逐字节一致:
| 字段 | 值 |
| --- | --- |
| name / version | `marqdo-stdlib` / `0.2.0`(内容变化显式升版本;摘要算法不变) |
| tree digest | `sha256:db905508dde89763b9d43b47fc5d52c6a1d5445a91f3c86a550ced43e8aac9d7` |
| aliases digest | `sha256:5f513c0fdbb3c1e9829be3c9fa23a2d1e89cb8510073fb5eb1e8e2f5265a83bb`(与迁移前一致) |
| 模块数 | 17(仅模块;`tests/`、`demo.mq.md`、`net/http`、`regex`、`compress` 均不在默认 Bundle) |
| 打包归档 | `marqdo-stdlib-0.2.0.tar.gz`,`sha256:212cca32f10ecfa0cdedfa976f7726db5e01cdb0e664a41ae26d4b34a8fd7048`(CLI Phase A `tools/pack-stdlib.py` 两次输出逐字节一致) |
## 门禁结果
| 门禁 | 命令 | 结果 |
| --- | --- | --- |
| 根布局 | `python3 scripts/check-layout.py` | PASS |
| 递归布局 | `python3 scripts/check-layout.py --checkouts` | PASS(33 个固定子树;6 个 active stdlib entry 存在且工作区干净) |
| 根集成测试 | `python3 -m unittest discover -s tests/integration` | Ran 56 tests,OK(含 9 个 Bundle 生产者契约测试) |
| 组件独立验收 | `MARQDO_BIN=<RC.4 由 452e9a3 构建> MARQDO_STDLIB_DIR=<新 Bundle> scripts/test.sh`(各仓) | 6/6 PASS,共 17 个 case(collections 1、text 2、data 3、io 4、fs 2、system 5) |
| 跨仓组合 | `scripts/acceptance-stdlib.py --cli <CLI> --bundle <新 Bundle>` | PASS:官方 `print`/`打印` 别名、Table 值操作+GFM 跨模块、默认 Bundle smoke |
| Table 等价性 | 组合 fixture 终值与迁移前原 `stdlib/tests/table.mq.md` 终值 | 逐字节一致 |
| 显式 Package 消费 | `scripts/acceptance-stdlib.py` 内 http/regex/archive 各自 `scripts/test.sh`(临时消费者工程 + `marqdo lock` + `@alias` 导入) | PASS(原领域测试终值与迁移前基线一致) |
| 失败负例 | 缺显式 Bundle、篡改模块摘要 | 均按预期失败(exit 1),不静默回退 |
| 相邻安装离线运行 | 把新 Bundle 放到 CLI 二进制旁 `stdlib/`,不设 `MARQDO_STDLIB_DIR` | PASS(默认离线安装路径可用) |
| CLI 打包 | Phase A `pack-stdlib.py --stdlib-dir <新 Bundle>` ×2 + 篡改输入 | 确定性 PASS;篡改拒绝 |
CLI 身份(sha256):由 `452e9a3` 构建的 RC.4 二进制 `sha256:0377b855...`;Phase A 合并 master(`f8b82d4`)二进制 `sha256:6ede3b9e...`。两者对同一 Bundle 的组件与组合门禁结果一致。
## 未验证 / 待办
- 完整 `scripts/integration.sh` 的既有消费者门禁(Conformance/View/Knowledge/Prove/Lint)本轮**未执行**:该流程仍取冻结 RC.4 制品,本次未替换为统一制品输入(ECO-02,marqdo#7);不能把本次 PASS 当作生态发行验收。
- CLI Phase B(删除仓内官方标准库源树、pin 切换)未做,等待 CLI PR #12 合并与本候选组件 PR 合并。
- HTTP/Regex/Archive 已成为显式 Package 且组件内测试通过;本候选的根组合门禁只验证了独立 Package 行为,尚未验证真实应用项目的 `git` 依赖锁定/同步与发布分发,也尚未从默认 Bundle 删除后验证既有 `std:` 用户的迁移提示(按合同不保留 fallback)。
- 未做完整产品归档冷安装(新 Bundle + 新 CLI 发行归档)与多平台证据;Windows/macOS 未验证。
- 根主分支未改动,回退方式为放弃本候选分支,迁移前组合 `484cb10` 仍可检出。
## 复现
```sh
git checkout migration/stdlib-m2-candidate
git submodule update --init --recursive
python3 scripts/check-layout.py --checkouts
python3 -m unittest discover -s tests/integration
python3 scripts/build-stdlib.py --out build/stdlib
python3 scripts/acceptance-stdlib.py --cli <verified-marqdo> --work build/accept
# 可选:--pack-tool <cli>/tools/pack-stdlib.py(Phase A 之后)
```
+44 -2
View File
@@ -169,6 +169,26 @@ def load_components() -> list[dict]:
] ]
def load_explicit_packages() -> list[dict]:
"""Planned extensions that already publish an explicit Package entry.
A component is gated as an explicit package only when its pinned checkout
carries the current package layout (``marqdo.yaml`` + ``index.mq.md`` +
``scripts/test.sh``); it is never silently loaded into the default Bundle.
"""
catalog = tomllib.loads((ROOT / "components.toml").read_text())
packages = []
for component in catalog["component"]:
if component.get("kind") != "extension":
continue
checkout = ROOT / component["path"]
if (checkout / "marqdo.yaml").is_file() and (
checkout / "index.mq.md"
).is_file() and (checkout / "scripts" / "test.sh").is_file():
packages.append(component)
return packages
def component_gates(cli: str, bundle: Path) -> list[dict]: def component_gates(cli: str, bundle: Path) -> list[dict]:
results = [] results = []
for component in load_components(): for component in load_components():
@@ -194,14 +214,34 @@ def component_gates(cli: str, bundle: Path) -> list[dict]:
"output": output, "output": output,
} }
) )
for component in load_explicit_packages():
entry = ROOT / component["path"] / "scripts" / "test.sh"
env = os.environ.copy()
env["MARQDO_BIN"] = cli
env["MARQDO_STDLIB_DIR"] = str(bundle)
result = run([str(entry)], cwd=ROOT / component["path"], env=env)
output = (result.stdout + result.stderr).decode(errors="replace").strip()
if result.returncode != 0:
raise AcceptanceError(
f"explicit package {component['id']} failed: {output}"
)
results.append(
{
"id": component["id"],
"entry": "scripts/test.sh",
"kind": "explicit-package",
"status": "PASS",
"output": output,
}
)
return results return results
def negative_gates(cli: str, bundle: Path, work: Path) -> list[dict]: def negative_gates(cli: str, bundle: Path, work: Path) -> list[dict]:
results = [] results = []
def expect_failure(name, command): def expect_failure(name, command, env_for_gate):
result = run(command) result = run(command, env=env_for_gate)
if result.returncode == 0: if result.returncode == 0:
raise AcceptanceError(f"negative gate {name} unexpectedly passed") raise AcceptanceError(f"negative gate {name} unexpectedly passed")
results.append( results.append(
@@ -219,6 +259,7 @@ def negative_gates(cli: str, bundle: Path, work: Path) -> list[dict]:
expect_failure( expect_failure(
"missing-explicit-bundle", "missing-explicit-bundle",
[cli, "run", str(ROOT / "tests/integration/composition/default-bundle.mq.md")], [cli, "run", str(ROOT / "tests/integration/composition/default-bundle.mq.md")],
env,
) )
tampered = work / "tampered-bundle" tampered = work / "tampered-bundle"
@@ -231,6 +272,7 @@ def negative_gates(cli: str, bundle: Path, work: Path) -> list[dict]:
expect_failure( expect_failure(
"tampered-module-digest", "tampered-module-digest",
[cli, "run", str(ROOT / "tests/integration/composition/default-bundle.mq.md")], [cli, "run", str(ROOT / "tests/integration/composition/default-bundle.mq.md")],
env,
) )
return results return results
+9 -1
View File
@@ -4,7 +4,7 @@ set -euo pipefail
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
root="$PWD" root="$PWD"
active="$(python3 scripts/check-layout.py --checkouts --active-paths)" active="$(python3 scripts/check-layout.py --checkouts --active-paths)"
expected=$'cli\ntests/conformance\ntools/knowledge\ntools/lint\ntools/prove\ntools/view' expected=$'cli\nstdlib/collections\nstdlib/data\nstdlib/fs\nstdlib/io\nstdlib/system\nstdlib/text\ntests/conformance\ntools/knowledge\ntools/lint\ntools/prove\ntools/view'
if [[ "$active" != "$expected" ]]; then if [[ "$active" != "$expected" ]]; then
echo "UNVERIFIED: update the integration plan for the changed active component set" >&2 echo "UNVERIFIED: update the integration plan for the changed active component set" >&2
exit 1 exit 1
@@ -45,6 +45,14 @@ source_sha="$(git -C cli rev-parse HEAD)"
test "$(cat "$(dirname "$MARQDO_BIN")/SOURCE_SHA")" = "$source_sha" test "$(cat "$(dirname "$MARQDO_BIN")/SOURCE_SHA")" = "$source_sha"
sha256sum "$archive" "$MARQDO_BIN" "$(dirname "$MARQDO_BIN")/marqdo-provider-worker" sha256sum "$archive" "$MARQDO_BIN" "$(dirname "$MARQDO_BIN")/marqdo-provider-worker"
# Standard-library source relocation candidate: the root producer builds the one
# Bundle from the pinned component gitlinks; active component entries, the
# cross-repository composition fixtures and the fail-closed negatives all run
# against the same verified CLI artifact.
python3 scripts/acceptance-stdlib.py \
--cli "$MARQDO_BIN" --work "$work/stdlib-acceptance" \
--evidence "$work/stdlib-acceptance.json"
python3 cli/tools/release/smoke.py --archive "$archive" python3 cli/tools/release/smoke.py --archive "$archive"
python3 cli/tools/ci/verify_extension_contracts.py \ python3 cli/tools/ci/verify_extension_contracts.py \
--source-repo cli --tested-sha "$source_sha" --cli "$MARQDO_BIN" \ --source-repo cli --tested-sha "$source_sha" --cli "$MARQDO_BIN" \