Escape ambiguous paths in import logs by Lingikaushikreddy · Pull Request #7082 · beetbox/beets · GitHub
Skip to content

Escape ambiguous paths in import logs - #7082

Open
Lingikaushikreddy wants to merge 3 commits into
beetbox:masterfrom
Lingikaushikreddy:lingikaushikreddy/fix-import-log-paths
Open

Lingikaushikreddy wants to merge 3 commits into
beetbox:masterfrom
Lingikaushikreddy:lingikaushikreddy/fix-import-log-paths

Conversation

@Lingikaushikreddy

Copy link
Copy Markdown

Description

Fixes #4941 for newly written import logs. The current log format uses semicolon-space both as a path separator and as valid filename text, so retrying an affected album can abort with “Can't mix absolute and relative paths.”

Emit an escaped JSON path list with a distinct <verb>-json marker when a path contains the separator or a line break. Parse and validate these records alongside legacy entries, retaining the existing common-directory behavior for multidisc albums and ignoring informational statuses. Ordinary log output stays compatible. Existing ambiguous legacy entries cannot be reconstructed reliably and still need manual correction; older beets versions cannot read the new escaped records. The CLI documentation explains these limits.

Validation

  • New emitter/parser regressions failed before the production change.
  • Import command and importer tests: 221 passed, 5 skipped, 8 subtests passed.
  • Full suite: 2,787 passed, 162 skipped, 8 subtests passed.
  • Repository lint and formatting, all 116 tracked RST formatter checks, tracked documentation lint, and a strict HTML documentation build passed.
  • Independent review found no actionable defects and checked POSIX/Windows paths, CR/CRLF, Unicode, backslashes, invalid-byte round trips, and malformed records.
  • Changed-source mypy passed. Full mypy reports two errors also reproduced on the unchanged upstream commit (beets/util/functemplate.py:102 and docs/extensions/conf.py:87).

To Do

  • Documentation.
  • Changelog.
  • Tests.

AI assistance disclosure

OpenAI Codex investigated the issue and generated the implementation, regression tests, documentation, changelog, and this description. It ran automated validation and independent AI code review. Human line-by-line review remains pending. Submitted at the account owner's explicit direction.

@Lingikaushikreddy
Lingikaushikreddy requested a review from a team as a code owner October 6, 2026 04:15
@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

--from-logfile parsing breaks when semicolons appear in paths

1 participant