Skip to content

fix(tables): finish GH-352 leftovers — shared column helper and scoreboard - #441

Draft
r-uben wants to merge 1 commit into
mainfrom
cursor/gh352-leftovers-98f1
Draft

fix(tables): finish GH-352 leftovers — shared column helper and scoreboard#441
r-uben wants to merge 1 commit into
mainfrom
cursor/gh352-leftovers-98f1

Conversation

@r-uben

@r-uben r-uben commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Completes the two remaining items on #352. PR #430 (223727b) already landed the column_binding_unverifiable walk gate; this PR leaves that behavior intact.

1. Single helper for projected grid + index remap

_candidate_data_column_indices is now the sole implementation of the numeric-column / widest-row-union logic. _project_candidate_data_columns projects through that tuple so a future tweak cannot silently desync the remap used in bind().

2. Record model_unbound_nonempty on the #330 scoreboard

Tests

New tests/test_gh352_leftovers.py:

Existing tests/test_gh352_column_binding_verifiable.py and binder tests still pass.

Verification

~/venvs/socr/bin/pytest tests/test_gh352_leftovers.py tests/test_gh352_column_binding_verifiable.py -q
# 10 passed

Does not close #352 — ready for review/merge first.

Open in Web Open in Cursor 

Summary by cubic

Completes the remaining GH-352 leftovers: consolidates candidate column projection into a single helper so the projected grid and the bind() remap can’t drift, and adds a model_unbound_nonempty flag to the coverage scoreboard.

Changes

  • _project_candidate_data_columns now delegates to _candidate_data_column_indices; the remap in bind() uses the same tuple, preventing silent drift.
  • CoverageRecord gains a model_unbound_nonempty boolean; aggregation uses it instead of re‑deriving from count.
  • Whole‑page summary_text now prints model unbound non-empty: N/denominator (region‑scoped already had it).
  • Adds tests/test_gh352_leftovers.py covering projection consistency, remap stability, and the new scoreboard line.

Written for commit 2d3d275. Summary will update on new commits.

Review in cubic

…board

- Collapse _project_candidate_data_columns and _candidate_data_column_indices
  onto _candidate_data_column_indices as the single source of truth so the
  projected grid and bind() remap cannot drift apart.
- Record model_unbound_nonempty on CoverageRecord and surface it on the
  whole-page #330 scoreboard summary (region-scoped already had it).

PR #430 already landed the column_binding_unverifiable walk gate; left intact.

Co-authored-by: Rubén Fernández-Fuertes <r-uben@users.noreply.github.com>

@r-uben r-uben left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

MERGE (head 2d3d275, draft)

Both remaining #352 items land. The #430 walk gate is untouched. Does not close #352 — correct.

Helper. _candidate_data_column_indices is the sole numeric-column / widest-row-union implementation; _project_candidate_data_columns projects through that tuple. bind() already remapped via the index helper, so this is the desync hole, not a new bind() rewrite. test_projected_grid_columns_match_index_helper goes red if they drift. typecheck + test (3.11) green.

Scoreboard. CoverageRecord.model_unbound_nonempty is required (no default); _record sets it from result.model_unbound; whole-page summary_text prints model unbound non-empty: N/denominator. Reverting the print reddens test_whole_page_summary_includes_model_unbound_nonempty.

Nits (non-blocking)

  1. test_coverage_record_carries_model_unbound_nonempty is construct+assert. The load-bearing pin is the summary line + the required field on _record.
  2. _aggregate fixture has flag and count>0 agreeing, so reverting the sum to model_unbound_count > 0 stays green. Fine while _record always sets bool(result.model_unbound).
  3. test_widest_row_union_... never has a narrow-only column, so it does not prove “a narrower row must not pull.” The (1,3) projection fixture is the real pin.
  4. Scoreboard print is pinned from a hand-built CoverageReport; a live coverage run is nicer, not a closer.

Do not merge unless asked. Do not close #352 from this PR. #326/#322 stay closed.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

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.

bug(tables): column_binding_unverifiable can go False while the cell walk still salvages

2 participants