Skip to content

[P2/P3] lote falha-total vira erro; bypass-note em erro; andamentos determinístico - #71

Merged
milkway merged 1 commit into
mainfrom
fix/batch-bypass-ordenar
Jun 17, 2026
Merged

[P2/P3] lote falha-total vira erro; bypass-note em erro; andamentos determinístico#71
milkway merged 1 commit into
mainfrom
fix/batch-bypass-ordenar

Conversation

@milkway

@milkway milkway commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #68, fixes #69, fixes #70.

  • lotes (P2): /v1/procedimentos e /v1/documentos propagam erro (não-2xx, não cacheável) quando nenhum item teve sucesso e houve falha transitória (timeout/indisponível/HTTP/parse). all-SoapFault (inexistentes) segue 200 com erros por item.
  • bypass (P2): o no-cache/no-store registra note mesmo em erro → o middleware aplica Cache-Control: no-store também na resposta de erro.
  • andamentos (P3): coleta com buffered (não buffer_unordered) → ordem determinística com ordenar=false.

50 testes. Validado: lote all-fail → 502; no-store em erro → header no-store.

🤖 Generated with Claude Code

… determinístico

- /v1/procedimentos e /v1/documentos: se nenhum item teve sucesso e houve falha
  transitória (timeout/indisponível/HTTP/parse), propaga o erro (não-2xx, não
  cacheável) em vez de 200 ok:true. all-SoapFault (inexistentes) segue 200.
- cache: o bypass (no-cache/no-store) registra `note` mesmo em erro, para o
  middleware aplicar Cache-Control: no-store também na resposta de erro.
- andamentos: coleta dos lotes com `buffered` (não buffer_unordered) -> ordem
  determinística quando ordenar=false (ordem dos lotes + do SEI).

50 testes (lote falha-total -> 502; no-store em erro -> header no-store).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@milkway
milkway merged commit 70b53bd into main Jun 17, 2026
2 checks passed
@milkway
milkway deleted the fix/batch-bypass-ordenar branch June 17, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant