Repository navigation
Conversation
A signed synthetic hosted request returned HTTP 530. The previous enum-only status switch treated that server-side failure as a client rejection, so explicit index builds skipped their bounded retry budget and diagnostics blamed the client. Classify the numeric 500–599 range as provider unavailable while preserving 429 and 4xx handling; add HTTP-mock coverage for 403 and 530. This does not restore the hosted service or alter ranking or retrieval breadth. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
This was referenced Sep 26, 2026
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.
What changed
Classify every numeric HTTP 5xx response from the embedding provider as
EmbeddingProviderUnavailable, including non-standard codes such as 530 that Zig's status enum does not name. Keep HTTP 429 asEmbeddingRateLimitedand 4xx responses asEmbeddingProviderRejected. Add mock HTTP coverage for 403 and 530 alongside the existing 429 and 500 cases.Why
A disposable, device-enrolled synthetic
semantic-indexrun received HTTP 530 on signed embedding requests. The previous switch listed only standard 5xx enum members and put 530 in its defaultEmbeddingProviderRejectedbranch, misdiagnosing a server-side status as a client rejection. Numeric 500–599 classification follows HTTP status classes without special-casing one provider code. The trade-off is treating any provider-specific 5xx as unavailable even if that provider meant it to be permanent; 4xx and 429 retain their existing classes. Treating 530 as a compact-transport negotiation error was rejected because a legacy retry also received 530 before this change.This fixes classification, not the hosted service. No model, ranking weight, ANN candidate breadth, local-CPU embedding, credential, or telemetry policy changes.
Verification — exact head
7063ca9f681fe00673528ffa6f13ff71cec3abe2zig build test-semantic -Dtest-filter='provider 4xx and 5xx responses fail closed with retryable classes' --summary all --cache-dir .graff/verify/pr761-direct-cache— 1/1 passed in a fresh, clean exact-head run after PR creation.zig build test --summary all— 33/33 steps succeeded; 1,621 tests passed and 13 skipped.zig build test --summary all --cache-dir .graff/verify/pr761-direct-cache— 31/33 steps succeeded; 1,620 passed, 13 skipped, oneEmbeddingTimeoutin the unchanged explicit-index retry test. The same test failed on cleanrelease/0.2.5856at565238036b7a2e29dc13972a45f5d59910d3fbfd; do not treat the full suite as consistently green.zig build -Doptimize=ReleaseFastsucceeded. A copied candidate (SHA-25680b97bffb9aaa42ef41f7c664f9833b44277af7c5406a109873557b99907e389) ran isolated signedsemantic-indexwith telemetry disabled: it exited withEmbeddingProviderUnavailable, notEmbeddingProviderRejectedor a panic. The provider is still unhealthy; this is not a live-retrieval pass.python3 scripts/e2e_mcp_test.py --binary .graff/verify/hosted-probe/codedb-5xx-candidate --project "$PWD"— 76/76 passed on this commit, including sensitive-path and semantic-boundary cases.benchpassed (8m49s) andmacos-resource-regressionpassed (3m50s);guardskipped while draft. The PR-ready preflight has not accepted the local check receipt/test reachability, so no ready-state write occurred.Do not tag, sign, or publish a release from this PR alone: the hosted provider still needs a successful live retrieval check, and separate release gates remain open.