Skip to content

Releases: block/model-ledger

v0.7.12

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 10 Jul 21:12
0aff237

Fix: backslash escaping in SQL literals (#35) — _esc now doubles backslashes before doubling quotes; previously any JSON payload with an embedded double quote or backslash was mangled by Snowflake's escape processing inside single-quoted constants, failing PARSE_JSON on the fallback INSERT and poisoning the write buffer (every subsequent flush-before-read 500s). Found by independent post-merge review of #33/#34; verified against live Snowflake.

Also: privilege denials short-circuit the pandas path quietly (no per-flush warning/DROP), unexpected failures log with traceback, failure-path cleanup DROP removed, row construction inside try, regression tests for quote/backslash round-trip and the snapshots fallback.

Strongly recommended over 0.7.10/0.7.11 for any write-enabled deployment.

v0.7.11

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 10 Jul 16:39
e9ccd27

Fix: pandas bulk path falls back to SQL on any failure (#34)

On sessions whose backing protocol cannot run PUT file transfers, write_pandas fails with KeyError('command') — not a privilege error — so the v0.7.10 fallback never engaged and the unclearable buffer turned every subsequent flush-before-read into a 500. The pandas path now falls back to the DDL-free SQL flush (idempotent, all columns) on any failure, with a warning logged.

Recommended for all write-enabled deployments on non-native-transport sessions; upgrade path 0.7.10 → 0.7.11 is drop-in.

v0.7.10

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 09 Jul 17:29
55d8300

Fix: SQL fallback snapshot flush drops PAYLOAD and TAGS (#33)

_flush_snapshots_sql — the DDL-free path taken whenever the role cannot CREATE TEMPORARY TABLE (least-privilege deployments with row-level grants only) — inserted only the 7 scalar columns, silently persisting every snapshot with NULL PAYLOAD and TAGS. The fallback now carries both via PARSE_JSON in the INSERT...SELECT, matching the pandas path. Regression tests included.

If you run a write-enabled deployment on a role without temp-table privileges, upgrade before enabling writes: 0.7.4–0.7.9 lose snapshot payloads on this path.

v0.7.9

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 03 Jul 16:31
a01f62f

MCP Registry release: adds server.json (io.github.block/model-ledger) and the PyPI ownership marker the registry validates. Launch via MCP clients: uvx --from "model-ledger[mcp,cli]==0.7.9" model-ledger mcp.

Full details in CHANGELOG.md.

v0.7.8

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 03 Jul 16:23
8596a59

What's new

Reliability on the first-touch paths (#29)

  • Bare installs (pip install model-ledger without extras) get a one-line install hint from model-ledger --help instead of a traceback
  • Inventory CLI commands detect a Ledger event-log database and exit with guidance instead of a raw sqlite error
  • model-ledger validate with an unknown profile exits listing the available profiles

Docs and README accuracy (#29)

  • README: CI/downloads badges, production-scale benchmark callout (28.8k models / 212k events, sub-second inventory reconstruction), architecture diagram, SECURITY.md
  • The SR 11-7/SR 26-2, EU AI Act Annex IV, and NIST AI RMF validation profiles are correctly documented as shipping in the OSS core (model_ledger.validate)
  • Quickstart and all Ledger examples persist to ./ledger.db; history() ordering (newest first) is now shown correctly and asserted in CI

Breaking (#29)

  • Removed the scanner module (Scanner, InventoryScanner, ModelCandidate, ScanReport), deprecated since v0.4.0 — use SourceConnector + DataNode + Ledger.add()/connect()

Packaging (#29)

  • PyPI Development Status: Beta; new keywords: mcp, model-context-protocol, ai-governance, eu-ai-act, nist-ai-rmf, sr-26-2

Full details in CHANGELOG.md.

v0.7.7 — session self-heal + investigate perf

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 02 Jul 19:31
ce37ef7

Changes

  • #24 — self-heal on auth-token expiry. SnowflakeLedgerBackend accepts an optional connection_factory; on Snowflake errno 390114 it swaps in a fresh connection and retries the same statement once. Backstop for long-idle expiry that keep-alive heartbeats can't fully prevent. Backward compatible.
  • #25 — batched edge resolution in the investigate/graph hot path.

v0.7.6 — least-privilege writes

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 23 Jun 04:28
c9ddc00

Fixes

  • #26 — least-privilege write path. SnowflakeLedgerBackend no longer requires schema-ownership DDL to write. Write-mode init skips CREATE SCHEMA/CREATE TABLE/ALTER when the schema + tables already exist (probed via SELECT-only INFORMATION_SCHEMA), and the bulk write path falls back to a DDL-free SQL MERGE/INSERT when the role can't create the temp staging table. Net: the entire write path needs only INSERT/UPDATE/SELECT. Fresh deployments still auto-provision; introspection failure falls back to the CREATE path.
  • #23 — status propagation. Connector-discovered status propagates to the model row on Ledger.add() (metadata['status'] contract, ModelStatus enum validation, dedup-skip self-correction).

(v0.7.5 was skipped — a stray tag at a pre-v0.7.4 commit, never released.)

v0.7.4 — fast composite_summary

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 10 Jun 17:32
8c30cfa

v0.7.4

Performance: SnowflakeLedgerBackend.composite_summary is now a single self-contained SQL statement (#21) — composite inventory queries drop from ~90s / 568 round trips to sub-second / 1 round trip on warehouse-backed ledgers. Semantics are parity-tested against the SDK fallback (replay-true member counts, observation set-difference, last-validated).

Also removes the backend's undeclared dependency on a deployment-specific view.

🤖 Generated with Claude Code

v0.7.3

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 18 Apr 04:23
50e4886

Changes

  • feat: ModelRef gains a metadata: dict[str, Any] field (default empty). Thread through register() and register_group().
  • feat: register_group(metadata=...) now stores metadata on the composite ModelRef itself. Previously broadcast to every link_dependency call (unintended).
  • feat: composite_summary(model_types=...) — optional filter for callers treating ml_model/heuristic (or other types) as composites. Default behavior preserved (model_type="composite").
  • fix: narrow ALTER TABLE ADD COLUMN METADATA VARIANT exception suppression to "already exists" only. Previously swallowed all DDL errors.
  • schema: SQLite + Snowflake backends carry a METADATA column. Existing deployments auto-migrate via idempotent ALTER TABLE.

Backward compatibility

Fully backward compatible. Existing serialized ModelRef data without a metadata field loads with metadata={}.

Upgrade

pip install -U model-ledger==0.7.3

Or for git-pinned consumers:

model-ledger = { git = "https://github.com/block/model-ledger.git", tag = "v0.7.3" }

v0.7.2

Choose a tag to compare

@vigneshnarayanaswamy vigneshnarayanaswamy released this 13 Apr 19:45
  • Push limit, offset, text filters to SQL in Snowflake backend — avoids S3 result downloads for paginated queries
  • Add count_models() for efficient total counts
  • In-memory backend also supports text/limit/offset for parity
  • Fixes 403 errors when querying through corporate proxies that break S3 presigned URLs