fix: security + multi-agent hardening — transactions, busy_timeout, input limits#56
Open
pszymkowiak wants to merge 1 commit intomainfrom
Open
fix: security + multi-agent hardening — transactions, busy_timeout, input limits#56pszymkowiak wants to merge 1 commit intomainfrom
pszymkowiak wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Deep security + multi-agent concurrency audit fixes. Makes ICM safe for multiple agents writing to the same database simultaneously.
Critical fixes (3):
BEGIN IMMEDIATEin all write transactions (prevents race conditions between agents)PRAGMA busy_timeout=5000on every connection (retry instead of fail on lock contention)High fixes (2):
store()wrapped in atomic transaction (2 INSERTs now atomic — memories + vec_memories)consolidate_topic()callsstore_inner()to avoid nested transactionsMedium fixes (3):
is_char_boundary()instead of raw byte slice)julianday()comparison, prevents double-apply)Tests: 185 total (+3 new)
test_store_is_atomictest_busy_timeout_pragmatest_fts_sanitize_utf8_safeTest plan
cargo fmtclean🤖 Generated with Claude Code