sillsdev / sillsdev/languageforge-lexbox
Rethink the dated sena-3 snapshot test pattern
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 9
- Forks
- 8
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 49
Description
The dated sena-3 snapshot files (FwLiteProjectSync.Tests/Snapshots/sena-3_snapshot.<date>.verified.txt) make the newest file do two jobs that fight each other:
AssertSena3Snapshotstreats every dated file as a frozen historical fixture (prove old formats still deserialize) — so it should never change.LatestSena3SnapshotRoundTripsround-trips the newest one and verifies against that same filename — so it wants to track the current format.
When the serialization format changes, you either edit the newest dated file in place (breaks job 1, and the date becomes a lie) or remember to hand-add a brand-new dated file (job 2). Nothing fails if you pick wrong, so the historical guard can silently rot. (This already happened once with the IsMain change.)
Likely fix: split the two jobs. Have an un-dated sena-3_snapshot.latest.verified.txt as the round-trip target (legitimately mutable, always "current"), and keep the dated files as deserialize-only inputs that are never edited. The sibling SnapshotDeserializationRegressionData.latest/.legacy tests in the same project already do this — worth borrowing the shape.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in FwLiteProjectSync.Tests/Snapshots and locate AssertSena3Snapshots, LatestSena3SnapshotRoundTrips, and the dated sena-3 snapshot files. Read the sibling SnapshotDeserializationRegressionData.latest/.legacy tests for the existing pattern; done means the latest round-trip uses an undated mutable fixture while dated files remain deserialize-only historical inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100