Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

locallibrary: drive tidy exits 0 on failures, and other edge cases from the coverage pass

Aperta
#166 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli, testing

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

bug locallibrary: core
What happened?

Found while raising coverage (https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/TODO.md#L176-L181):

  1. drive tidy exits 0 when it could not remove some files: it prints a warning per failure but returns Outcome::Applied (https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/src/drive_cmd.rs#L1076-L1082), whereas recordings reports Partial when something failed (https://github.com/cutenode/localnetwork/blob/24d3176/apps/locallibrary/src/drive_cmd.rs#L1128).
  2. setup --role is 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.
  3. A lenient replay that skips DeleteHistoryLists may only say "not found" and drop which list: when every wanted list is missing, picked is empty and Error::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.
  4. 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_name at https://github.com/cutenode/localnetwork/blob/24d3176/crates/locallibrary/src/merge.rs#L639).
  5. Under LOCALLIBRARY_VOLUMES, format::disk_at (https://github.com/cutenode/localnetwork/blob/24d3176/crates/locallibrary/src/format/mod.rs#L318) still runs read-only diskutil info / lsblk on the disk holding the test folder.
Steps to reproduce
  1. Items 1 and 2: make a file in the trash read-only so tidy --empty-trash cannot remove it, then check echo $?; run setup --role Nope=backup with the primary named.
  2. 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cutenode/localnetwork

Tutte le issue di cutenode/localnetwork

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.