Commit Graph

10 Commits

Author SHA1 Message Date
giles
5877a7702f Add README documenting shared infrastructure
Covers structure, key patterns, models, event bus, and alembic setup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 19:28:44 +00:00
giles
346d3f4e05 Phase 5: Drop cross-domain FK constraints (events → cart)
Merge three alembic heads and drop:
- calendar_entries.order_id FK → orders.id
- tickets.order_id FK → orders.id

Columns kept as plain integers for glue-service bridging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:35:17 +00:00
giles
0c6eee18de Remove MenuItem.post relationship to fix mapper init error
The back_populates="menu_items" referenced a relationship removed from
Post in the glue layer commit. MenuItem model kept for table preservation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 01:58:18 +00:00
giles
2c4ab9e3c8 Add glue layer support: MenuNode templates, factory registration, migration
- Templates: item.post.X → item.X (MenuNode has label/slug/feature_image directly)
- factory.py: add glue.models to import loop + register_glue_handlers() at startup
- alembic env.py: add glue.models to import loop
- New migration: container_relations + menu_nodes tables with backfill from existing data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:37:35 +00:00
giles
e1e6a7a98b Import all app model packages at startup for SQLAlchemy mapper
Cross-domain relationships like Product.order_items → OrderItem use
string references that SQLAlchemy resolves by class name lookup. All
model packages must be imported so every class is registered before
mapper configuration runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 16:00:32 +00:00
giles
22e09cf66b Add merge migration to unify diverged alembic heads
Two branches diverged from e5c3f9a2b1d6 (tag_groups):
- domain_events → generic_containers (g7e5b1c3d4f8)
- tickets → page_configs → market_places → page_tracking (c3d4e5f6a7b8)

This merge migration joins them into a single head so
alembic upgrade head works without specifying a branch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:26:43 +00:00
giles
ddc66fb1cf Add alembic.ini missing from decoupling branch
Was present on main but never carried over. Without it, alembic
upgrade head fails with 'No script_location key found'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 14:11:20 +00:00
giles
9bc9f64dce Rename shared/logging/ to shared/log_config/ to avoid stdlib shadow
shared/logging/ shadows Python's stdlib logging module, causing a
circular import when any code does `import logging`. This breaks
both the entrypoint Redis flush and Hypercorn app loading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:55:20 +00:00
giles
4dd25526b9 Add requirements.txt and guard app model imports in env.py
requirements.txt copied from shared_lib for Docker build compatibility.
Alembic env.py now uses try/except for app-specific model imports so
upgrade head works in Docker where only one app's code is present.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 13:16:04 +00:00
giles
ef806f8fbb feat: extract shared infrastructure from shared_lib
Phase 1-3 of decoupling plan:
- Shared DB, models, infrastructure, browser, config, utils
- Event infrastructure (domain_events outbox, bus, processor)
- Structured logging
- Generic container concept (container_type/container_id)
- Alembic migrations for all schema changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 12:45:56 +00:00