Skip to content

fix: Double embedding pass on fresh index - #260

Merged
Pringled merged 6 commits into
mainfrom
fix/subfolder-gitignore-and-double-embed
Sep 5, 2026
Merged

fix: Double embedding pass on fresh index#260
Pringled merged 6 commits into
mainfrom
fix/subfolder-gitignore-and-double-embed

Conversation

@Pringled

@Pringled Pringled commented Sep 5, 2026

Copy link
Copy Markdown
Member

This PR fixes a double embedding pass on fresh indexes. We had a guard for checking if there was a previous index on the second call, but not on the first one, which is now added. This speeds up Semble by ~34%, so the benchmarks/claims are also updated.

Also found a small visual bug on newer Python versions with the installer enum printing which is fixed.

Fresh index builds embedded every file's chunks in the per-file loop and
then embedded the whole corpus again at the end. Only incremental builds
need the per-file vectors, so the fresh path now does a single batched
encode. Cold index time on the speed benchmark drops from 518 ms to
383 ms; READMEs, plot data, and the cold plot are updated to match.

The installer printed IntegrationType members through an f-string, which
renders as IntegrationType.MCP on Python 3.11+. Use the enum value.

Claude-Session: https://claude.ai/code/session_01JtE5efYw5bBqbbwhkkuXv2
Keep main's per-file embedding in the loop and reuse those vectors for
fresh builds instead of encoding the whole corpus a second time. This
removes the extra branch, so no complexity suppression is needed.

Per-file encoding is also slightly faster than one repo-wide batch,
because the tokenizer pads each batch to its longest text. Cold index
time on the speed benchmark is now 344 ms; NDCG@10 on the quality
benchmark is unchanged (0.8524 -> 0.8527).

Claude-Session: https://claude.ai/code/session_01JtE5efYw5bBqbbwhkkuXv2
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/semble/index/create.py 100.00% <100.00%> (ø)
src/semble/installer/installer.py 100.00% <100.00%> (ø)
src/semble/version.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Sep 5, 2026

Copy link
Copy Markdown

Confidence Score: 4/5

The functional indexing fix appears safe to merge, with a non-blocking benchmark-provenance concern in the refreshed performance claims.

Vector parts remain aligned with chunks on both fresh and incremental builds, and installer identifiers satisfy the new enum access; the only accepted issue is that the published comparison mixes newly measured Semble timings with baselines from an earlier run.

Files Needing Attention: benchmarks/results/speed-5fcc8a0a7b89.json

Reviews (1): Last reviewed commit: "benchmarks: speed results for 5fcc8a0a7b..." | Re-trigger Greptile

Comment thread benchmarks/results/speed-5fcc8a0a7b89.json
@Pringled
Pringled merged commit a790780 into main Sep 5, 2026
16 checks passed
@Pringled
Pringled deleted the fix/subfolder-gitignore-and-double-embed branch September 5, 2026 06:03
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