Skip to content

Releases: ledgerwerk/ledgercore

v0.6.1

Choose a tag to compare

@holgern holgern released this 28 Jul 13:57

Full Changelog: v0.6.0...v0.6.1

[0.6.1] - 2026-07-28

Added

  • Added recovery assessment and migration inspection CLI commands
  • Added MigrationCommandResponse dataclass for framework-neutral CLI output
  • Added StorageFingerprint serialization methods (to_mapping, from_mapping)
  • Added CLI error types for migration operations
  • Added test suite for migration recovery scenarios

Changed

  • Improved migration phase transitions to allow recovery from failed state
  • Improved item state transitions for direct pending-to-complete and stage-verified-to-activation paths
  • Changed CLI migrate module to add recovery assessment and inspection commands

Fixed

  • Fixed pytest failures in migration module
  • Fixed Windows test failures in migration CLI tests

v0.6.0

Choose a tag to compare

@holgern holgern released this 27 Jul 21:46

Full Changelog: v0.5.1...v0.6.0

[0.6.0] - 2026-07-27

Added

  • Added DestinationPrecondition dataclass for typed before-state fingerprints
  • Added MigrationPhase and MigrationItemState enums for schema-3 state machine
  • Added Schema3MigrationJournal, Schema3ItemJournalState, Schema3ConfigSwitchState dataclasses
  • Added write_schema3_journal and _parse_schema3_journal for schema-3 TOML persistence
  • Added StorageMigrationHooks for lifecycle callbacks (quiescence, staged/activated validation, finalize)
  • Added MigrationLock for advisory project migration locking
  • Added _check_same_filesystem and _validate_same_filesystem for cross-filesystem detection
  • Added _durable_rename for fsync-backed atomic renames
  • Added render_ledger_manifest and render_ledger_local_config for pure TOML rendering
  • Added strict plan-structure validation (_validate_plan_structure) for migration_id, policies, strategies, kinds
  • Added stage/backup collision detection in _check_path_overlaps
  • Added source fingerprint population during planning

Changed

  • Changed file fingerprints (sha256-file-v1) to be path-independent (content hash only, no filename)
  • Changed fingerprint failures to fail closed: state='invalid' instead of 'owned' with missing fingerprint
  • Changed config inspection to check parent binding even when file is absent
  • Changed noop-if-exact to compare against expected_target_fingerprint (not before-state)
  • Changed replace-owned to use expected_before.fingerprint for before-state validation
  • Changed executor to call validate_storage_migration_plan before first journal write

Fixed

  • Fixed fail-open validation where fingerprint errors allowed owned+replaceable state
  • Fixed missing config file bypassing foreign parent detection
  • Fixed unknown destination policies/strategies falling through to default action

v0.5.1

Choose a tag to compare

@holgern holgern released this 27 Jul 16:17

Full Changelog: v0.5.0...v0.5.1

Changed

  • Classified incomplete migration recovery as manual intervention (STORAGE_MIGRATION_MANUAL_INTERVENTION_REQUIRED)
  • Disabled explicit mode=move execution (raises STORAGE_MIGRATION_MOVE_DISABLED)
  • Fixed codecov test configuration
  • Documented Ledgercore 0.5.1 migration containment strategy
  • Migrated releaseledger storage to project-local ledger directory
  • Added project badges
  • Fixed documentation typo
  • Fixed pytest configuration
  • Added tests to reproduce migration journal validation defects

Fixed

  • Fixed completed recovery to return truthful source_removed (False for schema-2 copy, None for schema-1)
  • Fixed schema-1 journal inspection to use None for unknown bindings instead of fabricating storage=project
  • Fixed migration progress metadata in schema-2 journals (items_completed, mode, verify, project_root)
  • Fixed exact migration journal binding identity round-trip (source and destination bindings persisted in schema-2 journals)

v0.5.0

Choose a tag to compare

@holgern holgern released this 17 Jul 11:39

Full Changelog: v0.4.0...v0.5.0

[0.5.0] - 2026-07-17

Added

  • BREAKING: Added a schema-3 storage model with derived paths, binding markers, TOML ownership, and migration

Changed

  • Documented per-ledger sibling storage paths and shared project UUID under one root

v0.4.0

Choose a tag to compare

@holgern holgern released this 15 Jul 20:31

Full Changelog: v0.3.0...v0.4.0

v0.4.0

Added

  • Added the fixed sibling-ledger workspace provider for direct project-scoped external storage
  • Added .ledger-store validation and fatal no-fallback errors for selected sibling storage

Changed

  • Changed root overrides to remain namespaced and removed unused provisional provider-definition abstractions
  • Documented external Git-backed workspace operation, provider activation, and downstream ID ownership

v0.3.0

Choose a tag to compare

@holgern holgern released this 15 Jul 05:32

Full Changelog: v0.2.1...v0.3.0

[0.3.0] - 2026-07-14

Added

  • Canonical .ledger/ledger.toml discovery through LedgerProjectLocator, with
    legacy .ledger.toml, ledger.toml, and caller-provided legacy tool config
    discovery retained as a compatibility surface.
  • Schema-version-2 project manifest parsing through parse_ledger_project_manifest,
    with strict top-level and nested field validation, a required normalized project
    UUID, multiple named mounts, repository / workspace / cache storage classes, and
    project / checkout scope handling.
  • Optional machine-local layout config parsing through parse_ledger_local_config,
    including workspace_root, cache_root, workspace_provider, cache_provider,
    and checkout_id fields.
  • Read-only layout resolution through resolve_ledger_layout, with named
    repository, workspace, and cache mounts, fixed projects/<uuid>/project and
    projects/<uuid>/checkouts/<checkout-id> structural roots, explicit,
    environment, local-root, and platform-root precedence, and a deterministic
    checkout-ID derivation exposed as derive_checkout_id.
  • platformdirs-backed family roots for the default workspace and cache providers.
  • Immutable ResolvedLedgerLayout and ResolvedMount objects.
  • LedgerLayoutError for invalid or unresolvable Ledger-family layouts.
  • ledgercore/_version.pyi stub so strict mypy passes in a pristine source tree.

Compatibility

  • Legacy .ledger.toml, ledger.toml, and caller-provided legacy tool config
    discovery remain available as compatibility surfaces; legacy locators report
    is_legacy=True and are accepted by discovery but rejected by
    resolve_ledger_layout.
  • Legacy locators are discovery and migration inputs only. They cannot be passed
    to canonical layout resolution.
  • derive_checkout_id remains importable from the package root for 0.2.x callers
    while also being available under ledgercore.layout.
  • No automatic migration is performed. Migration to the canonical layout is
    downstream-owned and explicit.

Explicit exclusions

  • No private sibling provider support (workspace_provider or cache_provider
    set to a non-default value is accepted by the parser for migration diagnostics
    but rejected by the resolver).
  • No external workspace config support (config.location == "workspace" is
    rejected until the private-provider phase).
  • No TOML parser, no CLI, and no manifest writer.
  • No downstream migration implementation; this release is a core API only.

Added

  • Added shared ledger configuration helpers for locating ledger.toml files and selecting project or tool tables

Changed

  • Changed core storage and validation behavior for atomic writes, front matter, IDs, and source-tree versions
  • Documented Sphinx builds with MyST Markdown and myst-parser dependencies

v0.2.1

Choose a tag to compare

@holgern holgern released this 17 Jun 21:19

Full Changelog: v0.2.0...v0.2.1

[0.2.1] - 2026-06-17

Added

  • Added shared ledger configuration helpers for locating ledger.toml files and selecting project or tool tables

Changed

  • Changed core storage and validation behavior for atomic writes, front matter, IDs, and source-tree versions
  • Documented Sphinx builds with MyST Markdown and myst-parser dependencies

v0.2.0

Choose a tag to compare

@holgern holgern released this 13 Jun 11:14

What's Changed

  • Feature/ledgercore 0.2 compatibility by @holgern in #1

New Contributors

Full Changelog: v0.1.0...v0.2.0

[0.2.0] - 2026-06-13

Added

  • Deterministic minimal front matter rendering, typed render options, and
    update/write option passthrough.
  • Whole-value and embedded template-placeholder parsing modes.
  • Basic, wide, and custom path-text punctuation normalization profiles.
  • Configurable JSON string/file formatting and compact output.
  • Line-aware JSONL loading and recoverable keyed object-map loading.
  • Configurable timestamp precision and UTC suffix style.
  • Front matter parser option passthrough for document fingerprints.
  • ledgercore.__version__ exposed at runtime via a build-generated, gitignored
    ledgercore/_version.py (hatch-vcs build hook).

Changed

  • Omitted front matter render options retain existing PyYAML output; explicit
    scalar_style="minimal" now performs deterministic minimal rendering.
  • Aware injected timestamps are normalized to UTC; naive values are rejected.

Fixed

  • Error subclasses now expose their documented stable code attributes
    (STORAGE_ERROR, ATOMIC_WRITE_ERROR, FRONTMATTER_ERROR,
    JSON_STORE_ERROR, YAML_STORE_ERROR, PATH_VALIDATION_ERROR,
    ID_FORMAT_ERROR) instead of inheriting the base code.
  • Minimal front matter rendering now quotes YAML plain-scalar hazards so values
    such as - item, *alias, ~, or 2026-06-13 round-trip instead of
    emitting invalid YAML or changing type.
  • JSON and YAML loaders with missing="empty" no longer mask non-missing
    I/O errors such as reading a directory; only absent files return empty.
  • LedgerIdFormat and NumericIdFormat consistently reject zero, negative,
    and boolean IDs across format, parse, and validity checks.
  • atomic_create_text() now loops os.write() to complete writes even when
    the OS performs a partial write.

v0.1.0

Choose a tag to compare

@holgern holgern released this 12 Jun 14:49

Full Changelog: https://github.com/holgern/ledgercore/commits/v0.1.0

Added
Atomic UTF-8 text writes and race-safe file creation (ledgercore.atomic).
Shared exception hierarchy with stable error codes (ledgercore.errors).
YAML front matter reader/writer and source file iteration (ledgercore.frontmatter).
Prefixed numeric ID formatting, parsing, next-ID generation, slug helpers (ledgercore.ids).
UTF-8 text helpers, newline normalization, content hash, text merging (ledgercore.io).
Validated JSON object/array loading and deterministic JSON writing (ledgercore.jsonio).
Safe relative POSIX path validation, config discovery, config-relative resolution (ledgercore.paths).
Canonical cross-ledger resource references (ledgercore.refs).
UTC timestamp generation with second precision (ledgercore.time).
Validated YAML mapping loading and deterministic YAML writing (ledgercore.yamlio).
py.typed marker for PEP 561 type checking support.
Full test suite with 235 tests.