Skip to content

Remove the unused is_border_4() helper - #14

Merged
billdenney merged 1 commit into
mainfrom
chore/drop-unused-internals
Jul 30, 2026
Merged

Remove the unused is_border_4() helper#14
billdenney merged 1 commit into
mainfrom
chore/drop-unused-internals

Conversation

@billdenney

Copy link
Copy Markdown
Member

thinr::is_border_4() in src/thinr_common.h had no caller. Its last users were the stentiford and pavlidis kernels, dropped 2026-05-20.

Verified before deleting: across src/, the symbol appears exactly once -- its own definition -- while its two neighbours in the same header, crossing_number() and neighbour_count(), have five references each. The package then compiles and passes 510 tests with the definition gone, which is the proof no caller existed.

REVIEW-2026-07-28.md raised it and deliberately left the choice open, between deleting it and adding a comment stating it was retained on purpose. The unmerged review/no-consumer-audit branch took the second option. Taking the first instead, per the standing instruction that internal code does not get to carry tech debt: an uncalled helper with a comment explaining why it is uncalled is still a thing every reader has to evaluate, and git preserves it if a future kernel wants it back.

The 8-neighbour vocabulary argument for keeping it does not survive contact with the file: the labelling convention lives in the header's own top comment, not in this function.

Scope checked, not assumed: is_border_4 is the ONLY unused internal in the package. Every file-local C++ helper is called, and all nine .*_cpp Rcpp bindings are reached from R/ outside RcppExports.

The CLAUDE.md line listing the header's shared helpers drops it too. REVIEW-2026-07-28.md keeps its mention -- it is a dated finding record, and this commit is the follow-up it asked for.

`thinr::is_border_4()` in src/thinr_common.h had no caller. Its last
users were the stentiford and pavlidis kernels, dropped 2026-05-20.

Verified before deleting: across src/, the symbol appears exactly once --
its own definition -- while its two neighbours in the same header,
crossing_number() and neighbour_count(), have five references each. The
package then compiles and passes 510 tests with the definition gone,
which is the proof no caller existed.

REVIEW-2026-07-28.md raised it and deliberately left the choice open,
between deleting it and adding a comment stating it was retained on
purpose. The unmerged review/no-consumer-audit branch took the second
option. Taking the first instead, per the standing instruction that
internal code does not get to carry tech debt: an uncalled helper with a
comment explaining why it is uncalled is still a thing every reader has
to evaluate, and git preserves it if a future kernel wants it back.

The 8-neighbour vocabulary argument for keeping it does not survive
contact with the file: the labelling convention lives in the header's
own top comment, not in this function.

Scope checked, not assumed: is_border_4 is the ONLY unused internal in
the package. Every file-local C++ helper is called, and all nine
.*_cpp Rcpp bindings are reached from R/ outside RcppExports.

The CLAUDE.md line listing the header's shared helpers drops it too.
REVIEW-2026-07-28.md keeps its mention -- it is a dated finding record,
and this commit is the follow-up it asked for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/thinr_common.h 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@billdenney
billdenney merged commit 196f0b7 into main Jul 30, 2026
9 checks passed
@billdenney
billdenney deleted the chore/drop-unused-internals branch July 30, 2026 21:00
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