Skip to content

Releases: Therealdk8890/DProvenanceKit

0.2.0

Choose a tag to compare

@Therealdk8890 Therealdk8890 released this 06 Jul 23:11

The first release since 0.1.0 — the API surface the README and docs already describe is now installable via from: "0.2.0".

.package(url: "https://github.com/Therealdk8890/DProvenanceKit.git", from: "0.2.0")

Highlights

  • Payload-value queriesTraceQueryDSL.matching(step:where:) filters runs by event content (score < 0.5, approved == false), not just which steps ran — closing the biggest query gap vs. Langfuse/LangSmith. Plus excluding(_:) to negate a sub-query. The predicate is a Swift closure evaluated in-process, so in-memory and SQLite stores agree by construction.
  • One-call lineagerecord(_:derivedFrom:) records an event and wires its lineage edge(s) in a single call, so lineage / impact / explain work without manual UUID bookkeeping.
  • OTel lineage export — lineage edges surface in the OTLP export as dpk.derived_from (+ dpk.derived_from.type), with dpk.event_id as the join key on every event. Deterministic (sorted by source id) and fault-tolerant.
  • DProvenanceFoundationModelsOTel — a bridge that makes FoundationModels traces classify as gen_ai.* out of the box when exported through the OTel bridge. Just link it; no call-site change.
  • Content-aware redactionFMRedactor masks sensitive substrings inside a field (SSN, email, …) via regex rules on FMRedactionPolicy.redactor. Deterministic, so live/post-hoc capture stay byte-equal; includes a .commonPII preset. Default nil = exact prior behavior.

Added

  • Bounded queriesTraceStore.queryRuns(_:limit:); the SQLite store pushes the bound down so it caps per-run hydration instead of materializing the whole result set.
  • DProvenanceKit.runReturningID(contextID:store:_:) — returns the runID alongside the block result, closing Run → Record → Query → Diff from one call.
  • TraceStore.getRun(id:) — fetch a single run by id (in-memory + SQLite).
  • MissingSupportRule — a batteries-included AnomalyRule so the documented anomaly example compiles verbatim.

OTel bridge

  • OTel error status — generation/tool spans carrying an errorType now export with OTLP status ERROR + an error.type attribute, so error-rate dashboards see failures.
  • OTLP/HTTP gzipOTLPHTTPExporter.Configuration.compression = .gzip (zero-dependency; falls back to uncompressed). Default .none preserves prior wire behavior.

Changed

  • SQLite reads are isolated from writes — reads go through a dedicated connection, so a query gets a committed WAL snapshot instead of possibly observing the writer's uncommitted rows. Recent records stay visible (reads flush the writer first).
  • record(_:) called outside a run { } scope now logs a warning in DEBUG builds (still a soft no-op in release) — the most common onboarding trap.

Fixed

  • SQLite preserves TraceEvent.id on readgetRun/queryRuns were minting a fresh UUID per hydrated event, so id-based joins (and lineage export) wouldn't line up for SQLite-backed runs.
  • The flagship README anomaly-detection snippet referenced a type that shipped nowhere; it now uses the real MissingSupportRule.

Tooling & CI

  • Quickstart executableswift run Quickstart prints an end-to-end trace, diff, and detected regression, and compile-checks the documented public API.
  • CLI gatingDProvenanceKitCLI evaluate --gate [--min-f1=<value>] exits non-zero on a corpus regression so it can fail a CI job.
  • CI — added an iOS device-SDK build, a ThreadSanitizer leg over the concurrency suites, and a gated benchmark run.
  • SQLite — index on runs(start_time) for recency listings; PRAGMA busy_timeout=5000 so a second reader waits on WAL-checkpoint contention instead of failing with SQLITE_BUSY.

Full changelog: 0.1.0...0.2.0 · see CHANGELOG.md for the complete list.

0.1.0 — first tagged release

Choose a tag to compare

@Therealdk8890 Therealdk8890 released this 02 Jul 18:03
cf16299

First versioned release of DProvenanceKit. Install with:

dependencies: [
    .package(url: "https://github.com/Therealdk8890/DProvenanceKit.git", from: "0.1.0")
]

Highlights

  • Recording: non-blocking record(...) with priority-aware O(1) backpressure, WAL-mode SQLite persistence, crash-safe run reconciliation, and by-tier drop accounting (dropStats / preservedIntegrity)
  • Querying: TraceQueryDSL with temporal and sequence operators, compiled to both an in-memory evaluator and SQL, held at parity by a shared test suite
  • Diffing: structural reasoning diffs (TraceDiffEngine) plus semantic alignment (TraceAlignmentEngine) with configurable equivalence models and regression-risk scoring
  • Validation: rule-based anomaly detection, explainability auditing, and a published benchmark corpus with standard and adversarial suites (see BENCHMARKS.md)
  • CI: every push now builds, runs the 70-test suite, and re-runs the benchmark corpus on GitHub Actions
  • Requires Swift 6.0 tools / macOS 13 / iOS 16

A Python port with the same corpus, a CI regression gate, and a GitHub Action lives at https://github.com/Therealdk8890/DProvenanceKitPython — docs and hosted visualizer at https://dprovenance.dev

🤖 Generated with Claude Code