Repository navigation
server: the meter's error never excuses a working-space overlap (issue #44) - #54
AidenJohnston wants to merge 1 commit into
Conversation
|
Note Review skipped Codemetrics is installed on this repository, but it hasn't been added to your team yet. To enable AI code reviews for this repo, go to your dashboard and add house-scanning-master to your team's repositories. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
7eb4fc3 to
4581d03
Compare
|
For whoever reviews: 9e42970 on |
AidenJohnston
left a comment
There was a problem hiding this comment.
Challenger review. The issue's spot (overlap of -1.25 ft, meter error 0.792 ft, wall error 0.713 ft) is now FAIL, and the suite passes locally apart from the two Windows-only tests. Two problems, though.
1. Blocking: the new FAIL can turn a meter-tap error into a false reject. At server/solver.py:597, an overlap larger than the wall's error but within the meter's error becomes FAIL. The README says a reject needs every spot within reach to FAIL, so a scene whose only standable spots sit just inside the working space is now rejected, even though the real meter could be where the battery clears it. Repro (local, not pushed): shared_fixture() with meter plus_minus_ft 1.0, wall plus_minus_ft 0.1, and pads_ground([(-W - 0.45, -0.25)]), so every spot overlaps by 0.8 to 1.0 ft. With this PR the result is reject ("every spot fails ground surface, meter working space, route length"). On t3/server it is manual_review. The reasoning in the comment at solver.py:595 and in README.md:103 doesn't hold physically. The spot is shown relative to the anchor, but the working space surrounds the real meter, and the meter's error measures the gap between the two. Also, reporting plus_minus_ft as the wall's error alone hides the meter's error from the app and from reviewers. Fix: drop the FAIL override and keep the check UNSURE. Ranking already keeps these spots from winning (see item 2). If you want a stronger rule, make it a ranking or manual_review signal that can never count toward reject, and add a regression test that this scene isn't rejected.
2. Blocking at conflict resolution: keep the base branch's ranking order. 9e42970 on t3/server already fixed #44's ranking as (estimate_fails(c), len(c.unsure()), route, s0), which is why this PR conflicts. This PR's solver.py:1206 puts the count of "leans fail" checks after the UNSURE count. That lets a spot overlapping the working space within the wall's error, with one UNSURE check, beat a clear spot with two UNSURE checks (for example, headroom unseen there). That is the #44 symptom again. When resolving, keep the base's tuple, delete _leans_fail (solver.py:1196, a duplicate of estimate_fails), and make the ranking sentence in README.md:127 match. The extra sweep boundaries at the pass line (solver.py:1047) are fine to keep.
No clearance numbers were added, so rules.yaml rightly doesn't change. The response schema is unchanged.
|
Read-only review at |
|
Not merged. The rule change was approved, but two reviews of 4581d03 found a false reject: a spot whose overlap with the working space exceeds the wall's error but is within the meter's error now FAILs, so a scene whose only standable spot is there gets rejected, although the real meter could be where that spot clears (Aiden's challenger review; the caretaker's reproduction in the comment above). #44 is already fixed on |
Fixes #44.
The bug. In device field test run 2 the server's best spot stood with its edge on the meter's centre line, 1 ft 3 in inside the meter's 30 in working space (
measured_ft-1.25; #40 is the app reading that as a distance, fixed in #37). Two things let it through. The working-space check added the meter's error (0.792 ft for a tap on an estimated plane) to the wall's error (0.713 ft), so the overlap was within its ±1.505 ft and came back UNSURE instead of FAIL. And_rank_unsureranked UNSURE spots by cable run without looking at margins.Already on
t3/server. Sam's 9e42970 fixed the ranking: a spot whose best estimate is past a rule now ranks after every spot whose estimates all clear. It left the check itself as it was.This PR fixes the check.
check_meter_spacestill needs the battery clear of the working space by more than the meter's error plus the wall's error to pass. An overlap by more than the wall's error alone now fails, and the check reports that error, someasured_ft ± plus_minus_ftgives the same FAIL. The spot is placed and shown against the meter's anchor, so the meter's error can hold back a pass but should not excuse an overlap. Without this, a scan whose only spots overlap the working space goes to manual review with one of them as the best spot, rather than failing it.server/README.mdstates the rule. No clearance value changed, sorules.yamlis untouched.Tests. Three cases join the #44 section of
tests/test_field_run_2.py, on its run-2 scene: the -1.25 ft overlap fails, which failed before the fix, and a spot clear by more than both errors passes. Spots clear by less, and overlaps within the wall's error, stay UNSURE with the combined error. On Windows, three tests intest_api.py,test_hardening.pyandtest_coderabbit_review.pyfail on the base branch too; CI runs on Linux.Review.
server/becomes Hunter's team's lane once #11 merges, so they should review this. It also changes the rule 9e42970 chose to keep, so Sam should confirm. It targetst3/server, so merging it won't close #44 automatically; close it by hand once it lands.