fix(selfhost): keep embedding errors status-only#5111
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5111 +/- ##
==========================================
- Coverage 94.13% 94.13% -0.01%
==========================================
Files 466 466
Lines 39573 39571 -2
Branches 14436 14435 -1
==========================================
- Hits 37254 37252 -2
Misses 1664 1664
Partials 655 655
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-11 15:22:21 UTC
⏸️ Suggested Action - Manual Review
Review summary Blockers
Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
Description
/embeddingsresponse bodies by throwing a status-only error insrc/selfhost/ai.ts(now throwsai_embed_http_<status>instead of includingres.text()content).test/unit/selfhost-ai.test.tsto assert that embedding errors surface only the status code and that provider-controlled error bodies are not read.Testing
npx vitest run test/unit/selfhost-ai.test.ts -t "embeddings response|provider-controlled embeddings" --pool=forks, and the focused test suite passed.git diff --checkto verify whitespace/conflict hygiene, and it succeeded.npm run test:ci/ unsharded coverage run was not executed in this environment; only the targeted unit tests listed above were run automatically and passed.Codex Task