The first FulfillmentPolicy implementation

Featurekamo-shared-library
Ya
26 Agosti 2026, 07:57 UTC
Mwandishi
Kamo
Ahadi ya
2e71c35

FulfillmentPolicy has declared supports/createFromCommitment since it was written and a repo-wide grep returned exactly one line: the declaration. Its work was inlined unconditionally in processOrderPaid, which builds a shipment-shaped FulfillmentOrder for every line with an offering regardless of what was sold. A Spring @Service with constructor injection — a NEW pattern for this policy family, not a copied one: RetailInventoryPolicy is never instantiated or injected either, so every member of the family was dead code. supports() matches EngagementType.SERVICE directly, never the vocabulary: PROCUREMENT also maps to EngagementVocabulary.SERVICE but is the buyer's side of a vendor order and must never raise a ServiceJob. It is conservative because the order path stops at the first policy that says yes. Commitment cannot navigate to its Order — the FK is on Order.commitment with no inverse — so OrderRepository gains findByCommitmentUid to reach the address snapshot. The returned FulfillmentOrder is left unsaved; the caller already saves it. Also widens the query guard from one package to the whole library. Three per-package guards left ~50 files of @Query covered by nothing, including every commerce repository — which is how the new query above came to be believed validated when it was not. All 746 parse today.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei