Implements the two CLI-owned P0 sub-issues of the ecosystem architecture
tickets without adding document-language syntax.
Environment report (marqdo-cli#26 §9.2, binding for #20):
- `marqdo inspect --environment [--json]` emits `marqdo.environment` v1:
producer version and build-embedded source commit, platform/arch/glibc and
real strict probe, adjacent provider-worker version/SHA (offline
`--build-info`, bounded), verified Bundle identity, current protocol
revisions and path-free diagnostics. Project-independent, offline, and
exclusive with document inspection flags.
- Release builds embed `MARQDO_BUILD_SOURCE_SHA`; the CI `build` lane sets it.
`tools/release/package.py` refuses to stage an archive whose binaries report
another commit or Bundle digest, and `tools/release/smoke.py` re-verifies the
extracted archive.
- Spec: `spec/environment.md`. Tests: `environment_report.rs` (5 cases) and
in-module unit tests; docs/releasing/COMPATIBILITY/STATUS updated.
Document-structure contract (marqdo-cli#25):
- `spec/document-structure.md` states the current author/tool semantics once:
heading mode inheritance (nearest ancestor, only Exec H2 callable), unit
identity and duplicate-name rules, anchor collision numbering, byte-exact
half-open spans, `index.mq.md` entry vs directory-dependency import meaning,
link != import != call, Proposed annotations marked not implemented, and the
Analysis fields consumers may rely on. It links the single authoritative
specs instead of duplicating them.
- Tests: `document_structure.rs` (6 cases) + docs_consistency coverage.
No runtime behavior change, no new language surface, no new cross-repo
dependency. `docs_consistency` and `architecture_boundaries` remain green.
Add the reproducible evidence record for candidate 0f87f856: pinned
ecosystem Bundle identity, the full source gate list (fmt/clippy/638
workspace tests/boundaries/independent-build), the environment-report probes,
the release archive built with the embedded source SHA (package identity check
+ smoke PASS) and the Woodpecker push/PR lanes. Windows/macOS native lanes and
the strict VM lane stay UNVERIFIED.
Links the record from docs/STATUS.md.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
概述
实现
marqdo#55/marqdo#56在 CLI 责任仓的两个子工单,不新增文档语言语法、不新增跨仓依赖:marqdo-cli#26§9.2(P1):marqdo inspect --environment [--json]离线诊断导出(marqdo.environmentv1),并把它绑定到发行身份。marqdo-cli#25:spec/document-structure.md固化当前文稿结构与入口语义,附 6 个真实 CLI 契约测试。marqdo-cli#20要求的“发行归档绑定精确源码/Bundle 输入”:package 与 smoke 都从归档自身验证。交付
1. 环境诊断导出(#26 §9.2)
inspect --environment:离线、与项目无关,只读取安装身份与平台事实;不加载模块、不启动 provider 会话、不打开插件、不联网、不输出绝对路径/凭据/源内容;与文档检查 flags 互斥(clap 报 usage error,退出码 2)。marqdo-provider-worker的版本/SHA(通过有界离线--build-info,750ms 超时)、已验证 Bundle 的 name/version/tree digest/instance id、当前协议版本、路径自由的diagnostics[].code。status: invalid+env.stdlib_*),命令仍成功;这是反馈体系需要的可脚本消费语义。spec/environment.md(唯一现行契约),README/COMPATIBILITY/developers/releasing/STATUS 同步。2. 发行身份绑定(#20)
crates/cli/build.rs与crates/marqdo-provider-worker/build.rs在构建时嵌入MARQDO_BUILD_SOURCE_SHA(严格 40 位小写 hex;dev 构建诚实为 null)。buildlane 在cargo build --release前export MARQDO_BUILD_SOURCE_SHA="$CI_COMMIT_SHA"。tools/release/package.py在写RELEASE_INFO.json/归档前运行暂存二进制的inspect --environment --json,要求 CLI 与 worker 的 source SHA 等于--source-sha、Bundleverified且 tree digest 等于归档 Bundle;不匹配即失败。tools/release/smoke.py从解包归档再执行同一检查,禁止“归档声称未构建的源码”。3. 文稿结构与入口语义契约(#25)
spec/document-structure.md:H1–H6 与@exec/@knowledge继承(最近祖先、绝不兄弟;仅 Exec H2 可调用)、unit 身份与同作用域重名错误、anchor slug 冲突编号、UTF-8 半开 span(BOM/CRLF/无尾换行)、index.mq.md作为项目入口 vs 目录依赖 import 的区别、link≠import≠call、未实现项(heading annotations)显式标注、消费者可依赖的 Analysis 字段清单。mapping.md/analysis.md/references.md/package-format.md单一事实源,不复制第二份规范。crates/cli/tests/document_structure.rs6 个真实 CLI 用例;docs_consistency增加“单一契约 + 入口链接”断言。验证(本地,Linux x86_64 / glibc 2.43)
python3 tools/ci/fetch_ecosystem_bundle.py --out target/ecosystem-stdlib(pin commit 与各 gitlink 固定)。边界
inspect --environment是既有inspect的离线模式,不进入执行路径)。marqdo-cli仅新增libcworkspace 依赖(用于报告 glibc 运行时事实,已存在于 workspace lock)。关联
refs #25 #26 #20