fix: move remaining app_api imports out of inference_api, agents, and shared - #200
Merged
Merged
Conversation
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
3 tasks
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #120
What changed
Moved every module that was consumed across service boundaries out of
apis.app_apiand intoapis.shared: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.pywith 6 AST-based tests that fail if any cross-service import is introduced.Verification
2202 tests pass, 0 failures.