Skip to content

feat(almoxarifado): transferências rastreáveis com recebimento parcial - #421

Merged
devmnsoft merged 1 commit into
mainfrom
codex/implementar-entrega-integrada-do-estoque
Sep 16, 2026
Merged

devmnsoft merged 1 commit into
mainfrom
codex/implementar-entrega-integrada-do-estoque

Conversation

@devmnsoft

Copy link
Copy Markdown
Owner

Motivation

  • Provide a canonical, tenant-scoped transfer workflow (draft → expedition → partial receipts) that preserves traceability and keeps stock integrity with atomic movements.
  • Close the gap where transfer routes redirected to generic stock views without persistence, idempotency, events or per-item receipts and divergences.
  • Keep stock and patrimony domains separated and avoid destructive changes to legacy keys while adding forward-only migration artifacts.

Description

  • Added transfer domain contracts and DTOs to the Almoxarifado application contract to model transfer creation, items, receipts and responses. (Transferencia* types).
  • Implemented tenant- and entity-scoped Dapper persistence and business logic for transfers in a partial AlmoxarifadoService extension that supports listing, creating (draft), expediting (locking and creating outgoing movements) and receiving (partial, idempotent receipts, divergence tracking), with events and movement linkage.
  • Exposed API and MVC endpoints for transfer lifecycle and added Razor views and forms for listing, creating, viewing, expediting and receiving transfers with antiforgery and basic UI validation.
  • Added a forward-only PostgreSQL migration 20260916160000_transferencia_almoxarifados_parcial.sql and updated the migrations manifest and canonical scripts to register: transfer header/item columns, receive records, events, indexes, constraints and permissions; existing legacy data is preserved and non-destructive adjustments are guarded by existence checks.
  • Documented scope, semantics and remaining gaps in docs/entregas/RC51-04-TRANSFERENCIAS-INVENTARIO-ESTOQUE.md describing delivered rules and explicit backlog (inventário físico strategy A, reversals/devoluções, transversal traceability).

Testing

  • Ran static and manifest checks: python3 -m json.tool database/postgres/migrations/manifest.json and a Python checksum verification of normalized migration files, which succeeded.
  • Verified migrations and canonical scripts were synchronized once the new migration was added, and validated git diff --check, absence of conflict markers and shell syntax for repository scripts, which all passed.
  • Attempted build/test pipeline commands from the repository contract but they are blocked in this environment because the .NET SDK and DB tools are not available, so runtime compilation and automated unit/integration tests were not executed: dotnet restore, dotnet build, dotnet test — blocked due to missing dotnet.
  • PostgreSQL runtime scenarios (Postgres 16 verification, concurrent expedição/recebimento, isolation and rollback tests) and browser-based accessibility/visual checks are blocked because psql, PostgreSQL server, Docker and Chromium/Chrome are not installed in the environment.

Files changed / added (high level): application contracts, Almoxarifado service (partial + new transfer implementation), API controller additions, Web controller & Razor views (list, create form, detail/receive), new migration 20260916160000_transferencia_almoxarifados_parcial.sql, updated migrations manifest.json and canonical script_completo variants, and the delivery document docs/entregas/RC51-04-TRANSFERENCIAS-INVENTARIO-ESTOQUE.md.


Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@devmnsoft
devmnsoft merged commit 5cd7aaa into main Sep 16, 2026
10 of 16 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-16T14:20:07.252366Z 987a94f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant