Skip to content

GEN-2154 Reduce authenticated data-loading waterfalls - #204

Merged
exe-dev-github-integration[bot] merged 1 commit into
mainfrom
fix/gen-2154-loading
Oct 9, 2026
Merged

exe-dev-github-integration[bot] merged 1 commit into
mainfrom
fix/gen-2154-loading

Conversation

@asselstine

Copy link
Copy Markdown
Collaborator

Authenticated pages repeatedly validate cookie membership and pay unnecessary PostgreSQL/browser waterfalls. This change reduces Jobs data reads from 1 + 2N to three, batches integration and execution-target reads, starts independent run metadata reads together, and renders runs directly from a run response containing the current job name. Existing Jobs payloads and live refresh/mutation behavior are preserved.

  • Add Server-Timing authorization/application phases to authenticated HTML and protected API responses. Cookie signature/expiry validation stays in the Worker; authoritative owner, verified-email, tenant and session-version validation runs once in the service. OAuth and bearer-token checks remain enforced.
  • Replace historical state arrays with grouped counts and a deterministic latest-state selection. Use one filtered connection read plus grouped Tail counts; reuse status installations in the UI.
  • Document the additive job_name field via the existing OpenAPI generation workflow, with API boundary, authorization, PostgreSQL query-count, parallel-read, and browser refresh regression tests.

Validation: clean npm ci; full root npm run check with disposable PostgreSQL: 375 passed, 8 opt-in tests skipped, generated OpenAPI/API boundaries, type checks, and Worker dry-run builds. Chromium cookie benchmarks passed sequentially before/after against default-branch daf766e using the same ten-job fixture and controlled 20 ms/query delay. Endpoint medians: Jobs 174→106 ms; run detail 179→80 ms; Integrations 280→51 ms. Browser results for all requested screens, ranges, production-proxy baseline, local query plans and reproduction instructions are in packages/app/performance/GEN-2154.md.

These are controlled local measurements, not production savings or p95 estimates. Browser variance remains substantial. Request-owned pool/socket lifecycle, production index selection, caching and placement remain unchanged pending real Worker/production evidence; the report identifies those remaining costs and follow-up measurement steps.

Linear: https://linear.app/generation/issue/GEN-2154/reduce-site-wide-data-loading-latency-and-database-request-waterfalls

@linear

linear Bot commented Oct 9, 2026

Copy link
Copy Markdown

GEN-2154

@exe-dev-github-integration
exe-dev-github-integration Bot added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 82a9cda Oct 9, 2026
2 checks passed
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