Skip to content

test(scan-gaps): graduate cell_range subrectangle test (P1-5)#30

Open
dev360 wants to merge 1 commit into
mainfrom
feat/p1-5-cell-range
Open

test(scan-gaps): graduate cell_range subrectangle test (P1-5)#30
dev360 wants to merge 1 commit into
mainfrom
feat/p1-5-cell-range

Conversation

@dev360
Copy link
Copy Markdown
Owner

@dev360 dev360 commented May 21, 2026

Summary

Closes P1-5. The brief noted "investigation first; the field exists, may already work" — and it does. Locate.cell_range already gates row/column extraction in _read_flat_grid:

min_row = (cell_range.start_row + 1) if cell_range else 1
max_row = (cell_range.end_row + 1) if (cell_range and cell_range.end_row is not None) else None
min_col = (cell_range.start_col + 1) if cell_range else 1
max_col = (cell_range.end_col + 1) if (cell_range and cell_range.end_col is not None) else None

No code change needed. This PR just removes the xfail(strict=True) marker on the proposed acceptance test so the existing wiring becomes a real regression check: two entities with disjoint cell_range values on the same tab each see only their own subrectangle.

Test plan

  • uv run pytest tests/test_field_scan_gaps.py::test_cell_range_restricts_extraction_to_subrectangle -v — passes.
  • uv run pytest -q — 105 passed, 36 xfailed.
  • uvx --from 'ruff==0.6.9' ruff check . and ruff format --check . — clean.

🤖 Generated with Claude Code

``Locate.cell_range`` was already wired through ``_read_flat_grid``
(see ``min_row`` / ``max_row`` / ``min_col`` / ``max_col`` derivation)
but the proposed acceptance test had been carrying an
``xfail(strict=True)`` since the field-scan corpus landed because no
one had actually re-verified the end-to-end behavior.

Removing the marker (with the matching ``description:`` add the
template loader requires) turns the existing wiring into a real
acceptance check: two entities with disjoint cell_range values on the
same tab each see only their own subrectangle.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dev360 dev360 force-pushed the feat/p1-5-cell-range branch from e8d02b6 to 7e0fd87 Compare May 22, 2026 13:44
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