Skip to content

v0.4.0 — hardened wire surface, contract-exact CLI, CI gates

Choose a tag to compare

@docxology docxology released this 21 Sep 22:44
· 166 commits to main since this release

v0.4.0

DOI: 10.5281/zenodo.22884305 (version deposit 22884305 on concept 10.5281/zenodo.22816187, which always resolves to the latest published version).

Two full audit-and-improvement waves over the v0.3.0 baseline: six deep audits (wire, logic, CLI/MCP, tests, docs, manuscript pipeline), every finding implemented or explicitly resolved.

Added

  • New shared modules: daf_jev.questions.question_from_mapping (one validated native-mapping question builder for CLI YAML and MCP dicts) and daf_jev.docs_verify.verify_manifest (single manifest verifier reporting missing/drifted/added, CWD-independent defaults)
  • models(*, timeout=None, request_headers=None) per-call overrides on JevClient/AsyncJevClient (mirroring ask semantics)
  • Public Evaluator.evaluate_async — one async path, usable inside a running loop (the MCP jev_evaluate tool now serves through it without blocking the event loop)
  • New manuscript token producers: BATCHING_RUNS / CALIBRATION_STATES / CALIBRATION_REPEATS (config-driven; batching token names now derive from experiment.batching_n_values)
  • GitHub Actions CI enforcing the full gate battery: ruff, mypy, pytest + coverage gate, docs-verify, offline scraper check, keyless example smoke

Hardened

  • Wire surface: httpx.HTTPError + StreamError map to APIConnectionError; explicit 60 s default transport timeout (was a silent 5 s); closed clients raise TypeSafeError; base-URL path prefixes normalized
  • Strict wire parsing: bool/numeric-string numbers rejected, malformed shapes raise ValueError (never TypeError/AttributeError), ChoiceQuestion criteria validated, legend values must be strings, usage tokens accept ints / integral floats only
  • Retry-After: retry-after-ms supported, numeric values clamped to [0, 300] s, HTTP-date falls back to exponential backoff (documented)
  • compose: probability finiteness/non-negativity validation, canonical index accumulation, fail-closed NaN semantics across route/tiered_gate/confidence_gate
  • CircuitBreaker: a BaseException from the wrapped call can no longer wedge the breaker HALF_OPEN
  • Decider: 11-reason fallback taxonomy (error last), a None-returning client_factory latches client_error, cache key evaluated once, Budget thresholds validated >= 0
  • CLI: ask usage errors exit 2 per the contract, duplicate question ids rejected, \\: escape in the SPEC grammar, scalar-JSON --state gate, docs-verify reports added files
  • Scripts: figure registry emitted unconditionally (incl. --only), scraper rejects hostile .. paths and validates --timeout, one-line error surfaces

Docs & metadata

  • The contract (docs/ARCHITECTURE.md) is synced to the shipped code; README/SKILL/AGENTS counts de-hardcoded (generated via the variables pipeline)
  • Zenodo family reconciled (API-verified): v0.3.0 = deposit 22817425; 22816188 is the superseded sibling
  • Dead bench (rich) extra removed

Quality: 448 unit tests (up from 320), 95.68% branch coverage (gate 90), ruff + mypy clean, no-mock test convention preserved.

Note: the Zenodo deposit ships the tagged source zip; the rendered PDF is unchanged from v0.3.0 (the template render path is currently unavailable) — the concept DOI always points at the latest deposit.