Files
marqdo-ext-web/docs/evidence/WEB-00-analysis-probe.md
cflmy df4324f3e3 test(web): probe the real Analysis contract for WEB-00
Add scripts/risk-probe.py and scripts/ci.sh: consume only the verified CLI's
public Analysis 3 for the research-workspace entry, its two component targets
and two negative fixtures. Verify the exact Knowledge H2 anchor/spans, the GFM
component table AST/header/cell links, references with candidate_path/fragment,
target anchor resolution with source digests, and that ordinary links and
missing anchors stay distinguishable facts.

The local candidate passes with no gaps, so WEB-DESIGN's Analysis dependency
needs no correction; no new CLI syntax/private field is requested. Record the
CLI/root identities, commands and unverified scope in the evidence document.

Refs cflmy/marqdo#6, cflmy/marqdo-ext-web#1
2026-11-27 02:27:42 +08:00

48 lines
3.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# WEB-00 真实 Analysis 风险探测(W-M0)证据
日期:2026-11-27。责任仓:`marqdo-ext-web`;父工单:[marqdo#6](https://git.cflmy.cn/cflmy/marqdo/issues/6);本仓工单:[marqdo-ext-web#1](https://git.cflmy.cn/cflmy/marqdo-ext-web/issues/1)。
本文件记录 `docs/WEB-DESIGN.md` 对公开 Analysis 3 的依赖是否被真实 CLI 满足,是**候选证据**,不声称 Design/Preview 已实现或 Web 领域已激活。
## 输入身份
| 对象 | 身份 |
| --- | --- |
| 根生态组合 | `cflmy/marqdo@d4ccb7700392e87b240d20f84539921f46540dda`(六个 stdlib active、CLI Phase B) |
| CLI | 由根固定的 `cli/` 提交 `deadf6e` 构建的 `marqdo 3.0.0-rc.4`,SHA-256 `sha256:6ede3b9e8bcfad3942573e68b5f54b2c5bc2866b37d102f63acd49a55cb212db` |
| 平台 | Linux x86_64(本机验证) |
| 示例根 | `examples/research-workspace/`(`--root` 显式) |
| 入口 | `index.mq.md`,设计单元 anchor `工作台` |
## 执行
```sh
MARQDO_BIN=<verified marqdo> MARQDO_CLI_SHA256=<digest> \
scripts/ci.sh
# out/web00-analysis-probe.json 为机器证据
```
`scripts/risk-probe.py` 只消费真实 `check --emit` 的 Analysis 3,不解析 Markdown;它对入口、两个设计链接目标与两个负例 fixture 分别生成 Analysis 并检查合同所需事实。
## 结果:PASS(gaps 为空)
均已由真实 Analysis 提供:
- Knowledge H2 `工作台` 的精确 anchor、`unit_id`、`heading_span`/`span`;`anchors` 把 anchor 映射到 Unit。
- `组件` 直接 H3 节内的单张 GFM 表:AST `table` 节点、`table_row`(首行 header)、四个 `table_cell`,表头文本精确为 `行 | 槽 | 组件 | 宽度`,整表 span 与节 span 一致。
- 每个组件单元格恰好包含一个 Link;Link 的 AST span 与单元格 span 可精确比较,正文链接不会被误当作组件边。
- 设计链接对应 Analysis `references`:`source_unit` 指向所在 H3、`url`/`span` 与原链接一致、`state = not_loaded`、`candidate_path`/`fragment` 精确且相对路径;无需按 label/文件名猜测。
- 目标解析:对 `components/navigation.mq.md#导航` 与 `components/workspace.mq.md#科研工作区` 分别 `check --emit`,其 `anchors` 均能映射到 Knowledge H2,并记录 `source_digest` 作为源身份;目标均在显式 `--root` 内。
- 负例事实:普通段落链接只形成普通 reference(无保留表格);缺失 anchor 仍暴露 `candidate_path`/`fragment`,Design 可确定性拒绝。
## 合同结论与修正
- `docs/WEB-DESIGN.md` 对 Analysis 3 的依赖(GFM 表 AST、精确 anchor、references `candidate_path`、source_digest、显式 root)**与实测一致,无需修改**;未发现公开 Analysis 合同缺口,因此不向 CLI 提交新的语法/私有字段需求。
- `--unit` 的“精确 anchor”在 Analysis 中由 `anchors[].anchor` 给出,并映射到 Knowledge H2 `unit_id`;Design 必须使用该映射而不是猜路径。
## 未验证 / 后续
- 本探测只覆盖合同示例入口与两个组件目标及负例 fixture;Design(WEB-01)对递归布局/场景/诊断的实现与 Preview(WEB-02)渲染仍待开发,示例整体仍为 `UNVERIFIED`。
- `marqdo-web-design`/`marqdo-web-preview` 不在本仓;本证据不替代组件 CI。
- 领域激活与根接入(WEB-05)仍未开始。