Repository navigation
feat(locallibrary): unpublish deleted sets and their recordings, and MusicBrainz IDs without the drive - #311
Merged
Merged
Conversation
…without the drive Planned as these commits, folded into one because they share files: - fix(locallibrary): read MusicBrainz IDs from the store when the drive is unplugged - feat(locallibrary): delete a published set's record and recording with sets delete - fix(locallibrary-cli): say "1 setting" when one setting is imported
bnb
previously approved these changes
Oct 30, 2026
Coverage Report for apps/web
File CoverageNo changed files found.SizeCompared with main. KiB are 1,024 bytes.
|
# Conflicts: # apps/locallibrary/TODO.md
botandbang
enabled auto-merge
October 30, 2026 20:10
Rust coverageFrom run 617. Both are held to the thresholds in .cargo/config.toml.
|
# Conflicts: # apps/locallibrary/CHANGELOG.md
bnb
approved these changes
Oct 30, 2026
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.
What and why
sets deletenow deletes a published set's record, and its recording's record (computer.localnetwork.dj.recordingunder the same key, fromsets upload), from the Atmosphere account before it removes the set, the set's record first. The publishing permission set grantsdeleteoncomputer.localnetwork.dj.setandcomputer.localnetwork.dj.recording(settings and profile stay create and update),PUBLISH_SCOPESmatches, and a newrepo::delete_recordsends a DPoP-boundcom.atproto.repo.deleteRecordthrough the same session, account and scope checks as writes. The set stays when the session may not delete or the server refuses. Signed out, it deletes the set locally and sends nothing. The confirmation line names the records it removes. The mock PDS answersdeleteRecord, and a new end-to-end CLI test walks sign-in (a written session), status check, the three publishes, import from the account, unpublish and sign-out against it.A set made or edited with its drive unplugged now gets MusicBrainz IDs from the tags of the store's copy of each file, found through the libraries' latest snapshots.
MusicBrainzIds::readreads a file whose name gives no type by its content.Also:
settings importsays "1 setting" instead of "1 settings".The swap to jacquard-lexicon's
SchemaValidator(LOC-85, #187) is not in this PR: 0.12.2 doesn't check string formats, enums, nullable fields, blob limits or constraints inside unions, so it can't replace the current validator without keeping nearly all of it.Fixes LOC-86
Fixes #188
Refs LOC-82 (the local part: unpublishing and the end-to-end CLI walk; the real-PDS sign-in and publish checks stay open)
Refs #184
How it was tested
On origin/main cc1e7a9 (after #272 and #273):
cargo fmt --check, andcargo clippy -p locallibrary -p locallibrary-cli --all-targets -- -D warnings.cargo nextest run -p locallibrary -p locallibrary-clifiltered on atmosphere, publish, sets, lexicon, musicbrainz, account, bug, mock PDS, recording and upload tests: 417 pass. The new tests passed 3 runs with--retries 0, anddeleting_a_published_set_deletes_its_record_and_recordingfails with the recording left out ofset_unpublish.oxfmt --checkon the changed lexicon.Before the move onto cc1e7a9:
cargo clippy -p locallibrary-cli --no-default-features -- -D warningsfor theaccount-gated parts, the help, rpc, docs, schema, settings and store tests (498 pass), and each new test failed once with its fix broken.Not run: the full suite and Windows clippy.
Checklist
apps/locallibrary/CHANGELOG.mdhas a line under Unreleased, if people using it will noticedocs/and--helpstill say what the code does (apps/locallibrary/docs/rpc/too, for a sidecar change)