Skip to content

perf(memory): remove repeated reads and batch first-write slot allocation - #501

Merged
cdeust merged 100 commits into
mainfrom
perf/green-batch-memory-reads
Sep 8, 2026
Merged

cdeust merged 100 commits into
mainfrom
perf/green-batch-memory-reads

Conversation

@cdeust

@cdeust cdeust commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Reuse observed rows and request-local candidate embeddings; allocate initial engram slots in one SQL statement. Curation still reads fresh supersession state.

Native fixture: first inserted remember 5,026→20 SQL statements; recall 27→26, including post-fusion SELECTs 6→5. Responses and vectors matched. Five total SQL statements remains an unmet broader target.

Validation and review (2026-09-08):

  • Reviewed the implemented diff for correctness, security, lifecycle and ordering; no unresolved source finding.
  • Integrated current main (including deps: refresh compatible dependencies and align plugin launcher pins #491) and every updated parent. Reviewed head: e7eee7f10a0e18150c226c87223e80447b493889.
  • Combined runtime tree: locked Ruff/format, craftsmanship and Pyright pass; full suite 8,013 passed, 257 skipped, one stale private dependency-fixture failure. Correcting that fixture without changing assertions yields 4/4 launcher tests passing. The added baseline setup and matrix tests pass 8/8. GitHub CI is running on each new head.
  • Full LongMemEval/LoCoMo comparison against main ca32ba50 is running on separate disposable databases with identical public datasets. It uses the repository's existing 0.005 tolerance; no acceptance result is claimed before completion.

Historical measurements apply to their recorded revisions and scopes. The current PR is authorized for merge after applicable checks; remaining optimization targets above are not presented as completed benefits.

The latest commit only triggers main-targeted security checks. Its tree fd5bee4ec126ee621361fcea12b3b2f37e138701 is identical to f8e57919cd9e8813a284a3eb81f172d97243f2f1. The composed benchmark uses frozen commit 5000f75e5d1ee14c5dd62db709a99f86792dab2d, whose tree matches final PR #502.

cdeust and others added 16 commits September 7, 2026 19:53
Brings in #503 (floor check non-blocking + --no-regression gate) and
#505 (mcp-host-config timeout sized to its measured tail), so this PR
is verified against the CI its merge will actually land on.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
Brings in #506 (docker-smoke cache export skipped on pull_request), the
fix for the Docker Smoke timeout that was the only red check on this
branch's last run.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
@cdeust
cdeust marked this pull request as ready for review September 8, 2026 19:37

@cdeust cdeust left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed source review of this implemented scope and its parent integration. No unresolved correctness, security or lifecycle finding. The description records limitations rather than claiming unmet optimization targets. Merge remains gated on current required CI and applicable baseline quality evidence. Review includes independent read-only review of the per-PR diff and combined locked local tests.

@cdeust
cdeust changed the base branch from perf/green-reranker-ablation to main September 8, 2026 20:53

@cdeust cdeust left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the CI-trigger commit: git diff from f8e5791 is empty and Git tree fd5bee4ec126ee621361fcea12b3b2f37e138701 is unchanged. Previous source review and test evidence apply to this identical tree. Required main-targeted checks are now running; no protection bypass is used.

@cdeust cdeust left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head 1fbceb1 including inherited test fix75fb7740.

The only source delta since the prior review is two PostgreSQL semantic test helpers. Both execute real production SQL with transaction-local exact scans; the scoring helper pins the real executor to the same pooled connection. All assertions are unchanged. Production runtime, scripts and benchmark trees are identical to the reviewed benchmark candidate.

Validation:35 native PostgreSQL tests passed (scoring-debias, near-duplicate pairs, indexed pools), zero skips; planner settings restore on both helpers. A rollback-only mutation removing the two real SQL auto-capture exclusions reverses curated/auto ranking and is rejected by the unchanged assertion. Ruff and formatting pass.

Empirical control: with2000 varied deleted vectors, default near-duplicate search missed a pair which exact search recovered. Forced ANN also changed recall score contributions. The precise CI curated-order inversion was not reproduced; it remains consistent with incomplete ANN membership, rather than proven as that incident's cause. These fixtures assert exact scoring/pair semantics, while ANN plans are covered separately. Fresh CI and the full baseline/candidate quality comparison remain merge gates.

Review recorded as COMMENT because this account owns the PR; no independent approval is claimed.

@cdeust
cdeust merged commit 24aa379 into main Sep 8, 2026
28 checks passed
@cdeust
cdeust deleted the perf/green-batch-memory-reads branch September 9, 2026 07:37
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.

2 participants