Skip to content

Delegate create_proposed_shipments to Spree::OrderShipping#6509

Open
sofiabesenski4 wants to merge 2 commits into
solidusio:mainfrom
SuperGoodSoft:introduce-extensible-stock-coordinator
Open

Delegate create_proposed_shipments to Spree::OrderShipping#6509
sofiabesenski4 wants to merge 2 commits into
solidusio:mainfrom
SuperGoodSoft:introduce-extensible-stock-coordinator

Conversation

@sofiabesenski4

@sofiabesenski4 sofiabesenski4 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

(From the first commit message)

Spree::OrderShipping is a configurable class, which increases the extensibility for this system behaviour. The Spree::Order model also shouldn't need to be responsible for the creation of its own shipments.

Separating this concern will allow us to refactor the underlying stock coordination implementation without introducing additional churn on the already heavy Spree::Order class.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@github-actions github-actions Bot added the changelog:solidus_core Changes to the solidus_core gem label Jun 30, 2026
@sofiabesenski4
sofiabesenski4 force-pushed the introduce-extensible-stock-coordinator branch from 4254f84 to 6b07b2c Compare June 30, 2026 20:53
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.02%. Comparing base (a0746e6) to head (5a57d65).
⚠️ Report is 1347 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6509      +/-   ##
==========================================
+ Coverage   89.68%   92.02%   +2.34%     
==========================================
  Files         991     1035      +44     
  Lines       20832    21127     +295     
==========================================
+ Hits        18683    19442     +759     
+ Misses       2149     1685     -464     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sofiabesenski4
sofiabesenski4 force-pushed the introduce-extensible-stock-coordinator branch from 6b07b2c to 1fdef1d Compare June 30, 2026 21:09

@mamhoff mamhoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like this. I think it'd be good to also move the error to OrderShipping and deprecate Spree::Order::CannotRebuildShipments, as it's really part of the API of #create_proposed_shipments.

@sofiabesenski4
sofiabesenski4 marked this pull request as ready for review July 16, 2026 17:41
@sofiabesenski4
sofiabesenski4 requested a review from a team as a code owner July 16, 2026 17:41
@sofiabesenski4
sofiabesenski4 force-pushed the introduce-extensible-stock-coordinator branch from 1fdef1d to 6d94924 Compare July 16, 2026 17:45
@sofiabesenski4

Copy link
Copy Markdown
Contributor Author

I'm going to break out some of the linter fixes into their own commit.

sofiabesenski4 and others added 2 commits July 16, 2026 10:49
Spree::OrderShipping is a configurable class, which increases the
extensibility for this system behaviour. The Spree::Order model also
shouldn't need to be responsible for the creation of its own shipments.

Separating this concern will allow us to refactor the underlying stock
coordination implementation without introducing additional churn on the
already heavy Spree::Order class.

Co-authored-by: Adam Mueller<adam@super.gd>
Correct block indentation in Stock::Estimator and remove redundant
map(&:to_s) before join in Store and Variant::PricingOptions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sofiabesenski4
sofiabesenski4 force-pushed the introduce-extensible-stock-coordinator branch from 6d94924 to 5a57d65 Compare July 16, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_core Changes to the solidus_core gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants