Skip to content

fix(production): preserve completed state after defect reversal - #43

Draft
cb8010d6 wants to merge 1 commit into
agent/frontend/fulfillment-evidencefrom
agent/backend/production-reversal-state
Draft

cb8010d6 wants to merge 1 commit into
agent/frontend/fulfillment-evidencefrom
agent/backend/production-reversal-state

Conversation

@cb8010d6

@cb8010d6 cb8010d6 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Problem

Reversing an earlier defect-only report could downgrade a completed work order to IN_PROGRESS even though net good quantity still met planned quantity.

Change

Derive COMPLETED first from the same net-good-quantity rule used by report posting; preserve existing PENDING/IN_PROGRESS behavior otherwise. No changes to inventory, transactions, outbox, idempotency or accounting policy.

Validation

Regression reproduced before fix. Five new cases cover completed defect-only reversal and replay, good-quantity reversal reopening, remaining active reports, partial quantity and final defect-only reset. Local API full suite 665 tests, typecheck and changed-file lint passed. Independent Astra review and 26 focused production tests passed.

Stacked on #42. Exact head 4729940788912acd6d2c31cfddb4c2e5c93f8928 passed all gates in CI run 36288237961: 825 regular tests (18 scripts + 665 API + 142 Web), 77 real PostgreSQL regressions, 13/13 stocked-trade HTTP steps and 9 actual Chromium tests. Actual logs inspected. No deployment/main merge or production-readiness claim.

Copy link
Copy Markdown
Owner Author

Exact head 4729940788912acd6d2c31cfddb4c2e5c93f8928: CI run https://github.com/cb8010d6/OneERP/actions/runs/36288237961 is all green, including security, validation, real HTTP journey, actual Chromium and the aggregate validate gate. Source patch independently reviewed; no production deployment or main merge.

This branch has not been deployed

No deployments
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.

1 participant