From 29e4f4c014d8a9fed68e6bb55bf8c68b6dc3e1cf Mon Sep 17 00:00:00 2001 From: argszero Date: Sun, 27 Sep 2026 19:19:32 +0800 Subject: [PATCH] docs(perf_gate): drop the stale file count from the gate header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header listed its first positive control as asserting that the scan "found 4 files", but the roster it describes holds five entries and the assert that pins the roster reads five (assert_eq!(FILES.len(), 5, "应扫描 5 个路由文件")). The two numbers agreed when 93b2ebd wrote both; 199566c added sharing.rs to FILES and updated only the assert, leaving the header behind. The count is already owned by that assert, so restating it in the header is a second carrier of one fact that can drift unnoticed: drop the number and point at the mechanism instead of refreshing it. --- src/perf_gate.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/perf_gate.rs b/src/perf_gate.rs index 5ebcfe0..8f6a43b 100644 --- a/src/perf_gate.rs +++ b/src/perf_gate.rs @@ -27,9 +27,9 @@ //! - **零新依赖**:只做逐字节扫描,不解析 SQL、不连数据库; //! - **关联方式全是位置性的**:生产区 = 文件里第一次出现行首 `#[cfg(test)]` 之前的部分 //! (`src/routes/*.rs` 的测试模块一律在文件末尾且 `#[cfg(test)]` 顶格); -//! - **阳性对照**:断言「扫描到 4 个文件」「闭区间重写逐文件计数」「测试里的旧写法 -//! 仍在(证明区域切分没多吃)」;检测器本身另有合成输入的阴性/阳性对照, -//! 保证它不会在空集上「通过」(C2005 坑 68)。 +//! - **阳性对照**:断言「路由文件名册的条目数(`FILES.len()` 对照写死的期望值)」、 +//! 「闭区间重写逐文件计数」「测试里的旧写法仍在(证明区域切分没多吃)」; +//! 检测器本身另有合成输入的阴性/阳性对照,保证它不会在空集上「通过」(C2005 坑 68)。 /// 编译期读入各文件(测试不依赖工作目录与文件系统布局)。 const FILES: &[(&str, &str)] = &[