Skip to content

perf: keep authenticated web reads responsive - #633

Merged
seonghobae merged 4 commits into
fix/global-ask-embedding-pool-releasefrom
fix/k6-authenticated-capacity
Aug 25, 2026
Merged

perf: keep authenticated web reads responsive#633
seonghobae merged 4 commits into
fix/global-ask-embedding-pool-releasefrom
fix/k6-authenticated-capacity

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Outcome

  • moves blocking commitment, Naruon calendar, relationship-verification, and report scoring work off the ASGI event loop
  • releases the asyncpg connection while external relationship verification is in flight
  • fixes the runtime-only TEPP API key configuration used by application startup
  • applies the existing /api/lineage landing ABAC, ordering, node limit, and edge bound in PostgreSQL instead of loading all 43,189 authorized runtime rows before limiting in Python

Verification

  • 71 passed across lineage ingestion, relation verification, period report, config, k6 contract, and public-docstring suites
  • actual Keycloak-authenticated k6 against the fully migrated local Compose PostgreSQL/Valkey/orchestrator stack; aggregate evidence only; zero HTTP errors at 1/10/25 VUs
  • before (10 s): VU1 median/p95/p99 809.03 ms / 6.18 s / 6.22 s, 0.618 req/s; VU10 4.63 s / 20.10 s / 20.46 s, 1.531 req/s; VU25 25.35 s / 33.59 s / 36.30 s, 1.046 req/s, 6 iterations
  • after (10 s): VU1 179.52 ms / 3.43 s / 4.17 s, 1.067 req/s; VU10 1.88 s / 20.80 s / 21.04 s, 1.487 req/s; VU25 22.03 s / 29.78 s / 31.38 s, 2.411 req/s, 25 iterations
  • exact behavioral code head a700374e, 4 VUs for 60 s: 36 iterations, 110 HTTP requests, 0 failures; overall median/p95/p99 392.15 ms / 8.82 s / 9.68 s, 1.644 req/s; posts/lineage read 3.21 s / 9.14 s / 9.89 s; Ask polling 41.39 ms / 413.16 ms / 462.65 ms

All 36 exact-head iterations observed the Ask lifecycle state. The remaining reader tail is recorded explicitly and is not presented as an SLO or capacity ceiling. The existing harness's #627 token renewal is preserved.

seonghobae and others added 3 commits August 25, 2026 21:54
…main)

The similar-VOC candidate fetch already carried a suppression, but its
Safe SQL reason sat three lines above the audited call while the review
contract requires the immediately preceding line. Collapse the comment
to one adjacent line; the counted total stays 36 because this repairs
an existing site rather than adding one.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a45ebd11-4df8-4303-9305-0299dd475473

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae enabled auto-merge (squash) August 25, 2026 13:32
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae changed the base branch from main to fix/global-ask-embedding-pool-release August 25, 2026 13:34
@seonghobae
seonghobae disabled auto-merge August 25, 2026 13:35
@seonghobae
seonghobae force-pushed the fix/k6-authenticated-capacity branch from 66d0f52 to fc57c23 Compare August 25, 2026 13:36
@seonghobae
seonghobae merged commit ccb4bb9 into fix/global-ask-embedding-pool-release Aug 25, 2026
1 of 4 checks passed
seonghobae added a commit that referenced this pull request Aug 25, 2026
* fix(ask): release pool before embedding provider work

* style: keep load evidence reviewable

* docs(gaps): refresh protected delivery evidence

* fix(ask): reject blank embedding requests

* fix(ask): preserve unavailable embedding short circuit

* fix(ask): honor validated precomputed embeddings

* fix(ask): honor precomputed embedding envelope

* fix(k6): reject unitless request timeouts

* fix(migrations): replay global ask queue safely

* fix(ask): reject nonfinite embeddings

* perf: keep authenticated web reads responsive (#633)

* fix(backend): make the similar-VOC SQL audit reason adjacent (hotfix main)

The similar-VOC candidate fetch already carried a suppression, but its
Safe SQL reason sat three lines above the audited call while the review
contract requires the immediately preceding line. Collapse the comment
to one adjacent line; the counted total stays 36 because this repairs
an existing site rather than adding one.

* perf: keep authenticated web reads responsive

* docs: record authenticated capacity comparison

---------

Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>

* feat(semantic): nominate Ask evidence candidates

---------

Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>
seonghobae added a commit that referenced this pull request Aug 27, 2026
* fix(ask): release pool before embedding provider work

* style: keep load evidence reviewable

* docs(gaps): refresh protected delivery evidence

* fix(ask): reject blank embedding requests

* fix(ask): preserve unavailable embedding short circuit

* fix(ask): honor validated precomputed embeddings

* fix(ask): honor precomputed embedding envelope

* fix(k6): reject unitless request timeouts

* fix(migrations): replay global ask queue safely

* fix(ask): reject nonfinite embeddings

* perf: keep authenticated web reads responsive (#633)

* fix(backend): make the similar-VOC SQL audit reason adjacent (hotfix main)

The similar-VOC candidate fetch already carried a suppression, but its
Safe SQL reason sat three lines above the audited call while the review
contract requires the immediately preceding line. Collapse the comment
to one adjacent line; the counted total stays 36 because this repairs
an existing site rather than adding one.

* perf: keep authenticated web reads responsive

* docs: record authenticated capacity comparison

---------

Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>

* fix(verification): persist completed provider results

* fix: count only claimed relation verifications

* fix: fence concurrent relation verification and migration drift

* fix: avoid evaluating absent migration indexes

* fix(ci): document trusted eligibility SQL

* test(ask): activate embedding diagnostics path

* fix(verification): fence deleted evidence rows

* fix(lineage): preserve landing tie order

* fix(lineage): retain string tie-break contract

* fix(verification): restore incremental relation persistence

* test(db): execute Global Ask migration replay

* fix(verification): fence deleted evidence

---------

Co-authored-by: seonghobae <seonghobae@users.noreply.github.com>
Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: Codex <codex@localhost>
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