Skip to content

fix(proxy-logs): keep the HTTP status the provider actually returned on search rows - #14220

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
maxmad64bis:fix/n92-search-upstream-status
Sep 22, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.51from
maxmad64bis:fix/n92-search-upstream-status

Conversation

@maxmad64bis

@maxmad64bis maxmad64bis commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ base-red inherited: #13866

Summary

Search proxy-log rows always read "no response received", even when the provider answered with a 429, 403, or 500. The chat writer already captures the received status; the search writer never forwarded it. After this change, search rows carry the status the provider actually returned, and keep null only when no response arrived.

Related Issues

Validation

  • Change type: provider
  • Focused tests and category gates from the golden path
  • npm run lint — ESLint 0 on the two touched source/test files; the full eslint . run is red on the base, unrelated to this diff.
  • Reconciled with the current active release base; focused checks rerun afterward — rev-list --count HEAD..upstream/release/v3.8.51 = 0, gates re-run after the last amend.
  • Production-code changes include a new or updated automated test in this PR — new tests/unit/search-proxy-upstream-status.test.ts (6 cases, RED-then-GREEN).

Tests Added Or Updated

  • New tests/unit/search-proxy-upstream-status.test.ts (6 cases, local HTTP server, journal capture): real 429/200/500 arrive on the row (RED before: null), transport timeout and synthesized envelope codes stay null; neighbor search-432-plan-limit-cooldown.test.ts still green (7/7).

Coverage Notes

  • Single-file change plus test: executeProviderFetch is the only search path, so every search provider is covered without a list.

Reviewer Notes

@maxmad64bis
maxmad64bis force-pushed the fix/n92-search-upstream-status branch from 373f3b6 to 0c3744d Compare September 19, 2026 22:54
@maxmad64bis
maxmad64bis marked this pull request as ready for review September 19, 2026 22:59
…on search rows

Search proxy-log rows always read null (no response received), even when the
provider answered with a 429, 403, or 500, so operators could not tell a real
refusal from a transport failure. Forward response.status at the four
emitEvent call sites; locally synthesized codes (envelope, transport) stay
null, matching the chat writer. Verified: new test 6/6 RED-then-GREEN,
neighbor search-432 7/7.
@maxmad64bis
maxmad64bis force-pushed the fix/n92-search-upstream-status branch from 0c3744d to 15abf90 Compare September 19, 2026 23:10
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @maxmad64bis — merging via the release merge-train. Validated in local merge-train (mt-train10c) on the devbox @ train tip 4d841aa1c740bbaa03868dc0a403c62099a99a42 with the 72 sibling PRs of this batch: typecheck:core, file-size, complexity, cognitive-complexity, changelog-integrity green; changed-area node:test 831/831 (0 failing) and vitest 480/482 — the two reds are autoCombo/provider-family-combos.test.ts timing out at 20s, which reproduces on the PURE release tip under the full vitest suite (and is already tracked by the Release-Green issue #13866), so it is inherited, not this batch's. Merged --admin per merge-gates §3/§4/§7.

@diegosouzapw
diegosouzapw merged commit df717be into diegosouzapw:release/v3.8.51 Sep 22, 2026
7 of 16 checks passed
@maxmad64bis
maxmad64bis deleted the fix/n92-search-upstream-status branch September 24, 2026 21:14
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