Skip to content

perf: 202/sweep poll backoff, last-20 runs, smaller client graph - #8

Open
AlonsoAlviraa wants to merge 1 commit into
cursor/verifleet-c2-console-b4aefrom
cursor/verifleet-perf-8562
Open

perf: 202/sweep poll backoff, last-20 runs, smaller client graph#8
AlonsoAlviraa wants to merge 1 commit into
cursor/verifleet-c2-console-b4aefrom
cursor/verifleet-perf-8562

Conversation

@AlonsoAlviraa

@AlonsoAlviraa AlonsoAlviraa commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Performance-only follow-up stacked on the paper judge console (cursor/verifleet-c2-console-b4ae). No restyle. Judge API contracts, hash authorship, Cloud Run URLs, and gates are unchanged.

Polling

  • Background 202 and the 3-invoice sweep share pollUntilSettled: exponential 500ms → 1s cap.
  • Stop when every tracked run is COMPLETED (other non-QUEUED/RUNNING statuses also halt).
  • Honest error.queueStuck at 45s. Ingest/sweep unlock then; leftover QUEUED rows keep a 1s-capped catch-up poll so the page can still settle.
  • Sweep polls GET /api/v1/fleet/runs?limit=20 once per tick instead of three by-id fetches.

Proxy

  • next.config.ts still has no /api/v1 rewrite. Browser traffic stays on app/api/v1/[...path] so wait=false is not dropped. Guarded in the poll tests.

Client cost

  • Runs list: last 20 only (API default + explicit limit=20; UI merge caps at 20). Dropped the unused /fleet/memory fetch on console refresh.
  • No extra client bundles: React Query Devtools off the tree; SessionProvider only under /auth. Landing CSVDisplay is a dynamic import.
  • No new images or fonts. prefers-reduced-motion kept (and applied to animate-spin). No scanlines.

Tests

  • frontend: npm test — 8 passed (backoff, COMPLETED stop, 45s timeout, continue-after-timeout, next.config rewrite guard).
  • tests/test_fleet_adk.py — 7 passed (list/API cap at last 20 + existing 202 drain / wait=false / batch queue).
  • npm run build — green (Next.js 16.1.1).
Open in Web Open in Cursor 

Background 202 and sweep poll with 500ms→1s backoff, stop on COMPLETED,
and surface the honest 45s queue error. Fetch /fleet/runs?limit=20 only.
Do not restore a next.config /api/v1 rewrite (it dropped wait=false).
Drop React Query Devtools and keep next-auth off the /fleet graph.

Co-authored-by: AlonsoAlviraa <AlonsoAlviraa@users.noreply.github.com>
@AlonsoAlviraa
AlonsoAlviraa marked this pull request as ready for review August 13, 2026 20:53
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