Repository navigation
perf(embeddings): batch codebase imports and preserve cache contexts - #497
Conversation
…en-embedding-prefix-audit
…en-batch-embedding-paths
…en-batch-embedding-paths
…en-embedding-prefix-audit
…en-embedding-prefix-audit
…en-reuse-write-embeddings
…en-batch-embedding-paths
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
…rance Retracts docs/provenance/green-w3-2-encoding-identity.md's "no tolerance adopted" decision (PR cdeust#495). That gate required bitwise-exact equality between a scalar-path and a batched-path float32 computation, which no batched implementation can pass by construction: IEEE 754 float32 addition/multiplication isn't associative, so a batched matmul reduces in a different element order than N scalar calls and won't reproduce the same bit pattern even when both results are correct. Evidence this is what happened, not a coincidence: every delta PR cdeust#495 and PR cdeust#497 recorded as a rejection (1.64e-7, 1.19e-7, 1.06e-7, 9.31e-8, 1.40e-7) is within ~1.4x of float32 machine epsilon (2**-23 = 1.1920928955078125e-07) — the PR cdeust#495 score delta equals it exactly. Adds benchmarks/lib/numeric_equivalence.py: vectors_equivalent() (ULP tolerance per component) and rank_stable() (a score shift must not flip which candidate wins unless they were already tied within tolerance). Both are exercised in tests_py/benchmarks/test_numeric_equivalence.py against the exact deltas above, reproduced from the two PR bodies. Does not itself restore the batched code paths PR cdeust#495/cdeust#497 reverted — this session had no torch/sentence-transformers available to re-run either PR's own harness against the new gate. See the new doc's closing section for what a maintainer with the pinned model needs to re-check before doing that. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01StMBvNd7eVJGtpnC2zNsx1
cdeust
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
Reviewed the CI-trigger commit: git diff from 29f74c6 is empty and Git tree b4233ce5b5d9d9e1718d63367bac8141c5c31df9 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.
Batch independent codebase import embeddings while preserving the existing scalar cache context and capacity.
Other writer conversions and cache reduction remain outside this change. Includes the latest corrected prefix guard from #496.
Validation and review (2026-09-08):
1be0f388d2324c179a2dba4fb9e950d368429115.ca32ba50is 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
b4233ce5b5d9d9e1718d63367bac8141c5c31df9is identical to29f74c66d37ce18ca49c0a276fb2ecdaf2f925ac. The composed benchmark uses frozen commit5000f75e5d1ee14c5dd62db709a99f86792dab2d, whose tree matches final PR #502.