Skip to content

chore: code audit and cleanup - #53

Merged
kacy merged 6 commits into
mainfrom
chore/code-audit-cleanup
Feb 7, 2026
Merged

chore: code audit and cleanup#53
kacy merged 6 commits into
mainfrom
chore/code-audit-cleanup

Conversation

@kacy

@kacy kacy commented Feb 7, 2026

Copy link
Copy Markdown
Owner

summary

comprehensive codebase audit and cleanup:

  • refactor: extract shared connection constants to connection_common.rs
  • tests: add 22 edge case tests for critical functionality (245 total tests)
  • docs: update README and CLAUDE.md with current stats and benchmarks
  • deps: update dependencies (memchr, zerocopy)

changes

code quality

  • extracted duplicate constants (BUF_CAPACITY, MAX_BUF_SIZE, IDLE_TIMEOUT) to shared module
  • added performance documentation to concurrent_handler.rs

new tests

  • sorted set: infinity scores, empty set, inverted indices
  • keyspace: zero/small TTL expiry, auto-deletion of empty collections
  • keyspace: duplicate set members, overflow/underflow for incr/decr
  • keyspace: empty keys, empty values, binary data

documentation

  • updated test count in README (245 tests, ~20k LOC)
  • updated CLAUDE.md with achieved benchmark results
  • updated benchmark commands to use scripts folder

dependencies

  • memchr 2.7.6 -> 2.8.0
  • zerocopy 0.8.38 -> 0.8.39

tested

  • all 245 tests pass
  • cargo fmt clean
  • cargo clippy clean (warnings as errors)

kacy added 6 commits February 7, 2026 16:06
- create connection_common.rs with BUF_CAPACITY, MAX_BUF_SIZE, IDLE_TIMEOUT
- remove duplicate constant definitions from connection.rs and concurrent_handler.rs
- add performance documentation to concurrent_handler.rs
- sorted set: infinity scores, empty set operations, inverted indices
- keyspace: zero/small TTL expiry, auto-deletion of empty collections
- keyspace: duplicate set members, overflow/underflow for incr/decr
- keyspace: empty keys, empty values, binary data

adds 22 new tests (223 -> 245 total)
- 245 tests (was showing 579 which was stale)
- ~20k lines of code
- add achieved metrics vs targets (1.86M SET, 2.48M GET, 0.4ms p99)
- update benchmark commands to use scripts folder
- memory overhead: 257 bytes/key in concurrent mode
- memchr 2.7.6 -> 2.8.0
- zerocopy 0.8.38 -> 0.8.39
@kacy
kacy merged commit 11ba90b into main Feb 7, 2026
5 checks passed
@kacy
kacy deleted the chore/code-audit-cleanup branch February 7, 2026 21:20
kacy added a commit that referenced this pull request Feb 11, 2026
* refactor: extract shared connection constants

- create connection_common.rs with BUF_CAPACITY, MAX_BUF_SIZE, IDLE_TIMEOUT
- remove duplicate constant definitions from connection.rs and concurrent_handler.rs
- add performance documentation to concurrent_handler.rs

* test: add edge case tests for critical functionality

- sorted set: infinity scores, empty set operations, inverted indices
- keyspace: zero/small TTL expiry, auto-deletion of empty collections
- keyspace: duplicate set members, overflow/underflow for incr/decr
- keyspace: empty keys, empty values, binary data

adds 22 new tests (223 -> 245 total)

* docs: update test count in README

- 245 tests (was showing 579 which was stale)
- ~20k lines of code

* docs: update CLAUDE.md with benchmark results

- add achieved metrics vs targets (1.86M SET, 2.48M GET, 0.4ms p99)
- update benchmark commands to use scripts folder
- memory overhead: 257 bytes/key in concurrent mode

* chore: update dependencies

- memchr 2.7.6 -> 2.8.0
- zerocopy 0.8.38 -> 0.8.39

* fix: correct test count (609) and LOC (~14k non-test)
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