Skip to content

refactor(server): standardize server env config prefixes#127

Merged
lan17 merged 8 commits intomainfrom
codex/refactor-server-env-prefixes
Mar 16, 2026
Merged

refactor(server): standardize server env config prefixes#127
lan17 merged 8 commits intomainfrom
codex/refactor-server-env-prefixes

Conversation

@lan17
Copy link
Contributor

@lan17 lan17 commented Mar 14, 2026

Summary

  • standardize server-owned config on canonical AGENT_CONTROL_* env vars
  • remove legacy server env aliases and switch the database config to true env_prefix-based settings
  • update server-facing compose, Docker, Makefile, and test docs to use the new canonical names

Verification

  • uv run --package agent-control-server pytest server/tests/test_config.py server/tests/test_logging_utils.py --noconftest -q
  • make lint
  • make typecheck

Notes

  • This PR intentionally migrates server env var names without legacy compatibility fallbacks.
  • I did not run the full DB-backed make server-test suite in this environment.

@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 97.64706% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/src/agent_control_server/logging_utils.py 94.73% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lan17 lan17 changed the title refactor: standardize server env config prefixes refactor(server)!: standardize server env config prefixes Mar 14, 2026
@lan17 lan17 changed the title refactor(server)!: standardize server env config prefixes refactor(server): standardize server env config prefixes Mar 14, 2026
@lan17 lan17 enabled auto-merge (squash) March 14, 2026 06:30
@namrataghadi-galileo
Copy link
Contributor

Problem

server/.env.example (line 44) documents only the split AGENT_CONTROL_DB_HOST / PORT / USER / PASSWORD / DATABASE variables, but the app also supports AGENT_CONTROL_DB_URL and the repo now uses that as the primary Docker example in docker-compose.yml (line 47).
That means someone reading .env.example can miss the simplest supported DB config even though the code clearly accepts it in config.py (line 109).

Suggestion:
Add following after line 44 in server/.env.example

# Preferred single-variable form:
AGENT_CONTROL_DB_URL=postgresql+psycopg://agent_control:agent_control@localhost:5432/agent_control

@namrataghadi-galileo namrataghadi-galileo self-requested a review March 16, 2026 20:14
@lan17
Copy link
Contributor Author

lan17 commented Mar 16, 2026

@namrataghadi-galileo addressed in ac5ee6b. I updated server/.env.example to document AGENT_CONTROL_DB_URL as the preferred single-variable form, with the expanded AGENT_CONTROL_DB_* settings kept below as the alternative.

Copy link
Contributor

@namrataghadi-galileo namrataghadi-galileo left a comment

Choose a reason for hiding this comment

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

Thank you

@lan17 lan17 merged commit bf494cc into main Mar 16, 2026
5 checks passed
@lan17 lan17 deleted the codex/refactor-server-env-prefixes branch March 16, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants