You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up from the pre-pr-review pass on sprint #544's PR (AppType custom JsonSchema impl, load_image_overrides() env-var parsing). property-test-gap-finder identified three
serialization/parsing code paths with only example-based coverage that would benefit from proptest (already a workspace dependency):
AppType serde roundtrip + alias resolution (crates/servarr-crds/src/v1alpha1/spec.rs): deserialize(serialize(v)) == v for all variants, deserialize("Overseerr") == AppType::Seerr,
and as_str()/wire-format consistency -- currently only one variant (Sonarr) is roundtrip-tested.
JsonSchema generation drift (same file): completeness (schema ⊇ AppType::ALL ∪ LEGACY_APP_TYPE_ALIASES), idempotence, no duplicates, and that every schema enum value is a
valid serde input. A hand-written exactness test was added in sprint Sprint: Overseerr→Seerr 1.2→1.3 upgrade-path hardening #544's PR
(schema_enum_length_matches_all_variants_plus_legacy_aliases, every_legacy_app_type_alias_deserializes) but property-based generation would cover more of
the space (e.g. duplicate detection, idempotence across repeated calls).
load_image_overrides() env-var parsing (crates/servarr-operator/src/context.rs):
arbitrary subsets of DEFAULT_IMAGE_<APP>_* env vars (all present/all missing/mixed,
tag-without-repo, repo-without-tag, explicit seerr vars coexisting with the legacy overseerr fallback) -- currently covered by several targeted example tests but not
systematically across the combination space.
Why
These are exactly the "high value from PBT" pattern per nbl-dev:property-based-testing:
serialization, parsing, and schema generation with combinatorial input spaces. The AppType alias
and schema logic in particular gates CRD admission validation for the whole operator -- drift here
either silently rejects valid manifests or silently accepts values the operator can't parse.
Scope
crates/servarr-crds/tests/crd_tests.rs (or a new proptest_apptype.rs): roundtrip + schema
completeness/idempotence properties.
crates/servarr-operator/src/context.rs::tests: env-var combination properties for load_image_overrides().
Summary
Follow-up from the pre-pr-review pass on sprint #544's PR (
AppTypecustomJsonSchemaimpl,load_image_overrides()env-var parsing).property-test-gap-finderidentified threeserialization/parsing code paths with only example-based coverage that would benefit from
proptest(already a workspace dependency):AppTypeserde roundtrip + alias resolution (crates/servarr-crds/src/v1alpha1/spec.rs):deserialize(serialize(v)) == vfor all variants,deserialize("Overseerr") == AppType::Seerr,and
as_str()/wire-format consistency -- currently only one variant (Sonarr) is roundtrip-tested.JsonSchemageneration drift (same file): completeness (schema ⊇AppType::ALL∪LEGACY_APP_TYPE_ALIASES), idempotence, no duplicates, and that every schema enum value is avalid serde input. A hand-written exactness test was added in sprint Sprint: Overseerr→Seerr 1.2→1.3 upgrade-path hardening #544's PR
(
schema_enum_length_matches_all_variants_plus_legacy_aliases,every_legacy_app_type_alias_deserializes) but property-based generation would cover more ofthe space (e.g. duplicate detection, idempotence across repeated calls).
load_image_overrides()env-var parsing (crates/servarr-operator/src/context.rs):arbitrary subsets of
DEFAULT_IMAGE_<APP>_*env vars (all present/all missing/mixed,tag-without-repo, repo-without-tag, explicit
seerrvars coexisting with the legacyoverseerrfallback) -- currently covered by several targeted example tests but notsystematically across the combination space.
Why
These are exactly the "high value from PBT" pattern per
nbl-dev:property-based-testing:serialization, parsing, and schema generation with combinatorial input spaces. The
AppTypealiasand schema logic in particular gates CRD admission validation for the whole operator -- drift here
either silently rejects valid manifests or silently accepts values the operator can't parse.
Scope
crates/servarr-crds/tests/crd_tests.rs(or a newproptest_apptype.rs): roundtrip + schemacompleteness/idempotence properties.
crates/servarr-operator/src/context.rs::tests: env-var combination properties forload_image_overrides().