wrolpi/modules/repos
lrnselfreliance 98ceb67321
A malformed entry stops a backup preview or merge with an error naming it (#896)
* A malformed entry stops a backup preview or merge with an error naming it

Backup previews and merges read every config entry as well-formed: a malformed one (an entry that is not a
mapping, a missing or non-text identity, a short tag_files line) raised an AttributeError or TypeError, so the
preview was a 500 and a merge failed with a generic message.  `ConfigFile.backup_entries` now checks each entry
a preview or merge reads, in the backup and in the current config, and raises InvalidConfig naming the file and
the entry; the merge endpoint passes that message on.  A malformed entry may be corrupt, so it is not skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* A falsy "tags" that is not a mapping is an error in a backup preview or merge

`tags: []`, `''`, `0` or `false` became no tags through `or dict()` before the mapping check.  Only a missing
or null `tags` means no tags now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 20:59:49 -06:00
..
test A malformed config entry is skipped and counted instead of failing the import (#875) 2026-10-25 16:28:34 -06:00
__init__.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00
api.py Repo changes wait for a concurrent writer (#853) 2026-10-21 16:50:09 -06:00
conftest.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00
downloader.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00
errors.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00
lib.py A malformed entry stops a backup preview or merge with an error naming it (#896) 2026-10-27 20:59:49 -06:00
models.py Model reprs read only loaded state (#819) 2026-10-11 16:47:32 -06:00
schema.py Add a Repos module that mirrors git repositories (#783) 2026-10-07 15:16:58 -06:00