Skip to content

docs: Document egg_config constants [doc-updater] - #400

Merged
jwbron merged 1 commit into
mainfrom
egg/doc-update-egg-config-constants
Feb 9, 2026
Merged

docs: Document egg_config constants [doc-updater]#400
jwbron merged 1 commit into
mainfrom
egg/doc-update-egg-config-constants

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

Document the constants module in shared/egg_config/README.md

This update adds documentation for the constants module that provides centralized definitions for ports, network names, and container configuration used throughout the codebase.

What changed

  • Added "System constants" section to the Overview list
  • Added new "System Constants" section with usage example and available constants list
  • Placed before "Available Configs" section for logical flow

Context

Triggered by PR #399 (#399) which refactored hardcoded port values to use GATEWAY_PORT constant. 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:

  • Gateway ports (HTTP API and proxy)
  • Docker network names and subnets
  • Container names and fixed IP addresses

Developers should import from this module instead of hardcoding values.

Authored-by: egg

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
@jwbron
jwbron merged commit 3e0c049 into main Feb 9, 2026
10 checks passed

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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_PORT

But constants.py line 7-8 shows the preferred import is:

from egg_config import GATEWAY_PORT, GATEWAY_PROXY_PORT

The 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

@james-in-a-box

james-in-a-box Bot commented Feb 9, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

james-in-a-box Bot added a commit that referenced this pull request Feb 9, 2026
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.
james-in-a-box Bot added a commit that referenced this pull request Feb 9, 2026
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
jwbron pushed a commit that referenced this pull request Feb 9, 2026
* 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>
jwbron pushed a commit that referenced this pull request Feb 9, 2026
…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>
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