Skip to content

fix(release-vote-tally): keep email-only roster voters distinct - #1913

Merged
potiuk merged 1 commit into
apache:mainfrom
MakerFlyFly:fix/vote-tally-empty-apache-id-upstream
Oct 30, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
MakerFlyFly:fix/vote-tally-empty-apache-id-upstream

Conversation

@MakerFlyFly

Copy link
Copy Markdown
Contributor

Summary

  • Use the existing normalized-address identity when a roster member has no Apache ID, so different members no longer supersede each other's votes.
  • Preserve roster-ID identities for members who have IDs, along with primary-email binding, pass thresholds, CLI arguments and JSON fields.
  • Cover both incorrect outcomes: three approvals reduced to one (false failure), and three dissenting votes reduced to one in a mixed roster (false pass).

Type of change

  • Python package (tools/release-management)
  • Skill change
  • Tool / bridge contract
  • Documentation
  • Project template
  • CI / dev loop

Test plan

Local checks run on upstream baseline 6fafad25 with this patch, in Linux / Python 3.12:

  • Vote-tally module: 102 tests and 3 subtests pass.
  • Entire release-management package: 718 tests and 11 subtests pass.
  • All seven new regression cases fail when the identity function from this upstream baseline is restored in memory, and pass with the fix.
  • Independent supplemental boundary check: 3,000 cases / 42,764 vote records, seed 20261030; expected grouping uses synthetic person IDs and input order.
  • Ruff check, Ruff format check and mypy pass for all 64 package source/test files.
  • prek run --all-files --skip workspace-pytest passes, including whole-tree link, symlink and static checks.
  • prek run workspace-pytest --from-ref origin/main --to-ref HEAD passes.
  • Standard commit hooks and Magpie pre-first-pr-check pass without bypass.

The seven new cases cover all four mechanisms, repeat votes with casing/display-name changes and reverse timestamps, mixed-roster dissent, and the CLI reviews/login-map/result-render path. The unspecified mechanism results remain null.

RFC-AI-0004 compliance

  • HITL — the result and next label remain proposals for RM confirmation.
  • Vendor neutrality — email-only rosters keep working without a fabricated Apache ID.

Linked issues

Closes #1912.

Notes for reviewers

The two changed files are byte-identical to the patch reviewed by the contributor at 1089c512; only the upstream base and resulting commit SHA differ.

Prior Windows / Python 3.14 validation of the same package contents reports 716 passing tests and two baseline failures (11 subtests passed), with UTF-8 and Git Bash on PATH. The baseline reports 709 passing tests and the same two failures: the custom-build archive tree note, and a native Windows subprocess-to-sh argument round trip involving a literal backslash followed by $HOME. Passing the quoted command through shell standard input succeeds. These platform failures do not involve voter identity; Windows compatibility and audit-report handle resolution are outside this PR.

CodeQL's optional aggregate can be neutral when the existing path-based workflow omits the Actions-language configuration for a Python-only diff. The Python analysis and required checks are evaluated separately; upstream CI will be checked for this PR's own HEAD.

Suggested labels: bug, family:release-management, capability:fix.

AI disclosure and author review

AI assistance: Codex (GPT-6). The contributor has completed review of the patch and validation results. The commit carries a Generated-by: trailer; no AI co-author is declared.

Roster membership can resolve through Primary email without an Apache ID.
Using the empty ID as a shared identity let different members supersede
each other, causing both missing approvals and missing dissenting votes.

Use the existing normalized-address identity when the Apache ID is absent.
Keep roster-ID identities, binding resolution, and pass rules unchanged.

Generated-by: Codex (GPT-6)

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The fix is correct: parse_roster keeps email-only rows, so _identity used to give every one of them the same roster: key and their votes superseded each other; guarding on apache_id as resolve_binding already does keeps them distinct, and the tests cover the false fail, the mixed-roster false pass, a changed vote and the CLI path.


This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.

More on how Apache Magpie handles maintainer review:
Contributing guide.

@potiuk
potiuk merged commit 288ca0e into apache:main Oct 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:tools tools/* substrate:release Tool substrate: release-artefact helpers (reproducible archive build, lint, comparison)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vote-tally: roster members without Apache IDs overwrite each other's votes

2 participants