fix(huggingchat): surface HTTP 200 JSONL failures - #12456
Merged
diegosouzapw merged 4 commits intoSep 3, 2026
Merged
Conversation
Comment on lines
+558
to
+563
| JSON.stringify( | ||
| buildErrorBody(502, message, undefined, { | ||
| type: "upstream_error", | ||
| code: "huggingchat_generation_error", | ||
| }) | ||
| ), |
Comment on lines
+633
to
+638
| JSON.stringify( | ||
| buildErrorBody(502, message, undefined, { | ||
| type: "upstream_error", | ||
| code: "huggingchat_generation_error", | ||
| }) | ||
| ), |
…huggingchat-stream-error-boundary
…huggingchat-stream-error-boundary
diegosouzapw
marked this pull request as ready for review
September 3, 2026 23:59
5 tasks done
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
Validado em lote numa worktree combinada com os 14 PRs desta campanha de error-boundary sobre o tip de `release/v3.8.51`: `typecheck:core` limpo e **120/120** nos 23 arquivos de teste que os PRs trazem. Um ponto que só apareceu no tree combinado: **diegosouzapw#12465 e diegosouzapw#12466 criam o mesmo arquivo novo** `open-sse/utils/streamReadiness.ts` (que não existe no tip) com desenhos divergentes de cancelamento — `cancelled` + `releaseLock` imediato num, `readInFlight`/`cancelRequested` com `cancelReader` fire-and-forget no outro. Adotei a versão do diegosouzapw#12466, que difere e defere o release do lock para quando a leitura em voo termina, e validei a escolha rodando as suítes dos **dois** PRs contra ela: 21/21 no readiness compartilhado e 22/22 incluindo o boundary do Perplexity.
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
status: "error"as an authoritative generation failurefinish_reason: "stop"cancel()never resolvestest:unit:fastcannot share module-cached persistence state with adjacent filesBehavioral boundary
huggingchat_generation_errorfinish_reason: "error"and[DONE]; fixed public messagestream_pipeline_error, failure usage and fallback callback recordedfinish_reason: "stop",[DONE]TDD evidence
The production regression was written against release base
7802f6ea163f18f349348dbfd8710a159ac32e15before implementation.finish_reason: "stop"+[DONE]cancel()never resolvedController is already closedafter cancelThe test-isolation regression was then reproduced and repaired separately:
call-log-save-drain,--test-isolation=none, concurrency 1test:unit:fastimports and--test-force-exit, no concurrency overrideFinal candidate evidence
Reconciled by normal merge commits through live release SHA
bf0d902dfc5369bd025f64808d96fe6cb473ea75. The latest merge commit has that exact live tip as its second parent. Drift from6da2418247d75acd0af3a617c7289b004b5a86f5tobf0d902dfc5369bd025f64808d96fe6cb473ea75had no intersection with the five owned PR paths, so no semantic conflict resolution or production edit was required.Head SHA:
20d7b82118cfae850eb299ca737f810ae12534cftest:unit:fasttopology,--test-isolation=none, no concurrency overrideopenSseTypecheckErrors=0--pass-on-unpruned-suppressions, zero findingsorigin/release/v3.8.51; clean diffsecretFindings=0; no forbidden tracked artifactsHOME,CODEX_HOME, credentials, orNODE_TEST_CONTEXTExact source hashes after reconciliation:
open-sse/executors/huggingchat.ts41013d05ad4fa1ed099cbc10db1822dbc2f5ff968adaf27246efc8870c93dd3copen-sse/executors/huggingchat/jsonlStream.tse63c60ab3f974978cc86f65bccdf7b3936091a36f4a1fe41283a1a0f4fb1c387tests/unit/huggingchat-stream-error-boundary.test.ts3e47baea663db40dda632a80d3e4da745a3eb43cf9051dfc07379dfef8038eaftests/unit/_fixtures/huggingchat-stream-error-boundary.fixture.tsddf5a7878dd410f42d61fb6d30ec3db5c56a1b5363d8f24b15a231a55c66627cGraph verification
Best-effort project
home-diegosouzapw-dev-proxys-OmniRoute, generation2026-09-02T07:48:51Z: the operated production paths reportmetadata_match/no_recorded_issue. The wrapper reports graph freshness missing and the child fixture is intentionally excluded undertests/unit/_fixtures, so both were verified directly from source and by execution.Scope note
Pre-existing fetch-catch response handling elsewhere in
huggingchat.tsis unchanged and is being hardened in a separate public-error PR; this change intentionally owns only the JSONL generation boundary.This PR is intentionally left open as a draft. No merge, automerge, deployment, or release action is included.