Prepare and serve verified Business item rankings - #1016
Closed
sridharkalaibala wants to merge 7 commits into
Closed
sridharkalaibala wants to merge 7 commits into
sridharkalaibala wants to merge 7 commits into
Conversation
This was referenced Sep 28, 2026
Contributor
Author
|
The complete Business companion stack, including this change, is integrated into develop through #1023. All checks, including CodeQL, passed before merge. Closing this superseded stacked PR. |
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.
Returned invoices replace their current item list, which made historical best-selling item figures unprovable. This change preserves bounded original item facts with the first return, allocates recorded invoice/refund amounts exactly, and prepares a top-20 branch/day ranking on the reporting desktop. Missing or contradictory history suppresses the ranking instead of presenting partial figures as complete.
The
/business/v1/itemsendpoint requires live financial and item access, accepts one authorized branch, and reads only fenced prepared snapshots. Discovery and desktop/Gateway capability negotiation preserve older overview clients. Item quantities remain separate by unit; revenue includes recorded discounts, tax and rounding and is not profit.Validation: 131 related unit/repository tests and 30 real-Mongo integration tests pass, including the actual return writer, sync transport, desktop worker/agent/Gateway publication, bounded read path, live ACL removal and Community recovery. Targeted lint, formatting, attribution and generated-doc checks pass. OpenAPI validates with 14 existing ambiguous-path warnings.
Stacked on PR #1015. Companion changes are on
codex/business-item-insightsin Gateway and posnic-business. This remains a draft: complete-source qualification, physical-device checks and wider release gates remain open. No CI workflow changes.