Skip to content

v1.7.2

Choose a tag to compare

@daniel-pittman daniel-pittman released this 30 May 23:43
157dec3

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) → IndexError in merge shape gates — both preview and commit paths split on the first : instead of the literal description: substring.
  • 0-byte / no-key pre-existing activities.yaml — line-anchored has_root_key scan. Empty / whitespace / comments-only files bootstrap safely. Files with real non-activities top-level content (e.g. a meta: block) are REFUSED with a clear error, preserving user bytes intact.

v1.7.1-round-6 MEDIUMs:

  • cmd_file_rehash ledger asymmetry: detection-only runs (path-drift / added-during / removed-during / vanished / missing / malformed) now write rows tagged detect-only=1 so --changed-since consumers can filter. save_files still gated on actual digest changes.
  • removed_during_hash computed inside the lock and reflected in the ledger detail — symmetric with added_during_hash.
  • atomic_replace durability: fh.flush() + fsync(fileno) before rename, fsync(dirfd) after. Post-rename dir-fsync failures are caught so append_ledger is never skipped after a successful write (closes the disk-has-write-but-no-ledger-row race).
  • _print_help_for adds a global-flags footer (--label / LIBRARIAN_SESSION_LABEL). cmd_create and cmd_merge docstrings 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=-foo rejects 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.