Commit Graph

2 Commits

Author SHA1 Message Date
dev a360238a95 Write the comments in both languages, part one
The comments in this service were written in English alone, while the
library it belongs to writes every comment in English and then in Chinese.
The smaller modules are done here: the library root, the bilingual text,
the shared state, the embedded content and assets, the three HTTP modules,
the entry point, the test seams, the tool labels, and the interface
catalogue reader.

A doc comment carries the English text, an empty doc line, and then the
Chinese. An inline comment carries the English line and then the Chinese.
Both are how the library already writes them.

The empty doc line matters and was wrong at first. A blank line between
the two halves is not the same thing: it detaches the second half from the
item it documents, and the compiler says so. A hundred of them were
rewritten as empty doc lines.
2026-10-02 13:17:41 +08:00
dev ff69c1cd63 Move every test out of src, as apsis-rs does
The service is a library with a thin binary over it, which is what makes
the move possible: an integration test is a separate crate and reaches
only what the library makes public, so the modules now live in
`src/lib.rs` and `main.rs` is the entry point. `src/` holds no test
code, which is the shape `apsis-rs` already has.

Eleven items are internal to a module and a test reaches them anyway.
Those stay `pub(crate)` where they are defined and are offered through
`src/testkit.rs`, which is the one place a caller is expected to look for
them. A wrapper is also the only way to offer a private thing outward:
Rust does not let visibility be widened twice, so a `pub(crate)` item
cannot be re-exported as `pub`. That keeps the seams in one file instead
of scattering them through the modules under test.

The 146 module tests and the 23 end to end tests all still run, which is
the number this move had to preserve: the 146 are spread over eighteen
files in `tests/`, one per module that had them.
2026-10-02 01:56:21 +08:00