Skip to content

Commit 7f573e7

Browse files
committed
release: 0.8.2 — coverage metadata nesting + model fallback
Bumps version after the wire-format regression fixes from PR #40: - coverage_report counters now nest under event.metadata (SdkTrackRequest drops unknown top-level keys) - NullRunSyncTransport._emit falls back to the request body's model field when the response extractor returns None - test_batch_response_parsing.py pins the post-2026-06-27 BatchTrackResponse schema (actions/messages) CHANGELOG entry added above 0.8.0. No public-API break.
1 parent 2018bfc commit 7f573e7

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,45 @@ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
77

88
---
99

10+
## [0.8.2] - 2026-06-29
11+
12+
Additive patch on top of 0.8.0. No public-API break. Continues the
13+
0.8.0 wire-format audit with two regressions that were caught on
14+
review and one contract test that pins the post-2026-06-27 backend
15+
schema so a future rename can't silently break the SDK.
16+
17+
### Fixed
18+
19+
- **`track_coverage()` emits counter dicts under `event.metadata`
20+
instead of the event top level.** Pre-fix the per-host `seen` /
21+
`tracked` / `streaming_skipped` dicts sat at the event root, where
22+
serde silently dropped them — `SdkTrackRequest` uses explicit
23+
fields with no `#[serde(flatten)]` catchall, so unknown keys are
24+
discarded. The dashboard's `last_coverage_pct` was permanently
25+
`null` because every coverage report landed with empty
26+
`seen`/`tracked`/`streaming_skipped` JSONB columns. Pin:
27+
`tests/test_coverage_report.py::test_track_coverage_emits_wire_shape_with_metadata_nesting`.
28+
- **Request-body model fallback in
29+
`NullRunSyncTransport._emit`.** When the response body extractor
30+
returns `None` for `model` (OpenAI Responses API, Anthropic
31+
streaming edge cases), `_extract_model_from_request_body` reads
32+
the model string the user embedded in the request body via
33+
`ChatOpenAI(model="gpt-4.1-mini")`. Without this every such
34+
call was zero-billed — backend `unwrap_or("default")` +
35+
`DEFAULT_RATE`\$0/call. Unit-tested in
36+
`tests/test_model_fallback.py`.
37+
38+
### Tests
39+
40+
- `tests/test_batch_response_parsing.py` pins the post-2026-06-27
41+
`BatchTrackResponse` shape (`actions: Vec<ActionTaken>`,
42+
`messages: Vec<String>`) and documents that the legacy
43+
`actions_taken: Vec<String>` field is intentionally dropped in
44+
0.8.0. Regression test so a future backend rename can't silently
45+
break the SDK.
46+
47+
---
48+
1049
## [0.8.0] - 2026-06-28
1150

1251
SDK↔backend wire-format audit. Closes a class of silent-fail-OPEN

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "nullrun"
7-
version = "0.8.0"
7+
version = "0.8.2"
88
# Long form used by PyPI page meta-description and search snippets.
99
# Kept under the 200-char preview threshold so the full line is visible
1010
# without an "expand" click. Keywords are matched against likely search

0 commit comments

Comments
 (0)