Night Nurse: MCP Server Implementation (WIP)#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5ea7819b5
ℹ️ 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".
| webhook_url = os.getenv("SLACK_WEBHOOK_URL") | ||
| if not webhook_url: | ||
| logger.info("Approval notification: %s", message) |
There was a problem hiding this comment.
Add missing logger import or initialization
When SLACK_WEBHOOK_URL is unset, _notify calls logger.info(...), but this module never defines logger. That means normal approval flows without a webhook will raise NameError instead of logging. This breaks the state machine paths that call _notify in non-webhook environments. Import and initialize a logger (or use the existing logging setup) before calling it.
Useful? React with 👍 / 👎.
| try: | ||
| httpx.post( | ||
| webhook_url, | ||
| json={"text": f"[BrandOS] {message}"}, | ||
| timeout=10, |
There was a problem hiding this comment.
Import httpx before using it in notifications
When SLACK_WEBHOOK_URL is set, _notify calls httpx.post(...), but httpx is never imported in this file, so the first approval notification will raise NameError. This makes webhook notifications non-functional even though the dependency exists. Import httpx (module-level or inside the function) before invoking it.
Useful? React with 👍 / 👎.
Automated PR from Night Nurse.
Spec
MCP Server Implementation - Complete the MCP server to expose brand operations (personas, content, intel, decisions) as tools for AI assistants using FastMCP.
Progress
This PR is a work in progress - Night Nurse will continue iterations.