Skip to content

compactCells: reject duplicate input with E_DUPLICATE_INPUT - #1236

Open
lenamonj wants to merge 1 commit into
uber:masterfrom
lenamonj:compactcells-duplicate-input
Open

lenamonj wants to merge 1 commit into
uber:masterfrom
lenamonj:compactcells-duplicate-input

Conversation

@lenamonj

@lenamonj lenamonj commented Sep 6, 2026

Copy link
Copy Markdown

compactCells counted how many times each parent was produced, not how many distinct children it saw, so an input that repeated one child six times and added a second child reached a count of seven and compacted to a parent the input never covered: the call returned a superset of the caller's region with E_SUCCESS.

Duplicates are now rejected up front with the documented E_DUPLICATE_INPUT, after sorting a private copy of the input. compactCells_duplicateIgnored, which pinned the old behaviour, becomes compactCells_duplicateRejected; the parentError2 fixture repeated values and is re-pointed at that code; a new mixed-resolution fixture keeps the parent-count overflow branch covered. Docs and CHANGELOG updated.

@CLAassistant

CLAassistant commented Sep 6, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coveralls

coveralls commented Sep 6, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 99.59% (+0.002%) from 99.588% — lenamonj:compactcells-duplicate-input into uber:master

compactCells counted how many times each parent was produced, not how
many distinct children it saw, so a set that repeated one child could
reach a full count of seven and compact to a parent the input never
covered, silently returning a superset of the caller's region. Duplicates
are now rejected up front with the documented E_DUPLICATE_INPUT. The
former parentError2 fixture repeated values and is re-pointed at that
code; a new mixed-resolution fixture keeps the parent-count overflow
branch covered. Docs and CHANGELOG updated.
@lenamonj
lenamonj force-pushed the compactcells-duplicate-input branch from 08dcfcd to 5c1c143 Compare September 13, 2026 17:47

This branch has not been deployed

No deployments
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.

3 participants