Skip to content

Polymorph 0.4.0a7 - audit throughput recovery

Pre-release
Pre-release

Choose a tag to compare

@IamAngusU IamAngusU released this 12 Sep 15:49
· 11 commits to main since this release

Audit throughput recovery

This corrective pre-release removes an O(history) quota query from every audit append without weakening the write boundary.

Changes

  • Audit event count and logical-byte usage are maintained transactionally in SQLite.
  • Quotas are still checked before inserts under BEGIN IMMEDIATE serialization.
  • Inserted rows, hash-chain tail, and usage metadata receive explicit postcondition checks before commit.
  • Existing audit stores receive a one-time usage backfill when opened for writing.
  • Multiple writers share the same committed quota state.
  • Already serialized event bytes are reused for hashing and accounting.

Measured effect on the same contended host

  • Isolated 20,000-event audit median: 3,431 to 6,395 events/s, about 86% faster.
  • Signed 1,000-row workflow: previous single run 143.58 rows/s; post-fix three-run median 262.95 rows/s, about 83% higher.
  • Peak RSS remained near 87.3 MiB.

Battlefield 6 was using roughly 5.8 CPU cores and the GPU was device-wide near full utilization during these measurements. These values are deliberately not presented as a replacement for the controlled 375.83 rows/s idle baseline.

Verification

  • Compile, Ruff, formatting, and strict mypy passed.
  • Full tests passed with warnings treated as errors.
  • Audit migration, rollback, multi-writer quota, runtime, and workflow regressions passed.
  • scripts/validate_local.py passed, including three workflow performance gates.
  • Wheel and sdist passed Twine checks.
  • Clean wheel installation, audit smoke, and connector scaffold smoke passed.
  • GitHub Actions remained disabled.