Skip to content

refactor(setup_wizard): replace port magic numbers with constants#3527

Merged
mrveiss merged 1 commit intoDev_new_guifrom
issue-3526
Apr 5, 2026
Merged

refactor(setup_wizard): replace port magic numbers with constants#3527
mrveiss merged 1 commit intoDev_new_guifrom
issue-3526

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Apr 5, 2026

Closes #3526

Summary

  • Replaces infra_vars["ai_stack_port"] = 8080 with _ROLE_INFRA_VARS["ai-stack"][1] so the AI stack port has exactly one definition; changing _ROLE_INFRA_VARS is now sufficient.
  • Introduces _CHROMADB_PORT = 8100 as a module-level constant (with a comment pointing at both Ansible role defaults files that must stay in sync) and uses it in place of the bare 8100 literal.

Test plan

  • No functional change — values remain 8080 and 8100; verify with grep -n "ai_stack_port\|backend_chromadb_port" autobot-slm-backend/api/setup_wizard.py that no bare literals remain.
  • python3 -m black --check --line-length=88 autobot-slm-backend/api/setup_wizard.py passes.
  • python3 -m flake8 --max-line-length=100 autobot-slm-backend/api/setup_wizard.py passes.
  • Existing wizard integration tests (if any) continue to pass.

🤖 Generated with Claude Code

…ARS and _CHROMADB_PORT constant (#3526)

Replace hardcoded 8080 with _ROLE_INFRA_VARS["ai-stack"][1] so the AI stack
port has a single definition, and introduce _CHROMADB_PORT = 8100 as a
module-level constant so the ChromaDB port stays in sync with the Ansible
role defaults without silent divergence.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

@mrveiss mrveiss merged commit 3a96d7b into Dev_new_gui Apr 5, 2026
3 of 4 checks passed
@mrveiss mrveiss deleted the issue-3526 branch April 5, 2026 20:09
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.

1 participant