Skip to content

Promote gateway_portal features from unsupported to experimental#129

Merged
aidankhogg merged 2 commits into
dev/alphafrom
claude/gateway-federation
Jun 29, 2026
Merged

Promote gateway_portal features from unsupported to experimental#129
aidankhogg merged 2 commits into
dev/alphafrom
claude/gateway-federation

Conversation

@aidankhogg

Copy link
Copy Markdown
Contributor

Summary

This PR promotes five gateway_portal feature 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.py to change the state of five gateway_portal entries from "unsupported" to "experimental":

    • gateway_portal.real_internet.mode
    • gateway_portal.real_internet.service_mirrors
    • gateway_portal.real_internet.upstream_resolver_enabled
    • gateway_portal.cross_world.mode
    • gateway_portal.cross_world.peers
  • Updated 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.py with 304 lines of test coverage including:

    • Feature gate state validation tests
    • Positive spec-load tests demonstrating that previously-gated fields now load successfully
    • Handler unit tests for GatewayHandler.apply_internet_policy() covering shadowed, mirrored, and custom modes
    • Handler tests for GatewayPortalHandler._setup_peer() with routing and error handling
  • Updated CLI Tests: Modified tests/test_cli.py to reflect the promotion:

    • Changed test_validate_unsupported_enabled_feature_exits_nonzero to test_validate_experimental_gateway_portal_exits_zero_with_warning
    • Updated test_validate_json_unsupported_active_feature_exits_nonzero to test_validate_json_experimental_active_feature_exits_zero
    • Tests now verify that experimental features load with warnings rather than failing validation
  • Updated Spec Parsing Tests: Modified tests/test_spec_parsing.py to replace the unsupported field test with a new test demonstrating that gateway_portal fields now load with warnings.

  • Documentation: Updated docs/spec-alpha-support.md to reflect the new experimental status and implementation details.

  • Code Formatting: Applied consistent formatting improvements to netengine/cli/main.py and tests/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:

  • Load successfully with experimental-stage warnings
  • Have nftables policy generation implemented for internet access modes
  • Support service mirror provisioning in mirrored mode
  • Support upstream DNS forwarder configuration
  • Support cross-world peer routing and DNS forwarding in PEERED mode

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

…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
@aidankhogg aidankhogg self-assigned this Jun 29, 2026
@aidankhogg aidankhogg marked this pull request as ready for review June 29, 2026 23:02
@aidankhogg aidankhogg merged commit e89ca1b into dev/alpha Jun 29, 2026
@aidankhogg aidankhogg deleted the claude/gateway-federation branch June 29, 2026 23:04
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.

2 participants