aedes_flytable_update(): don't flag NA root_ids as duplicated - #12
Merged
Conversation
group_by(root_id, good_status) collapses all NA-root_id rows into one group, so n>1 marked them root_duplicated=TRUE even though we don't know their identity. Force root_duplicated=FALSE for NA root_ids; they are only written to clear a previously-set TRUE.
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.
Follow-up to #11 (which was already merged, so this is a fresh PR).
Problem
In the duplicate-flagging step, rows are grouped with
group_by(root_id, good_status). dplyr collapses all rows withroot_id = NAinto a single group, son > 1marks them asroot_duplicated = TRUE— even though we don't actually know their identity and they shouldn't be treated as a group at all.Fix
Force
root_duplicated = FALSEforNAroot_ids:Combined with the existing change detection, an
NA-root_id row is written only if it previously carriedroot_duplicated = TRUE(to clear the stale flag); otherwiseFALSE == FALSEand it's left untouched.Same fix applied in parallel to crantr's
crant_seatable_update(). Internal-only; no signature/doc changes.🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com