docs: Document egg_config constants [doc-updater] - #400
Conversation
Add documentation for the constants module in shared/egg_config/README.md. The constants module provides centralized definitions for ports, network names, and container configuration that are used throughout the codebase. This update was prompted by PR #399 which refactored hardcoded port values to use GATEWAY_PORT constant, highlighting that the constants module was undocumented. Authored-by: egg
There was a problem hiding this comment.
Post-Merge Review
This PR was already merged before review. The changes are documentation-only and low-risk. Here's my assessment:
Changes Reviewed
File: shared/egg_config/README.md
- Added "System constants" to the Overview bullet list
- Added new "System Constants" section with usage example and available constants
Issues Found
Minor: Import path inconsistency in example
The documentation shows:
from egg_config.constants import GATEWAY_PORT, GATEWAY_PROXY_PORTBut constants.py line 7-8 shows the preferred import is:
from egg_config import GATEWAY_PORT, GATEWAY_PROXY_PORTThe constants are re-exported from the package root (as shown in the module's own docstring). The example should use the shorter, preferred path for commonly-used constants, matching the module's own documentation.
Minor: Test constants omitted
The documentation lists available constants but omits TEST_GATEWAY_PORT and TEST_GATEWAY_PROXY_PORT, which are exported in __all__. These are intentionally for tests only (as noted in constants.py:28-30), so this omission is arguably correct, but a brief note like "Test-only constants are also available—see the source file" would help developers discover them.
Correctness Verification
I verified the documented constants against shared/egg_config/constants.py:
- ✓ Port values (9848, 3129) are correct
- ✓ All listed constants exist and are exported in
__all__ - ✓ Descriptions match the actual values and purposes
Verdict
Low-risk documentation improvement. The issues above are minor and don't affect functionality. The PR correctly documents infrastructure that was previously undiscoverable. Consider a follow-up to fix the import path in the example.
— Authored by egg
|
egg review completed. View run logs |
The rebase introduced unintended changes to shared/egg_config/README.md that removed the "System Constants" section added in PR #400. This commit restores the README to match main, keeping only the intended documentation update to docs/guides/github-automation.md.
The previous rebase incorrectly removed documentation that was added by PR #400. This commit restores the System Constants section and the bullet point in the Overview that documents the constants module. Authored-by: egg
* fix: Use GATEWAY_PORT constant instead of hardcoded port values Import GATEWAY_PORT from egg_config via the config module instead of hardcoding 9848 in compose.py and orchestration.py. This ensures port values remain consistent across the codebase. Authored-by: egg * Revert incorrect removal of constants documentation from README The previous rebase incorrectly removed documentation that was added by PR #400. This commit restores the System Constants section and the bullet point in the Overview that documents the constants module. Authored-by: egg --------- Co-authored-by: james-in-a-box[bot] <246424927+james-in-a-box[bot]@users.noreply.github.com>
…397) * Fix hardcoded port numbers and update reviewer coordination docs Replace hardcoded gateway port 9848 with GATEWAY_PORT constant imported from egg_config in compose.py and orchestration.py. This ensures consistency with the centralized constants module. Also includes the doc changes from the original PR to update the reviewer coordination mechanism description in the GitHub automation guide. Authored-by: egg * Revert unintended README.md changes from conflict resolution The rebase introduced unintended changes to shared/egg_config/README.md that removed the "System Constants" section added in PR #400. This commit restores the README to match main, keeping only the intended documentation update to docs/guides/github-automation.md. --------- Co-authored-by: james-in-a-box[bot] <246424927+james-in-a-box[bot]@users.noreply.github.com>
Document the constants module in shared/egg_config/README.md
This update adds documentation for the
constantsmodule that provides centralized definitions for ports, network names, and container configuration used throughout the codebase.What changed
Context
Triggered by PR #399 (#399) which refactored hardcoded port values to use
GATEWAY_PORTconstant. This highlighted that the constants module exists and is widely used but wasn't documented in the egg_config README.The constants module (
shared/egg_config/constants.py) is the single source of truth for:Developers should import from this module instead of hardcoding values.
Authored-by: egg