Repository navigation
K2GO-427 feat(cx-core): delete + storage endpoints - #680
Merged
Merged
Conversation
K2GO-427 feat(cx-core): add delete and storage endpoints
DELETE /v1/content/{app}/{localRef} reclaims one item by delegating to each
app own delete (Kiwix rm + reindex, Kolibri deletechannel CLI, Calibre-Web
/delete); freedBytes is what the app actually reclaimed. GET /v1/storage reports
the content volume disk plus per-app content totals. Both unblock the K2Go
content manager; dash-node relay is generic and needs no change.
@
K2GO-427 fix(cx-core): refine delete freedBytes and storage estimate note Calibre freedBytes uses the book known size (self-contained, no shared files) instead of a free-space delta. Kolibri keeps the delta but labels freedBytes approximate (whole-volume read) and flags on-device verification that deletechannel is synchronous. /v1/storage notes usedByContentBytes is an estimate (shared files counted per channel); disk total/free stay authoritative. @
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two cx-core endpoints the content manager needs. No dash-node change: its /v1/* relay is
generic, so new core endpoints are exposed with no bump.
delete (never drives the DB/files directly): Kolibri
manage deletechannel(synchronousCLI; freedBytes is a free-space delta, since channels share content-addressed files),
Kiwix removes the .zim then re-runs iiab-make-kiwix-lib (freedBytes = the file size),
Calibre-Web POST /delete/{id} (calibredb absent; freedBytes = the item's known size).
404 when the item is absent (idempotent-safe); the front confirms the destructive action.
content-volume disk summary plus per-app content totals (usedByContentBytes is an estimate;
totalBytes/freeBytes are authoritative).
Verification: 124 unit tests pass (was 102).