Skip to content

fix: consolidate AppView read state and attribute request latency - #458

Merged
CountableNewt merged 6 commits into
devfrom
codex/tsw-121-publication-development
Sep 15, 2026
Merged

CountableNewt merged 6 commits into
devfrom
codex/tsw-121-publication-development

Conversation

@CountableNewt

Copy link
Copy Markdown
Collaborator

Publication requests in Development still hit their two-second deadline after PR454. This change removes repeated read-state database work and adds evidence to identify the remaining latency: a cached nonempty page now reads authority, explicit marks, unread overrides, and legacy floors in one statement snapshot (previously five transactions for legacy authority, two for PDS authority).

The overlay retains PDS authority, fails when its projection is unavailable, preserves legacy watermark/tie/override behavior and viewer isolation, and tolerates repeated cached entry IDs. The request deadline is unchanged. Fixed-category timings distinguish cache lookup, refresh-lease contention, publication selection, cache storage, authoritative read state, PostgreSQL pool wait, transaction duration, and application SELECT attempts. One existing slow/failure log carries the bounded numeric summary; fast successes stay silent, background refreshes are excluded, and no SQL, parameters, viewer IDs, URLs, or raw errors are collected.

Validation:

  • Five focused Swift 6 timing tests passed locally; source parsing and diff checks passed.
  • Added PostgreSQL parity coverage for missing cached source rows, duplicate entries, floors, ties, overrides, PDS authority and unavailable projections, plus pool/query timing assertions.
  • Added middleware coverage for retry aggregation, fast-success silence, and slow-success timing.
  • Full Swift/PostgreSQL integration suites, contracts, and production images are required in CI. Local Docker is unavailable and disk headroom is insufficient for another full backend build.

Rollout: Development first, followed by authenticated first/repeat publication loads. The browser session expired and needs sign-in before acceptance. This removes measured-in-source overhead; it does not establish the dominant timeout cause or claim a memory/latency saving. Production PR453 remains held for Development acceptance. No memory limits, replica counts, durability settings, or public XRPC shapes change.

Tracks TSW-121 under TSW-92.

@linear-code

linear-code Bot commented Sep 15, 2026

Copy link
Copy Markdown

TSW-121

@CountableNewt
CountableNewt merged commit 88639f5 into dev Sep 15, 2026
20 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