* read_block 失败时:是不是「确定性不存在」(vs 网络/超时/反代/DNS)。 * 只命中明确来自 KB 业务层的串;**不**匹配 ENOTFOUND/ECONNREFUSED/http_404/timeout 等传输层故障 * (那些归 unverified、不降级,避免主站抖动误降级真实引用)。
(err: string)
| 47 | * (那些归 unverified、不降级,避免主站抖动误降级真实引用)。 |
| 48 | */ |
| 49 | function errorIsNotFound(err: string): boolean { |
| 50 | return /未找到\s*anchor|未找到\s*文件|文件不存在|no such file|page_not_found|errno\s*2(?!\d)/i.test(err); |
| 51 | } |
| 52 | |
| 53 | function blockContent(data: unknown): string { |
| 54 | if (data && typeof data === "object" && "content" in data) { |
no outgoing calls
no test coverage detected