[Debt] Replace IDM cross-module ORM imports with public capabilities #3

Closed
opened 2026-07-11 11:39:41 +02:00 by zemion · 1 comment
Owner

govoplan-idm explicitly depends on identity and organizations packages, but it imports their backend ORM models directly. That makes schema internals part of another module's runtime contract and increases migration coupling.

Code paths: src/govoplan_idm/backend/directory.py:8, src/govoplan_idm/backend/directory.py:10, src/govoplan_idm/backend/api/v1/routes.py:22, src/govoplan_idm/backend/api/v1/routes.py:24.

Acceptance: identity and organizations expose typed capability/query interfaces, IDM uses those public contracts, dependency-boundary checks cover the rule, and tests cover IDM assignment listing/resolution through the public contracts.

`govoplan-idm` explicitly depends on identity and organizations packages, but it imports their backend ORM models directly. That makes schema internals part of another module's runtime contract and increases migration coupling. Code paths: `src/govoplan_idm/backend/directory.py:8`, `src/govoplan_idm/backend/directory.py:10`, `src/govoplan_idm/backend/api/v1/routes.py:22`, `src/govoplan_idm/backend/api/v1/routes.py:24`. Acceptance: identity and organizations expose typed capability/query interfaces, IDM uses those public contracts, dependency-boundary checks cover the rule, and tests cover IDM assignment listing/resolution through the public contracts. <!-- codex-audit-2026-07-11:idm-orm-imports -->
Author
Owner

Codex State: done

The ORM-boundary debt is complete and published.

  • Production IDM code consumes typed Identity and Organizations contracts from Core; direct sibling ORM imports remain only in isolated test setup needed to register foreign-key tables.
  • The workspace dependency-boundary gate passes across 50 Python repositories and 22 WebUI repositories with 0 exceptions.
  • IDM suite: 10 passed, 7 subtests passed.
  • The original contract refactor is on remote main; the latest compatible IDM state is 01c1f7e.

The acceptance criteria for public capabilities, boundary enforcement, and contract-based resolution coverage are met.

## Codex State: done The ORM-boundary debt is complete and published. - Production IDM code consumes typed Identity and Organizations contracts from Core; direct sibling ORM imports remain only in isolated test setup needed to register foreign-key tables. - The workspace dependency-boundary gate passes across `50` Python repositories and `22` WebUI repositories with `0` exceptions. - IDM suite: `10 passed, 7 subtests passed`. - The original contract refactor is on remote `main`; the latest compatible IDM state is `01c1f7e`. The acceptance criteria for public capabilities, boundary enforcement, and contract-based resolution coverage are met.
zemion removed the codex/ready
status
ready
labels 2026-07-29 14:20:50 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-idm#3