Remove duplicated logic in the export and restore code
Problem/motivation
The review before 1.0.0-beta2 also found code that works but is written twice or kept by hand. None of it changes what users see, so it waits for after the release.
- The list of datasets lives in five places, and the restore outcomes in three.
CsvWriterquotes by hand whatfputcsv()does, and repeats the formula characters ofCsvEncoder.AssessmentFormat::validate()repeats the property constraints.ImportReportconverts to arrays only for the batch.- The importer keeps run state on the shared service.
recordRestore()copies the mapping ofrecordSave().- The image effect still places the icon by the file, not by the visible mark.
- The uploaded file uses its own 24 hour limit instead of
temporary_maximum_age. - The main module calls the audit submodule through strings and
method_exists().
Proposed resolution
Refactor each item with tests, one MR per area.
AI Compliance
🤖 Generated with the help of an LLM, reviewed and approved by me before posting.