Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
feat: rename files
jinzhenj0a17f9d1e1cc
diff --git a/NEXT-CLI.md b/NEXT-CLI.mdindex f40bc12d..6312e638 100644--- a/NEXT-CLI.md+++ b/NEXT-CLI.md@@ -10,7 +10,7 @@|------|--------|-----------|| 定位 | 本地文档解析和管理中心 | 纯文档解析工具 || 受众 | Agent 系统 / 少量文档的非技术用户 | 大规模数据处理的开发人员 |-| 数据库 | 维护本地 mineru.db,去重 + 可搜索 | 不涉及数据库 |+| 数据库 | 维护本地 doclib.db,去重 + 可搜索 | 不涉及数据库 || 输入 | 单文件(未来多文件/目录/URL) | 文件/目录 || 输出默认 | STDOUT(渐进式,默认有限页) | 文件(-o 必填) || 参数风格 | 精简,隐藏专家选项 | 完整,暴露所有引擎/并发/冲突策略参数 |@@ -46,9 +46,10 @@ Found -> Check path -> calc SHA256 -> Check sha256 -> Plain TextMinerU home:默认是 `$HOME/.mineru` ,可通过 `MINERU_HOME` 配置。[MINERU_HOME]- mineru.sock- mineru.db- mineru.log+ config.yaml+ doclib.sock+ doclib.db+ doclib.logdata/parsed/temp/@@ -58,7 +59,7 @@ MinerU home:默认是 `$HOME/.mineru` ,可通过 `MINERU_HOME` 配置。## 概述-`parse` 是 `mineru` 的文档解析子命令。解析结果自动入库(mineru.db),同时输出到 STDOUT 或指定文件。支持本地引擎和远端 API 两种执行模式。+`parse` 是 `mineru` 的文档解析子命令。解析结果自动入库(doclib.db),同时输出到 STDOUT 或指定文件。支持本地引擎和远端 API 两种执行模式。设计原则:- **隐私优先**:不会在用户不知情的情况下将文件上传到远端,也不会静默降级解析质量@@ -425,7 +426,7 @@ mineru server 是常驻后台进程,负责:- 单进程,asyncio 事件循环调度- CLI ↔ Server 通信:HTTP + JSON over Unix Domain Socket- 数据存储:SQLite(WAL 模式)+ FTS5 全文搜索-- Socket 路径:默认是 `$MINERU_HOME/mineru.sock`,权限 `0600`+- Socket 路径:默认是 `$MINERU_HOME/doclib.sock`,权限 `0600`## 生命周期diff --git a/NEXT-DESIGN.md b/NEXT-DESIGN.mdindex c6426d10..3c2d2dd2 100644--- a/NEXT-DESIGN.md+++ b/NEXT-DESIGN.md@@ -54,11 +54,11 @@| 通道 | 路径 / 地址 | 权限 | 用途 ||------|-----------|------|------|-| UDS | `$MINERU_HOME/mineru.sock` | `0600` | CLI / MCP / 桌面端与 doclib 通信 |+| UDS | `$MINERU_HOME/doclib.sock` | `0600` | CLI / MCP / 桌面端与 doclib 通信 || TCP (parse-server) | `127.0.0.1:15981` | loopback only | doclib ParseWorker 调用 local parse-server API || TCP (doclib Web UI) | `127.0.0.1:<随机端口>` | loopback only | 可选,供浏览器访问 Web UI (P1) |-doclib 启动后 UDS sock 文件默认位于 `$MINERU_HOME/mineru.sock`,权限 0600。CLI 通过 sock 连接检测 server 状态。TCP 端口按 config 中 `http.enabled` 决定是否启动。parse-server 端口固定为 `127.0.0.1:15981`,仅环回地址可访问。managed 模式下 parse-server 由 doclib 自动拉起,self-hosted 模式下用户自行管理。+doclib 启动后 UDS sock 文件默认位于 `$MINERU_HOME/doclib.sock`,权限 0600。CLI 通过 sock 连接检测 server 状态。TCP 端口按 config 中 `http.enabled` 决定是否启动。parse-server 端口固定为 `127.0.0.1:15981`,仅环回地址可访问。managed 模式下 parse-server 由 doclib 自动拉起,self-hosted 模式下用户自行管理。---@@ -608,9 +608,10 @@ managed 模式崩溃恢复:```~/.mineru/- mineru.sock- mineru.db- mineru.log+ config.yaml+ doclib.sock+ doclib.db+ doclib.logdata/parsed/temp/diff --git a/docs/next/architecture.md b/docs/next/architecture.mdindex 1ab20021..5199131b 100644--- a/docs/next/architecture.md+++ b/docs/next/architecture.md@@ -41,7 +41,7 @@ Tier 的产品语义以 [解析 Tier](tiers.md) 为准;本文只描述它们| 通道 | 地址 | 用途 ||------|------|------|-| UDS | `$MINERU_HOME/mineru.sock` | CLI、MCP、桌面端访问 doclib |+| UDS | `$MINERU_HOME/doclib.sock` | CLI、MCP、桌面端访问 doclib || TCP | `127.0.0.1:15981` | doclib 调用 local parse-server || TCP 随机端口 | `127.0.0.1:<random>` | P1 Web UI |@@ -290,9 +290,10 @@ ParseWorker 按 `tier`、`privacy` 和 parse-server 健康状态路由:```text~/.mineru/- mineru.sock- mineru.db- mineru.log+ config.yaml+ doclib.sock+ doclib.db+ doclib.logdata/temp/parsed/diff --git a/docs/next/cli/README.md b/docs/next/cli/README.mdindex f6418a12..59f3ca0b 100644--- a/docs/next/cli/README.md+++ b/docs/next/cli/README.md@@ -23,7 +23,7 @@ MinerU 仓库提供两款命令行工具:|------|----------|--------------|| 产品定位 | 本地文档能力中心 | 纯解析与服务工具 || 默认受众 | Agent / 普通用户 | 开发者 / 批处理用户 |-| 状态管理 | 维护 `mineru.db` | 无状态 |+| 状态管理 | 维护 `doclib.db` | 无状态 || 去重缓存 | SHA256 内容寻址缓存 | 不负责 || 搜索 | 支持 | 不支持 || 默认输出 | STDOUT,适合 Agent 渐进式阅读 | 文件输出,适合批处理 |diff --git a/docs/next/cli/mineru-e2e-test-cases.md b/docs/next/cli/mineru-e2e-test-cases.mdindex b572d9d4..46cd4e6d 100644--- a/docs/next/cli/mineru-e2e-test-cases.md+++ b/docs/next/cli/mineru-e2e-test-cases.md@@ -61,7 +61,7 @@~/mineru-e2e-test```-进入测试目录后,只需设置 `MINERU_HOME`,即可让默认配置文件、DB、日志、UDS socket 和数据目录都落在测试目录中:+进入测试目录后,只需设置 `MINERU_HOME`,即可让默认配置文件(`$MINERU_HOME/config.yaml`)、DB、日志、UDS socket 和数据目录都落在测试目录中:```bashcd ~/mineru-e2e-testdiff --git a/docs/next/cli/mineru-kit-parse.md b/docs/next/cli/mineru-kit-parse.mdindex b1e4a58e..7de67306 100644--- a/docs/next/cli/mineru-kit-parse.md+++ b/docs/next/cli/mineru-kit-parse.md@@ -10,7 +10,7 @@`mineru-kit parse` 是无状态解析命令。它面向批处理和开发者工作流,接受文件和目录输入,输出到指定文件或目录。-与 `mineru parse` 不同,它不维护本地文档库,也不复用 `mineru.db` 或 doclib 解析缓存。+与 `mineru parse` 不同,它不维护本地文档库,也不复用 `doclib.db` 或 doclib 解析缓存。## 2. Usagediff --git a/docs/next/cli/mineru-kit.md b/docs/next/cli/mineru-kit.mdindex 694ed817..831d2b7a 100644--- a/docs/next/cli/mineru-kit.md+++ b/docs/next/cli/mineru-kit.md@@ -8,7 +8,7 @@## 1. 定位-`mineru-kit` 是无状态解析工具和服务工具。它不维护 `mineru.db`,不做本地文档库搜索,不负责 Agent 渐进式阅读体验。+`mineru-kit` 是无状态解析工具和服务工具。它不维护 `doclib.db`,不做本地文档库搜索,不负责 Agent 渐进式阅读体验。`mineru-kit` 适合:diff --git a/docs/next/cli/mineru-server.md b/docs/next/cli/mineru-server.mdindex 412761e1..bc1a8de8 100644--- a/docs/next/cli/mineru-server.md+++ b/docs/next/cli/mineru-server.md@@ -33,7 +33,7 @@6. 启动 watch、ingest、parse、health check、device monitor 和 compaction。7. 通过 UDS 提供本地 HTTP + JSON 协议。-默认情况下,UDS socket 位于 `$MINERU_HOME/mineru.sock`。如需覆盖,可设置 `doclib.uds.path` 或环境变量 `MINERU_DOCLIB_UDS_PATH`。+默认情况下,UDS socket 位于 `$MINERU_HOME/doclib.sock`。如需覆盖,可设置 `doclib.uds.path` 或环境变量 `MINERU_DOCLIB_UDS_PATH`。关闭时:diff --git a/docs/next/cli/mineru.md b/docs/next/cli/mineru.mdindex 4bba0a9d..3b9b29ed 100644--- a/docs/next/cli/mineru.md+++ b/docs/next/cli/mineru.md@@ -35,15 +35,16 @@```text~/.mineru/- mineru.sock- mineru.db- mineru.log+ config.yaml+ doclib.sock+ doclib.db+ doclib.logdata/parsed/temp/```-`mineru.db` 记录文件路径、文档 SHA256、解析任务、缓存状态、FTS 索引、watch 目录和配置。详细数据模型见 [系统架构](../architecture.md)。+`doclib.db` 记录文件路径、文档 SHA256、解析任务、缓存状态、FTS 索引、watch 目录和配置。详细数据模型见 [系统架构](../architecture.md)。## 4. 处理模型diff --git a/docs/next/config.md b/docs/next/config.mdindex b048deeb..bede6de2 100644--- a/docs/next/config.md+++ b/docs/next/config.md@@ -18,8 +18,8 @@ MinerU 有两类配置:启动前还存在一个 bootstrap 根目录:- `MINERU_HOME` 决定 MinerU home,默认 `~/.mineru`。-- 默认配置文件路径是 `$MINERU_HOME/mineru.yaml`。-- 默认 DB、日志从 `MINERU_HOME` 派生;默认 `data_dir` 是 `$MINERU_HOME/data`,其下包含 `parsed/` 和 `temp/`。+- 默认配置文件路径是 `$MINERU_HOME/config.yaml`。+- 默认 DB、日志和 UDS socket 从 `MINERU_HOME` 派生;默认 `data_dir` 是 `$MINERU_HOME/data`,其下包含 `parsed/` 和 `temp/`。- `MINERU_CONFIG` 仍可显式指定配置文件路径;`MINERU_HOME` 只影响默认 home 和默认配置文件位置。配置必须服务两个产品原则:@@ -37,7 +37,7 @@ MinerU 有两类配置:| 分组 | 字段 | 默认值 | 说明 ||------|------|--------|------|-| UDS | `doclib.uds.path` | `~/.mineru/mineru.sock` | CLI / doclib 通信 socket,默认取 `$MINERU_HOME/mineru.sock` |+| UDS | `doclib.uds.path` | `~/.mineru/doclib.sock` | CLI / doclib 通信 socket,默认取 `$MINERU_HOME/doclib.sock` || UDS | `doclib.uds.permission` | `0o600` | socket 权限 || HTTP | `doclib.http.enabled` | `False` | 是否启用 TCP HTTP || HTTP | `doclib.http.host` | `127.0.0.1` | TCP 监听地址 |@@ -45,7 +45,7 @@ MinerU 有两类配置:| HTTP | `doclib.http.strict_port` | `False` | 端口占用时是否报错 || HTTP | `doclib.http.backlog` | `128` | socket backlog || HTTP | `doclib.http.timeout` | `600` | keep-alive timeout |-| log | `doclib.log.path` | `~/.mineru/mineru.log` | 日志路径 |+| log | `doclib.log.path` | `~/.mineru/doclib.log` | 日志路径 || log | `doclib.log.level` | `info` | 日志级别 || doclib | `doclib.data_dir` | `~/.mineru/data` | 数据目录,默认取 `$MINERU_HOME/data`,但仍可通过配置文件或环境变量覆盖 || doclib | `doclib.ingest_workers` | `2` | ingest worker 数 |@@ -60,7 +60,7 @@ MinerU 有两类配置:| doclib | `doclib.parse_server_probe_timeout_sec` | `10` | parse-server 探测超时 || doclib | `doclib.parse_server_startup_grace_sec` | `30` | managed parse-server 启动宽限时间 || doclib | `doclib.parse_server_stop_timeout_sec` | `10` | managed parse-server 停止超时 |-| sqlite | `doclib.sqlite.path` | `~/.mineru/mineru.db` | SQLite DB 路径 |+| sqlite | `doclib.sqlite.path` | `~/.mineru/doclib.db` | SQLite DB 路径 || sqlite | `doclib.sqlite.mmap_size` | `268435456` | mmap size || sqlite | `doclib.sqlite.cache_size` | `-20000` | SQLite cache size || sqlite | `doclib.sqlite.wal_autocheckpoint` | `1000` | WAL checkpoint 阈值 |diff --git a/docs/next/decisions/0016-mineru-kit-parse-command.md b/docs/next/decisions/0016-mineru-kit-parse-command.mdindex 90309f79..f63b8619 100644--- a/docs/next/decisions/0016-mineru-kit-parse-command.md+++ b/docs/next/decisions/0016-mineru-kit-parse-command.md@@ -23,7 +23,7 @@`mineru-kit parse` 是无状态批处理解析命令:-- 不使用 `mineru.db`+- 不使用 `doclib.db`- 不复用 doclib 缓存- 不承担 Agent 默认阅读体验- 主要输出文件产物diff --git a/docs/next/decisions/0019-mineru-kit-models-command.md b/docs/next/decisions/0019-mineru-kit-models-command.mdindex 1b57a157..094ac9e3 100644--- a/docs/next/decisions/0019-mineru-kit-models-command.md+++ b/docs/next/decisions/0019-mineru-kit-models-command.md@@ -44,7 +44,7 @@ mineru-kit models verify- `models-dir.pipeline`- `models-dir.vlm`-第一阶段不迁移到新的 `mineru/config.py` / `mineru.yaml` 体系。+第一阶段不迁移到新的 `mineru/config.py` / `config.yaml` 体系。### 2. `mineru-kit models download`diff --git a/docs/next/decisions/0020-doclib-schema-stability-boundary.md b/docs/next/decisions/0020-doclib-schema-stability-boundary.mdnew file mode 100644index 00000000..24b78259--- /dev/null+++ b/docs/next/decisions/0020-doclib-schema-stability-boundary.md@@ -0,0 +1,174 @@+# ADR-0020: Doclib Schema Stability Boundary++状态: Accepted+日期: 2026-06-18+相关文档: ../architecture.md, ../sdk/doclib-client.md, ../cli/mineru-server.md++## 背景++doclib 以 SQLite 作为本地存储实现,但 CLI、SDK、Agent 和未来外部 HTTP client 依赖的是 doclib 对外暴露的 JSON / Pydantic models。++此前存在一个未决问题:++- 哪些 SQLite 字段进入稳定 v1 schema,哪些仍视为内部或实验字段。++如果直接把 SQLite 表结构视为稳定契约,会带来两个问题:++1. 存储实现细节会被错误地锁死,后续迁移、压缩、归并列或调整索引成本过高。+2. 对外字段稳定性会继续模糊,调用方无法判断哪些响应字段可以长期依赖。++因此需要明确:稳定的是哪一层,如何分层,以及哪些字段仍不进入稳定承诺。++## 决策++v1 稳定 schema 绑定的是 **doclib public models 的字段**,而不是 SQLite 表结构或原始列名。++稳定性分三层:++1. `core stable`+2. `operational stable`+3. `diagnostic / internal`++### 1. Core stable++以下对象进入稳定 v1 schema,字段级稳定:++- `ParseResponse`+- `ParseInfo`+- `FileInfo`+- `DocInfo`+- `DocContentResponse`+- `SearchResult`+- `FindResult`+- `FileInfoResponse`+- `TierParseInfo`+- `WatchInfo`+- `ExcludeRuleInfo`+- `ParsingRuleInfo`+- `ConfigValueResponse`+- `ConfigResponse`+- `ForgetPathResponse`+- `InvalidateResponse`++这些对象承载用户主链路、SDK 主接口和 Agent 主消费面。字段可以新增可选项,但不应删除、重命名或改变既有语义。++### 2. Operational stable++以下对象也进入稳定 v1 schema,但归类为运维状态面:++- `ScanInfo`+- `WatchStats`+- `ErrorBucket`+- `ErrorSummary`+- `HTTPServerStatus`+- `WorkerStatus`+- `LocalParseServerStatus`+- `RemoteParseServerStatus`+- `ParseServerStatus`+- `ServerStatusResponse`++这些对象的目标是支持:++- `mineru server status`+- watch / scan / health 观察+- SDK 和桌面端的运行状态展示++它们属于稳定契约,但只覆盖长期有产品意义的状态字段,不要求为每个调试字段提供长期承诺。++### 3. Diagnostic / internal++以下字段不进入稳定承诺:++- 仅用于调试或环境自检的字段+- 容易随部署方式、日志策略或 SQLite 配置变化的字段+- 仅为了排障临时加入的运行时细节++当前明确归入 `diagnostic / internal` 的典型字段包括:++- `ServerStatusResponse.version`+- `ServerStatusResponse.python_version`+- `ServerStatusResponse.sqlite_size_bytes`+- `ServerStatusResponse.sqlite_journal_mode`+- `ServerStatusResponse.sqlite_wal_size_bytes`+- `ServerStatusResponse.watches`+- `ServerStatusResponse.recent_logs`++这些字段可以继续暴露,但调用方不得把它们当作稳定 v1 契约。++## 稳定边界说明++### SQLite 不是稳定对外 schema++SQLite 表、列名、索引、锁字段、计数缓存字段都属于内部实现。允许:++- 改列名+- 拆表或并表+- 调整索引+- 改写中间状态字段++前提是对外 public models 的语义保持兼容。++### Public models 的兼容规则++对于进入 `core stable` 和 `operational stable` 的字段:++- 可以新增可选字段+- 不应删除既有字段+- 不应重命名既有字段+- 不应改变字段语义+- 不应把原先稳定字段降级为仅诊断字段++如果必须做破坏性修改,应通过新的 ADR 和明确迁移说明处理。++## 替代方案++### 方案 A:SQLite 表结构直接作为稳定 schema++未采用。++原因:++- 锁死内部存储实现,后续演化成本过高。+- SQLite 列名与对外 API 命名层并不总是一一对应。++### 方案 B:只稳定主链路对象,不稳定运维对象++未采用。++原因:++- `mineru server status`、scan、watch 已进入 P0 主链路。+- 如果运维对象长期不稳定,CLI、桌面端和 SDK 状态展示都无法形成可靠契约。++### 方案 C:所有 `doclib/types.py` 字段全部稳定++未采用。++原因:++- 会把明显仍在演进的诊断字段也锁死。+- 不利于后续对状态输出和调试信息做迭代。++## 影响++### 对实现++- 后续存储层重构以 public models 兼容为边界,而不是以 SQLite 列兼容为边界。+- 新增字段时需要先判断属于 `core stable`、`operational stable` 还是 `diagnostic / internal`。++### 对 CLI / SDK / Agent++- 主链路对象和运维对象都有清晰的稳定层级。+- 调用方可以安全依赖 `core stable` 与 `operational stable` 字段。+- 调试字段应按 best-effort 使用,不应写死依赖。++### 对文档++- `open-questions.md` 中的 `OQ-B-003` 不再保留为 blocker。+- 后续状态类文档应在需要时标注哪些字段属于 diagnostic。++## 后续动作++1. 从 `open-questions.md` 中移除 `OQ-B-003`。+2. 在相关 SDK / CLI 文档中引用本 ADR 作为 schema 稳定性边界说明。+3. 后续若需要,可把 diagnostic 字段进一步收敛到单独命名空间,而不是继续平铺在顶层响应中。diff --git a/docs/next/decisions/README.md b/docs/next/decisions/README.mdindex 443e3bda..d315fb8c 100644--- a/docs/next/decisions/README.md+++ b/docs/next/decisions/README.md@@ -47,6 +47,7 @@| [ADR-0017](0017-mineru-kit-api-server-command.md) | Accepted | MinerU Kit API Server Command || [ADR-0018](0018-mineru-kit-vlm-server-command.md) | Accepted | MinerU Kit VLM Server Command || [ADR-0019](0019-mineru-kit-models-command.md) | Accepted | MinerU Kit Models Command |+| [ADR-0020](0020-doclib-schema-stability-boundary.md) | Accepted | Doclib Schema Stability Boundary |## 模板diff --git a/docs/next/open-questions.md b/docs/next/open-questions.mdindex 5fff1100..72f26a8f 100644--- a/docs/next/open-questions.md+++ b/docs/next/open-questions.md@@ -65,6 +65,7 @@| `ParseResult` backend 字段 | `ParseResult` 不再持有 `_backend` / `_version_name`;backend 仅允许作为 page / middle-json 内部来源信息存在。 || 其他语言 SDK | 其他语言 SDK 暂无开发计划;如果未来开发,只覆盖 v1 Unified API,不覆盖本地 doclib UDS 能力。 || `mineru server status` | `mineru server status` 使用 doclib `ServerStatusResponse`,不与 parse-server `/v1/health` 强行对齐;后续只需决定该 JSON schema 的稳定发布边界。 |+| doclib schema 稳定边界 | 稳定的是 doclib public models,不是 SQLite 表结构;稳定性分为 `core stable`、`operational stable` 和 `diagnostic / internal`,详见 [ADR-0020](decisions/0020-doclib-schema-stability-boundary.md)。 || `mineru-kit` 对外暴露 | `mineru-kit` 保留为专家工具入口;Agent 默认入口是 `mineru`,skill 不主动暴露 `mineru-kit`。 || Office/HTML unknown bbox | 公共 schema 允许 unknown bbox;不要求 Office/HTML 在 P0 估算真实 bbox,validator 应区分 unknown 与非法 bbox。 || `standard` 硬件基线 | `standard` 当前使用 pipeline 后端;Apple Silicon macOS 约使用 4GB 统一内存,Windows / Linux 需要 NVIDIA GPU 且至少 4GB 显存。详见 [解析 Tier](tiers.md#5-standard)。 |@@ -75,7 +76,6 @@| ID | 问题 | 决策产物 | 影响范围 ||----|------|----------|----------|-| OQ-B-003 | 哪些 SQLite 字段进入稳定 v1 schema,哪些仍视为内部或实验字段。 | schema 稳定性说明 | doclib server、SDK、Agent || OQ-B-004 | CLI exit code、`error.code`、`retryable`、`user_action` 和 trace/request id 的稳定契约。 | 错误码补充规格 | CLI、API、SDK |## 5. CLI 与 Agent 协议diff --git a/mineru/config.py b/mineru/config.pyindex f2931adb..cd57dea2 100644--- a/mineru/config.py+++ b/mineru/config.py@@ -31,7 +31,7 @@ def _mineru_home() -> str:def _default_config_path() -> str:- return os.path.join(_mineru_home(), "mineru.yaml")+ return os.path.join(_mineru_home(), "config.yaml")def _uds_available() -> bool:@@ -48,15 +48,15 @@ def _default_uds_path() -> str:raise RuntimeError(f"System [{system}] is not supported.")if not _uds_available():raise RuntimeError("Unix domain socket is not available.")- return os.path.join(_mineru_home(), "mineru.sock")+ return os.path.join(_mineru_home(), "doclib.sock")def _default_log_path() -> str:- return os.path.join(_mineru_home(), "mineru.log")+ return os.path.join(_mineru_home(), "doclib.log")def _default_db_path() -> str:- return os.path.join(_mineru_home(), "mineru.db")+ return os.path.join(_mineru_home(), "doclib.db")def _default_data_path() -> str:diff --git a/tests/unittest/test_cli_next_command_design.py b/tests/unittest/test_cli_next_command_design.pyindex 1a0585ef..427cab0c 100644--- a/tests/unittest/test_cli_next_command_design.py+++ b/tests/unittest/test_cli_next_command_design.py@@ -449,7 +449,7 @@ def test_config_set_uses_key_path_and_value_body(monkeypatch: Any) -> None:def test_server_start_failure_points_to_log_and_does_not_discard_child_stderr(monkeypatch: Any, tmp_path: Path) -> None:popen_calls: list[dict[str, Any]] = []- log_path = tmp_path / "mineru.log"+ log_path = tmp_path / "doclib.log"class _Proc:pid = 12345@@ -467,7 +467,7 @@ def test_server_start_failure_points_to_log_and_does_not_discard_child_stderr(momonkeypatch.setattr(server, "_server_running", lambda: False)monkeypatch.setattr(server, "_wait_for_sock", lambda: False)- monkeypatch.setattr(server, "_socket_path", lambda: str(tmp_path / "mineru.sock"))+ monkeypatch.setattr(server, "_socket_path", lambda: str(tmp_path / "doclib.sock"))monkeypatch.setattr(server, "_server_log_path", lambda: str(log_path))monkeypatch.setattr(server.subprocess, "Popen", _popen)@@ -475,7 +475,7 @@ def test_server_start_failure_points_to_log_and_does_not_discard_child_stderr(moassert result.exit_code == 1assert "See log:" in result.output- assert "mineru.log" in result.output+ assert "doclib.log" in result.outputassert "child failed\n" in log_path.read_text(encoding="utf-8")assert popen_calls[-1] == {"kill": True}@@ -752,18 +752,18 @@ def test_cleanup_temp_json_error_output_is_machine_readable(monkeypatch: Any) ->def test_server_status_json_not_running_returns_state_json(monkeypatch: Any) -> None:monkeypatch.setattr(server, "_server_running", lambda: False)- monkeypatch.setattr(server, "_socket_path", lambda: "/tmp/mineru.sock")+ monkeypatch.setattr(server, "_socket_path", lambda: "/tmp/doclib.sock")monkeypatch.setattr(server.config.doclib, "data_dir", "~/.mineru")- monkeypatch.setattr(server.config.doclib.sqlite, "path", "~/.mineru/mineru.db")- monkeypatch.setattr(server.config.doclib.log, "path", "~/.mineru/mineru.log")+ monkeypatch.setattr(server.config.doclib.sqlite, "path", "~/.mineru/doclib.db")+ monkeypatch.setattr(server.config.doclib.log, "path", "~/.mineru/doclib.log")result = runner.invoke(app, ["server", "status", "--json"])assert result.exit_code == 0payload = json.loads(result.output)assert payload["running"] is False- assert payload["socket_path"] == "/tmp/mineru.sock"- assert payload["sqlite_path"] == os.path.expanduser("~/.mineru/mineru.db")- assert payload["log_path"] == os.path.expanduser("~/.mineru/mineru.log")+ assert payload["socket_path"] == "/tmp/doclib.sock"+ assert payload["sqlite_path"] == os.path.expanduser("~/.mineru/doclib.db")+ assert payload["log_path"] == os.path.expanduser("~/.mineru/doclib.log")assert payload["http"] == {"enabled": False, "host": None, "port": None}assert "Server is not running." not in result.outputdiff --git a/tests/unittest/test_doclib_app_startup.py b/tests/unittest/test_doclib_app_startup.pyindex 0ee8169d..91743e46 100644--- a/tests/unittest/test_doclib_app_startup.py+++ b/tests/unittest/test_doclib_app_startup.py@@ -15,7 +15,7 @@ from mineru.version import __version__def test_required_schema_check_fails_before_migration_and_passes_after(tmp_path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))with pytest.raises(RuntimeError, match="missing tables"):await _assert_required_schema(db)@@ -44,9 +44,9 @@ def test_server_status_reports_configured_socket_path(monkeypatch, tmp_path) ->cfg = PatchedConfig(doclib={"data_dir": str(tmp_path),- "sqlite": {"path": str(tmp_path / "mineru.db")},- "log": {"path": str(tmp_path / "mineru.log")},- "uds": {"path": str(tmp_path / "mineru.sock")},+ "sqlite": {"path": str(tmp_path / "doclib.db")},+ "log": {"path": str(tmp_path / "doclib.log")},+ "uds": {"path": str(tmp_path / "doclib.sock")},})@@ -63,9 +63,9 @@ def test_server_status_reports_configured_socket_path(monkeypatch, tmp_path) ->assert payload["mineru_home"]assert payload["version"] == __version__assert isinstance(payload["python_version"], str)- assert payload["socket_path"] == str(tmp_path / "mineru.sock")- assert payload["sqlite_path"] == str(tmp_path / "mineru.db")- assert payload["log_path"] == str(tmp_path / "mineru.log")+ assert payload["socket_path"] == str(tmp_path / "doclib.sock")+ assert payload["sqlite_path"] == str(tmp_path / "doclib.db")+ assert payload["log_path"] == str(tmp_path / "doclib.log")assert payload["http"] == {"enabled": cfg.doclib.http.enabled, "host": cfg.doclib.http.host, "port": None}@@ -85,7 +85,7 @@ def test_write_temp_asset_uses_temp_read_assets_directory(tmp_path: Path) -> Nondef test_tail_log_uses_current_config_default_when_data_dir_missing(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:- log_path = tmp_path / "mineru.log"+ log_path = tmp_path / "doclib.log"log_path.write_text("line-1\nline-2\n", encoding="utf-8")monkeypatch.setattr(mineru_config.doclib, "log", LogConfig(path=str(log_path)))diff --git a/tests/unittest/test_doclib_cache_semantics.py b/tests/unittest/test_doclib_cache_semantics.pyindex c277e95e..f3f36a21 100644--- a/tests/unittest/test_doclib_cache_semantics.py+++ b/tests/unittest/test_doclib_cache_semantics.py@@ -232,7 +232,7 @@ def test_get_file_stat_returns_typed_file_stat(tmp_path: Path) -> None:def test_config_defaults_are_code_backed_and_unset_removes_override(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ConfigService(db)@@ -262,7 +262,7 @@ def test_config_defaults_are_code_backed_and_unset_removes_override(tmp_path: Padef test_data_dir_is_not_runtime_kv_config(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ConfigService(db)@@ -481,7 +481,7 @@ def test_remap_api_result_pages_rejects_count_mismatch() -> None:def test_ensure_doc_record_extends_short_id_on_prefix_conflict(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()sha_a = "a" * 64sha_b = ("a" * 7) + ("b" * 57)@@ -514,7 +514,7 @@ def test_ensure_doc_record_extends_short_id_on_prefix_conflict(tmp_path: Path) -def test_ensure_ingested_rebinds_changed_text_file_to_new_sha(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=None, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "note.txt"@@ -548,7 +548,7 @@ def test_ensure_ingested_rebinds_changed_text_file_to_new_sha(tmp_path: Path) ->def test_refresh_file_marks_missing_known_path_deleted(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=None, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "note.txt"@@ -576,7 +576,7 @@ def test_refresh_file_marks_missing_known_path_deleted(tmp_path: Path) -> None:def test_refresh_file_records_stat_error_without_marking_deleted(tmp_path: Path, monkeypatch) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=None, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "note.txt"@@ -608,7 +608,7 @@ def test_refresh_file_records_stat_error_without_marking_deleted(tmp_path: Path,def test_ingest_worker_skips_files_with_blocking_stat_errors(tmp_path: Path, monkeypatch) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=None, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "note.txt"@@ -637,7 +637,7 @@ def test_ingest_worker_skips_files_with_blocking_stat_errors(tmp_path: Path, mondef test_ingest_worker_preserves_precise_file_access_errors(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=None, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "note.txt"@@ -666,7 +666,7 @@ def test_ingest_worker_preserves_precise_file_access_errors(tmp_path: Path) -> Ndef test_ingest_worker_skips_any_file_with_existing_error(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=None, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "note.txt"@@ -688,7 +688,7 @@ def test_ingest_worker_skips_any_file_with_existing_error(tmp_path: Path) -> Nondef test_search_filters_by_tier_min_tier_and_file_type(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()fts = FTSManager(db)service = SearchService(db, fts)@@ -730,7 +730,7 @@ def test_search_filters_by_tier_min_tier_and_file_type(tmp_path: Path) -> None:def test_search_prefers_active_paths_and_falls_back_to_non_active_paths(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()fts = FTSManager(db)service = SearchService(db, fts)@@ -775,7 +775,7 @@ def test_search_prefers_active_paths_and_falls_back_to_non_active_paths(tmp_pathdef test_find_filters_by_ext(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()fts = FTSManager(db)service = SearchService(db, fts)@@ -807,7 +807,7 @@ def test_find_filters_by_ext(tmp_path: Path) -> None:def test_refresh_file_marks_only_current_file_unreachable_when_watch_root_is_missing(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)service = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -847,7 +847,7 @@ def test_refresh_file_marks_only_current_file_unreachable_when_watch_root_is_misdef test_remove_watch_converts_unreachable_files_to_deleted_and_unbinds_watch(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)service = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -882,7 +882,7 @@ def test_remove_watch_converts_unreachable_files_to_deleted_and_unbinds_watch(tmdef test_watch_scan_refreshes_known_active_paths_before_walk(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)fts = FTSManager(db)@@ -910,7 +910,7 @@ def test_watch_scan_refreshes_known_active_paths_before_walk(tmp_path: Path) ->def test_watch_scan_marks_root_unreachable_without_refreshing_all_files(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)fts = FTSManager(db)@@ -941,7 +941,7 @@ def test_watch_scan_marks_root_unreachable_without_refreshing_all_files(tmp_pathdef test_device_monitor_queues_watch_scan_when_removable_watch_recovers(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)fts = FTSManager(db)@@ -990,7 +990,7 @@ def test_device_monitor_queues_watch_scan_when_removable_watch_recovers(tmp_pathdef test_scan_service_creates_and_processes_manual_file_scan(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)parse_svc = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -1021,7 +1021,7 @@ def test_scan_service_creates_and_processes_manual_file_scan(tmp_path: Path) ->def test_scan_service_directory_scan_applies_excludes_and_counts_unsupported(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)parse_svc = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -1056,7 +1056,7 @@ def test_scan_service_directory_scan_applies_excludes_and_counts_unsupported(tmpdef test_scan_service_reuses_pending_scan_for_same_kind_and_path(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)parse_svc = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -1076,7 +1076,7 @@ def test_scan_service_reuses_pending_scan_for_same_kind_and_path(tmp_path: Path)def test_watch_ids_are_non_negative_for_cli_arguments(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)root = tmp_path / "watch-root"@@ -1091,7 +1091,7 @@ def test_watch_ids_are_non_negative_for_cli_arguments(tmp_path: Path) -> None:def test_doclib_server_list_responses_include_pagination_metadata(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)parse_svc = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -1143,7 +1143,7 @@ def test_doclib_server_list_responses_include_pagination_metadata(tmp_path: Pathdef test_scan_service_cleanup_keeps_latest_terminal_scans_and_active_tasks(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)parse_svc = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -1179,7 +1179,7 @@ def test_scan_service_cleanup_keeps_latest_terminal_scans_and_active_tasks(tmp_pdef test_watch_loop_queues_watch_scan_when_scan_service_is_available(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)parse_svc = ParseService(db=db, fts=FTSManager(db), config_svc=config_svc, data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)@@ -1201,7 +1201,7 @@ def test_watch_loop_queues_watch_scan_when_scan_service_is_available(tmp_path: Pdef test_cleanup_deleted_files_does_not_cleanup_orphan_docs(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()cleanup_svc = CleanupService(db=db, data_dir=str(tmp_path / "data"))now = 1000@@ -1238,7 +1238,7 @@ def test_cleanup_deleted_files_does_not_cleanup_orphan_docs(tmp_path: Path) -> Ndef test_cleanup_orphans_keeps_docs_referenced_by_deleted_or_unreachable_files(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()cleanup_svc = CleanupService(db=db, data_dir=str(tmp_path / "data"))now = 1000@@ -1281,7 +1281,7 @@ def test_server_status_includes_watch_stats_and_error_summary(tmp_path: Path) ->return 2async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)watch = await config_svc.add_watch(str(tmp_path / "watched"), removable=True)@@ -1363,7 +1363,7 @@ def test_server_status_includes_watch_stats_and_error_summary(tmp_path: Path) ->parse_svc=_ParseQueue(),start_time=0,pid=123,- socket_path="/tmp/mineru.sock",+ socket_path="/tmp/doclib.sock",data_dir=str(tmp_path / "data"),)status = await DoclibServer(state).get_server_status()@@ -1393,7 +1393,7 @@ def test_server_status_includes_watch_stats_and_error_summary(tmp_path: Path) ->def test_forget_path_deletes_file_row_and_filename_fts_without_deleting_doc(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()cleanup_svc = CleanupService(db=db, data_dir=str(tmp_path / "data"))now = 1000@@ -1444,7 +1444,7 @@ def test_forget_path_deletes_file_row_and_filename_fts_without_deleting_doc(tmp_def test_forget_directory_matches_historical_prefix_rows(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()cleanup_svc = CleanupService(db=db, data_dir=str(tmp_path / "data"))now = 1000@@ -1480,7 +1480,7 @@ def test_forget_directory_matches_historical_prefix_rows(tmp_path: Path) -> Nonedef test_forget_rejects_watch_root_and_warns_under_active_watch(tmp_path: Path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()config_svc = ConfigService(db)cleanup_svc = CleanupService(db=db, data_dir=str(tmp_path / "data"))@@ -1522,7 +1522,7 @@ def test_ingest_records_doc_error_when_metadata_extraction_fails(tmp_path: Path,return []async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ParseService(db=db, fts=FTSManager(db), config_svc=_NoRulesConfig(), data_dir=str(tmp_path / "data"), parse_lock_timeout_sec=1800)source = tmp_path / "broken.pdf"diff --git a/tests/unittest/test_doclib_config.py b/tests/unittest/test_doclib_config.pyindex 5d59f465..9484f85b 100644--- a/tests/unittest/test_doclib_config.py+++ b/tests/unittest/test_doclib_config.py@@ -47,7 +47,7 @@ def test_interpolate_env_rejects_missing_required_value(monkeypatch: pytest.Monkdef test_load_config_reads_yaml_and_interpolates_env(tmp_path, monkeypatch: pytest.MonkeyPatch) -> None:monkeypatch.setenv("MINERU_TEST_DATA", str(tmp_path / "data"))- config_file = tmp_path / "mineru.yaml"+ config_file = tmp_path / "config.yaml"config_file.write_text("""doclib:@@ -56,7 +56,7 @@ doclib:enabled: trueport: 18080sqlite:- path: ${MINERU_TEST_DATA}/mineru.db+ path: ${MINERU_TEST_DATA}/doclib.db""",encoding="utf-8",)@@ -66,7 +66,7 @@ doclib:assert data["doclib"]["data_dir"] == str(tmp_path / "data")assert data["doclib"]["http"]["enabled"] is Trueassert data["doclib"]["http"]["port"] == 18080- assert data["doclib"]["sqlite"]["path"] == str(tmp_path / "data" / "mineru.db")+ assert data["doclib"]["sqlite"]["path"] == str(tmp_path / "data" / "doclib.db")def test_apply_env_overrides_uses_greedy_field_path_matching(monkeypatch: pytest.MonkeyPatch) -> None:@@ -108,7 +108,7 @@ def test_default_paths_derive_from_mineru_home(monkeypatch: pytest.MonkeyPatch)monkeypatch.setenv("MINERU_HOME", "/tmp/mineru-home")assert _default_data_path() == "/tmp/mineru-home/data"- assert _default_config_path() == "/tmp/mineru-home/mineru.yaml"+ assert _default_config_path() == "/tmp/mineru-home/config.yaml"def test_read_config_uses_default_config_under_mineru_home(tmp_path, monkeypatch: pytest.MonkeyPatch) -> None:@@ -116,7 +116,7 @@ def test_read_config_uses_default_config_under_mineru_home(tmp_path, monkeypatchmineru_home.mkdir()monkeypatch.setenv("MINERU_HOME", str(mineru_home))monkeypatch.delenv("MINERU_CONFIG", raising=False)- (mineru_home / "mineru.yaml").write_text(+ (mineru_home / "config.yaml").write_text("""doclib:data_dir: /tmp/ignored-data-dir@@ -147,7 +147,7 @@ def test_default_uds_path_uses_mineru_home_on_unix(monkeypatch: pytest.MonkeyPatmonkeypatch.setattr("mineru.config.platform.system", lambda: "Linux")monkeypatch.setenv("MINERU_HOME", "/tmp/mineru-home")- assert _default_uds_path() == "/tmp/mineru-home/mineru.sock"+ assert _default_uds_path() == "/tmp/mineru-home/doclib.sock"def test_default_uds_path_uses_mineru_home_on_windows(monkeypatch: pytest.MonkeyPatch) -> None:@@ -155,7 +155,7 @@ def test_default_uds_path_uses_mineru_home_on_windows(monkeypatch: pytest.Monkeymonkeypatch.setattr("mineru.config.platform.system", lambda: "Windows")monkeypatch.setenv("MINERU_HOME", r"C:\MinerU")- assert _default_uds_path() == r"C:\MinerU/mineru.sock"+ assert _default_uds_path() == r"C:\MinerU/doclib.sock"def test_patched_config_returns_validated_deep_patch() -> None:diff --git a/tests/unittest/test_doclib_interface_contract.py b/tests/unittest/test_doclib_interface_contract.pyindex 01e02d82..9bbc3ca1 100644--- a/tests/unittest/test_doclib_interface_contract.py+++ b/tests/unittest/test_doclib_interface_contract.py@@ -207,7 +207,7 @@ def test_interface_app_uses_doclib_server_routes() -> None:def test_add_watch_rejects_missing_directory(tmp_path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = ConfigService(db)@@ -219,7 +219,7 @@ def test_add_watch_rejects_missing_directory(tmp_path) -> None:def test_forget_watch_root_is_allowed_with_warning(tmp_path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()watch_root = tmp_path / "watch-root"watch_root.mkdir()@@ -238,7 +238,7 @@ def test_forget_watch_root_is_allowed_with_warning(tmp_path) -> None:def test_cleanup_temp_rejects_negative_older_than(tmp_path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()service = CleanupService(db, str(tmp_path))@@ -277,10 +277,10 @@ def test_core_doclib_schemas_are_instantiable() -> None:error_summary = ErrorSummary(file_errors=[ErrorBucket(code="stat_failed", count=1)])status = ServerStatusResponse(running=True,- socket_path="/tmp/mineru.sock",+ socket_path="/tmp/doclib.sock",data_dir="/tmp/mineru",- sqlite_path="/tmp/mineru.db",- log_path="/tmp/mineru.log",+ sqlite_path="/tmp/doclib.db",+ log_path="/tmp/doclib.log",watch_stats=[watch_stats],recent_scans=[recent_scan],error_summary=error_summary,diff --git a/tests/unittest/test_doclib_short_id.py b/tests/unittest/test_doclib_short_id.pyindex 7cc71991..a9df12df 100644--- a/tests/unittest/test_doclib_short_id.py+++ b/tests/unittest/test_doclib_short_id.py@@ -6,7 +6,7 @@ from mineru.doclib.services.parse_svc import ensure_doc_recorddef test_ensure_doc_record_extends_short_id_on_prefix_conflict(tmp_path) -> None:async def _run() -> None:- db = DatabaseManager(str(tmp_path / "mineru.db"))+ db = DatabaseManager(str(tmp_path / "doclib.db"))await db.initialize()now = 1000existing_sha = "abcdef0" + "0" * 57