- Emit product.listed events when products are created
- Updated shared with federation handlers, delivery, anchoring
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Register StubFederationService in services/__init__.py
- Add federation to CI sibling list
- Add federation URL to app-config.yaml
- Update shared submodule with federation models/contracts/services
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update shared submodule: category selector uses slug comparison
instead of current_local_href for active state
- Keep current_local_href commented out in category_context() to
avoid overriding the base template value used by brand filters
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The category selector compares current_local_href against sub.local_href
to determine the active subcategory. This was commented out, so no
subcategory was ever highlighted.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Market context processor was only counting product CartItems for cart_count,
while blog/cart/events apps include calendar entries too. Use cart service
for consistent counts across all apps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Market owns CartItem/Product — query directly with selectinload
so templates can access item.product.slug and other ORM attributes.
The cart service DTOs are for cross-domain consumers (blog, events).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The services singleton was used in before_request closures but the
import was removed when refactoring to domain_services_fn.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The glue layer's models (MenuNode, ContainerRelation), services
(navigation, relationships), and event handlers have been absorbed
into shared/. The glue submodule caused duplicate SQLAlchemy table
registration for 'menu_nodes'.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace direct Post query and CartItem imports with typed service calls.
Market registers all 4 services via domain_services_fn with has() guards.
Key changes:
- app.py: use domain_services_fn, Post query → services.blog,
CartItem → services.cart, MarketPlace+Post join → separate queries,
glue navigation → shared navigation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The context processor loaded cart items but only passed aggregates
(cart_count, cart_total) — not the cart list itself. Templates need
the full list to display per-product quantities.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two bugs fixed:
1. First htmx add didn't update mini cart count because the context
processor's API call couldn't see the uncommitted transaction.
Fix: pass cart_count/cart_total explicitly from the route handler.
2. Page refresh always showed cart count 0 because the internal API
call to the cart service failed to resolve cart identity correctly.
Fix: replace the API call with a direct DB query using the same
shared database and session, matching how the cart app itself works.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The _added.html template's summary macro expects calendar_total and
calendar_cart_entries from the cart/events domain. The market app has
no calendar entries, so pass a no-op function and empty list.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
g.cart was never populated in the market app — the cart loader
before_request hook was only registered in the cart microservice.
Replace the dead filter-building code with an actual query that
loads cart items inline, scoped to the current user/session.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
List specific model imports, glue services, and internal APIs
that market code actually references.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix microservice count (4 not 3), document submodules, models,
scraper, all blueprints including bp/cart/, and cross-app integration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shared: migration to drop cross-domain FK constraints
glue: order lifecycle services, cart adoption, login/order handlers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous runs left self-copies (e.g. market/market/) that caused
'Table already defined' errors. Split into two loops: first rm -rf
all sibling dirs, then copy only non-self siblings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each app has its own models/ at the root (imported as bare `models.X`).
The CI copy was also creating {app}/models/ (imported as `{app}.models.X`),
causing SQLAlchemy to see the same table defined twice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>