locallibrary: drive tidy exits 0 on failures, and other edge cases from the coverage pass
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the coverage-pass notes in apps/locallibrary/TODO.md and inspect the referenced paths in apps/locallibrary/src/drive_cmd.rs, apps/locallibrary/src/jobs_cmd.rs, crates/locallibrary/src/edit.rs, crates/locallibrary/src/merge.rs, and crates/locallibrary/src/format/mod.rs. Confirm the intended behavior for each of the five cases before changing code; the issue explicitly says those decisions are still open. Done means the agreed behaviors are covered for each case, including avoiding disk-tool calls under LOCALLIBRARY_VOLUMES.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
Found while raising coverage (https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/TODO.md#L176-L181):
drive tidyexits 0 when it could not remove some files: it prints a warning per failure but returnsOutcome::Applied(https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/src/drive_cmd.rs#L1076-L1082), whereasrecordingsreportsPartialwhen something failed (https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/src/drive_cmd.rs#L1128).setup --roleis ignored for the drive that becomes the primary, even a bad value: the primary is pinned to "primary" (https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/src/jobs_cmd.rs#L764), and the roles are only parsed in the loop over the other drives.- A lenient replay that skips
DeleteHistoryListsmay only say "not found" and drop which list: when every wanted list is missing,pickedis empty andError::NotFound("the history lists to delete")is returned without a name (https://github.com/cutenode/localnetwork/blob/24d3176/crates/locallibrary/src/edit.rs#L1950-L1978); the single-list note on line 1965 does name it. - Merging the same drive twice in folder mode makes "(2)" copies of every playlist (https://github.com/cutenode/localnetwork/blob/24d3176/crates/locallibrary/src/merge.rs#L329-L330,
unique_top_level_nameat https://github.com/cutenode/localnetwork/blob/24d3176/crates/locallibrary/src/merge.rs#L639). - Under
LOCALLIBRARY_VOLUMES,format::disk_at(https://github.com/cutenode/localnetwork/blob/24d3176/crates/locallibrary/src/format/mod.rs#L318) still runs read-onlydiskutil info/lsblkon the disk holding the test folder.
Steps to reproduce
- Items 1 and 2: make a file in the trash read-only so
tidy --empty-trashcannot remove it, then checkecho $?; runsetup --role Nope=backupwith the primary named. - Items 3 and 4: replay an edit journal that deletes a history list the drive does not have, and merge one drive into a folder-mode target twice.
What did you expect?
A tidy with failures exits with the partial code; a bad --role on the primary is refused (or the role honoured); the replay note names the list; the second merge adds nothing; and the test setup does not shell out to disk tools. Each was marked "a decision" in the TODO, so confirm the intended behavior for each first.
- Lingua principale
- Rust
- Stelle
- 0
- Fork
- 0
- Merge medio
- 9h 14m
- PR unite (30g)
- 99
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cutenode/localnetwork
-
enhancement locallibrary locallibrary: mixes
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cutenode/localnetwork#182 ·
I maintainer di solito rispondono entro 1 giorno
-
bug locallibrary: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
cutenode/localnetwork#169 ·
I maintainer di solito rispondono entro 1 giorno
-
bug locallibrary: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
cutenode/localnetwork#158 ·
I maintainer di solito rispondono entro 1 giorno
-
bug locallibrary locallibrary: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
cutenode/localnetwork#137 ·
I maintainer di solito rispondono entro 1 giorno
-
locallibrary: a plugin's export plan adds up the file sizes it reports without an overflow checkApertabug locallibrary locallibrary: plugins
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
cutenode/localnetwork#133 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cutenode/localnetwork
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
DayuanJiang/PecoFence#139 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nearai/compose-manager#73 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
akitaonrails/ai-memory#1664 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno