v0.4.2 - scope-mode bugfixes
Bugfix release over v0.4.1 — five critical scope-mode bugs surfaced by an internal review, plus robustness hardening.
Critical fixes
kpxc getexited 1 on success. Missingexit 0in dispatch.- fzf picker emitted bare entry titles instead of full paths. Children of nested groups lost their parent context. Switched
keepassxc-cli ls -Rto-Rf. - Scope spec parser word-split paths with spaces (
Email/My Personalwas split into two args). Rewritten as a stdin-based parser. :was treated as path/field separator inside scope-file lines, but KeePass entry titles can legitimately contain:. Breaking: in-line separator is now a literal TAB. See migration below.- Scope-mode positive tests silently masked failures. They used
"$(kpxc get …)"which only captures stdout; non-zero exit codes and stderr warnings vanished. Newcheck_cleanhelper asserts exit 0, empty stderr, and matching stdout.
Robustness
kpxc lockrefuses to remove the cache directory if it contains files other thanmaster/scoped(defends against collisions on a shared/dev/shm).- Refuse early if
$KPXC_CACHEis a symlink or non-directory. - Detect mixed picker selection (the "all entries" sentinel marked alongside real entries).
- Explicit conflict detection for incompatible flag combos (
--master+--interactive,--master+ scope args,--interactive+ scope args).
Other
-ishortcut for--interactive.- Migration warning:
_load_scope_filedetects likely legacy:-separator lines and prints a one-time hint to stderr. - README documents the TAB-separated scope-file syntax + adds an "Upgrading from v0.4.1" section.
Migration from v0.4.1
The scope file's in-line separator changed from : to TAB. Default-field entries (Email/personal with no field suffix) carry over unchanged. Entries with explicit fields need updating:
# v0.4.1
Email/personal:Username
# v0.4.2
Email/personal Username # literal TAB before "Username"
Easiest: kpxc unlock --interactive regenerates the scope file in the new format. Or hand-edit ~/.config/kpxc/scope.
kpxc will print a one-time warning if it detects likely legacy lines.
Test suite
62 integration tests, all green. Test fixtures cover entries with spaces, entries with : in the title, multi-field TAB-separated scope lines, comment stripping, the legacy-format migration warning (positive + false-positive checks), and the lock-with-stray-files refusal.