Skip to content

feat(api): adaptive Antigravity resilience, model quarantine and hot timeouts - #47

Merged
Bl0ck154 merged 4 commits into
productionfrom
fix/antigravity-resilience-20261024
Oct 24, 2026
Merged

Bl0ck154 merged 4 commits into
productionfrom
fix/antigravity-resilience-20261024

Conversation

@Bl0ck154

Copy link
Copy Markdown
Owner

Summary

Implement all four requested Antigravity/Gemini 3.8 resilience improvements together against the fork's production branch:

  1. Distinguish confirmed pre-response/header 504 timeouts from transient 502/503/socket resets. Prevent same-account 504 retry, release and rotate to another eligible account, preserve explicit pin semantics and request limits.
  2. Optional adaptive account + model health, bounded rolling sample, 499 ignored, quarantine with cooldown/backoff, single half-open real-request probe, two-success recovery, concurrency/generation fence; state in management connections API/dashboard.
  3. Optional sanitized timing telemetry for idle time, inflight concurrency, time to headers, first substantive SSE output and completed phases, with DNS/TCP/TLS null when not measurable. No synthetic paid probe traffic.
  4. Hot DB-persisted Antigravity preferred failover timeouts (defaults 5000ms / Gemini 3.8 12000ms), admin-only resilience API, validation 500–120000ms, UI Settings → Resilience, revision-based write protection and per-request config snapshots.

Evidence

Production current release 3.8.52-custom.32 (unchanged during development), production fork based on SHA 44fdae6b. Live SQLite logs in the last 24h showed about 2,824 Gemini3.8 call entries: 261 504, 576 499, 1,874 200 (window-dependent). Roughly 100 same-connection consecutive 504→504 sequences by correlation ID; owner reported 113 in another window. 504 durations near 12,025ms match current Gemini3.8 start timeout. Idle-gap evidence is correlational, not root-cause proof. Original retry classifier included 504. Client 499 and 429 are not counted as model timeout health failures.

Verification gates

Unit tests: tests/unit/antigravity-adaptive-health.test.ts, antigravity-timeout-retry.test.ts, antigravity-timing.test.ts.
Integration: tests/integration/antigravity-resilience-routing.test.ts, antigravity-resilience-settings.test.ts.
All five added to selected-upstream-regression.yml alongside existing failover tests and TypeScript typecheck. These tests have not yet been validated by CI. Do not merge or deploy until green. No build/test was run on VPS per /opt/AGENTS.md; full audit and limitations in docs/audits/2026-10-24-antigravity-resilience/README.md.

Release

After green CI and review, the operator will use GitHub Actions to build and test a packaged artifact off the production VPS and deploy once with the existing canary/rollback installer, then verify authenticated Antigravity requests and hot settings. Feature gates for adaptive quarantine and timing diagnostics default OFF for safe rollout; enable via admin API after deployment and confirm actual state.

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.

1 participant