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
{{ message }}
Repository navigation
Overwrite policy: an empty value cannot clear a property, and kept pages are reported as stored #190
Two defects in the selective overwrite feature (OSW.OverwriteClassParam, OSW._apply_overwrite_policy). Both were found during the assessment in #163 and listed there under "Found but not fixed - needs a design decision". Both are still present on main (v2.5.1, 9351f6b).
1. A property cannot be cleared by assigning an empty value
remove_empty=True is the default. It strips "", [] and {} from the local content before the merge:
The stored value therefore always survives. A caller who assigns "" to clear a property gets no change and no warning. The only workaround is remove_empty=False for the whole call, which also writes every unrelated empty default.
Expected: an empty value that the caller assigned on purpose clears the stored value, subject to the overwrite setting as usual. An empty value that is merely a field default is still stripped.
2. Pages kept by keep existing are indistinguishable from pages that were written
StoreEntityResult declares change_id, pages and failed:
The caller cannot tell which entities were written and which were kept. The docstring of pages reads "The pages that have been successfully stored", which does not hold for a kept page.
Expected: kept pages are identifiable, for example through an additional skipped list. Listing them in pages as well is acceptable, because callers that only need the final set of pages on the wiki depend on it.
Status
A fix for both is in #168, which is open and currently conflicting with main.
Activity