Remove the unused is_border_4() helper - #14
Merged
Conversation
`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 Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.