sillsdev / sillsdev/harmony

Test coverage: DataModel.AddManyChanges bulk write and chunking

Open Beginner friendly
#98 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C#
Stars
14
Forks
4
Avg merge
3d 21h
Merged PRs (30d)
3

Description

Follow-up from the test-suite review (batches merged as #92–#96).

Gap

DataModel.AddManyChanges is a public bulk-write entry point with its own chunking (changesPerCommitMax, one commit per chunk) and empty-input early return (if (commits is []) return). No test calls it — the chunk-splitting math and per-chunk commit flow are entirely unverified.

https://github.com/sillsdev/harmony/blob/03f609f11a560433ce4a7ecd598a21921b324add/src/SIL.Harmony/DataModel.cs#L61-L80

Suggested tests

  • AddManyChanges_SplitsChangesIntoCommitsOfMaxSize
  • AddManyChanges_WithNoChangesDoesNothing

Why it matters

It is a distinct write path with its own transaction/lock/validate flow; a bug in the chunking could silently mis-group changes into the wrong commits.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/SIL.Harmony/DataModel.cs around DataModel.AddManyChanges and review its changesPerCommitMax chunking and empty-input return. Add tests for the two suggested cases, verifying maximum-sized chunks, per-chunk commits, and no work for empty input; run the relevant test suite to confirm the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
testing-qa
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.