Skip to content

v1.7.0

Choose a tag to compare

@daniel-pittman daniel-pittman released this 30 May 16:35
7daa8ea

Highlights

Four feature releases bundled (v1.4 → v1.7) plus extensive review hardening.

New commands

  • set-block (v1.4) — Add a schema block to an existing entry. Validates the block atomically against the active schema before write; coerces stringy primitives (int / bool / date) to native types.
  • delete --repoint-to <target> (v1.5) — Rewrite every inbound reference to the deleted entry id (backticked and plain-text, across descriptions and block string values) to point at <target> before removing the source. A shared repoint helper backs this and the merge rewriter.
  • merge (v1.6) — Atomic consolidation of N source entries into one target. Carries optional schema blocks (with --on-block-conflict keep-target | keep-source | abort), unions tags and docs, rewrites cross-references, deletes sources, writes one ledger entry.

v1.7 — deferred cleanup

  • Cross-process write lock with thread-local reentrancy and an os.register_at_fork hook so a forked child re-acquires its own flock.
  • Merge target-skip: backticked source-id mentions inside the target's prose are rewritten by step 1b; plain-text mentions are deliberately preserved for the author to edit.
  • merge --append-sources: folds source descriptions into the target's body with plain-text ## From <sid> headers. Backticked cross-source references are rewritten to target_id so step 6's source-delete doesn't strand dangling backticks.
  • Dangling-ref scanner softening: historical phrases (Originally tracked under, Previously known as, Consolidated from, etc.) suppress what would otherwise be flagged as broken cross-references. Sentence-scoped via lookbehind on alphabetic characters plus uppercase lookahead, so decimals (4.2), version numbers (v1.0), and short abbreviations (Dr., e.g.) don't false-trigger.

Cosmetic + UX polish

  • bool coerce strips whitespace before lowercasing
  • _render_scalar bool raises on unrecognized strings (no silent flip to false)
  • Bare librarian delete (no args) exits 1 with a usage hint (vs argparse exit 2)

Test plan

  • pytest green on 3.10 / 3.11 / 3.12
  • Lint + format clean
  • MCP server smoke test against real corpus (364 entries)
  • Eight rounds of automated review on the v1.7 cleanup PR

Upgrade notes

No breaking changes. Existing entries, schemas, and ledger files are forward-compatible.

Known follow-ups (v1.7.1 candidates)

Review-batch deferrals: lock-scope expansion to argparse / dry-run paths, dry-run preview ↔ ledger drift in merge, opt-out advice joiner, folded-scalar (>) handling in --append-sources, further regex tightening for consolidat\w* / merged, cmd_file_rehash --all lock scope, scanner edge cases (CRLF strip set, window-edge backtick straddle).