tools/test-doc-workspace-coverage.sh measures line+region coverage of
the doc module's pure layer the same way the CAD gate does: it copies
the dependency-free sources (advanced_json, crdt_bridge,
mobile_gesture, persistence, projection_layout, projection_session,
and the collaboration/, editing/, layout/, model/, plugins/ trees)
plus tests_pure.rs into a temporary host-only crate with the real
module path, satisfies the five makepad-math symbols the pure layer
uses through a 30-line makepad-widgets shim, runs the suite under
-C instrument-coverage with a toolchain it installs itself, and
enforces a total floor plus a per-file floor for every instrumented
file. The per-file floors are the point: a lone total waves through
the silent loss of one whole file's tests.
Measurement moved from a 28.55% line baseline to 96.76% (6170 lines)
with the tranche in the parent commit; floors sit a few points under
per file, except persistence.rs (55%), whose three write-path entry
points write into the host's real application-data directory and are
covered through their path-injected seams instead -- the honest
exclusions, the exact table, and the two defect fixes this drive
surfaced (ReplaceBlockRange validation order, dead
RgaText::visit_children) are written down in the module's new
COVERAGE.md.
Everything the script touches -- pinned toolchain, cargo home, target
dir, fetched Makepad tree, profraw data -- lives under one mktemp dir
removed by a shell trap on every exit path; nothing lands in the repo
or $HOME unless KEEP_COVERAGE=1 is set for a debugging run.
DOC_WS_COVERAGE_REPORT_ONLY=1 measures without gating.