mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #227] [MERGED] feat: persist post records as versioned JSON #225
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/227
Author: @Glitchy-Sheep
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/11/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:feat/store-post-records-as-json📝 Commits (4)
59d80defeat: define the JSON format for post content5762763feat: encode and validate versioned post records6b023b5feat: save post records atomicallyaf5721etest: intercept atomic replacement on Python 3.10📊 Changes
8 files changed (+1942 additions, -0 deletions)
View changed files
➕
boosty_downloader/infrastructure/library/__init__.py(+1 -0)➕
boosty_downloader/infrastructure/library/_post_json.py(+296 -0)➕
boosty_downloader/infrastructure/library/_post_json_blocks.py(+215 -0)➕
boosty_downloader/infrastructure/library/errors.py(+9 -0)➕
boosty_downloader/infrastructure/library/json_store.py(+62 -0)➕
test/unit/library/json_store_test.py(+420 -0)➕
test/unit/library/post_json_blocks_test.py(+285 -0)➕
test/unit/library/post_json_test.py(+654 -0)📄 Description
📝 Summary
Add versioned
post.jsonpersistence for a complete saved post in a known folder. This lets future download runs retain the full body and media history across restarts, including when the first run downloaded only text. The current CLI download flow is unchanged.🔧 What changes
post.json. Failed or interrupted writes before replacement preserve the previous record.🧪 Tests
task ci: 1037 tests passed; the full suite also passed on Python 3.10; Ruff, formatting, Pyright, import boundaries and wheel/sdist builds passed.os._exitbefore replacement.⏭️ Next
Add folder naming and lookup by full post ID, then author records and viewing marks. Connect the completed store to downloads and dry-run planning in the download-flow integration step.
✅ Checklist
--helpand README if needed (no CLI changes)docs/if the download flow or dev process changed (neither changes)## Unreleasedin CHANGELOG.md (not user-facing; usesci/skip-changelog)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.