Repository navigation
fix(indexing): partial settings rollback, clone cancellation & 409 lock guard, minified input halving retry, and pipeline concurrency (#183, #184, #185, #186) - #187
Merged
Conversation
added 2 commits
November 20, 2026 13:45
…e init_embeddings contract
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
Resolves four issues discovered during deployment testing on v2.28.1:
Partial Embedding Settings Update & Atomic Rollback on Failure (
#183):EmbeddingSettingsRequest.providerdefault from"local"toNoneso partial payloads (e.g.,{"api_concurrency": 8}) retain the saved provider and model.update_embedding_configandinit_embeddingsto initialize candidate models/clients before persisting tosystem_metadataand to snapshot/restore all module globals and active clients if initialization fails.Clone Subprocess Cancellation, DB Status Sync, and HTTP 409 on Overlapping Sync (
#184):_run_cancellable_git_cmdinapp/services/git_manager.pysoshallow_clone_repopollsprogress_tracker.is_cancelled(repo_id)and terminates/kills thegit cloneorgit fetchsubprocess immediately on cancel._mark_repo_cancelledinapp/services/indexing/git_syncer.pyso cancelling a sync at any stage updatesgit_repositories.status = 'error'in the database to stay consistent withsync-status.is_repo_sync_running(repo_id)and updatedPOST /admin/api/repos/{repo_id}/sync(api_sync_repo) to return HTTP409 Conflict(status: "already_running") when the per-repository sync lock is already held.Dense/Minified Input Token Estimation & Single-Input HTTP 400 Halving Retry (
#185):_chars_per_token_for_textinapp/services/embedding_batcher.pyto use a conservative2 chars/tokenratio for dense/minified files (high punctuation ratio or long lines such as minified CSS/JS, HTML fixtures, or literal arrays) during pre-batch truncation.400input-length error inexecute_api_embeddings_batch, truncates the input in half and retries up to 3 times before skipping so the file chunk is embedded instead of dropped.Shared Concurrency Preservation Across Pipeline Slices (
#186):EmbeddingTelemetryAndPacer.get_effective_concurrencynon-clamping on_current_concurrency(min(self._current_concurrency, max_c)) and addedset_target_concurrencyoninit_embeddings.ChannelIngestionPipelineto trackactive_futsacross batches and passmax_concurrency=max_conctoexecute_api_embeddings_batchsoapi_concurrencyrequests run in parallel without clampingactive_concurrencyto1.Closes #183
Closes #184
Closes #185
Closes #186
Verification
tests/test_embedding_input_limits_and_pipeline_recovery.pyand verified all existing embedding, git manager, sync progress, and 500-LOC guardrail test suites pass.