feat(compras): jornada física de devolução de itens rejeitados - #476
Merged
devmnsoft merged 1 commit intoSep 24, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Motivation
Description
20260924210000_compras_devolucao_fisica.sqlque cria as tabelascompras_empresarial_devolucao,compras_empresarial_devolucao_item,compras_empresarial_devolucao_eventoecompras_empresarial_devolucao_idempotencia, índices, constraints de estado/datas/quantidade e seeds de permissões, e atualiza omanifest.jsone scripts consolidados.DevolucaoCompraRepositorye registraIDevolucaoCompraRepository/IDevolucaoCompraApplicationServiceemDependencyInjection, com lógica transacional para reserva de saldo rejeitado, validação de saldo elegível, bloqueio estável de agregado e itens, e controle idempotente (request_hashv2).DevolucaoCompraApplicationServicee contratos (ComprasContracts.cs) e expõe endpoints API/Web para central, criação/edição de rascunho, detalhe, expedição, confirmação de entrega, cancelamento e exportação CSV, além de views Razor para index, nova e detalhe.DivergenciaRecebimentoRepositorypara usar ordem de locks consistente, aplicarpg_advisory_xact_lockna chave idempotente, oferecerHashV2(mantendo compatibilidade com hashes legados) e enriquecer eventos com campos (resultado, justificativa, responsável anterior/novo).script_completo*emanifest.jsoncom a migration e regera artefatos consolidados usados pelo pipeline de migrations.Testing
python3 -m json.tool database/postgres/migrations/manifest.jsonvalidated the manifest JSON.bash scripts/check-migration-catalog.shran static validation and checksum/catalog checks (semantic execution on PostgreSQL reported as BLOCKED by gate).bash scripts/validate-compras-schema-contracts.shvalidated SQL contracts relevant to compras.git diff --checkshowed no whitespace/patch errors and commit succeeded (feat(compras): implementar devolução física de rejeitados).dotnet build sigov.runtime.slnf --no-restorecould not be executed because the .NET SDK is not available in the environment.psql+ PostgreSQL 16 and the .NET runtime are omitted for lack of runtime infrastructure.Codex Task