diff --git a/.changeset/olive-donkeys-smile.md b/.changeset/olive-donkeys-smile.md deleted file mode 100644 index b2a20cb..0000000 --- a/.changeset/olive-donkeys-smile.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -"@smooai/audit": minor ---- - -Give every language the same emit posture: retry with backoff, and never fail -silently. - -- **Retry on transient failure in Python, Rust, Go, and .NET** — previously - TypeScript only. Transport errors and HTTP 5xx are retried with exponential - backoff; a 4xx is surfaced immediately. The retried POST carries the same - canonical bytes, since ingest dedupes on the event hash. The defaults now live - in `spec/parity-corpus.json`'s `retryPolicy` (3 attempts, 100 ms base, - doubling) and every language's tests assert their client against it, rather - than five copies of the same magic numbers. -- **BREAKING (Python): `swallow_errors` now defaults to `False`.** It defaulted - to `True`, so a misconfigured endpoint or an expired token dropped every audit - event and reported success — fail-open on the exact path that carries the - record. Pass `swallow_errors=True` to keep the old behaviour; `on_error` now - fires whether or not the error is swallowed. (The old docstring also claimed - this matched the TypeScript client. It never did — TS has always thrown.) -- **New: `AuditClient.emit_async` in Python**, running the blocking `urllib` - POST off the event loop via `asyncio.to_thread`. -- Rust's `AuditClientOptions` gains `max_retries` / `retry_backoff_ms` (both - `Option`, `None` = the shared default) and an `AuditClientOptions::new` - constructor. Go's `AuditClient` gains `MaxRetries` / `RetryBackoff` (zero = - default). .NET's `AuditClientOptions` gains `MaxRetries` / `RetryBackoffMs`. -- Go's `Emit` stays synchronous on purpose — `go client.Emit(ctx, event)` is how - Go does async — and now honours context cancellation between retries too. diff --git a/CHANGELOG.md b/CHANGELOG.md index 5362813..b59f211 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # @smooai/audit +## 0.4.0 + +### Minor Changes + +- ccc4f4e: Give every language the same emit posture: retry with backoff, and never fail + silently. + - **Retry on transient failure in Python, Rust, Go, and .NET** — previously + TypeScript only. Transport errors and HTTP 5xx are retried with exponential + backoff; a 4xx is surfaced immediately. The retried POST carries the same + canonical bytes, since ingest dedupes on the event hash. The defaults now live + in `spec/parity-corpus.json`'s `retryPolicy` (3 attempts, 100 ms base, + doubling) and every language's tests assert their client against it, rather + than five copies of the same magic numbers. + - **BREAKING (Python): `swallow_errors` now defaults to `False`.** It defaulted + to `True`, so a misconfigured endpoint or an expired token dropped every audit + event and reported success — fail-open on the exact path that carries the + record. Pass `swallow_errors=True` to keep the old behaviour; `on_error` now + fires whether or not the error is swallowed. (The old docstring also claimed + this matched the TypeScript client. It never did — TS has always thrown.) + - **New: `AuditClient.emit_async` in Python**, running the blocking `urllib` + POST off the event loop via `asyncio.to_thread`. + - Rust's `AuditClientOptions` gains `max_retries` / `retry_backoff_ms` (both + `Option`, `None` = the shared default) and an `AuditClientOptions::new` + constructor. Go's `AuditClient` gains `MaxRetries` / `RetryBackoff` (zero = + default). .NET's `AuditClientOptions` gains `MaxRetries` / `RetryBackoffMs`. + - Go's `Emit` stays synchronous on purpose — `go client.Emit(ctx, event)` is how + Go does async — and now honours context cancellation between retries too. + ## 0.3.0 ### Minor Changes diff --git a/dotnet/src/SmooAI.Audit/SmooAI.Audit.csproj b/dotnet/src/SmooAI.Audit/SmooAI.Audit.csproj index f7f87bc..fece0c6 100644 --- a/dotnet/src/SmooAI.Audit/SmooAI.Audit.csproj +++ b/dotnet/src/SmooAI.Audit/SmooAI.Audit.csproj @@ -12,7 +12,7 @@ SmooAI.Audit - 0.3.0 + 0.4.0 SmooAI SmooAI Polyglot client SDK for tamper-evident, SQL-queryable audit logging. .NET port of @smooai/audit — a canonical event schema, a per-org-per-day SHA-256 hash chain, and an emit client, verified byte-for-byte against a shared parity corpus. diff --git a/go/version.go b/go/version.go index 65bdeab..7135c85 100644 --- a/go/version.go +++ b/go/version.go @@ -5,4 +5,4 @@ package audit // Version is the current version of the smooai-audit Go package. -const Version = "0.3.0" +const Version = "0.4.0" diff --git a/package.json b/package.json index 4218541..6ec24fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smooai/audit", - "version": "0.3.0", + "version": "0.4.0", "description": "A polyglot client SDK for tamper-evident, SQL-queryable audit logging: a canonical event schema, a per-org-per-day SHA-256 hash chain, and an emit client — with byte-for-byte parity across TypeScript, Python, Rust, Go, and .NET.", "homepage": "https://github.com/SmooAI/audit#readme", "bugs": { diff --git a/python/pyproject.toml b/python/pyproject.toml index a3b6024..4f2dddb 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "smooai-audit" -version = "0.3.0" +version = "0.4.0" description = "Polyglot client SDK for tamper-evident, SQL-queryable audit logging — Python port of @smooai/audit." readme = "README.md" authors = [{ name = "SmooAI", email = "brent@smooai.com" }] diff --git a/python/uv.lock b/python/uv.lock index ffcd4e0..4a6e0cb 100644 --- a/python/uv.lock +++ b/python/uv.lock @@ -297,7 +297,7 @@ wheels = [ [[package]] name = "smooai-audit" -version = "0.3.0" +version = "0.4.0" source = { editable = "." } dependencies = [ { name = "pydantic" }, diff --git a/rust/audit/Cargo.lock b/rust/audit/Cargo.lock index 2294c9d..0eda7d5 100644 --- a/rust/audit/Cargo.lock +++ b/rust/audit/Cargo.lock @@ -966,7 +966,7 @@ checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "smooai-audit" -version = "0.3.0" +version = "0.4.0" dependencies = [ "opentelemetry", "opentelemetry_sdk", diff --git a/rust/audit/Cargo.toml b/rust/audit/Cargo.toml index 0219a5c..10ae5be 100644 --- a/rust/audit/Cargo.toml +++ b/rust/audit/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "smooai-audit" -version = "0.3.0" +version = "0.4.0" edition = "2021" description = "Polyglot client SDK for tamper-evident, SQL-queryable audit logging — Rust port of @smooai/audit." license = "MIT"