[codex] Add customer VM IPv6 provisioning#33
Conversation
PR Reviewer Guide 🔍(Review updated until commit eb04d5a)Here are some key observations to aid the review process:
|
|
Addressed PR-Agent feedback:
|
|
Persistent review updated to latest commit eb04d5a |
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb04d5a785
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if port in cfg.blocked_ports: | ||
| raise HTTPException(400, f"Port {port} is blocked by policy") | ||
|
|
||
| if _real_provisioning_enabled() and not supports_static_network_config(order.os): |
There was a problem hiding this comment.
Apply real-mode OS validation to native intents
When real provisioning is enabled, this OS support check is only reached by /v1/vm/create and /v1/vm/quote; /v1/intent/create still does its own domain/blocked-port validation and then stores any order_payload. If BTC/XMR payments are configured, a customer can open an intent for openbsd-7.8/alpine, receive a deposit address, pay, and only then have _provision_vm fail with Static network config is not supported, while the x402 paths correctly reject before payment. Please route native intent creation through the same helper before creating the intent.
Useful? React with 👍 / 👎.
Summary
Adds tactical per-VM IPv6 provisioning for customer VMs so paid Debian VMs no longer wait for nonexistent RA/DHCPv6 on the customer segment.
Changes
/64allocation fields and Alembic revision012.0; allocate VM prefixes from2a0c:b641:b51::/48and assign::2inside each/64.networkConfigfor XO withenX0, DNS/gateway2a0c:b641:b51::1, andon-link: true.networkConfigthroughXCPNGProvider.create_vm.ipv6_prefixto VM status responses.vm.deploy.hyrule.host.deploy.hyrule.host.Validation
uv run pytestpassed: 213 tests before the DNS follow-up.uv run pytest tests/test_dns_provider.py tests/test_customer_ipv6.py tests/test_xcpng_openbsd.py tests/test_vm_quote.py tests/test_api.pypassed: 43 tests.uv run mypy hyrule_cloud/passed after the CI typing fix.uvx ruff checkon touched app/test/migration files passed.