refactor(PR-02): protocol/reader architecture, /api/documents and reader IA
- migrate crate to RFC-0002 §5.3 Reader layout: src/protocol/{analysis_v2,
trace_v2,tool_v1}.rs, src/reader/{source,markdown,model,assemble,render,
assets}.rs, src/config.rs; lib.rs is the composition root; delete app/project/
semantic/trace/document/presentation/source_map/render/assets top-level files
- split presentation into model (types) and assemble (merge/stale/DocumentService)
- merge controlled project root/path boundary and UTF-8 byte spans into
reader/source.rs; move view.json config to config.rs
- replace GET /api/document with read-only GET /api/documents (documents list +
current outline/function/analysis summary) and add contract tests
- reading UI: drop variable/memory placeholder actions, keep one explicit
unsupported explanation, add simple dark theme toggle over the single token
layer; assert via rendering test
- reorganize tests into Cargo [[test]] suites tests/contract and
tests/integration; record docs/evidence/PR-02
- unit 41 + contract 41 + integration 33 all pass; clippy clean
This commit is contained in:
1 parent
5a61788bc9
commit
5c9a313424
43 files changed
+1222
-936
No files matched your search
+18
-18
@@ -15,31 +15,31 @@
|
||||
|
||||
| ID | 结果 | 证据 |
|
||||
|---|---|---|
|
||||
| A-01 无旧 crate 依赖 | PASS | `tests/no_coupling.rs` 依赖/Cargo.lock/源码扫描 |
|
||||
| A-01 无旧 crate 依赖 | PASS | `tests/contract/no_coupling.rs` 依赖/Cargo.lock/源码扫描 |
|
||||
| A-02 独立新仓库 clean build | PASS | acceptance `build`;无 `marqdo`/`marqdo-cli` 源码依赖 |
|
||||
| A-03 Tool v1 安装/分发 | PASS | acceptance `archive_install`、`tool_list`、`view_help`;`scripts/install-smoke.sh` |
|
||||
| A-04 CLI SHA-256 前后相同 | PASS | acceptance `core_sha`;manifest 中 before==after=`062cb56e…` |
|
||||
| A-05 旧审计与截图基准 | PASS(静态) | `docs/audits/legacy-render-paths.md`(`LEGACY_RUNTIME_UNVERIFIED` 已声明) |
|
||||
| A-06 单一 Renderer/CSS 入口 | PASS | `tests/no_coupling.rs`、`tests/asset_integrity.rs`、ADR-0001/0002 |
|
||||
| S-01 Knowledge/Exec/继承 | PASS | `tests/rendering.rs`、`tests/unicode_spans.rs`、冻结 Analysis golden |
|
||||
| S-02 Emph/Strong/Code 载体 | PASS | `tests/rendering.rs`(4 个 Exec 锚点)、`tests/unicode_spans.rs` |
|
||||
| A-06 单一 Renderer/CSS 入口 | PASS | `tests/contract/no_coupling.rs`、`tests/contract/asset_integrity.rs`、ADR-0001/0002 |
|
||||
| S-01 Knowledge/Exec/继承 | PASS | `tests/integration/rendering.rs`、`tests/integration/unicode_spans.rs`、冻结 Analysis golden |
|
||||
| S-02 Emph/Strong/Code 载体 | PASS | `tests/integration/rendering.rs`(4 个 Exec 锚点)、`tests/integration/unicode_spans.rs` |
|
||||
| S-03 Knowledge 惰性 | PASS | `knowledge_emphasis_never_becomes_an_execution_anchor` |
|
||||
| S-04 中文/emoji/CRLF/重复语句 | PASS | `examples/unicode-spans` + 冻结 golden + `tests/unicode_spans.rs` |
|
||||
| S-05 check 失败可读 | PASS | `tests/presentation_states.rs`、浏览器 diagnostics 区 |
|
||||
| S-06 未知 Analysis major 拒绝 | PASS | `tests/semantic` 单测、`tests/presentation_states.rs`、`verify` 负测 |
|
||||
| S-07 digest/span 篡改 | PASS | `tests/trace_contract.rs`、`tests/presentation_states.rs` |
|
||||
| R-01 刷新 10 次不运行 | PASS | `tests/http_live.rs::opening_and_refreshing_never_runs_the_document` |
|
||||
| R-02 导出纯静态 | PASS | `tests/export.rs`(marker 假核心 + argv 无 run) |
|
||||
| S-04 中文/emoji/CRLF/重复语句 | PASS | `examples/unicode-spans` + 冻结 golden + `tests/integration/unicode_spans.rs` |
|
||||
| S-05 check 失败可读 | PASS | `tests/contract/presentation_states.rs`、浏览器 diagnostics 区 |
|
||||
| S-06 未知 Analysis major 拒绝 | PASS | `tests/semantic` 单测、`tests/contract/presentation_states.rs`、`verify` 负测 |
|
||||
| S-07 digest/span 篡改 | PASS | `tests/contract/trace_contract.rs`、`tests/contract/presentation_states.rs` |
|
||||
| R-01 刷新 10 次不运行 | PASS | `tests/integration/http_live.rs::opening_and_refreshing_never_runs_the_document` |
|
||||
| R-02 导出纯静态 | PASS | `tests/integration/export.rs`(marker 假核心 + argv 无 run) |
|
||||
| R-03 用户确认后真实运行 | PASS | acceptance `real_run`(安装态、CSRF、真实 Trace) |
|
||||
| R-04 trace 不匹配 → STALE | PASS | `tests/trace_contract.rs`、`tests/http_live.rs` |
|
||||
| R-04 trace 不匹配 → STALE | PASS | `tests/contract/trace_contract.rs`、`tests/integration/http_live.rs` |
|
||||
| R-05 截断/运行错误 | PASS | 真实 truncated/arity golden + 页面状态 |
|
||||
| R-06 不猜未公开值 | PASS | Trace 模型无这些字段;UI `UNSUPPORTED`(`docs/design/state-matrix.md`) |
|
||||
| X-01 恶意 Markdown | PASS | `tests/rendering.rs`、`tests/fixtures/security-project` 浏览器 |
|
||||
| X-02 路径穿越/symlink | PASS | `tests/http_live.rs`、`SafeRelativePath` 单测 |
|
||||
| X-03 跨站 POST run | PASS | `tests/http_live.rs`(token/Origin/confirm/mode) |
|
||||
| X-01 恶意 Markdown | PASS | `tests/integration/rendering.rs`、`tests/fixtures/security-project` 浏览器 |
|
||||
| X-02 路径穿越/symlink | PASS | `tests/integration/http_live.rs`、`SafeRelativePath` 单测 |
|
||||
| X-03 跨站 POST run | PASS | `tests/integration/http_live.rs`(token/Origin/confirm/mode) |
|
||||
| X-04 无 JS/禁网/file:// | PASS | 浏览器 no-JS/外部请求检查;`scripts/test-export.sh` file:// Chromium |
|
||||
| X-05 stdout 注入转义 | PASS | `tests/http_live.rs::program_stdout_is_escaped...` |
|
||||
| X-06 超时/子进程清理 | PASS | `tests/core_contract.rs::timeout_kills_the_process_group...` |
|
||||
| X-05 stdout 注入转义 | PASS | `tests/integration/http_live.rs::program_stdout_is_escaped...` |
|
||||
| X-06 超时/子进程清理 | PASS | `tests/contract/core_contract.rs::timeout_kills_the_process_group...` |
|
||||
| P-01 文档可复现 | PASS | README / RFC / STATUS / COMPATIBILITY / ADR / 审计 / 证据 |
|
||||
| P-02 archive clean install | PASS | acceptance 从 `.tar.gz` 解包到临时目录安装并运行 |
|
||||
| P-03 协议审计 | PASS | `docs/audits/protocol-conformance.md` |
|
||||
@@ -52,8 +52,8 @@
|
||||
| U-02 多宽度 | PASS | 390/600/900/1280/1664/1920/2560 真实 Chromium:无横向溢出、Dock 在视口内 |
|
||||
| U-03 键盘/焦点/屏幕阅读器 | PASS(基础) | Tab 可达命名控件、Esc 关闭、Ctrl/Cmd+K 搜索;完整 screen-reader 手工走查未做 |
|
||||
| U-04 动态曲线侧注 | **PARTIAL** | 运行事件使用**内联 keyed chip**(无 JS/移动/打印均可读);SVG 曲线侧注未实现,不画错线 |
|
||||
| U-05 Welcome 仅显式配置 | PASS | `view.json` 驱动;`tests/rendering.rs`、浏览器 |
|
||||
| U-06 Live/Export 内容对照 | PASS | `tests/rendering.rs` 同模型对照;导出复用同一 renderer |
|
||||
| U-05 Welcome 仅显式配置 | PASS | `view.json` 驱动;`tests/integration/rendering.rs`、浏览器 |
|
||||
| U-06 Live/Export 内容对照 | PASS | `tests/integration/rendering.rs` 同模型对照;导出复用同一 renderer |
|
||||
|
||||
## 复现
|
||||
|
||||
|
||||
Reference in new issue
Block a user