Skip to content

Org-scoping phase 8: manifest sync (export_import.py) _resolve_* migration #313

@jackmusick

Description

@jackmusick

Follow-up from the org-scoping consolidation (docs/plans/2026-05-26-org-scoping-consolidation.md).

api/src/routers/export_import.py contains 13 inline cascades for the manifest sync _resolve_* paths (Config, KnowledgeStore, Table, IntegrationMapping). These were tagged "phase 8 follow-up" in the lint allow-list because the manifest sync surface is large and has its own integration test suite.

Scope

  • Audit routers/export_import.py _resolve_* paths against OrgScopedRepository.get().
  • Migrate each existing_query = existing_query.where(<Entity>.organization_id == org_id) pattern.
  • Allow-list entries (13) shrink.

Why this is separate

Manifest import touches every execution-resolution entity and has subtle round-trip invariants. The right-sized PR migrates each entity's resolve path independently with its own test review.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions