docs: refresh two stale facts against their code arbiters - #178
Merged
Conversation
docs/architecture.md said the SQLite file was at "migration v10" while src/db.rs has SCHEMA_VERSION = 12 (v11/v12 landed after that text was written), and docs/plan-api-matrix.md said "13 个模型" while the catalog has held 14 since deepseek-v4-flash-vision-exp was added -- the doc commit 6d87213 postdates that model by 1h47m. Both lines now quote the arbiter instead of retyping the fact, so the next drift is visible: SCHEMA_VERSION for the schema, [[models]] plus catalog_gate's MODEL_COUNT for the catalog.
This was referenced Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two statements in
docs/no longer match the code that owns them. Both files self-describe as current state (architecture.md: 「本文说明现状」;plan-api-matrix.md: 「协议支持现状」), so stale numbers there are read as facts by new contributors. This PR refreshes them and — more importantly — makes each line point at its arbiter instead of retyping the value, so the next drift is visible at the point of editing.The two errors have different provenance, which is why both are worth recording:
docs/architecture.md— "迁移 v10" → v12. Correct when written, then went stale. The text was accurate at commit6d87213(git show 6d87213:src/db.rsreally wasSCHEMA_VERSION = 10); v11 and v12 landed afterwards (v12 = thetransactionsperformance indexes, rant 2026-08-25T12:02:13, PR fix(perf): warm NFS sqlite with 64MB cache + transactions indexes + parallel trend (rant 2026-08-25T12:02:13) #150) and nothing pointed the doc back at the constant.docs/plan-api-matrix.md— "13 个模型" → 14. Wrong the moment it was written. The modeldeepseek-v4-flash-vision-expwas added in2474f87(2026-08-22 06:19); the doc text arrived in6d87213(2026-08-22 08:06), 1h47m later. Replaying that commit settles it —git show 6d87213:config/config.example.tomlhas 14[[models]]andgit show 6d87213:ui/js/data.jshas 14MODELS. So "13" matches no set that ever existed alongside that sentence; the 13-model state is2474f87^.The 14 figure is not my count, it is already a guarded contract in-repo:
src/catalog_gate.rspinsMODEL_COUNT: usize = 14(added by #173) andcatalog_gate.rs/i18n_pack.rsrun on everycargo test. The doc was contradicting a gate that had been in place since the same week.Related Issue
Changes
docs/architecture.md: 数据库 row — 「迁移 v10」→「幂等迁移至 v12,见src/db.rs的SCHEMA_VERSION」docs/plan-api-matrix.md§4: 「13 个模型」→「14 个模型」,并注明真源(config/config.example.toml的[[models]])与守卫(src/catalog_gate.rs的MODEL_COUNT)Scope: exactly two files, both Markdown. No Rust source, no
ui/, no i18n keys, no cache-bust.git diff HEAD -- . ':(exclude)docs/'is empty.Tests
cargo test全部通过 — 165 passed / 0 failedcargo fmt --check通过;cargo clippy --all-targets -- -D warnings无 warning新增/更新了单元测试(如适用)— not applicable for a Markdown-only change. Instead every fact asserted by the two edited lines was checked mechanically against its arbiter, with a negative control:
src/db.rsSCHEMA_VERSION= 12✓config/config.example.toml[[models]]src/catalog_gate.rsMODEL_COUNT= 14✓ui/js/data.jsMODELSNegative control: replaying the same checks against a copy with the value perturbed fails, so the assertions are not vacuous.
Checklist
docs/refresh-stale-facts(docs/per CONTRIBUTING.md)docs: refresh two stale facts against their code arbiters(baredocs:matching the repo's precedent in6d87213for multi-file doc changes)docs/