Skip to content

fix(sse): register quota batch after imports resolve - #15548

Merged
diegosouzapw merged 119 commits into
diegosouzapw:release/v3.8.52from
wedreamer:fix/chat-quota-batch-init
Oct 6, 2026
Merged

diegosouzapw merged 119 commits into
diegosouzapw:release/v3.8.52from
wedreamer:fix/chat-quota-batch-init

Conversation

@wedreamer

Copy link
Copy Markdown
Contributor

Summary

  • Cold POST /v1/chat/completions, /v1/messages, and /v1/responses return an empty HTTP 500 after process start. The console error is TypeError: (0 , e.Zd) is not a function.
  • e.Zd is registerQuotaFetcher in quotaPreflight.ts, a real Map.set wrapper, not a missing export. Webpack emits that module as an async module. quotaTrackersBatch.ts called registerQuotaTrackersBatch() at module scope, so the first callee (registerAgentrouterQuotaFetcher) touched the live binding before it was a function. Next caches the rejected chat-route module, so every later chat request 500s. Restarting the same image does not help. GET /v1/models does not load this barrel and stays up.
  • Remove the module-load side effect. Call registerQuotaTrackersBatch() from the chat.ts module body (same point as the sibling registrars that already survive init) and from instrumentation-node.ts after await import. chat.ts is frozen at 2586 lines, so the new call replaces a blank line.

Related Issues

Validation

  • Change type: routing
  • Focused tests and category gates from the golden path
  • npm run lint — not run in this sparse checkout (no node_modules). CI lint is the gate.
  • Reconciled with the current active release base (release/v3.8.52 @ 23a11484); focused check rerun afterward
  • Production-code changes include a new or updated automated test in this PR
  • SonarQube is temporarily opt-in while the private project has no quota; it is not a PR gate.

Tests Added Or Updated

  • tests/unit/quota-trackers-batch-init.test.ts (added)

Local run, from a sparse checkout of this branch:

node --experimental-strip-types --test tests/unit/quota-trackers-batch-init.test.ts
# tests 3, pass 3, fail 0

The existing tests/unit/instrumentation-import-graph-12074.test.ts case "startup still registers bespoke, batch, and generic quota fetchers" still calls registerQuotaFetchers() and asserts getQuotaFetcher("agentrouter") is a function. That path now goes through the explicit call.

Coverage Notes

  • open-sse/services/quotaTrackersBatch.ts, src/sse/handlers/chat.ts, and src/instrumentation-node.ts are covered by the new source-contract test: no module-scope call, chat body calls the registrar before registerGenericQuotaFetchers(), instrumentation calls it only after the dynamic import resolves.
  • No coverage drop expected. The production change deletes a side effect and moves the same function call to the two callers that already owned registration.

Reviewer Notes

  • Reproduced on published image diegosouzapw/omniroute:latest sha256:8bd462c9f60d8eda79329cfbb6ea7ea723505fe7721beb944f3d43835409e218 (package 3.8.51, image created 2026-09-24). The side effect is unchanged on release/v3.8.52.
  • Throw site in that image: function k(){(0,e.Zd)("agentrouter",j),(0,f.registerMonitorFetcher)("agentrouter",j)} while chunk 80010.js module 502008 is still inside webpack's async dependency resolve. No source maps in the image.
  • chat.ts line count stays 2586, equal to config/quality/file-size-baseline.json.
  • Registration order is unchanged relative to registerGenericQuotaFetchers(), so bespoke batch fetchers still win over the generic registrar. Both call sites are idempotent (Map.set).

A module-load call to registerQuotaTrackersBatch() invokes
registerQuotaFetcher while webpack is still binding that async export.
Cold chat-route init then throws "(0 , e.Zd) is not a function" and
caches an empty HTTP 500 for every later chat/messages/responses request.
@wedreamer

Copy link
Copy Markdown
Contributor Author

CI for this fork PR finished as action_required with zero jobs — GitHub is waiting on a maintainer to approve workflows from a first-time contributor. I only have pull access, so I cannot approve them.

Semgrep cloud scan already passed. chat.ts stays at the frozen 2586-line baseline. Focused test run locally: node --experimental-strip-types --test tests/unit/quota-trackers-batch-init.test.ts (3/3).

Once the workflows are approved I will watch the gates and fix anything this change breaks.

@wedreamer

Copy link
Copy Markdown
Contributor Author

@diegosouzapw could you review this when you have a moment?

This is a production outage, not a cosmetic fix: on diegosouzapw/omniroute:latest (package 3.8.51, image sha256:8bd462c9f60d), a cold start makes every /v1/chat/completions, /v1/messages and /v1/responses return an empty HTTP 500. The throw is TypeError: (0 , e.Zd) is not a function while registerQuotaTrackersBatch() runs at module scope; e.Zd is registerQuotaFetcher, which is still an unresolved webpack async live binding. /v1/models is unaffected, and restarting the same image does not clear it because webpack caches the rejected module.

I am a first-time contributor, so the required workflows (CI, Quality Gates, API Route Typecheck, semgrep) are stuck at action_required with zero jobs. Mergify also will not queue this until you apply the queue label.

Could you approve those workflow runs and, if the fix looks right, queue the PR? Happy to adjust the patch if you want a different init boundary.

diegosouzapw and others added 25 commits October 6, 2026 11:33
…purify 3.4.16 and patched npm-bundled copies in the image (diegosouzapw#15325)

- next/eslint-config-next 16.3.5 -> 16.3.6 (critical RCE in next/og ImageResponse).
- override axios ^1.20.0 so ibm-cloud-sdk-core's exact 1.18.0 pin cannot keep the vulnerable copy.
- @grpc/grpc-js 1.14.5, dompurify 3.4.16 via lockfile.
- Dockerfile npm-internals overlay: undici 6.29.0, brace-expansion 5.0.12, ip-address 10.7.3.
node-forge has no patched release yet (dev-only, via promptfoo -> jks-js).
…gosouzapw#15003)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…zapw#15225)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
… Rule diegosouzapw#16 (diegosouzapw#15389)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
… text (diegosouzapw#15399)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…alog (diegosouzapw#15396)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…iegosouzapw#15395)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…osouzapw#15378)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
diegosouzapw#15432)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…get (diegosouzapw#15433)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…#15434)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…pw#15463)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…pass (diegosouzapw#15560)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…ead of failing silently (diegosouzapw#15362)

Validated in a combined 14-PR board on the current release tip (112313a): 111 focused tests, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…zapw#15224)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…umn name" (diegosouzapw#15236)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…guard (diegosouzapw#15239)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…rt failures (diegosouzapw#15248)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
… in pool visibility (diegosouzapw#15374)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…ouzapw#15375)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…osouzapw#15398)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…diegosouzapw#15402)

Validated in a combined board on the current release tip: focused node:test + vitest suites, typecheck:core, open-sse typecheck, gate-manifest, mutation-test-coverage, file-size, changelog-integrity, complexity, env-doc-sync, test-discovery, vitest-exclusions, error-helper, cli-i18n and the i18n new-keys/ui-coverage gates green. Thank you for the contribution.
…zapw#15443)

Brought the tip into the branch (the stacked parent commit had landed as a squash) and revalidated: focused tests, typecheck:core, open-sse typecheck, file-size, changelog-integrity, complexity and mutation-test-coverage green. Thank you for the contribution.
…journal (diegosouzapw#15390)

Brought the tip into the branch (the stacked parent commit had landed as a squash) and revalidated: focused tests, typecheck:core, open-sse typecheck, file-size, changelog-integrity, complexity and mutation-test-coverage green. Thank you for the contribution.
woodsonl and others added 29 commits October 6, 2026 18:22
…e catalogs (diegosouzapw#15599)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…pw#15346)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…thrown save (diegosouzapw#15600)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
diegosouzapw#15583)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…pw#15593)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…ig saves (diegosouzapw#15592)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…d fails (diegosouzapw#15587)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…ouzapw#15612)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…egosouzapw#15604)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…ale saves (diegosouzapw#15571)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…#15589)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…ine tests (diegosouzapw#15610)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…le mirrors (diegosouzapw#15618)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…ed semantics (diegosouzapw#15617)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
…ckbox (diegosouzapw#15605)

Onda 3 (woodsonl) validada num único board em `.claude/worktrees/batch-w3` sobre `origin/release/v3.8.52` (`4f4c983347b9`), 27 PRs, superfícies protegidas 0.

Evidência: `typecheck:core` limpo. i18n drift limpo no board. changelog-integrity ok. file-size ok (170 congelados). complexity 2975/3218 e cognitive-complexity 1357/1437 dentro do baseline. node:test focado: 1868 passaram, 0 falharam. Vitest da UI: 150 passaram em 12 arquivos. Os 38 do RTK caem no `useCallback` nulo de `node_modules/node_modules/react` via zustand, o mesmo React duplicado desta worktree. Onde dois PRs mexiam no mesmo save, o board ficou com os dois comportamentos: escrita parcial de engine por id e a fila/resync do PR que entrou depois.

O hash de `.i18n-state.json` do guia de quality-gates entra no follow-up, fora do squash.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @woodsonl.
Follow-up da onda 3. Os guias de compressão, environment e quality-gates já entraram nos squashes do @woodsonl. Este commit só regrava os hashes de `.i18n-state.json` para bater com o que está no disco. Nenhum doc foi reescrito aqui.

file-size no pai `5a82a1c0` ficou verde (170 congelados, 46 testes). Não há bump de teto. O drift de i18n passou depois do `--adopt`.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).
…gosouzapw#15435)

Onda 4. O restante do lote do @maxmad64bis já estava na release. Este squash é o índice cobrindo da matriz de saúde (migration 200) mais a reserva dos buracos 197, 198 e 199.

197 e 198 continuam com o diegosouzapw#15564. 199 continua com o diegosouzapw#15314. Os dois ainda estão abertos. Sem a reserva, o gate de numeração quebrava no tip no momento em que o 200 entrasse.

Evidência neste board: `check-migration-numbering` OK (194 migrations, 6 gaps). Testes focados: 26 passaram, 0 falharam (`check-migration-numbering`, `migration-200-provider-health-matrix-cover`, `call-logs-family-agg`). O índice é `CREATE INDEX IF NOT EXISTS` e a segunda corrida é no-op.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @maxmad64bis.
…egosouzapw#15370)

Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
…egosouzapw#15371)

Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
…uzapw#15372)

Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
…iegosouzapw#15373)

Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
…15577)

Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
Onda 7. Bumps do Dependabot que não encostam no lock da raiz: workflows (Trunk uploader 2.1.5, CodeQL 4.38.2) e locks de folha (plugin v2 e electron 44.5.1, depois o http-cache-semantics do electron).

O board em `.claude/worktrees/batch-w7` sobre `f715c86f` mergeou os sete sem conflito e sem `package-lock.json` da raiz. diegosouzapw#15577 entra antes de diegosouzapw#15649.

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).

Obrigado, @dependabot.
…pw#15686)

O diegosouzapw#15434 já publicava o status do stream de eventos da Trae quando `!res.ok || !res.body`. Um 200 sem body é falha local do stream, e mesmo assim o 200 entrava como status de upstream.

Agora o `upstreamStatus` só é gravado quando `!res.ok`. O throw continua nos dois casos. O caminho de criar sessão já estava certo e não mudou.

O teste "event stream 2xx without a body" falhou no tip (`200 !== undefined`) e passou depois do ajuste. Os outros quatro do arquivo continuam verdes (429, 503, refresh).

⚠️ base-red inherited: diegosouzapw#15306 (timeouts de suíte no tip, não neste diff).
The release removed the side-effect import. The named import and the
call after the other imports stay, so the webpack async binding does
not run at module load.
@diegosouzapw
diegosouzapw merged commit 17d1cca into diegosouzapw:release/v3.8.52 Oct 6, 2026
3 checks passed
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.

fix(backend): Cold chat route returns empty HTTP 500: (0 , e.Zd) is not a function

7 participants