feat: add GET /manifest endpoint for mothership service discovery#139
Merged
feat: add GET /manifest endpoint for mothership service discovery#139
Conversation
Implement manifest endpoint on LoadBalancer handlers to serve flash_manifest.json for cross-endpoint routing. The endpoint is conditionally registered when FLASH_IS_MOTHERSHIP=true environment variable is set, enabling child endpoints to fetch function/resource metadata from the mothership. Changes: - Add /manifest to reserved paths in manifest builder - Implement conditional GET /manifest endpoint in lb_handler factory - Returns 200 with manifest JSON on success, 404 if not found - Endpoint only registers for LoadBalancer resources with env var set - Add comprehensive unit and integration tests (18 unit, 4 integration)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a GET /manifest endpoint to enable service discovery for mothership-based LoadBalancer deployments. The endpoint conditionally serves the flash_manifest.json file when the FLASH_IS_MOTHERSHIP=true environment variable is set, allowing child endpoints to fetch function/resource metadata during cross-endpoint routing.
Changes:
- Added
/manifestto reserved paths to prevent conflicts with user-defined routes - Implemented conditional
/manifestendpoint increate_lb_handlerthat returns manifest JSON or 404 - Added comprehensive unit and integration tests covering endpoint registration, responses, and coexistence with other routes
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/unit/runtime/test_lb_handler.py |
Unit tests for manifest endpoint registration, responses, and edge cases |
tests/integration/test_lb_remote_execution.py |
Integration tests verifying manifest endpoint behavior in LiveLoadBalancer and LoadBalancerSlsResource contexts |
src/tetra_rp/runtime/lb_handler.py |
Implementation of conditional /manifest endpoint in handler factory |
src/tetra_rp/cli/commands/build_utils/manifest.py |
Added /manifest to reserved paths list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jhcipar
approved these changes
Jan 14, 2026
Merged
This was referenced Feb 6, 2026
Closed
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a GET
/manifestendpoint to LoadBalancer handlers for Mothership-based service discovery. This enables child endpoints to fetch function/resource metadata from the mothership during cross-endpoint routing.Changes
/manifestto reserved paths to prevent user function conflictsload_manifest()functionImplementation Details