Promote gateway_portal features from unsupported to experimental#129
Merged
Conversation
…mental All five gateway_portal spec fields (real_internet.mode, real_internet.service_mirrors, real_internet.upstream_resolver_enabled, cross_world.mode, cross_world.peers) are now experimental in alpha. The handler implementation was already complete; these gates were the only blocker preventing specs from loading with gateway federation or real-internet policies enabled. - feature_state.py: change state from unsupported to experimental for all 5 gateway_portal entries - tests/test_gateway_federation.py: 13 new tests covering gate state, positive spec-load (warns instead of raising), nft rule content for shadowed/mirrored modes, mirror IP injection, and peer routing wiring - tests/test_spec_parsing.py: update gateway_portal test to assert experimental warning behaviour (not SpecLoadError) - tests/test_cli.py: update two CLI validate tests that expected unsupported errors; all spec fields are now experimental or stable - docs/spec-alpha-support.md: mark 5 gateway_portal rows experimental Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NsdPH4dcsbTWeTFuTgswY
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
This PR promotes five
gateway_portalfeature gates from "unsupported" to "experimental" status, reflecting the completion of their implementation in the codebase. The features now load with warnings instead of being rejected, and comprehensive test coverage has been added.Key Changes
Feature State Promotion: Updated
netengine/spec/feature_state.pyto change the state of five gateway_portal entries from "unsupported" to "experimental":gateway_portal.real_internet.modegateway_portal.real_internet.service_mirrorsgateway_portal.real_internet.upstream_resolver_enabledgateway_portal.cross_world.modegateway_portal.cross_world.peersUpdated Reason Strings: Replaced generic "not implemented" messages with detailed descriptions of what is actually implemented and any known limitations (e.g., "nftables policies for isolated/shadowed/mirrored/exposed modes are implemented; requires gateway container with nft available").
Comprehensive Test Suite: Added
tests/test_gateway_federation.pywith 304 lines of test coverage including:GatewayHandler.apply_internet_policy()covering shadowed, mirrored, and custom modesGatewayPortalHandler._setup_peer()with routing and error handlingUpdated CLI Tests: Modified
tests/test_cli.pyto reflect the promotion:test_validate_unsupported_enabled_feature_exits_nonzerototest_validate_experimental_gateway_portal_exits_zero_with_warningtest_validate_json_unsupported_active_feature_exits_nonzerototest_validate_json_experimental_active_feature_exits_zeroUpdated Spec Parsing Tests: Modified
tests/test_spec_parsing.pyto replace the unsupported field test with a new test demonstrating that gateway_portal fields now load with warnings.Documentation: Updated
docs/spec-alpha-support.mdto reflect the new experimental status and implementation details.Code Formatting: Applied consistent formatting improvements to
netengine/cli/main.pyandtests/test_readiness_cli.py(import reordering, line length adjustments).Implementation Details
The promotion enables users to configure gateway portal features (real internet access modes, service mirroring, upstream DNS resolution, and cross-world federation) in their specs. These features now:
The test suite validates both the feature gate metadata and the actual handler behavior, ensuring the implementation is production-ready for alpha-stage usage.
https://claude.ai/code/session_018NsdPH4dcsbTWeTFuTgswY