logwarden v0.10.3¶
Status: Released 2026-11-23 · tag v0.10.3
Outcome: the GenAI conventions cost no per-run copying. Since v0.10.2 each check builds the
registry chain logwarden → GenAI → semantic conventions by copying about 290 files into a
temporary directory: semconv without the gen-ai, mcp and openai directories that GenAI
replaces (Weaver loads every file under a registry path and can't skip directories), and GenAI
pointed at that copy. Measured on a one-line check (median of 15, laptop): v0.10.1 0.244 s,
v0.10.2 0.355 s, of which about half is that copy and half Weaver loading the larger registry.
Fixes¶
- The chain is built once and cached next to the downloaded archives
(
<cache>/registry-semconv-<v>-genai-<v>-<format>), per pair of pinned versions. It's built in a temporary directory and renamed into place, so an interrupted or parallel run never leaves a half-built copy. Each check copies only logwarden's own registry files (a few small files) and points them at the cached chain. - A cache copied to another directory is rebuilt there. The GenAI manifest in the chain points at the semconv copy by absolute path (Weaver reads a relative path from the working directory), so a chain whose path doesn't match its location isn't used.
logwarden setupbuilds it too, so the Docker image ships it and runs offline as any user.- When it can't be cached, the check works as before: with
LOGWARDEN_SEMCONVorLOGWARDEN_SEMCONV_GENAIset (a local directory whose content can change), or when the cache can't be written (a read-only cache), the chain is built in the run's temporary directory.
Changes you might notice¶
- A new directory in the cache, about the size of the semantic conventions model.
Breaking changes¶
None.
Verification¶
| # | Claim | How it will be checked | Result |
|---|---|---|---|
| 1 | Built once | The first check builds the chain in the cache; a second check doesn't copy semconv or GenAI (the cached chain's files are untouched); the cached chain has no gen-ai, mcp, openai; a check of a GenAI line through the cached chain passes |
✅ tests/test_registry_cache.py::test_claim1_built_once: the first call copies into <cache>/registry-semconv-1.45.0-genai-0.1.0-1, without gen-ai, mcp, openai; the second (base_registry) makes no copytree call, the cached manifest's mtime is unchanged, and the run's directory holds only logwarden/, pointing at the cached chain. test_claim1_checks_use_the_cached_chain: two CLI checks of a line with current gen_ai.* fields: 0 violations, one chain in the cache |
| 2 | Same findings | Full findings for examples/, databridge, yallmp-sync ×2 and the sensitive corpus: identical to v0.10.2; goldens unchanged; claim 8 of v0.10.2 (one definition per field) still passes |
✅ Full findings (rule, level, line, field, message, event) identical to v0.10.2: examples 15, databridge 481, yallmp-sync 3,084 and 3,084, sensitive corpus 1,970. Goldens unchanged. test_genai.py::test_claim8_each_field_is_defined_once (now on the cached chain) passes. uv run pytest: 323 passed |
| 3 | Fallbacks | With LOGWARDEN_SEMCONV / LOGWARDEN_SEMCONV_GENAI set, nothing is written to the cache; with a read-only cache dir, the chain is built in the run's temp dir; a leftover .tmp-<pid> from an interrupted build doesn't get in the way; a cache copied to another directory is rebuilt there |
✅ test_claim3_local_copies_are_not_cached: chain under the run's directory, no registry-* in the cache. test_claim3_read_only_cache (cache dir mode 555): chain in the run's directory, without the replaced directories, nothing written. test_claim3_leftovers_and_a_moved_cache: with a leftover …-1.tmp-99999 the chain is built; after copying the cache to another directory, the chain is rebuilt there and its manifest points at its own semconv (Weaver reads a relative registry_path from the working directory, so it has to be absolute) |
| 4 | Faster | Median of 15 one-line checks vs v0.10.2 on the same laptop: the copy is gone | ✅ Two rounds, laptop under load: v0.10.2 0.655 s / 0.625 s, this change 0.530 s / 0.512 s. Weaver's own time is the same (0.50–0.53 s); the rest went from 0.109–0.127 s to 0.008 s |
| 5 | Setup and image | logwarden setup creates the chain; the image built from this change, run with --network none as uid 12345, checks a GenAI line without writing to the cache |
✅ test_claim5_setup_builds_it: setup creates the chain and says "registry for checks: …". Image built from this change: /opt/logwarden/registry-semconv-1.45.0-genai-0.1.0-1 present (root, a+rX); --network none -u 12345, with a fields file: a line with gen_ai.* fields, a list and 20260911-120000 has no finding, the card number in query_params is found; /opt/logwarden lists the same four entries after the run (not writable by that user). Image removed |
| 6 | Docs, CI, release | AGENTS.md, docs/integration.md (cache contents); CI on Linux, macOS, Windows; dry run to TestPyPI; after the tag, PyPI and the image |
✅ AGENTS.md (check.py row: base_registry, base_chain, CHAIN_FORMAT), docs/integration.md (the cache holds the prepared registry); strict site build passes. PR #19 CI (Linux, macOS, Windows, Python 3.10, coverage, speed, recipes, Docker) passed; main CI 45233549527 after the version bump passed. Dry run and after the tag: see below |
Post-release checks¶
- ✅ Dry run 45233551756 (before the tag): TestPyPI
0.10.3.dev23, image:0.10.3.dev23. Main CI 45233549527 passed. - ✅ Release run 45236636165 published PyPI
logwarden 0.10.3, imageghcr.io/ingeniator/logwarden:0.10.3and the GitHub release. - ✅
uvx logwarden==0.10.3from PyPI with an emptyLOGWARDEN_CACHE: the first check downloads Weaver, semconv and GenAI and createsregistry-semconv-1.45.0-genai-0.1.0-1; with a fields file, a line withgen_ai.*fields, a list and20260911-120000has no finding and the card number inquery_paramsis found. - ✅ The image
:0.10.3from GHCR,--network none, uid 12345: the same single finding.