Skip to content

fix(vision): remove sampled region coverage heuristic - #666

Merged
seonghobae merged 9 commits into
feat/ontology-project-nodes-v2200from
fix/no-region-coverage-heuristic
Aug 25, 2026
Merged

fix(vision): remove sampled region coverage heuristic#666
seonghobae merged 9 commits into
feat/ontology-project-nodes-v2200from
fix/no-region-coverage-heuristic

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Contract

Removes the sampled 32 x 32 region-coverage heuristic. ADR 0067 now makes the evidence boundary explicit: a locator response does not authoritatively prove whole-image coverage, so every proper subregion set retains one parent-image VISION request. A single explicit full-image box remains parent evidence rather than a fake decomposed region.

This deletes local coverage arithmetic and introduces no replacement threshold, tolerance, weight, or fallback calculation.

Verification

  • uv run --extra dev --extra backend pytest -q — 1,468 passed, 17 skipped on the exact implementation tree before the frontend-only stack advance
  • focused exact-stack verification — 61 passed
  • Ruff clean for every touched Python/test module
  • git diff --check

The two ontology test-double repairs align pre-existing stack tests with the current cutoff/snapshot keyword contract; they do not change production behavior.


Open in Devin Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 467b8a43-e374-4fff-9c35-602910a4c49e

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

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head validation for f369ca0b: image normalization, parent-image evidence, and ontology visibility tests pass with backend extras (56 passed); documentation/docstring gates pass (7 passed). The default uv run --extra dev collection lacks asyncpg, so backend tests were re-run with the repository-defined --extra backend contract. This stacked PR targets #663, not protected main; hosted Checks and independent approval remain required.

@seonghobae

Copy link
Copy Markdown
Contributor Author

The baseline now records this open PR and its exact-head evidence. Documentation-only follow-up advanced the branch to 656a6529; the focused image/normalization/ontology plus documentation gates remain green (63 passed). Hosted Checks and independent approval must be revalidated on 656a6529; this remains stacked on #663 and is not protected-main delivery.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Revalidated concurrent exact head eb2f9b7f (including the RankWeave baseline update): image/normalization/ontology and documentation gates remain green (63 passed with --extra backend). No failed hosted check is present; queued hosted checks and independent approval remain required. This branch remains stacked on #663.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Revalidated concurrent documentation-only exact head 215d4e66 (PR #632 baseline reconciliation). Focused image/normalization/ontology and documentation gates remain green: 63 passed with --extra backend. Hosted checks and independent approval remain required; this stacked PR is not protected-main delivery.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

regions = ()
full_image_region = len(regions) == 1 and regions[0] == ImageRegion(0.0, 0.0, 1.0, 1.0)
partial_regions = bool(regions) and not full_image_region and not regions_cover_image(regions)
has_subregions = bool(regions) and not full_image_region

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: Tiled regions now trigger an extra parent-image VISION call

With the coverage heuristic gone, has_subregions is true for any non-empty, non-full-image region set. Region sets that previously tiled the plane took the merge-only path with no parent call; they now always issue one extra vision_client.describe on the parent image. This is the ADR 0067 tradeoff, and the new test expects describe_calls == 3, but per-image VISION cost rises for tiled outputs.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head revalidation at f0727f84 after the concurrent ontology-label invariant merge: focused image/normalization/visibility/documentation gates passed 63, and the changed ontology contract suite passed 23 (86 passed total across these focused invocations). The label path now fails closed with ValueError instead of relying on an assert. Hosted Checks and independent approval remain required; this is still stacked on #663.

@seonghobae
seonghobae merged commit f8c7895 into feat/ontology-project-nodes-v2200 Aug 25, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant