Skip to content

v0.16.0 — backend v3.66.2 wire-validation alignment - #91

Merged
maltsev-dev merged 1 commit into
masterfrom
fix/remove-flaky-approval-timeout-test
Aug 20, 2026
Merged

v0.16.0 — backend v3.66.2 wire-validation alignment#91
maltsev-dev merged 1 commit into
masterfrom
fix/remove-flaky-approval-timeout-test

Conversation

@maltsev-dev

@maltsev-devmaltsev-dev commented Aug 20, 2026

Copy link
Copy Markdown
Member

@## Summary

SDK v0.16.0 (commit 681ce93) closes the v1/v2 no-reservation fallback in _route_track. Behavior change for callers that invoke track_llm() outside a paired /check scope.

What changed

  • _route_track no-smid branch (src/nullrun/runtime.py:3036-3067) drops llm_call events instead of falling back to /track/batch. Backend v3.66.2 closed the v1/v2 no-reservation consume path with per-event type-aware wire validation: any llm_call event in a batch WITHOUT reservation_id is rejected with 503 BUDGET_RECHECK_FAILED (whole-batch fail-CLOSED). The 0.12.0 fallback was amplifying into 503-storm for every call site that forgot to pair track_llm with a prior gate.
  • New metric metrics.runtime.dropped_llm_call_no_reservation (src/nullrun/observability/__init__.py:104-109) — operators alert on sustained rate to detect integration bugs (missing gate pairing around track_llm).
  • WARNING log (not DEBUG) naming event_type + workflow_id, mirroring the 0.15.2 fail-OPEN observability fix.

Migration

Operations hitting dropped_llm_call_no_reservation > 0 on /health are calling track_llm() outside a paired /check scope. Wrap calls in one of:

  • @protect(...) decorator (wraps in with workflow(...) + check_workflow_budget() automatically),
  • check_workflow_budget() before track_llm() (explicit two-step),
  • with workflow("wf-id"): context manager + check_workflow_budget() inside.

Bare track_llm() calls (no surrounding gate) silently drop the event post-0.16.0 — the call still returns {"allowed": True, ...}, but no cost_events row is written.

Tests

  • 2 source-pin regression tests updated to pin the corrected drop behavior (TestRouteTrack.test_llm_call_without_smid_is_dropped + TestEndToEndCaptureFlow::test_block_response_does_not_infect_subsequent_track).
  • 1 wire-payload test updated to use tool_call (avoids the drop-on-no-smid).
  • 2 model-wire tests opt into NULLRUN_V3_TRACK_DISABLE=1 to keep the focus on the missing-model flag-and-log surface.
  • 1571 passed, 7 skipped in 23.89s (matches 0.15.2 baseline). Zero regressions. ruff clean.

Compatibility

  • No SDK_MIN_VERSION bump. Backend v3.66.2 ships since 2026-08-18 (commit e262f1c3).
  • Wire-format unchanged. No public API change.
  • Drop-in replacement for 0.15.2 for callers that always pair track_llm with a prior gate — those observe zero behavior change.

Files

 CHANGELOG.md | +32
pyproject.toml | +1 -1
src/nullrun/observability/__init__.py | +9
src/nullrun/runtime.py | +35 -12
tests/contract/test_llm_call_model_wire.py | +18 -4
tests/test_runtime.py | +9 -4
tests/test_v3_wire_contract.py | +47 -8
uv.lock | +1 -1

Note on commit history

PR was rebased onto master (HEAD 4b6ce56, 0.15.2 squash-merge) — the previous commits on the source branch (35728b9, 1c96654, 9b87d20, 127b003, 0f86c8c, 46c5325) are already in master via the 0.15.2 squash-merge, so the v0.16.0 commit is the only new commit on top of master. The original commit e09813c (pre-rebase) is superseded by 681ce93 (post-rebase) with identical tree content.
@

v0.16.0 (2026-08-20) — backend v3.66.2 wire-validation alignment
SDK behaviour change for callers that invoke track_llm() / track({"type":
"llm_call", ...}) outside a paired /check scope.
What changed
------------
- _route_track no-smid branch (src/nullrun/runtime.py:3036-3067) drops
llm_call events instead of falling back to /track/batch. Backend v3.66.2
closed the v1/v2 no-reservation consume path with per-event type-aware
wire validation: any llm_call event in a batch WITHOUT reservation_id is
rejected with 503 BUDGET_RECHECK_FAILED (whole-batch fail-CLOSED). The
0.12.0 fallback was amplifying into a tight retry loop producing 503-storm.
- New metric metrics.runtime.dropped_llm_call_no_reservation (src/nullrun/
observability/__init__.py:104-109) — operators alert on sustained rate to
detect integration bugs (missing gate pairing around track_llm).
- WARNING log (not DEBUG) naming event_type + workflow_id, mirroring the
0.15.2 fail-OPEN observability fix.
- 2 source-pin regression tests updated to pin the corrected drop behaviour
(TestRouteTrack.test_llm_call_without_smid_is_dropped and
TestEndToEndCaptureFlow.test_block_response_does_not_infect_subsequent_track)
+ 1 wire-payload test updated to use tool_call (avoids the dropon-no-smid)
+ 2 model-wire tests opt into NULLRUN_V3_TRACK_DISABLE=1 to keep the
focus on the missing-model flag-and-log surface.
Migration
---------
Ops hitting dropped_llm_call_no_reservation > 0 on /health are calling
track_llm() outside a paired /check scope. Wrap calls in @Protect /
check_workflow_budget() / with workflow(...) before track_llm().
Compatibility
-------------
Wire-format unchanged. No SDK_MIN_VERSION bump. Drop-in replacement for
0.15.2 for callers that always pair track_llm with a prior gate. Backend
v3.66.2 ships since 2026-08-18 (commit e262f1c3).
Tests
-----
1571 passed, 7 skipped in 21.91s (matches 0.15.2 baseline of 1571). Zero
regressions. ruff clean. mypy clean.
@
@maltsev-dev
maltsev-devforce-pushed the fix/remove-flaky-approval-timeout-test branch from e09813c to 681ce93CompareAugust 20, 2026 14:01
@maltsev-dev
maltsev-dev merged commit 6978117 into masterAug 20, 2026
4 checks passed
@codecov

codecovBot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@maltsev-dev