Skip to content

feat(state): Phase 7 — delta codec, production benchmarks, admin resync/GC, C-identifier enforcement - #84

Merged
transfix merged 1 commit into
masterfrom
feature/phase7-perf-hardening
May 22, 2026
Merged

transfix merged 1 commit into
masterfrom
feature/phase7-perf-hardening

Conversation

@transfix

Copy link
Copy Markdown
Owner

Phase 7: Performance & Production Hardening

Delta codec (state_delta_codec)

  • XOR-based delta compression against per-path baselines
  • CRC32 baseline verification; raw fallback for first writes
  • 18 test cases (round-trip, size change, CRC mismatch, independent paths)

Production benchmarks

  • blob_store_put/get_5000x4KB: content-addressed store throughput
  • callback_latency_10000: ingest → valueChanged signal latency
  • admin_snapshot_128peers: snapshot + to_text overhead
  • slow_peer_isolation_32peers_half_slow: quarantine under load
  • delta_codec_64KB_1000iters: delta encode/decode throughput

Admin tooling

  • force_resync(peer): drain pending mutations for a peer
  • gc_stale_peers(now, threshold): remove stale peers from registry
  • 6 new admin test cases

C-identifier enforcement

  • state_cluster_shard constructor validates cluster_id and local_node_id
  • state_peer_registry::add_peer validates node_id
  • All test files updated (12 files) — hyphens replaced with underscores

All tests pass. No regressions.

@transfix
transfix force-pushed the feature/phase7-perf-hardening branch from 691cd98 to 6ab797d Compare May 22, 2026 15:20
…nc/GC, C-identifier enforcement

Delta codec (state_delta_codec):
  - XOR-based delta compression against per-path baselines
  - CRC32 baseline verification for safe decode
  - Raw fallback for first-write paths (magic 0xD0 vs 0xD1)
  - Path-aware encode/decode with automatic baseline update
  - 18 test cases covering round-trip, size change, CRC mismatch

Production benchmarks (state_distributed_bench_test):
  - blob_store_put/get_5000x4KB: content-addressed store throughput
  - callback_latency_10000: ingest → valueChanged signal latency
  - admin_snapshot_128peers: snapshot + to_text overhead
  - slow_peer_isolation_32peers_half_slow: quarantine under load
  - delta_codec_64KB_1000iters: delta encode/decode throughput

Admin tooling (state_distributed_admin):
  - force_resync(peer): drain pending mutations for a peer
  - gc_stale_peers(now, threshold): remove stale peers from registry
  - 6 new admin test cases

C-identifier enforcement:
  - state_cluster_shard constructor validates cluster_id and
    local_node_id against C identifier rules (isValidStateName)
  - state_peer_registry::add_peer validates node_id
  - All test files updated: hyphens replaced with underscores in
    cluster/node identifiers across 12 test files
@transfix
transfix force-pushed the feature/phase7-perf-hardening branch from 6ab797d to 0008bb2 Compare May 22, 2026 15:33
@transfix
transfix merged commit 54aaa79 into master May 22, 2026
13 checks passed
@transfix
transfix deleted the feature/phase7-perf-hardening branch October 29, 2026 20:53
Sign up for free to 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