Add FastAPI LXMF integration utilities and update examples#202
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
| raw_json = os.getenv(env_json_var) | ||
| if raw_json: | ||
| config_data = _load_config_from_json(raw_json) | ||
| else: | ||
| path_override = os.getenv(env_path_var) | ||
| if path_override: | ||
| try: | ||
| candidate_path = Path(path_override).expanduser() | ||
| except (TypeError, ValueError): | ||
| candidate_path = None | ||
| if candidate_path is not None: | ||
| config_data = _load_config_from_path(candidate_path) | ||
| else: | ||
| config_data = {} | ||
| elif default_path is not None: |
There was a problem hiding this comment.
Invalid config path env var silently discards settings
When the LXMF client settings are loaded, an invalid path supplied via LXMF_CLIENT_CONFIG_PATH (for the gateway this comes from NORTH_API_CONFIG_PATH) is coerced to {} at lines 133‑147. This means a typo or malformed environment value results in a completely empty configuration instead of falling back to the default JSON file or raising an error as the previous implementation did. The gateway will then start with server_identity_hash=None, the link manager never attempts to connect, and every request must provide the identity explicitly. This regression is easy to trigger in production and is hard to diagnose because the service still boots. Consider either falling back to default_path when the override cannot be parsed, or surfacing a validation error so the operator notices the misconfiguration.
Useful? React with 👍 / 👎.
Summary
reticulum_openapi.integrations.fastapipackage with LXMF client settings, lifecycle helpers, link management, and command execution utilitiesTesting
Codex Task