Skip to content

Bound weighted vector reads across org and process queues - #823

Draft
zlareb1 wants to merge 29 commits into
mainfrom
feat/vector-read-admission
Draft

zlareb1 wants to merge 29 commits into
mainfrom
feat/vector-read-admission

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Related: #811

Changelog category (leave one):

  • Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Vector reads share weighted org and process capacity bounds. Reads that exceed a queue or native budget return a retryable capacity error, preserving complete results on successful reads.

Why

Connection slots limit active connections but leave vector work and waiting allocations uncharged. Each vector dispatch carries its authorized org, namespaces and probe weight. Admission reserves the whole weight before allocating org queue state and retains it through the org wait, existing connection or stream gate, retries and owned driver retirement.

Scope and risk

Weighted FIFO prevents small work from passing an older queued request. Queued and active work count toward finite org and process bounds. Vector statements also receive finite time, memory and row limits that throw rather than return partial results. Scalar schema, permission and key-component reads retain scalar attribution.

Capacity errors escape composed read fallbacks. Each owner joins its children and preserves the first error through repeated cancellation. Streams retain their reservation through consumption and close; nested permission reads remain scalar. Post-commit optional linking records a capacity refusal without claiming to roll back the committed version.

Supplemental subquery and set-expansion reads use immediate admission. If work would wait for org credits, the whole read refuses after collecting its children. This preserves eager scheduling and the shared duplicate winner on successful reads. Other vector reads use weighted FIFO waiting. No-op retirement adds no scheduling boundary; real retirement remains owned.

SQL, tenant predicates, ranking formulas, current-head validation and publication barriers remain unchanged. These bounds do not limit every upstream task object, remote query lifetime or fleet-wide memory. Wide legal requests can refuse when demand exceeds credits, including at the default limit; no universal maximum-input success rate is claimed.

Compatibility, rollout and rollback

  • Adds HTTP 429 VECTOR_CAPACITY_REFUSED and Python and TypeScript capacity-error types. Existing OVERLOADED and VECTOR_INPUT_TOO_LARGE retain their status and meaning. SDK errors preserve request ID, detail and retry hints.
  • No migration or backfill. Live vector_scan_max_concurrent_per_org defaults to 16 weighted units; live vector_scan_max_waiters_per_org defaults to 256. Twice the waiting bound limits process population. vector_scan_max_rows_to_read defaults to 1,000,000 and takes effect after restart. Existing connection, time and memory bounds still apply.
  • Rollback leaves no schema or data changes. Remove overrides for the three new settings when retiring the feature.

Tests

Unit controls cover weighted FIFO, population and queue bounds, cancellation before and after grant, stale org replacement, repeated cancellation, reconnect and stream retirement, complete refusal propagation, successful result bodies and drained reuse. Settings, error, SDK and reach references use their existing generators. Scoped Ruff and formatting pass; type checks and broad suites run in GitHub CI. Two inherited timeout-break failures, from traffic-class and explicit statement settings, become the same five passing cases with three vector/scalar controls. Thirty more cases cover result, sort, grouping, set and join overflow through class and statement settings, scalar behavior and optional-reader failures. Their baseline has 12 intended failures and 18 passing controls; the same cases and all older controls give 54 passing admission tests. Attributed vectors force native timeout overflow to throw while preserving tighter deadlines and scalar behavior; these fake-driver checks do not claim a real server-timeout experiment. Attributed vectors also force the six demonstrated partial-result modes to throw and classify native set and result limit errors as capacity refusals. Twelve DISTINCT regressions and one selected existing control reproduce six intended failures and seven passing controls; all 66 admission cases pass after the vector-only correction. DISTINCT row and byte limits remain unchanged, scalar profiles retain their behavior, and actual identifier lookups preserve complete bodies before and after refusal. All eight small native overflow cases pass in CI, including DISTINCT row and byte limits. The step records aggregate results; exact module source, configured target and shard evidence establish execution. Final-head CI results are recorded below.

The matched free ranking fixture passes all 18 real reads over one fixed six-row namespace: memory.search, memory.search_trace and memory.ask retrieval candidates preserve ordered identities and finite scores. Actual query logs witness the head's row, memory and time caps. The published-build compatibility check passes.

A direct native ceiling control compares an unmarked complete query, a capped refusal and drained reuse. Four native API cases pass through real search, set, update and one-entry bulk-set refusals, exact response/request/native-query correlation, unchanged committed heads and a successful scalar read. Twenty focused HTTP and retry-header controls pass.

Twelve HTTP and verified-HTTPS fault cases pass cancellation, deadline, withheld-response, installed retry and parser-retirement assertions. Two native client-process death/restart cases also pass exact owned reap, equivalent replacement, complete peer and replacement light-org results and drained reuse. Initial two-client native overlap must be positive; the observed old-native/replacement overlap may be zero. Captured successful CI output does not retain separate per-case native payloads. Native clients do not establish serving-worker or fleet capacity.

The small matched timing fixture uses two process groups with two web workers per group, concurrent light-org traffic, 2,048 main seeds and 16 light seeds. Both arms complete all 120 attempts with zero errors or lag responses. Every first cross-process search and point read returns the committed row; final head censuses and worker identities match. Fake providers and conflict threshold 0.5 are measurement conditions, not a production workload claim. The following measurements come from the capture before the cohort-preparation correction; its base differs from the earlier run, so measurements from different runs are not a paired comparison.

Scope Operation Base p50 / p99 (ms) Head p50 / p99 (ms)
main memory.get 17.6 / 36.1 23.2 / 48.1
main memory.set 127.1 / 221.1 196.6 / 299.2
main memory.bulk_set 159.2 / 211.2 216.8 / 340.6
main memory.search 99.5 / 141.9 123.6 / 195.9
light memory.get 22.3 / 32.1 26.9 / 49.4
light memory.set 138.5 / 193.0 206.7 / 256.6
light memory.bulk_set 189.1 / 212.0 240.7 / 287.7
light memory.search 115.1 / 133.8 141.3 / 186.0
Scope Write until first searches finish Base p50 / p99 (ms) Head p50 / p99 (ms)
main memory.set 119.7 / 339.4 155.4 / 249.3
main memory.bulk_set 216.3 / 308.3 298.4 / 570.5
light memory.set 144.3 / 216.0 149.4 / 231.1
light memory.bulk_set 255.1 / 487.9 309.1 / 384.1

There are eight main and four light observations per operation; these p99 values are observed maxima. Bulk visibility includes the first serial search for each of its two rows. Mean measured client time rises 118.97 to 154.23 ms; mean handler time rises 67.12 to 90.69 ms. The worse timings remain unexplained and unaccepted, so this PR is not ready to merge.

Both seed cohorts are prepared before either measured group starts, through the existing ordinary N-1 API. Preparation retains 516 bulk requests, 4,128 seeded heads, distinct identities, complete acknowledged rows and the same pacing. Both actual measured groups still verify their own complete corpora before timing. Every measured body, attempt, worker count, first-read check, native bound and cleanup path remains unchanged. Base writes still add 36 heads before head starts, so the arms do not have identical physical snapshots. This removes the between-arm seeding phase without claiming that it caused the slower result.

One regression reproduces the original empty seed map at first measured startup instead of four complete cohorts. The same regression and all 61 existing controls pass after the preparation correction: 62 cases. These pure fixture checks establish neither native latency nor acceptance; the slower completed measurements remain unaccepted.

The timing fixture also records an ordinary namespace-key step's start, duration and terminal state at entry and return. It verifies the defining source, matches the existing callback shape and delegates the wait once. The interval includes any required-work yield inside that step; terminal state does not mean success. Unknown shapes emit no fields. Headers snapshot the last completed matching call, and later cleanup cannot rewrite them. The wrapper adds no query, task or separate child wait and never changes a child's state.

Six cases fail for missing observations and two for accepting a defining source outside its arm; ten controls pass. The same 18 cases and all 62 existing controls pass after the correction: 80 cases. Completion fields require exact integer zero or one; booleans, floats and other integers refuse. These checks do not establish native latency, its cause or a performance improvement. The completed native diagnostic observations follow; they do not establish an accepted performance result.

The completed namespace-step diagnostic capture records all 120 ordinary requests per arm as HTTP 200, with no error or lag response. Its 47 ordered ranking rows and scores match. All request IDs join the recorded workers, native aggregates and complete statement arrays: 1,180 base and 1,200 head statements, with no overflow or native exception. This is functional and evidence reconciliation; the slower measurements remain unaccepted.

Scope Operation Base p50 / p99 (ms) Head p50 / p99 (ms)
main memory.get 23.3 / 104.0 25.0 / 34.1
main memory.set 178.0 / 482.9 209.3 / 450.3
main memory.bulk_set 229.6 / 452.8 218.8 / 584.2
main memory.search 141.0 / 238.0 139.7 / 234.1
light memory.get 26.8 / 74.6 36.6 / 81.7
light memory.set 192.6 / 557.7 210.3 / 554.6
light memory.bulk_set 243.1 / 271.8 198.6 / 392.4
light memory.search 159.3 / 294.0 152.2 / 192.2
Scope Write until first searches finish Base p50 / p99 (ms) Head p50 / p99 (ms)
main memory.set 179.1 / 369.8 184.2 / 359.5
main memory.bulk_set 284.2 / 426.8 344.1 / 692.1
light memory.set 169.0 / 356.3 182.7 / 341.0
light memory.bulk_set 293.3 / 339.6 322.6 / 547.9

These are eight main and four light measurements per operation, with p99 again the observed maximum. Mean measured client time is 177.23 to 186.99 ms, and handler time is 95.84 to 103.72 ms. Mean settlement is 0.588 to 5.550 ms. The four new namespace fields occur on all 24 measured writes per arm. Base has 20 already-complete steps and four that complete during the step; head has 15 and nine. Their wall intervals range from 0.047 to 17.762 ms for base and 0.044 to 141.097 ms for head. Each interval ends inside its outer settlement interval and before the response snapshot. Completion does not prove successful key insertion.

The namespace task runs detached with its own query tag. Request-tagged native statements therefore cannot assign its SQL cost. Overlapping native durations, handler intervals and client time cannot be added as exclusive costs or treated as CPU. Blank request-event build fields remain blank; checkout, response source hashes and worker identities supply the available attribution. The observed HTTP source differs from the topic branch, so this capture names the actual tested merge. Both cohorts seed before timing, but the base still adds 36 heads before head starts. Cleanup stop calls and both native gate results succeed; no independent remote process-absence or container-deletion receipt is present. These limits preserve the unaccepted performance result.

The diagnostic build also exposes an inherited clock race in a SCIM unit test: it samples a supposedly earlier token after deactivation. A deterministic whole-second crossing reproduces the strict rejection assertion failure while its same-second neighbour passes. Sampling before deactivation makes both cases pass. Both retain the actual stored cutoff and prove that the first token at the cutoff lives. Production revocation logic, its strict comparison and clock-skew allowance are unchanged.

A preceding preparation-corrected capture completes all 120 attempts per arm, all HTTP 200 with no recorded error or lag response. The complete-corpus, first-read and worker checks pass. All 47 ordered ranking rows and 141 score pairs agree. Source attribution identifies the actual tested merge; its application source is not assumed byte-identical to the topic branch.

Scope Operation Base p50 / p99 (ms) Head p50 / p99 (ms)
main memory.get 20.5 / 32.6 20.7 / 62.0
main memory.set 135.7 / 363.8 147.5 / 279.2
main memory.bulk_set 170.0 / 338.1 172.1 / 241.8
main memory.search 107.8 / 341.8 115.5 / 155.6
light memory.get 20.6 / 66.2 31.8 / 52.8
light memory.set 187.1 / 346.3 260.0 / 566.7
light memory.bulk_set 183.5 / 336.1 203.8 / 235.3
light memory.search 109.5 / 134.5 127.5 / 320.9
Scope Write until first searches finish Base p50 / p99 (ms) Head p50 / p99 (ms)
main memory.set 128.9 / 221.4 145.9 / 243.2
main memory.bulk_set 246.6 / 345.3 257.3 / 479.5
light memory.set 135.7 / 174.9 151.8 / 221.9
light memory.bulk_set 277.6 / 328.8 254.1 / 277.1

These are eight main and four light observations per operation; p99 remains the observed maximum. Mean measured client time rises 139.56 to 148.42 ms, and handler time rises 78.15 to 84.89 ms. Mean measured settlement rises 0.397 to 1.643 ms. The largest head settlement is 50.18 ms; its publication interval is approximately 0.002 ms. These intervals do not isolate the latency cause. The corrected preparation retains 36 extra committed base heads before head starts; it does not make physical snapshots identical. Performance remains unaccepted and this PR remains a draft.

All 1,184 base and 1,170 head numeric statement tuples reconcile with their original native aggregates, without truncation or diagnostic error. Native joins use recorded request tags; raw query IDs and ledger statement counts are not assumed equal to those native counts. Overlapping statement intervals and finishes after client completion remain explicit. Detached work can replace the request tag, so an absent request-tagged statement does not establish Python CPU.

Both arm stop calls return before their receipts, and the gate reports success after ordinary owned-server cleanup. This log has no independent post-stop kernel census and does not separately prove container removal. Recorded functional success is accepted within those evidence limits; latency acceptance remains required.

The following diagnostic observations retain the earlier capture, before the preparation correction.

Timing diagnostics retain every cold request and the original total interval, including fresh-client construction and close. All 61 directly related pure fixture controls pass on that head, including six tail-stage cases and five statement-evidence controls. Independent reconciliation verifies all 120 logical request pairs, 240 request-ID ledger/native joins and all 47 ordered ranking rows and scores. All six deterministic-body checks pass. Ledger build-commit fields are empty; actual checkout, source headers and proved worker identities provide the recorded attribution.

The fixture-only app factory records ASGI entry, endpoint binding, auth, body read, authorization, policy, rate limiting, idempotency, telemetry, handler and completion. The largest matched client regression is a first-after-ack search, rising 161.51 to 366.40 ms while its handler falls 95.34 to 82.94 ms. Its auth-to-body gap rises 52.76 to 271.81 ms. That span contains the existing session-protection proof and scheduling; the proof source is identical in both arms. Proof-specific SQL tags replace the request tag, so these statements cannot join through the original request ID. The data does not isolate a session-proof substep, connection acquisition or scheduling cause.

That completed capture includes separate start and duration observations for tail settlement and publication, with the tail module source hash. Mean measured settlement falls 0.715 to 0.243 ms; publication rises 0.00138 to 0.00163 ms. The largest head post-handler-to-header interval is 6.84 ms. These observed intervals do not explain the observed latency increase or identify the cause of the preceding run’s approximately 109 ms tail. Six regressions fail for missing observations or accepted wrong-source loading before the correction; the same six and all 55 existing controls pass after it. Headers retain the last completed call before their snapshot, including a completed outer nested call. Later response-body and final cleanup work cannot change that observation. Missing intervals remain unknown; overlapping wall intervals do not establish exclusive CPU.

A post-measurement read retains numeric normalized statement hashes, sequence, timestamps, durations, rows, bytes, memory, error codes and four allowlisted settings. It captures no SQL or parameter values. That CI capture records all 1,123 base and 1,151 head statement tuples, with no overflow or diagnostic error; every tuple reconciles with the original native aggregates. Each request remains below the 64-statement cap, and the existing two-megabyte output and query limits remain. Missing settings stay unknown. Numeric shape hashes do not identify SQL text, and native duration sums can overlap or extend after responses.

Measured handler increases co-occur with larger represented native durations. One matched set has handler time 89.32 to 202.43 ms and summed native time 158 to 292 ms; one bulk set has handler time 139.89 to 226.17 ms and native time 120 to 194 ms. These observations do not establish why execution grew. The largest client regression instead has lower handler and native time. Both arms have the same four measured workers alongside the original mixed-build processes; measured base groups stop before head groups start. Equal process policy and logical bodies do not prove equal asynchronous activity or physical table state.

Both arms use the same numeric observer, with source origins checked before application loading. Ordinary launches retain their entrypoint; absolute observation overhead is unmeasured. No session protection, native limit, workload, assertion or deadline is waived. Ordinary exact-key reads bypass vector-credit admission; indirect contention remains unproved. The slower results remain unaccepted.

The preceding preparation-corrected head has 53 terminal checks: 51 succeed and two publication checks are expected skips. Its five applicable workflows succeed, with the functional results and unaccepted timings above. The diagnostic build has one failed SCIM test in unit shard 4, and its dependent coverage job is skipped. These are not passing results. Full CI for the test-clock correction is recorded in the next section; preceding results are not credited to a later head. Earlier translation-check worker losses remain unexplained; no timeout or skip is changed. Passing fake-driver controls or a green timing harness does not resolve the open latency requirement.

Test-clock capture and terminal failures

The completed capture for the test-clock correction compares base fc930e0c with actual tested merge 8f1252ac, which includes topic c1df6ca4. All 47 ordered ranking rows match. Each arm completes 120 ordinary HTTP requests without errors or lag responses, with current first point reads and searches. All 1,184 base and 1,160 head request-tagged native statement tuples reconcile; no overflow or native exception is recorded. These native counts cover their query-tag scope, and differ from response telemetry counts.

Client measurements below are mean / p50 / p99, in milliseconds. The groups contain four or eight observations; p99 is the sample maximum.

Group n Base client Head client
light/memory.bulk_set 4 378.6 / 348.0 / 438.6 307.5 / 290.6 / 357.9
light/memory.get 4 58.6 / 41.0 / 119.3 42.1 / 36.9 / 58.2
light/memory.search 4 201.5 / 179.5 / 233.6 201.9 / 190.7 / 232.1
light/memory.set 4 288.2 / 256.5 / 366.6 305.1 / 215.3 / 564.6
main/memory.bulk_set 8 299.7 / 273.5 / 479.4 274.6 / 258.0 / 319.9
main/memory.get 8 39.0 / 33.0 / 77.3 39.0 / 32.0 / 60.1
main/memory.search 8 200.3 / 178.5 / 292.7 183.8 / 173.5 / 229.2
main/memory.set 8 272.0 / 217.9 / 531.9 292.6 / 266.7 / 592.6
Write group n Base ack-to-first-search Head ack-to-first-search
light/memory.bulk_set 4 444.9 / 383.3 / 621.6 401.0 / 388.5 / 447.2
light/memory.set 4 272.8 / 290.9 / 297.1 293.3 / 239.7 / 382.3
main/memory.bulk_set 8 432.3 / 379.7 / 591.5 420.7 / 397.8 / 502.0
main/memory.set 8 237.0 / 202.9 / 368.3 231.6 / 197.9 / 317.6

Mean measured client time falls 212.413 to 203.033 ms and mean handler time falls 125.470 to 120.923 ms. Set means and observed p99 values increase in both roles, and light search mean increases slightly. The aggregates do not establish a uniform improvement or explain the regressions. Performance remains unaccepted.

All 24 write attempts per arm contain the new namespace-key interval. Three base and two head tasks are pending on entry; all are terminal on callback return. Terminal does not mean a successful durable insert. These intervals finish before response headers and nest inside settlement; the namespace task uses its own native query tag. Ordinary SQL costs, overlapping native intervals and absent build fields retain the preceding attribution limits.

The actual merge's HTTP and settings-source hashes match the capture; its HTTP source differs from the topic branch. Both arms share one ClickHouse service and distinct org fixtures. Base adds 36 global heads before head starts; org predicates exclude those rows as head-tenant candidates. Their effect on shared parts, caches or scheduling is unmeasured. Stop calls return before receipt emission, without an independent post-stop kernel census. No new physical-snapshot requirement or storage helper is introduced.

The completed CI round for c1df6ca4 has 53 terminal checks: 48 succeed, the two publication checks and dependent coverage are skipped, and two fail. Both Postgres authority versions pass. Unit shard 6 has one translation-check worker crash with no verified termination cause or assertion result. Integration shard 3 fails because its two lesson tests share an org; #969 repairs that fixture, and the repair is absent from this tested checkout. These failures remain failures. No timeout, skip or assertion is relaxed.

The pushed head bcb810ce incorporates the shipped fixture repair through a normal merge of main. Compared with the preceding actual CI checkout, only the lesson fixture changes: each test uses its own registered org, and all seven assertions remain. The SCIM clock correction is unchanged. Scoped Ruff, formatting and diff checks pass. The historical captures above remain attributed to their tested checkouts.

Final-head CI and current latency evidence

Fresh whole-PR source review of bcb810ce returns zero findings and zero nits. It reads all 124 changed paths and the entire source of all 28 changed test files. The four inherited translation-inventory files in the actual CI merge receive a separate complete source read. All 53 checks are terminal: 51 succeed and two publication checks are expected skips. All five applicable workflows succeed, including both Postgres authority versions, both Quickstarts, every unit and integration shard, native fault and overflow coverage, and the mixed-build gate. These results do not explain the earlier translation-check worker loss.

The current completed mixed-build job compares base 80c90e18 with actual merge 8cf31af9, which includes topic bcb810ce. The checkout and captured source headers agree; the measured head HTTP, tail, namespace-key and admission sources match the pushed head. Both arms complete 120 ordinary HTTP requests with HTTP 200, no ordinary errors and no lag responses. All 47 ordered ranking rows and exact scores match. The first post-ack point reads and searches return the committed rows.

Client measurements below are mean / p50 / p99, in milliseconds. Main groups have eight observations and light groups have four; p99 is the sample maximum.

Group n Base client Head client
main/memory.get 8 41.006 / 33.592 / 66.573 35.652 / 33.739 / 48.518
main/memory.set 8 275.655 / 237.259 / 445.686 271.590 / 225.523 / 542.640
main/memory.bulk_set 8 284.257 / 270.673 / 393.817 316.360 / 263.922 / 462.346
main/memory.search 8 197.225 / 171.928 / 266.209 196.256 / 177.133 / 290.932
light/memory.get 4 53.918 / 53.871 / 58.267 56.706 / 42.194 / 101.947
light/memory.set 4 354.463 / 311.491 / 505.620 308.927 / 240.479 / 405.706
light/memory.bulk_set 4 300.491 / 287.365 / 342.272 317.410 / 299.634 / 390.654
light/memory.search 4 293.591 / 259.665 / 429.586 205.310 / 183.848 / 254.969
Write group n Base ack-to-first-search Head ack-to-first-search
main/memory.set 8 245.467 / 229.881 / 359.398 251.880 / 194.192 / 530.811
main/memory.bulk_set 8 409.726 / 404.762 / 511.540 421.934 / 379.552 / 702.164
light/memory.set 4 336.902 / 289.128 / 546.354 300.528 / 235.236 / 466.603
light/memory.bulk_set 4 405.770 / 379.044 / 452.361 392.294 / 368.867 / 424.698

Across 48 measured requests per arm, mean client time falls 216.562 to 210.672 ms while mean handler time rises 123.641 to 125.761 ms. Both bulk client means rise, and main set, main bulk, main search and light get observed p99 values rise. Main set and bulk ack-to-first-search means and p99 values also rise. These results require rework or explicit owner acceptance under the latency criterion. No such acceptance is recorded; performance remains unaccepted and this PR remains a draft.

All 1,187 native statement tuples per arm reconcile with their original aggregates and request-tag joins. No overflow, native exception or diagnostic error is recorded. Summed native durations fall 11,767 to 11,501 ms, while overlapping intervals remain wall-time observations rather than exclusive CPU. Native request-tag counts differ from response telemetry counts throughout the capture. Build-commit event fields are empty; checkout, source headers, catalog pins and recorded worker identities provide the attribution. Query-ID spelling alone does not identify a request or worker.

All 24 writes per arm record namespace-key intervals. One base task and four head tasks are pending on interval entry; every task is terminal on return. Terminal does not prove a successful durable insert. Mean key intervals rise 0.228 to 0.459 ms across the writes, and mean settlement rises 0.128 to 0.245 ms across 48 measured requests. The key interval nests inside settlement and uses its own SQL tag; their different sample counts and overlapping boundaries prevent adding them as independent costs.

The slower bulk results do not establish a source cause. The matched main bulk tail has the same 14 request-tagged statements in both arms; its native union rises 126.127 to 154.234 ms while handler time rises 180.094 to 369.272 ms. Another main bulk request has lower handler time but higher client time. The measured bulk bodies contain two semantic entries, so the four-child owner uses one window. The matched main set tail also has the same 41 statement shapes and counts while native union falls 310.700 to 293.389 ms and handler time rises 305.627 to 367.006 ms. Unobserved gaps include security-proof work under a separate tag and scheduling; subtracting represented native time does not identify Python CPU or a removable delay.

Both cohorts are prepared before measurement. Base adds 36 global heads before head starts; org predicates exclude them as head-tenant candidates, while their effect on shared storage and scheduling remains unmeasured. Owned stop calls return before receipt emission; the log supplies no independent post-stop kernel census. Functional and ranking results are accepted within these limits. The worse named latency results remain visible, no requirement is waived, and no new physical-snapshot gate is introduced.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated: Codex wrote the change; independent source review has zero findings and final CI passes. Latency acceptance remains open.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full format, lint, typecheck, unit and applicable integration gates pass on the final pushed head.
  • Changed generated settings and error references are regenerated by their built-in generators.
  • Architecture documentation describes admission and its limits.
  • Commits are signed off.

Attribute vector dispatches explicitly, bound org and process queues, and preserve capacity refusals across composed reads. Keep existing connection pools and apply finite native query limits.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep the existing concurrent launch and result order while canceling and shield-joining owned namespace, phrase and subquery tasks. Preserve the first refusal through repeated cancellation.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep native capacity refusals visible through neighbor and promotion scans. Retire card and duplicate-candidate readers before a failed owner returns.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Record the three new defaults through the existing snapshot updater without changing any pinned value.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Retain concrete input, overload and capacity wire contracts while testing configured queue and row bounds and both public SDK mappings.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep completion-sensitive duplicate selection on the eager path and return the complete capacity refusal when immediate credits are unavailable. Retire no-op client generations inline while preserving owned closure for real retired clients.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Preserve typed refusals through identifier, document and widening owners while retaining ordinary optional-read fallbacks. Join both temporal operands before returning the first failure, including through repeated cancellation. Add a native row-budget CI case.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Optional context and grounding fallbacks must preserve whole-read capacity errors. Join owned siblings and keep the first refusal when cleanup is cancelled.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
A refused ranking read cannot become absent evidence. Collect duplicate-check and bisect children before returning the original failure, including through repeated cancellation.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Register speculative reads before the graph await so the public owner joins their cleanup. Keep advisory connection metadata outside the interrupted statement charge, and preserve ask failures in the existing cancellation helper.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Remove an empty org entry only while it still names the same accounting object. An older cancelled waiter can finish cleanup after a new request has already acquired replacement credits.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
The dispatch census must account for the reconnect probe that clears inherited vector attribution. A focused check inspects the actual connect method while the complete source census remains in CI.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 force-pushed the feat/vector-read-admission branch from 0f17aa7 to f748c53 Compare November 18, 2026 20:16
@zlareb1
zlareb1 changed the base branch from feat/memory-fanout-windows to main November 18, 2026 20:16
@zlareb1 zlareb1 closed this Nov 18, 2026
@zlareb1 zlareb1 reopened this Nov 18, 2026
The shared stream reader also serves scalar document reads. Scope vector work at its discovery caller through stream close, preserve the parser contract, and align the SDK and dispatch declarations with their intended public surface.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Component-only key scoring reads existing pool keys without vectors. Preserve scalar availability under occupied vector credits while retaining admission and native limits for cosine-ranked reads.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Use a fixed fake-provider corpus and native query-setting witnesses to check that vector admission preserves all three retrieval APIs.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Keep real refusal, cancellation, retry and parser-retirement evidence in the existing hosted fixtures. Record every attempted call and first-read result, and regenerate the script reach declarations.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Record client setup, response phases and bounded request timing evidence so slower samples can be diagnosed. Keep cold requests, workload assertions and the original timers.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Override inherited timeout break mode for attributed vector work so a shorter native deadline cannot return partial success. Retain scalar settings and tighter execution limits.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Native output, sorting, grouping, membership and join limits must refuse the whole attributed read. Preserve scalar profiles and configured limits, and propagate native set and result budget errors through optional readers.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Attribute delays before and inside handlers with bounded numeric metadata from both source arms. Preserve requests, security decisions, native limits and closed-client timings.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Preserve inherited DISTINCT row and byte limits while refusing incomplete candidate sets before ranking. Retain scalar profiles, native causes and complete reuse after refusal. State the ordinary-failure boundary on cache misses.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Retain numeric statement shapes and costs per observed request so timing analysis can separate repeated native work from more expensive queries. Keep the original witnesses, workload and resource bounds.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Measure the existing request-tail settle and publication intervals before response headers. Keep exact source provenance and unchanged delegation so late response costs can be investigated without changing production behavior.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Seeding the second cohort between measured arms changes the shared store
under the comparison. Prepare both through the existing API before either
arm starts, retaining their distinct identities and all measured requests,
visibility checks, worker ownership and cleanup.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Record the ordinary step's interval and terminal state while delegating the existing wait. Verify its defining source and keep later cleanup out of response header snapshots.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>

This branch has not been deployed

No deployments
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