Skip to content

docs: fix dead docs/model_tests.md and docs/testing.md pointers - #2022

Merged
inureyes merged 3 commits into
mainfrom
fix/issue-1658-dead-doc-pointers
Sep 28, 2026
Merged

inureyes merged 3 commits into
mainfrom
fix/issue-1658-dead-doc-pointers

Conversation

@inureyes

@inureyes inureyes commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Six dead docs/*.md pointers (five plain comments plus one assertion message) referenced docs/model_tests.md and docs/testing.md, neither of which ever existed in this tree; this repoints five of them to the file that actually carries that content and drops the sixth in favor of an inline instruction.

Per-reference decision

docs/model_tests.md was never a real path (git log --all --diff-filter=A -- docs/model_tests.md is empty); it was always meant to be docs/benchmark_results/model_tests.md, which carries the exact ## Speculative drafters (line 317) and ## Prompt cache benchmarks (line 240) sections the five references describe. Repointed in Cargo.toml:54, src/bin/speculative_bench.rs:23 and :750, tests/speculative_parity.rs:1540 (the assertion message, still a plain string literal so it reads correctly when it fires), and tests/prompt_cache_prefill_bench.rs:41.

docs/testing.md also never existed. Its introducing commit (290eb64) also touched docs/en/user-guide/server.md, and a later commit in this history names docs/en/development/testing.md for the same topic (a TurboQuant testing section); per docs/README.md's "The MkDocs manual" section, docs/en/ and docs/ko/ are sources for the separately maintained manual at mlxcel.lablup.ai, not part of this repository, so pointing at that path here would still be a dead reference. CLAUDE.md's "Testing with real models" section was considered as a replacement target but is itself .gitignored in this repo (not in git ls-files), so it is not a valid target either. Dropped the pointer at src/tokenizer/mod.rs:2812 and inlined the one fact the comment needed: mlxcel download mlx-community/gemma-4-e4b-it-8bit (verified against docs/model-catalog.tsv:63).

What changed

  • Cargo.toml, src/bin/speculative_bench.rs (module doc + print_markdown_table doc, not encode_prompt), tests/speculative_parity.rs, tests/prompt_cache_prefill_bench.rs: repoint docs/model_tests.md to docs/benchmark_results/model_tests.md.
  • src/tokenizer/mod.rs: drop the docs/testing.md pointer, inline the download command instead.
  • tests/dead_doc_pointers.rs (new): narrow regression guard, include_str!s the five fixed files and asserts neither dead path string reappears. Not an extension of src/main_tests.rs's supported_models_output_has_no_dead_doc_link (issue fix(cli): mlxcel list output is stale, missing VLMs and ~30 model types, and links to nonexistent doc #26): that test checks rendered CLI output, this checks raw source text, and src/main_tests.rs is already 1535 lines. It is also deliberately not a tree-wide "every docs/*.md reference must exist" scanner: this repo has other, pre-existing dead doc references outside this issue's scope (for example docs/USAGE.md, docs/bridge-overhead-microbench.md) that belong to separate cleanup.

Test plan

  • grep -rn "docs/model_tests.md\|docs/testing.md" --exclude-dir=target --exclude-dir=.git . matches only tests/dead_doc_pointers.rs, which names the strings it guards against; no other source references them
  • cargo check --features metal,accelerate --test speculative_parity --test prompt_cache_prefill_bench --test dead_doc_pointers --bin speculative_bench --bin mlxcel
  • cargo test --features metal,accelerate --test dead_doc_pointers (2 passed)
  • cargo fmt --check
  • python3 scripts/ci/check_cross_repo_refs.py

Closes #1658

Six source references pointed at docs/model_tests.md and docs/testing.md, neither of which ever existed in this tree (git log --all --diff-filter=A confirms both paths were never added).

docs/model_tests.md was always meant to be docs/benchmark_results/model_tests.md, which carries the exact Speculative drafters and Prompt cache benchmarks sections the five references describe. Repointed in Cargo.toml, src/bin/speculative_bench.rs (module doc and print_markdown_table doc), tests/speculative_parity.rs (the REACHABLE_PAIRINGS assertion message), and tests/prompt_cache_prefill_bench.rs.

docs/testing.md was never real either. Its introducing commit (290eb64) also touched docs/en/user-guide/server.md, and mkdocs.yml's nav lists development/testing.md; per docs/README.md, docs/en/ and docs/ko/ are sources for the separately maintained MkDocs manual and are not part of this repository, so that target would still be a dead reference here. Dropped the pointer in src/tokenizer/mod.rs and inlined the one fact the comment needed instead.

Adds tests/dead_doc_pointers.rs, a narrow regression guard that include_str!s the five fixed files and asserts neither dead path string reappears. It intentionally does not extend src/main_tests.rs's supported_models_output_has_no_dead_doc_link (added for issue #26): that test checks rendered CLI output, this checks raw source text, and main_tests.rs is already well over the project's 500-line file-size guideline. It is also deliberately not a tree-wide dead-doc-link scanner: this repo carries other, pre-existing dead references (docs/USAGE.md, docs/bridge-overhead-microbench.md) that are out of scope for this issue.
@inureyes inureyes added status:review Under review type:docs Documentation improvements or additions priority:low Low priority labels Sep 28, 2026
pr-reviewer on #2022 flagged the module doc: it said six source comments plus one assertion message (seven total) when the fix touches five comments plus the one assertion message, and it cited a line number for the issue #26 guard test that drifts as the file changes; name the function instead.
@inureyes

Copy link
Copy Markdown
Member Author

Security and performance review: no findings at any severity. No fixes committed.

  • Security: the diff edits only comments, doc comments, and one compile-time assertion message. The new tests/dead_doc_pointers.rs reads five fixed in-repo relative paths through include_str! at compile time and runs contains checks. It adds no runtime file I/O, process execution, environment variable handling, network or URL handling, credentials, unsafe, or dependency changes.
  • Performance: no production code path changes. The test embeds about 320 KB of source text into one test binary and runs ten substring scans over it, which is negligible. The repointed target docs/benchmark_results/model_tests.md exists.

@inureyes
inureyes merged commit 6526cc4 into main Sep 28, 2026
21 of 24 checks passed
@inureyes
inureyes deleted the fix/issue-1658-dead-doc-pointers branch September 28, 2026 23:50
@inureyes inureyes added this to the 0.8 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:low Low priority status:done Completed type:docs Documentation improvements or additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: source comments reference docs/model_tests.md and docs/testing.md, which do not exist

1 participant