Skip to content

fix: move remaining app_api imports out of inference_api, agents, and shared - #200

Merged
colinmxs merged 1 commit into
developfrom
fix/decouple-inference-api-imports
Apr 30, 2026
Merged

colinmxs merged 1 commit into
developfrom
fix/decouple-inference-api-imports

Conversation

@colinmxs

Copy link
Copy Markdown
Contributor

Closes #120

What changed

Moved every module that was consumed across service boundaries out of apis.app_api and into apis.shared:

  • costs/ — calculator, pricing_config, models, aggregator
  • auth/api_keys/ — models, service, repository
  • tools/ — models, repository, freshness
  • storage/ — metadata_storage, dynamodb_storage

Updated all imports in inference_api, agents/, apis.shared, app_api, and tests. No re-export shims — old files deleted.

Boundary enforcement

Added tests/architecture/test_import_boundaries.py with 6 AST-based tests that fail if any cross-service import is introduced.

Verification

2202 tests pass, 0 failures.

Moves costs (calculator, pricing_config, models, aggregator), auth/api_keys
(models, service, repository), tools (models, repository, freshness), and
storage (metadata_storage, dynamodb_storage) from apis.app_api into
apis.shared so that inference_api, agents/, and shared/ no longer import
from app_api.

Adds AST-based architectural boundary tests
(tests/architecture/test_import_boundaries.py) that enforce:
- inference_api never imports from app_api
- agents/ never imports from app_api or inference_api
- apis.shared never imports from app_api or inference_api
- app_api never imports from inference_api

Updates CLAUDE.MD and steering docs with the import boundary rule.

Closes #120
@colinmxs
colinmxs merged commit 8d4d3cd into develop Apr 30, 2026
24 checks passed
@colinmxs
colinmxs deleted the fix/decouple-inference-api-imports branch May 6, 2026 14:35
raoakkineni pushed a commit to AuraWorx/auraxai-agentcore-public-stack that referenced this pull request Sep 22, 2026
Left over from Boise-State-Development#200. Every runtime consumer already imports
apis.shared.sessions.metadata; the copy still wrote the legacy rotating
S#ACTIVE# session sort key that the SessionRecencyIndex (GSI4) listing
cannot see. Repoint test_cache_savings.py and three spec citations.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant