Skip to content

Refactor control service packaging under app namespace#52

Merged
Hamedghz merged 1 commit into
AIONOSfrom
codex/organize-packaging-and-imports-for-app
Nov 7, 2025
Merged

Refactor control service packaging under app namespace#52
Hamedghz merged 1 commit into
AIONOSfrom
codex/organize-packaging-and-imports-for-app

Conversation

@Hamedghz

@Hamedghz Hamedghz commented Nov 7, 2025

Copy link
Copy Markdown
Owner

Summary

  • relocate the FastAPI control code under app/control/app with compatibility shims and move the plugin bundle alongside it
  • add a dedicated control service Dockerfile, update docker-compose to the new entrypoint, and set up .dockerignore
  • introduce a combined HTTP/gRPC launcher and adjust unit tests to import from the new module paths

Testing

  • pytest tests/test_policy_state.py tests/test_stream_control.py tests/test_api_webhooks.py

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread docker-compose.yml
Comment on lines +55 to +75
control:
build:
context: .
dockerfile: app/control/Dockerfile
env_file: .env
environment:
AION_CONTROL_API_PREFIX: ${AION_CONTROL_API_PREFIX}
AION_CONTROL_REDIS_URL: ${AION_CONTROL_REDIS_URL}
AION_CONTROL_POSTGRES_DSN: ${AION_CONTROL_POSTGRES_DSN}
AION_CONTROL_MONGO_DSN: ${AION_CONTROL_MONGO_DSN}
AION_CONTROL_QDRANT_URL: ${AION_CONTROL_QDRANT_URL}
AION_CONTROL_MODELS_DIRECTORY: ${AION_CONTROL_MODELS_DIRECTORY}
AION_CONTROL_POLICIES_DIRECTORY: ${AION_CONTROL_POLICIES_DIRECTORY}
TENANCY_MODE: ${TENANCY_MODE}
MINIO_ENDPOINT: ${MINIO_ENDPOINT}
MINIO_ACCESS_KEY: ${MINIO_ACCESS_KEY}
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY}
PYTHONPATH: /srv/app:/srv/app/app
volumes:
- ./policies:${AION_CONTROL_POLICIES_DIRECTORY}
- ./config/certs:/app/config/certs:ro

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Mount control TLS certs into correct path

The new control service image switches its working directory to /srv/app (app/control/Dockerfile), but the compose file still mounts the TLS certificate bundle into /app/config/certs. create_grpc_server() looks for config/certs/... relative to the working directory, so the cert and key will never be found at runtime. The server will therefore emit the warning about missing TLS material and fall back to an insecure gRPC listener, silently dropping mTLS even though the configuration still expects it. The volume target should be updated to /srv/app/config/certs (or the settings paths changed) so the certificates are available and the service keeps running with TLS.

Useful? React with 👍 / 👎.

@Hamedghz Hamedghz merged commit 29ed318 into AIONOS Nov 7, 2025
1 of 4 checks passed
@Hamedghz Hamedghz deleted the codex/organize-packaging-and-imports-for-app branch November 11, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant