An imported binned page whose days are up gets seven days from the import (#1055) #1059
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1055-overdue-binned-page-week"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1055. The owner's answer to Q142 (D270).
Summary
#1016 puts an imported binned wiki page straight into the bin with the day it was binned. A page whose bin time was already up would go at the next nightly clean-up, perhaps minutes after the import. Now a page that is already overdue at the moment of the import gets seven days from the import. A page with any time left, even one day, keeps its original day.
How it is stored. No migration and no new column: the page gets an adjusted
deleted_at, such thatdeleted_at + graceis the import time plus seven days.deleted_atas a date, and both add the grace through the sametrash_purge_at. The date the bin shows is therefore the date the purge uses.deleted_atfor null. The import records no "deleted" event, so no history shows the original day.docs/API.mdsays so: the list'sdeleted_atfor an extended page is not the day it was really binned.Re-export. The stored stamp travels as it stands. Imported again at once, the page has about seven days left, so it is left alone. The extension does not compound, and no stamp is ever in the future.
Boundary. "Already up" is
deleted_at + grace <= import time, the same boundary the purge uses.Changelog
changelog.d/1055-overdue-binned-page-week.changed.mdTest plan
tests/exportandtests/test_lore_soft_delete.py: 253 passed.test_export_bin.pyafter the format commit: 28 passed.🤖 Generated with Claude Code