Skip to content

fix: preserve remainder rows across worker batches#12

Open
sergioballesteros-vd wants to merge 2 commits into
SantanderAI:mainfrom
sergioballesteros-vd:fix/remainder-workload
Open

fix: preserve remainder rows across worker batches#12
sergioballesteros-vd wants to merge 2 commits into
SantanderAI:mainfrom
sergioballesteros-vd:fix/remainder-workload

Conversation

@sergioballesteros-vd

Copy link
Copy Markdown

Summary

This PR fixes row loss in account and transaction generation when the requested totals do not divide evenly across workers * batches_per_worker.

The generator now splits work with exact shard planning, so every requested row is produced and no remainder is dropped.

Type of change

  • fix — bug fix
  • test — adding or updating tests

Linked issues

  • N/A

Checklist

  • Commit messages follow Conventional Commits
  • Tests added or updated (pytest tests/ -v --cov=gen_fraud_graph)
  • Coverage stays at or above 80%
  • Lint/format/type pass locally (ruff check . && black --check . && mypy src/)
  • Documentation updated (README, CHANGELOG, docstrings) if behaviour changed
  • I have signed the CLA (the bot will prompt me if not)
  • I agree to follow the project's Code of Conduct

Notes for reviewers

The change is intentionally small and localized:

  • workload splitting was moved to an exact divmod-based helper
  • the public CLI/API contract remains unchanged
  • tests cover both remainder and exact-division cases

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sergioballesteros-vd

Copy link
Copy Markdown
Author

Closed by request.

@sergioballesteros-vd sergioballesteros-vd deleted the fix/remainder-workload branch June 19, 2026 14:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
@sergioballesteros-vd sergioballesteros-vd restored the fix/remainder-workload branch June 19, 2026 14:19
@SantanderAI SantanderAI unlocked this conversation Jun 21, 2026
@opensource-SantanderAI

Copy link
Copy Markdown
Contributor

recheck

@opensource-SantanderAI

Copy link
Copy Markdown
Contributor

Hi @sergioballesteros-vd — thanks for the fix! Before we can review/merge, please sign the CLA by posting this comment:

I have read the CLA Document and I hereby sign the CLA

The CLA Assistant check will go green automatically once signed. 🙌

@sergioballesteros-vd

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jun 21, 2026
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.

2 participants