chore: integrate reviewed maintenance PR queue - #22
Merged
Conversation
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
…ore loop Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Tested edge cases and happy path, significantly improving coverage. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
- Extracted `validate_export_request` to handle preliminary cursor and parameter bounds checking. - Extracted `resolve_high_water_mark` to determine and validate the query high water mark constraint. - Extracted `validate_export_cursor` to check cursor validity against queried sequence counts. - Extracted `pack_export_page` to handle serialization size bounding and commit packing. - Reduced the size and complexity of the primary `export` method by delegating these distinct steps. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
- Extracts input validation logic into `validate_apply_input`. - Extracts inner loop commit processing into `apply_commit`. - Greatly simplifies the `MemoryDb::apply` method. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
- Fixes the formatting issues detected by `cargo fmt --check` in the previous run. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Make lexical_queries pub(super) and add missing test coverage for empty query, single word, multiple words, deduplication, escaping, punctuation, and token limits. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Make lexical_queries pub(super) and add missing test coverage for empty query, single word, multiple words, deduplication, escaping, punctuation, and token limits. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
This adds three new tests for the `readFile` functionality: - A test that invalid zkr paths correctly throw "invalid zkr memory path". - A test that reads are correctly mapped to the underlying CLI "get" command with extracted params. - A test validating the pagination logic (extracting line subsets) and truncation values using the `from` and `lines` parameter. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
This fixes formatting errors and adds three new tests for the `readFile` functionality: - A test that invalid zkr paths correctly throw "invalid zkr memory path". - A test that reads are correctly mapped to the underlying CLI "get" command with extracted params. - A test validating the pagination logic (extracting line subsets) and truncation values using the `from` and `lines` parameter. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
- Decomposed `delete_source` in `src/store/lifecycle.rs` into multiple well-named private helper functions. - Preserved existing logic, order of operations, and tests passing state. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
- Decomposed `delete_source` in `src/store/lifecycle.rs` into multiple well-named private helper functions. - Preserved existing logic, order of operations, and tests passing state. - Formatted file per `cargo fmt`. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
- Decomposed `delete_source` in `src/store/lifecycle.rs` into multiple well-named private helper functions. - Preserved existing logic, order of operations, and tests passing state. - Formatted file per `cargo fmt`. - Addressed clippy complaints for type_complexity and too_many_arguments. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Replaced a verbose 15-line test that dynamically generated a mock `zkr` script with two concise tests using standard shell commands (`echo` and `false`). These simple tests successfully trigger the JSON parsing error path and the non-zero exit code error path in `cli.ts`, improving test maintainability and driving coverage to 100%. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Fix test string format to match expected output and run cargo fmt. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Extracted the checking and insertion queries from the inner apply loops into cached prepared statements to prevent query parsing/compilation overhead on each of the thousands of records. Benchmarked using 25,000 records resulting in an approx. 4.1x performance increase (331ms baseline down to ~79ms). Included explicit drop of the cached statements to comply with Rust borrow checking before the transaction commit. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_e8d13b7c-1f33-4b40-8308-80717a9bea4f) |
This was referenced Aug 12, 2026
This was referenced Aug 12, 2026
Merged
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.
Integrates the reviewed open PR queue after resolving overlapping test modules and composing the apply/repair refactors with cached statement performance optimizations.
Validated locally:
Note
Medium Risk
Touches critical memory store paths (apply, export, deletion, repair) via structural refactors and statement caching, so regressions could affect data integrity even though behavior is intended to stay the same.
Overview
Integrates a reviewed maintenance queue: refactors large store and personality paths into smaller helpers, caches prepared SQLite statements in apply/export/repair, and expands test coverage.
Store refactors split
apply,export, anddelete_sourceinto focused helpers (validate_apply_input/apply_commit,pack_export_page/validate_export_*, deletion target/soft-delete/retract helpers) while preserving existing behavior. Apply, export append, and repair now reuseprepare_cachedstatements.Personality extracts hard-rule and learned-policy evaluation from
route_eventintoevaluate_hard_rules/evaluate_learned_policywith no routing logic change.Tests add coverage for claim-evidence validation, memory-state legality, repair outbox handling, correction lifecycle, lexical query edge cases, OpenClaw exact-read/path rejection, and CLI help/error paths.
Reviewed by Cursor Bugbot for commit 619ec84. Configure here.