Repository navigation
Backend: run real CPU criteria on published capture artifacts - #279
Conversation
Publish two supported single-wall source scenes (the synthetic flat-wall geometry unchanged, plus one variant carrying an observed gas-meter hazard at known dimensions) through the same captures/<capture>/runs/<run>/ storage map an upstream scene/coverage stage supplies, hydrate them via Services.stage_context, and execute the real criteria stage entry with stubs off. Assert fresh contract- valid verdicts for every profile, a provisional=false report, published bytes hashing to the declared asset stamps, honest C2 execution (12 vs 16 compared positions; a bounded-out sweep downgrades C1 passes), scene-dependent gas- clearance runs near the hazard, identity separation between two capture/run pairs, explicit typed occluders_missing failure for missing/empty/truncated declared PLYs, and the placement bridge's unchanged bounded refusal on the generator's original geometry as a diagnostic. Co-authored-by: Sam Gu <sgu07966@gmail.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Verification record (head
|
|
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 BaseScanning to your team's repositories. |
[Medium impact] The PR appears safe to merge; the previous report-selection issue is fixed, and no new actionable issues were found.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c815b43fb5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| c2_report = { | ||
| "status": "ok", | ||
| "agreement_with_c1": stamped["agreement_with_c1"], | ||
| "positions_compared": stamped["positions_compared"], |
There was a problem hiding this comment.
Report C2 comparisons for the default profile
When HSS_CRITERIA_C2_PROFILES=all, this assignment overwrites the top-level c2_report on every profile iteration, so after the A,B,C,S loop positions_compared (and agreement_with_c1) describe profile S rather than the configured default profile C. The later c2_sweep_document only corrects the top-level status/count fields, leaving this newly exposed comparison count inconsistent with the report's default-profile semantics whenever profiles produce different matches.
Useful? React with 👍 / 👎.
evaluate_scene overwrote report["c2"] as profiles ran and then only replaced its status with the default profile's sweep status, so in an all-profile sweep the published comparison counts, agreement, and vetoes could describe another profile. c2_sweep_document also substituted the only profile present when the configured default was absent, publishing that profile's evidence as if the default had run. - select the whole top-level C2 report from the configured default profile's sweep entry after the loop - c2_sweep_document: default present -> whole entry; absent -> the honest off/zero/None document; explicit run statuses (off, skipped, no_coverage_grid) pass through unchanged - record status + comparison + counts for every profile in c2.sweep.json so reviewers keep the full evidence Tests: two real-stage regressions (default selection across profile orders and defaults with a measured C-vs-S discriminator on the hazard scene; named off/skipped/no-coverage documents without fabricated agreement) fail against the pre-fix code; unit pins cover whole-document selection and no substitution for an absent default. Co-authored-by: Sam Gu <sgu07966@gmail.com>
…ub.com/SamGu-NRX/BaseScanning into obv/burst9-bs-criteria-published-inputs # Conflicts: # backend/server/criteria/run.py
fleet-packet: burst10-bs-profile-evidence
Backend: run real CPU criteria on published capture artifacts; C2 report follows the default profile
What changed and why
Capability. The criteria stage's published-inputs seam (PR #279): two records for running the real CPU criteria stage over published capture artifacts, plus the tests that prove them. This packet adds the third record: the top-level C2 report in
criteria_report.jsonnow describes the configured default profile — status, agreement, positions compared and vetoes together — underHSS_CRITERIA_C2_PROFILES=all.The defect (Greptile r4290120811, Codex r4290131173 — both verified against head c815b43). With
HSS_CRITERIA_C2_PROFILES=all, the profile loop overwrote the top-levelc2_reporton every A/B/C/S iteration (run.py:410-415), so after the loop it described S, the last profile. The post-loop selection (run.py:527-529) picked the default profile's counts forc2.sweep.jsonbut corrected onlystatuson the report. A reader — includingserver/result/compose.py, which publishesreport["c2"]["vetoes"]to the device — could see S's count and agreement under C's status. Report-level selection must not depend on iteration order.The fix. The loop records each profile's full comparison evidence (status, agreement_with_c1, positions_compared, vetoes, n_pass, n_spots) into
c2_by_profileand never touches the top-level report. After the loop, the report's whole C2 document is selected from the configured default profile (c2_default_document); a default profile with no C2 entry keeps the namedoffdocument withagreement_with_c1: None— another profile's numbers are never promoted, andc2.sweep.json's first-profile substitution fallback is removed (c2_sweep_documentnow reports off counts with the per-profile evidence kept inby_profile). Preserved unchanged: the explicit no-coverage / skipped / no-observed-ground downgrades, #255's agreement=None for zero compared positions, the published-input stage contract, andPOST /v1/placements(criteria stays authoritative for device eligibility; no evaluator or threshold changed).Alternatives considered.
report.c2.by_profileand drop the flat fields. Rejected: changes the published report contract consumed byresult/compose.pyand the eval gates — a wider blast radius than the defect justifies.The chosen fix has one source of truth (the per-profile record), preserves the report's shape, and makes the top-level document order-independent by construction.
Fixture helper and bridge diagnostic. Unchanged and still pinned:
backend/tests/fixtures/cpu_downstream/scenes.py(supported_wall_variants,original_scene) andtest_bridge_boundary_diagnostic_on_unchanged_generator_geometry(the placement bridge's unchanged refusal of the generator's geometry: keyframes, then/coverage/grid).How I verified it
obv/burst9-bs-criteria-published-inputsat start SHA c815b43 on the repo sandboxcmp_l3e2i2Fu(fresh directory, no other thread's tree touched).test_c2_report_evidence_follows_the_default_profile_not_the_iteration_orderruns the real criteria stage — publication →Services.stage_contexthydration →runner.run_stage(ctx, stubs=False)— over both committed synthetic variants (clean, hazard) withHSS_CRITERIA_C2_PROFILES=all, once as profiles A,B,C,S with default C, once reordered S,B,A,C with default S. It asserts every profile's evidence is kept, the report's whole C2 document equals the configured default's sweep entry (for C and for a non-C default), the same profile's evidence is byte-identical across both iteration orders, and C's and S's real evidence differs on both variants — so the selection cannot pass by coincidence.test_c2_report_names_off_absent_default_skipped_and_no_coverage_without_fabricated_agreementcovers C2 off, a default profile absent while A/S really ran C2 (no substitution), a budget-bounded sweep (every profile named skipped, C1 passes downgraded), and a scene that declares no coverage grid (no_coverage_grid, downgraded,agreement_with_c1: None) — each through the real stage with no fabricated agreement.server/criteria/tests/test_criteria.py: no substitution when the default is absent; the whole default comparison selected verbatim, including fix(backend): review-page links, packet still paths, C2 join agreement, and hydrated reads/scale #255's ok-with-zero-positionsagreement_with_c1: None.test_join_without_matches_reports_no_comparison.make lint,make schemas, full backend pytest, and the root solver suite (make server, pinned uv) — results below.Verification results (fix commit
89d7de6d= 89d7de6, authorObvious <obvious@obvious.ai>,Co-authored-by: Sam Gutrailer; branch head563855d1= merge of the advanced baseobv/burst7-bs-capture-placement-runner, whosepositions_comparedadditions to the old-style top-level documents are subsumed by the per-profile records — conflict resolved to the default-profile selection):c815b43f, fix stashed, final tests)test_ssr_overlap_check.py+ 4 xtest_gates.pySD-96), identical on the starting headruff check/ruff format --check/lint-importsmake schemasexport_schemas --check)server/criteria/run.pymake server(pinned uv)Failing-before detail (old code, final tests): the strict regression failed on the substituted report; the named-statuses regression first failed at the absent-default assert expecting
off/None/0 and receivingok/1.0/12;test_c2_sweep_document_never_substitutes_another_profilefailedassert doc["status"] == "off"receiving'ok';test_c2_default_document_selects_the_whole_default_comparisonfailed on ImportError becausec2_default_documentdid not exist pre-fix;test_c2_sweep_counts_the_default_profileand #255'stest_join_without_matches_reports_no_comparisonpassed untouched.Test logs (inline)
What is not verified
server/(root placement service source) and deployment files are untouched by this packet and not exercised here.Assumptions
off, and the report carries no agreement rather than another profile's.by_profileentries gaining comparison keys (agreement_with_c1, positions_compared, vetoes) is additive: nothing consumesc2.sweep.jsonbeyond the published-inputs tests, andcompose.pyreads onlyreport["c2"]["vetoes"], whose semantics now correctly describe the default profile.HSS_CRITERIA_PROFILESis a misconfiguration worth reporting honestly (off, no substitution) rather than one to mask with another profile's numbers.cmp_l3e2i2Fusandbox in the fresh clone~/work/burst10-bs-profile-evidence; no branches checked out in other directories' trees; ios: fix review debt on the walk, review and AR result screens #241/chore(backend): port house-scanning-server into the monorepo #247 untouched; no merge, no default-branch push, no force-push, no auto-merge.Human author: Sam Gu (sgu07966@gmail.com)
🔗 Obvious Project · 🧵 Obvious Thread · 🔀 Obvious PR Artifact