alunduil/zfs-replicate
View on GitHubHypothesis SNAPSHOTS strategy generates distinct filesystem names
Open
#405 opened on Apr 23, 2026
buggood first issue
Repository metrics
- Stars
- (24 stars)
- PR merge metrics
- (PR metrics pending)
Description
User story
As a maintainer, I want the Hypothesis SNAPSHOTS strategy to generate distinct filesystem names so that the property tests that depend on it actually exercise the planner's handling of multiple filesystems.
Why
zfs_test/replicate_test/snapshot_test/strategies.py:21 reads:
_FILESYSTEMS = text(_NOT_WHITESPACE).map(lambda x: "a{x}").map(filesystem)
That's a plain string literal, not an f-string — every generated filesystem name is the literal a{x}. All tests that depend on SNAPSHOTS (generator, planner, list parser) therefore exercise a single-filesystem world and miss cross-filesystem cases. This is a silent test-quality bug.
Acceptance criteria
- The strategy generates genuinely varied names (e.g.
f"a{x}"with thetext()body excluded from producing an empty string, or a more deliberate strategy composed fromlists(sampled_from(...))etc). - A sanity test asserts that across a Hypothesis run, at least two distinct filesystem names appear.
- Existing property tests still pass after the fix. If any start failing, the underlying logic bug they uncover is filed as a separate issue and triaged before this issue closes.
Out of scope
- Broader Hypothesis strategy redesign.
Notes
- Target release: none — chore (test-only, no behavior change)
- Good first issue — small, self-contained, testable.
- Source: modernization assessment §1.