Skip to content

settings: Duration settings must be listed by hand in two helpers; no test catches a missing one #45

Closed

Description

@scuttletoby

Minor 1 from the data-integrity (settings) lens on #42: #42 (comment)

The settings patch-merge helper and the drop-defaults-before-save helper treat a Duration value as a plain object, so
each Duration server setting must be listed by hand in both places (upstream does this for its own interval settings;
#42 adds headlessUsageRefreshInterval the same way). The next Duration setting, from the fork or from upstream, breaks
the same way (value corrupted in memory and in settings.json) if someone forgets a list, and nothing warns.

Fix (fork-only, no upstream file changed): one test that walks the server settings schema, finds every Duration field,
and checks a non-default value survives patch-merge and save/load.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions