Skip to content

Witnesses for the clipped coverage grid and fitted ground - #220

Draft
obvious-autobuild[bot] wants to merge 4 commits into
mainfrom
obv/basescanning-004
Draft

obvious-autobuild[bot] wants to merge 4 commits into
mainfrom
obv/basescanning-004

Conversation

@obvious-autobuild

Copy link
Copy Markdown

What this adds

Pipeline-level witnesses on top of ea38351 (Coverage stops at the fitted extent and samples the fitted ground), which fixed the two coverage defects in the handoff (issues #95 and #96). No behavior change here — tests, a synthetic bundle builder, a schema-compat check script, and a results record.

  • recon/tests/witness_bundle.py — renders synthetic scan bundles from analytic planes (wall pieces, a back wall, a hole, a falling floor) with exact poses plus fixed-seed noise, into the app's bundle layout (scene.json, JPEGs, Float32 depth, UInt8 confidence). Nothing synthetic claims to be a real capture: no home, no private rule, no real-world coordinate.
  • recon/tests/test_coverage_pipeline.py — eight witnesses through pipeline.run, the caller a real bundle takes, with --depth lidar (no model, no network). Oracle is the written scene.json / coverage.json / geometry.json, never a test-local copy of the clipping logic: exported spans stop at the fitted extent while the phone's baseline claims past it; a hole in the wall stays unobserved across a bridged fit; ground follows a falling fitted plane (0.35 m/m) where the old horizontal-plane sampler cannot produce a 2 ft entry at all; short (0.6 m) and empty wall tracks refuse; no-keyframes, single-LiDAR-frame and too-close-tracks refuse or observe nothing.
  • recon/tests/scene_schema_check.py — validates an exported scene.json against server/schemas/scene.schema.json; reports the input bundle's per-keyframe depth passthrough (an app-side extension the schema does not define) on its own line rather than folding it into a pass.
  • recon/results/coverage_extent_witnesses.md — baseline counts, witness table, owned smoke command with output hashes, and a field-level old-vs-new comparison run at c813182.

Check commands (all run in recon/, offline)

Command Result
uv sync --locked resolves cleanly, 17 packages
uv run ruff check . All checks passed
uv run ruff format --check . clean
uv run pytest -q 98 passed, 56 warnings
uv run pytest -q tests/test_coverage_pipeline.py 8 passed

Owned CLI smoke (exact command, recorded in the results doc with output hashes):

uv run python tests/witness_bundle.py /tmp/witness-smoke/bundle
uv run python -m recon /tmp/witness-smoke/bundle --out /tmp/witness-smoke/out --work /tmp/witness-smoke/work --depth lidar --no-server

Old-vs-new on the same bundle (c813182 vs head): grid now starts at the fitted extent (-3.035, was -3.5), cells_end_ft appears and clips the boundary cell, wall span covers the full fit ([−3.0, 5.332], was [−3.0, 5.0]), overhead stops claiming past the fit ([-3.035, 5.332], was [-3.5, 5.5]), phantom last grid cell goes false → true-observed-at-real-end.

Not run

  • The depth/model path (--depth moge2 or photo-based depth): these bundles are LiDAR-rendered by design — running the model would need its process and weights.
  • The server round-trip and server/tests: recon-side only; the schema-compat receipt covers the exported document against the committed schema.
  • ETH3D acceptance (make accept) and the iOS checks: untouched by this branch, not rerun.
  • Any run against a real home capture.

Assumptions

  • The witnesses treat server/schemas/scene.schema.json as the compatibility bar for the exported scene.json; the input depth extension is reported separately, not hidden.
  • Free space keeping its own weaker bar than the two-position rule is pinned as current behavior (commented in the test), not fixed here — it is outside this pass's scope.
  • recon/results/ is the right home for the witness record, next to the existing ETH3D results.

Handoff (from the recon handoff, done / remaining)

Review request: the repair under test touches the recon coverage area — @hunter, this will need your review.

ObviousApp and others added 4 commits October 9, 2026 19:45
Cells were half-foot steps from the floor of the fitted stretch to its end plus
one cell, so a sample outside the fit could drive an observation, and a longer
baseline an older scan left behind backed wall the fit never established. Cells
are now clipped to the fitted extent, with partial boundary cells sampled
inside their own widths; a fit that begins and ends on the grid gets exactly
the cells it did before.

Ground samples sat on the horizontal plane through the meter's foot and the
pipeline never passed its fitted ground in, so on sloping ground the samples
hung above or below the surface and visible ground read unobserved. The
pipeline now passes the fit in and the samples follow the plane.

Spans in scene.json, measurements, the report's ft totals, and the coverage
doc follow the clipped ends; scene.json gains no fields. report.md's coverage
doc gains cells_end_ft so clipped boundary cells are visible.
… change

The witness pass on top of ea38351 keeps its own record in
recon/results/coverage_extent_witnesses.md; this first entry pins the
baseline: uv sync --locked clean, ruff check and format clean, pytest
90 passed, test_coverage_fit.py 9 passed.
…ted ground

Eight witnesses run pipeline.run itself - the caller a real bundle takes -
on synthetic bundles rendered from analytic planes in
tests/witness_bundle.py: LiDAR depth, no model, no network, no real home
capture. The oracle is what the pipeline writes (scene.json,
coverage.json, geometry.json) plus the refusals it raises: exported spans
stop at the fitted extent while the phone's baseline claims past it, a
hole in the wall stays unobserved across a bridged fit, ground follows a
falling fitted plane where the old horizontal-plane sampler cannot, and
short/empty/too-thin tracks refuse. results doc records the counts, the
owned CLI smoke with output hashes, and a field-level old-vs-new
comparison run at c813182. Full suite: 98 passed.
tests/scene_schema_check.py validates an exported scene.json against the
committed server schema and keeps the input bundle's per-keyframe depth
passthrough (an app-side extension the schema does not define) on its own
line instead of folding it into a pass. Receipt in the results doc: the
smoke output has 0 strict errors, 5 passthrough items.
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3d1f2695-aa80-4f44-8714-0df8b95b499c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants