v1.7.2
Final v1.7.x cleanup
Closes every v1.7.1-deferred item and every round-1 review finding from PR #22. End of the v1.7.x development arc — no further point releases planned.
Items closed
v1.7.1-deferred HIGHs:
--label=--dry-run(equals-form) bypass — flag-shape guard now applied to both equals- and space-forms.description :(space before colon) →IndexErrorin merge shape gates — both preview and commit paths split on the first:instead of the literaldescription:substring.- 0-byte / no-key pre-existing
activities.yaml— line-anchoredhas_root_keyscan. Empty / whitespace / comments-only files bootstrap safely. Files with real non-activities top-level content (e.g. ameta:block) are REFUSED with a clear error, preserving user bytes intact.
v1.7.1-round-6 MEDIUMs:
cmd_file_rehashledger asymmetry: detection-only runs (path-drift / added-during / removed-during / vanished / missing / malformed) now write rows taggeddetect-only=1so--changed-sinceconsumers can filter.save_filesstill gated on actual digest changes.removed_during_hashcomputed inside the lock and reflected in the ledger detail — symmetric withadded_during_hash.atomic_replacedurability:fh.flush()+fsync(fileno)before rename,fsync(dirfd)after. Post-rename dir-fsync failures are caught soappend_ledgeris never skipped after a successful write (closes the disk-has-write-but-no-ledger-row race)._print_help_foradds a global-flags footer (--label/LIBRARIAN_SESSION_LABEL).cmd_createandcmd_mergedocstrings extended to list every flag.
Test plan
- Full pytest suite green on 3.10 / 3.11 / 3.12
- 5 new tests pin the v1.7.2 fixes
- Both claude-review and security-review pass on PR #22
Upgrade notes
No breaking changes. Existing entries, schemas, and ledger files are forward-compatible.
If you've hand-edited activities.yaml to contain a meta: block (or other top-level content) WITHOUT an activities: mapping key, librarian create will now refuse rather than silently produce malformed YAML. Add activities: as the top-level key (your other content is preserved) and creates will resume normally.
Known LOWs (will not be patched in v1.7.x)
- Equals-form
--label=-foorejects values that start with-with a misleading "looks like another flag" message. Affects no in-tree caller; users adopting a leading-hyphen label convention should use the space-form--label -foo.