Skip to content

Anvil/fix adversarial review findings 1776030818#6

Merged
binhex merged 2 commits into
mainfrom
anvil/fix-adversarial-review-findings-1776030818
Apr 14, 2026
Merged

Anvil/fix adversarial review findings 1776030818#6
binhex merged 2 commits into
mainfrom
anvil/fix-adversarial-review-findings-1776030818

Conversation

@binhex
Copy link
Copy Markdown
Owner

@binhex binhex commented Apr 14, 2026

No description provided.

binhex and others added 2 commits April 14, 2026 13:10
…t token check

- R3: strip Windows drive tokens (C:) in safe_path_parts() to prevent path traversal
- R3: fix DB backfill predicate to skip rows where album IS NULL (legitimate nulls)
- R3: remove 'keep looser set' guard in download-phase artist-only fallback
- Remove first_track_name_of, first_track_matches, FIRST_TRACK_SIMILARITY_THRESHOLD
  from filter.py; remove _first_track_name from scanner.py; update scan_library
  return type from 4-tuple to 3-tuple; remove all first_track usage from cli.py
- Tighten artist token check: any() -> all() for multi-token artists in
  filter_responses_by_query to prevent 'James' matching paths containing only 'Brown'
- Remove 6 now-obsolete first_track test cases from test_filter_query.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nks, organizer, search &→and

- filter.py: replace _LEADING_ARTICLES set with _LEADING_ARTICLE_RE regex; compute
  _eff_artist_tokens by stripping leading article from raw artist string (pre-tokenization)
  so 'The Beatles' matches 'beatles/revolver' dirs; apply to has_artist and artist_ok checks
- filter.py: fix pick_best_directory to integrity-filter merged disc candidates before
  any size comparison (not only at tie-break)
- filter.py: add targeted hidden-track-99 outlier rule in _has_contiguous_track_numbers
  (single track >= 99 with contiguous remainder is silently dropped)
- scanner.py: add 'not c.is_symlink()' guard to second disc-subdir site in _guess_artist_album
- organizer.py: revert incorrect _sanitize change (restore 'return sanitized or _');
  instead use empty string for blank album in resolve_pattern so no '_' appears in path
- organizer.py: move dest.is_symlink() check to BEFORE dest.exists() to also catch
  dangling symlinks (which have exists()=False)
- search.py: canonicalize & / + to ' and ' and standalone 'et' to 'and' in _matches_path
  so 'Iron & Wine' matches 'iron and wine' directories and vice-versa

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@binhex binhex merged commit 0231723 into main Apr 14, 2026
binhex added a commit that referenced this pull request Apr 19, 2026
…gs-1776030818

Anvil/fix adversarial review findings 1776030818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant