Problem
Follow-up to #526. That issue removed rust,ignore from crate README examples, but only 2 of 9 crates wire their README into the doctest harness:
crates/tensor4all-itensorlike/src/lib.rs:2 — #![doc = include_str!("../README.md")] (2 fences covered)
crates/tensor4all-tensorci/src/lib.rs:64 — (1 fence covered)
9 ```rust fences remain compiled by nothing:
crates/tensor4all-aci/README.md — 3 fences
crates/tensor4all-core/README.md, crates/tensor4all-interpolativeqtt/README.md, crates/tensor4all-quanticstci/README.md, crates/tensor4all-quanticstransform/README.md, crates/tensor4all-simplett/README.md, crates/tensor4all-treetn/README.md — 1 each
A 2026-08-04 spot-check verified all 5 sampled snippets against source and found them API-correct today, so this is prevention, not repair: these are the first files an agent or human sees when browsing GitHub, and nothing stops them from rotting. The book-side mechanism (docs/book-tests + scripts/test-mdbook.sh) already covers all 57 book fences; crate READMEs are the only unverified user-facing snippet surface left.
Proposed direction
Add #![doc = include_str!("../README.md")] (on a mod readme_doctests {} shim if crate-level docs already exist) to the 7 crates above, mirroring the itensorlike pattern. Where a README snippet needs setup lines, use hidden # doctest lines rather than weakening the snippet.
Reference: tensor4all/tenferro-rs#1609 (closed by tensor4all/tenferro-rs#1632) did the equivalent sweep for tenferro guide snippets.
Acceptance criteria
- All ```rust fences in
crates/*/README.md execute as doctests in `cargo test --doc --workspace`.
- No fence carries
ignore/no_run (per REPOSITORY_RULES.md doctest policy).
Problem
Follow-up to #526. That issue removed
rust,ignorefrom crate README examples, but only 2 of 9 crates wire their README into the doctest harness:crates/tensor4all-itensorlike/src/lib.rs:2—#crates/tensor4all-tensorci/src/lib.rs:64— (1 fence covered)9 ```rust fences remain compiled by nothing:
crates/tensor4all-aci/README.md— 3 fencescrates/tensor4all-core/README.md,crates/tensor4all-interpolativeqtt/README.md,crates/tensor4all-quanticstci/README.md,crates/tensor4all-quanticstransform/README.md,crates/tensor4all-simplett/README.md,crates/tensor4all-treetn/README.md— 1 eachA 2026-08-04 spot-check verified all 5 sampled snippets against source and found them API-correct today, so this is prevention, not repair: these are the first files an agent or human sees when browsing GitHub, and nothing stops them from rotting. The book-side mechanism (
docs/book-tests+scripts/test-mdbook.sh) already covers all 57 book fences; crate READMEs are the only unverified user-facing snippet surface left.Proposed direction
Add
# to the 7 crates above, mirroring the itensorlike pattern. Where a README snippet needs setup lines, use hidden#doctest lines rather than weakening the snippet.Reference: tensor4all/tenferro-rs#1609 (closed by tensor4all/tenferro-rs#1632) did the equivalent sweep for tenferro guide snippets.
Acceptance criteria
crates/*/README.mdexecute as doctests in `cargo test --doc --workspace`.ignore/no_run(per REPOSITORY_RULES.md doctest policy).