Bam masterdata runtime selection - #97
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bd5eb6020
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if allow_cross_module: | ||
| return True | ||
| # same module only if cross-mod disabled | ||
| return module.startswith(base_namespace) | ||
| return module.startswith(base_namespace) |
There was a problem hiding this comment.
Re-enable cross-module traversal when enabled
The allow_cross_module switch is effectively ignored because both branches now require module.startswith(base_namespace). With allow_cross_module=true, graph expansion should include related classes outside the base namespace (e.g., inherited or subsection targets), but this change silently filters them out and breaks the UI’s cross-module mode. This is a functional regression in graph completeness.
Useful? React with 👍 / 👎.
| async def schema_update(): | ||
| async def schema_update(profile: str | None = Query(None)): | ||
| ws = _workspace() | ||
| selected = schema_profile_for_key(profile) if profile else _profile_for_workspace(ws) |
There was a problem hiding this comment.
Handle unknown schema profile as a client error
schema_profile_for_key(profile) can raise SchemaUnavailable for invalid profile keys, but it is called outside the try block, so /schema/update?profile=<invalid> surfaces as an unhandled 500 instead of a controlled API error. A stale or mistyped profile from clients will therefore fail with an internal error and no actionable response code.
Useful? React with 👍 / 👎.
(rebasing of #81)