Parity with the WOM-side --audit-watertight --summary added
last batch. Same one-line rollup format for CI dashboards:
watertight-wob: PASS (1 buildings, 0 failure(s)) [/tmp/migtest, weld 0.001000]
watertight-wob: FAIL (12 buildings, 4 failure(s)) [/tmp/zone, weld 0.001000]
Format: "watertight-wob: <PASS|FAIL> (<N> buildings, <K>
failure(s)) [<root>, weld <eps>]". Exit code unchanged —
failure count capped at 255.
Both --audit-watertight (WOM) and --audit-watertight-wob
(WOB) now offer the same trio of output modes: verbose
(default), --json (machine-readable), --summary (one-line
CI rollup).
CI-friendly one-line rollup mode for the welded watertight
audit. Replaces the per-mesh PASS/FAIL detail lines with a
single status line:
watertight: FAIL (121 meshes, 27 failure(s)) [/tmp/migtest, weld 0.001000]
watertight: PASS (6 meshes, 0 failure(s)) [/tmp/camp, weld 0.001000]
Format: "watertight: <PASS|FAIL> (<N> meshes, <K> failure(s))
[<root>, weld <eps>]". Exit code unchanged — failure count
capped at 255, matching the verbose-mode contract.
Useful for build dashboards / CI grep lines / Slack-bot
notifications where the full per-mesh dump would be too
noisy. Verbose mode is still the default; opt in with
--summary.
Sibling of --audit-watertight that walks every .wob under
<root> and runs the welded watertight check on every group.
A WOB passes only if every group is closed — interior rooms
in a real building should each be a closed solid even
though the building as a whole has intentional portal
openings between them.
Per-failure detail lists which groups failed and why
(boundary edge count + non-manifold edge count). Exit code
is the number of failed buildings (capped at 255) — same
CI-friendly contract as the WOM audit.
Smoke tested against /tmp/migtest cube.wob: PASS, 12 tris,
exit code 0.
The "loop over triangles, key edges by canonical-vertex pair,
count uses, classify boundary/manifold/non-manifold" pass was
duplicated across cli_mesh_info, cli_world_info, and the new
cli_audits watertight check. Hoist it into cli_weld as
classifyEdges(indices, canon) returning an EdgeStats struct
with boundary / manifold / nonManifold counters and a
watertight() convenience method.
All three callers verified byte-identical:
• --info-mesh-stats firepit: 180 edges, watertight YES
• --info-wob-stats cube: 18 manifold, watertight YES
• --audit-watertight /tmp/...: 61 meshes, 12 failures, rc=12
About 60 more lines of duplication removed; classifyEdges +
buildWeldMap together form the complete reusable surface for
new weld/topology audit commands.
Walk every .wom under <zoneDir|projectDir>, run the welded
watertight check from cli_weld + the same edge-analysis as
--info-mesh-stats, and report PASS/FAIL with the per-mesh
failure detail (boundary / non-manifold edge counts).
Exit code is the number of failures (capped at 255), so
CI pipelines can gate on `--audit-watertight $project` and
fail the build if any mesh isn't a closed solid.
Smoke-tested over 61 procedurally-generated WOMs:
• 49 PASS — most stand-alone primitives are watertight
• tent_fixed FAIL with 5 boundary edges = the intentional
door cutout (correct surface count)
• woodpile / bed / well variants FAIL with non-manifold
edges = adjacent stacked cylinders/legs sharing corners
(correct geometry callout)
Defaults to weld eps 1e-4 — a good balance for procedural
output where positions are exact rationals at typical scales.
Continues the modularization. Moves the four audit handlers
(--validate-zone-pack, --validate-project-packs, --info-zone-deps,
--info-project-deps) into their own file using the same
handle<Family>(int& i, int argc, char** argv, int& outRc) pattern.
Side-cleanup: the two project-scope audits had identical
subprocess-fanout structure (enumerate zones → run per-zone
command → tally PASS/FAIL → print summary). Consolidated that
into a shared runPerZoneAudit helper. Saves ~80 lines of
duplicated dispatch code.
main.cpp drops 28,070 → 27,736 lines (-334). Audit family is
fully self-contained (~330 lines), behavior unchanged
(verified all 4 commands against existing test zones).