Repository navigation
feat(stack): engine-managed WARP IPv6 pool by default - #4
Merged
Merged
Conversation
The external rotator's health check only treated 429 as a rotation trigger, so a WARP exit flagged with the free tier's 403 "abusive traffic" response kept serving until a collision forced a rotate. Treat both as signals to re-register.
The free-tier quota is counted per egress block (/64 on IPv6, /32 on IPv4), with a daily reset at 00:00 UTC. The external WARP nodes share Cloudflare's IPv4 NAT, which other users routinely exhaust, so widening or rotating that pool stopped adding headroom. opencode2api v1.4.4+ can run its own userspace WARP pool and key exits by egress block. With warp.stack: ipv6 and a routed source_ipv6 prefix, each exit binds its own outer address and gets a distinct /64. This commit switches the default stack to that mode: - pin the engine to v1.4.5 (per-request project id, ses_ timestamp fix, Retry-After pacing, exit rotation on 429/403) - generate only config-init and opencode-engine when warp.enabled is true - seed warp.source_ipv6 from WARP_SOURCE_IPV6 in .env, so the prefix is not committed - set retry.max_attempts to 6 so a request can walk past exhausted exits - keep the external pool generator for warp.enabled: false Verified locally: host IPv4 returns 429 until the daily reset, while three parallel beam-free requests through distinct WARP /64 exits return 200.
The external WARP nodes refuse to start unless WARP_ACCEPT_TOS=1. The engine-managed mode uses Cloudflare's network too, so config-init now enforces the same explicit opt-in before seeding the config.
- default architecture, requirements, and scaling now describe the engine-owned WARP pool and the /64 vs /32 quota unit - quota axis records the 2026-10-27 measurement: shared Retry-After to 00:00 UTC on IPv4, 200s on distinct IPv6 /64 exits - smoke.sh detects the mode, reads /healthz for the WARP pool, and skips completion checks when every exit is cooling down
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.
What changed
The free-tier quota is counted per egress block:
/64on IPv6,/32on IPv4, with a daily reset at 00:00 UTC. The external WARP nodes share Cloudflare's IPv4 NAT, which other users routinely exhaust, so widening or rotating that pool stopped adding headroom.opencode2apiv1.4.4+ can run its own userspace WARP pool and key exits by egress block. Withwarp.stack: ipv6and a routedsource_ipv6prefix, each exit binds its own outer address and gets a distinct/64. This PR makes that the default.ses_timestamp fix, Retry-After pacing, exit rotation on 429/403)config-initandopencode-enginewhenwarp.enabledis truewarp.source_ipv6fromWARP_SOURCE_IPV6in.env, so the prefix is not committedWARP_ACCEPT_TOS=1in both modes, so the terms are never accepted silentlyretry.max_attemptsto 6 so a request can walk past exhausted exitswarp.enabled: falsescripts/smoke.shmode-aware and treat a cooling pool as quota, not a stack faultEvidence
Measured 2026-10-27 on a host with a routed
/64:Retry-Afterresolving to exactly 00:00:00 UTCbeam-freerequests through two distinct/64exits all returned 200Migration
Hosts without a routed IPv6
/64can keepwarp.enabled: falseand use the external pool or their own proxies throughproxyfile. Without IPv6, WARP falls back to the shared IPv4 NAT and the pool adds no headroom.Tests
python3 -m unittest discover -s tests -vgives 135 tests, 2 skipped (the legacy-only port checks).Notes
The two setup bugs reported in #3 (
config-initlabels on Fedora, engine cold-start catalogue) are separate and not addressed here.