Repository navigation
feat(qwp): add owned_by to name the owner of the tables a sender auto-creates - #130
Conversation
… auto-creates The owned_by connect-string key, and LineSenderBuilder.ownedBy(), name the user, group or service account that QuestDB Enterprise grants the owner permissions on every table and column the sender auto-creates, as OWNED BY does in SQL. An external (OIDC) user cannot hold those permissions itself, so it must name one of its groups to auto-create anything. - The sender sends the owner as X-QWP-Owned-By, percent-encoded UTF-8, on every upgrade, reconnects and failovers included. WebSocket only: http, tcp and udp connect strings and builders reject it. - The upgrade fails unless the server echoes the owner, so a server that predates the header fails the connection instead of creating tables without the owner. The failure is a non-421 WebSocketUpgradeException, which the connect walk treats as terminal. - A rejected upgrade now carries the plain-text body of the response as its reason, sanitized and length-capped, in WebSocketUpgradeException and in QwpAuthFailedException (getReason()), so a refused owner is told apart from a rejected credential.
The owned_by helpers were inserted between pollDurableAckRequest() and its javadoc, which then documented pollOwnedByRequest() instead. Move the javadoc back, give the new helpers their own, and attach an older javadoc that sat loose above them to setSuppressDurableAckHeader(), the method it describes.
WebSocketClient.upgrade() throws WebSocketUpgradeException with status 101 when the server completes the upgrade without echoing the owned_by the client asked for, but the class javadoc still said the exception means a non-101 status. The javadoc now names that case.
Tests now pin the parts of owned_by and of the upgrade reject reason that nothing checked before: - A reconnect and an orphan drainer's upgrade send X-QWP-Owned-By again, not only the first connect (QwpOwnedByTest, BackgroundDrainerEndToEndTest). - The reject reason stays null when the Content-Length exceeds the bytes received, is malformed or not positive, the body is not text/plain, or it is blank, and it reaches messages only sanitized and capped at 256 characters. TestWebSocketServer can now send reject headers that do not describe the body. - encodeOwnedBy keeps the ends of the unreserved ranges and encodes the characters just outside them, as the server's re-encoded echo must match it byte for byte. The owned_by echo failure now carries STATUS_NONE instead of 101: the server answered 101 and rejected nothing, so Sender.health() reports status 0 for it, as it does for the durable-ack gap and as ConnectionHealth documents. The ownedBy() javadoc no longer says the built-in admin may name any entity: Enterprise refuses an external user as the owner, the admin's choice included.
WebSocketClient's comment on the owned_by echo check said that the connect walk latches a missing echo as terminal. That holds for the initial connect and for an orphan drainer, but a sender that has connected before keeps retrying the error, as QwpOwnedByTest.testHealthReportsUnconfirmedOwnedByWithoutStatus asserts. The comment now says so, and so does the test helper that repeated it. TestWebSocketServer's suppressOwnedByEcho flag becomes isOwnedByEchoSuppressed, set with setOwnedByEchoSuppressed(), as the project names booleans with an is or has prefix.
A connect round that met a 421 role reject on one endpoint demoted a 101 without the owned_by echo from another endpoint to a role mismatch, as it demotes every plain non-421 upgrade error. build() then reported a missing primary, an async sender retried forever while its health said every endpoint was a replica, and the real cause survived only as a suppressed exception. The missing or mismatched echo now throws QwpOwnedByMismatchException, a WebSocketUpgradeException that the round epilogue does not demote: like a missing durable-ack echo, it comes from a writable endpoint that lacks the capability. A sender fails its initial connect with it and an orphan drainer quarantines its slot, as they already did with a single endpoint, and a sender that has connected before keeps retrying it. QwpOwnedByTest covers both mixed rounds: a 101 without the echo, and a 403 refusal, which surfaces with its reason.
Review: questdb-enterprise#1572 + questdb/questdb#8504 (+ #130)Tandem review at level 3 of questdb-enterprise Verdict: approve for #1572, #8504 and #130. There are no Critical or Moderate findings, and the one Minor test-hygiene item has since been fixed. CriticalNone. ModerateNone. Minor (fixed)[OSS]
Fixed in questdb CoverageThe test gate passes, with no coverage gaps that block or need a fix. The two Summary
Intended behaviour change, worth a release note: an external (OIDC) principal that names no owner is now refused ( |
An orphan drainer quarantined its slot on the first connect round in which a writable endpoint answered 101 without the X-QWP-Owned-By echo. Such an endpoint lacks the feature, as one without durable ack lacks that, and a rolling upgrade or a failover back to an upgraded node clears it. Yet the drainer took the missing echo for a rejected upgrade and set the slot's rows aside behind a .failed sentinel that nothing in production clears, where a missing durable-ack echo gets a settle budget of 16 sweeps for exactly this reason. BackgroundDrainer now counts QwpOwnedByMismatchException toward the same capability-gap episode as QwpDurableAckMismatchException, and quarantines the slot only once that budget runs out, with a reason that names owned_by. Mid-drain, CursorWebSocketSendLoop hands the exception back to the drainer as a capability-gap terminal rather than a final one, so the drainer re-enters the budget. The durable-ack listener callbacks keep reporting durable ack only. A sender that has connected before keeps retrying, and the initial connect still fails at once. Tests cover the ride-out, the escalation and the shared budget at the initial connect, the same mid-drain, and the sender's own connect walk against a server that leaves the echo out for two sweeps.
Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130Tandem review at level 3 of questdb-enterprise Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical or Moderate findings. The one Minor item has since been fixed. CriticalNone. ModerateNone. Minor (fixed)[ENT]
Fixed in questdb-enterprise CoverageThe test gate passes, with no coverage gaps. The enterprise owner suites pass at questdb-enterprise In that run, the OIDC concurrent-create test took the retriable "table is being created" branch. Summary
Intended behaviour changes, worth a release note:
|
A connect round latches its first non-421 upgrade failure, and a 421 from another endpoint demotes a plain one, such as a proxy's 503, to a role mismatch. When that plain failure came before an endpoint that answered 101 without the durable ack or the owned_by echo the sender asked for, the demotion hid the capability gap as well. The initial connect then reported "no endpoint matches target=PRIMARY", a SYNC connect retried it for its whole reconnect budget, and an ASYNC one never failed, while the same endpoints in another order reported the gap. connectWalk now keeps the round's first capability gap apart from the latch and throws it when the 421 demotes the latched error, which it attaches as suppressed. A round without a 421 behaves as before. QwpOwnedByTest and WriteFailoverTest walk a 503, a primary without the echo and a replica, in that order. Fixes #131
Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130Tandem review at level 3 of questdb-enterprise Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings. CriticalNone. ModerateNone. MinorNone. CoverageThe test gate passes, with no coverage gaps that block or need a fix. Summary
Behaviour changes worth a release note:
|
The reconnect arm of CursorWebSocketSendLoop declared the flag that routes an unconfirmed owned_by on an ORPHAN loop to the capability-gap settle budget as ownedByCapabilityGap. The project names boolean variables with an is or has prefix, so the local is now isOwnedByCapabilityGap. Nothing else changes.
Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130Tandem review at level 3 of questdb-enterprise Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and the test gate passes. Titles and descriptions
CriticalNone. ModerateNone. MinorNone. CoverageThe test gate passes, with no coverage gaps worth reporting. I ran the owner-related test classes locally at the reviewed revisions and all passed: 161 Enterprise tests and 19 OSS tests. Classes run:
In that run, the OIDC concurrent-create test did exercise the retriable "table is being created" path: it was refused three times, then the replay landed. Summary
|
QwpOwnedByMismatchException named the owner and the echo, but not the endpoint that answered 101 without confirming the owner. A sender with several addresses could not tell from build()'s error, from Sender.health() or from an orphan drainer's .failed reason which node lacked the feature, while QwpDurableAckMismatchException, the gap it is modelled on, names host and port. WebSocketClient now passes its host and port to the exception. The exception renders them first in its message, so the 256-character cap of the sanitized health message keeps them, and exposes them as getHost() and getPort(), as QwpDurableAckMismatchException does. QwpOwnedByTest pins the endpoint in the message of the direct client, the sender's build, both mixed connect rounds and the health snapshot, and in the getters. BackgroundDrainerDurableAckRetryTest pins the whole quarantine reason instead of its prefix. QwpOwnedByTest's reject-reason tests now call assertBadRequestReason instead of repeating it inline.
Only OFF-mode builds checked that the initial connect fails when the server answers 101 without the X-QWP-Owned-By echo. SYNC and ASYNC startup fail too, but only through the WebSocketUpgradeException supertype: a change that let owned_by alone retry passed the whole suite, while a SYNC build() then blocked for the reconnect budget and an ASYNC or lazy_connect sender buffered without ever latching a terminal. - QwpOwnedByTest: a SYNC build fails with QwpOwnedByMismatchException after a single upgrade. - CursorWebSocketSendLoopForegroundReconnectPolicyTest: owned_by joins auth and durable-ack in both rows of the foreground policy table. An ASYNC startup latches the terminal on the first rejection, and a sender that has connected before rides it out and delivers once the owner is confirmed.
testRejectReasonNullUnlessBodyIsUsable checked a Content-Length 984 bytes past the body that arrived with the headers, but not one byte past it. A bound in WebSocketClient.extractRejectReason loosened by one byte passed the whole class, while the reason picked up a byte the peer never sent: stale native memory, or the byte past the receive buffer when a response fills it. A Content-Length of 17 against the 16-byte body now pins that edge. The case fails with the bound loosened and passes as written. testRejectReasonSanitized now builds its 300-character body with TestUtils.repeat() instead of a hand-written loop.
Review: #130Level 3 review of head Verdict: approve. There are no Critical, Moderate or Minor findings, and the test gate passes. PR metadata and scope
CriticalNone. ModerateNone. MinorNone. CoverageThe test gate passes, with no coverage gaps. What I ran:
What I checked
Behaviour changes worth a release note (all intended)
|
Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130Tandem review at level 3 of questdb-enterprise The branches have since moved to questdb-enterprise Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and both gates pass. CriticalNone. ModerateNone. MinorNone. CoverageThe test gate passes, with no coverage gaps that need a fix. Every change in behaviour has a test that would fail if it regressed. That includes:
I ran the classes that test the two newest commits (questdb
Summary
|
Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130Tandem review at level 3 of questdb-enterprise Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and both gates pass. CriticalNone. ModerateNone. MinorNone. CoverageThe test gate passes, with no coverage gaps. Every changed behaviour has a test whose assertion would fail if it regressed:
None of the added test lines use Summary
Behaviour changes worth a release note (all intended, and the PRs document them):
|
[PR Coverage check]😍 pass : 135 / 136 (99.26%) file detail
|
Review: questdb/questdb-enterprise#1572 + questdb/questdb#8504 + #130Tandem review at level 3, at these revisions:
Verdict: approve for questdb/questdb-enterprise#1572, questdb/questdb#8504 and #130. There are no Critical, Moderate or Minor findings, and the test gate passes. Titles and descriptions
CriticalNone. ModerateNone. MinorNone. CoverageThe test gate passes with no coverage gaps. No added test line uses Summary
|
kafka1991
left a comment
There was a problem hiding this comment.
I reviewed PR #130 at level 3, the full review. Verdict: approve. There are no Critical or Moderate findings, one Minor doc nit, and the test gate passes.
Revisions: head a8759195, base and merge-base 58e556ff.
Title and description
- The title follows Conventional Commits and the description explains the user impact.
- Labels (
security,tandem,QWP,READY) fit the scope. Fixes #131sits inside a bullet rather than at the top of the body. GitHub still links it as a closing issue, so this doesn't block anything.
Submodule provenance
No submodule pointer moved and no binary files are committed.
Tandem PRs
- questdb/questdb#8504 and questdb/questdb-enterprise#1572 both exist on the matching branch
ia_qwp_owned_by, and all three PR descriptions link to each other. - The OSS branch pins the client at
a8759195, so OSS CI runs this exact client code. - OSS end-to-end tests (
QwpOwnedByE2ETest) cover, against a real server:- the server echo and the owner recorded on auto-created tables and columns;
- the 403 refusal and its reason.
- Enterprise ACL and OIDC tests cover the HA and ACL side.
Critical
None.
Moderate
None.
Minor
README describes owned_by as a group only
- Problem: the README placeholder suggests
owned_bymust name a group. - Net impact: readers may think a user or service account cannot be named.
- Evidence: at
a8759195,README.md:737-739says "owned_by=<group>… grants them to that group". TheLineSenderBuilder.ownedByjavadoc (Sender.java:2561-2568) says "user, group or service account", and that a principal may name itself. - Fix: use
owned_by=<owner>and "grants them to that user, group or service account". Keep the existing note that an external user must name one of its groups.
Coverage
- Test gate: passes, with no coverage gaps admitted.
- #131 fix, checked by running the tests: in a scratch worktree on JDK 25, the regression tests pass at head and fail once the fix is removed.
- The tests are
WriteFailoverTest.testMixedSweepCapabilityGapOutranksDemotedUpgradeErrorandQwpOwnedByTest.testMixedRoundReportsUnconfirmedOwnerAfterPlainUpgradeFailure. - I ran them with the native library taken from the local 1.3.13-SNAPSHOT jar, since this PR changes no native code.
- At head: green (18/18 in
QwpOwnedByTest, 2/2 inWriteFailoverTest). - With the new
capabilityGapErrorblock inconnectWalkremoved: both fail withQwpRoleMismatchException, which is the #131 symptom.
- The tests are
- CI: green, including JDK 8, the JDK 25/26 compile smoke jobs and Windows/Mac/Linux on Azure.
Behaviour changes worth knowing (intended, not defects)
- Store-and-forward and pool startup rules hold for
owned_by:- A sender that has already connected retries a missing owner echo with no time limit and keeps buffering rows.
- SYNC and OFF startup report the failure from
build(); ASYNC startup latches it as a terminal error. - Orphan drainers get the same settle budget as a missing durable-ack echo, and only that gap counts against it. Role rejects and transport errors still reset the budget.
- #131 changes outcomes in one kind of mixed round: a plain non-421 failure, then a capability gap, then a 421 now reports the gap.
- SYNC startup fails at once instead of retrying within its budget.
- An orphan drainer now spends the settle budget and then writes
.failed, instead of retrying forever. - This makes the result independent of endpoint order: base already behaved this way when the gap came first.
- Without a 421 in the round, the order still decides the error:
[503, gap]reports the 503, and an orphan drainer quarantines that slot immediately.[gap, 503]reports the gap. Base does the same for durable ack. - Orphan drainers replay adopted slots under the adopting sender's
owned_by, the same way they already use its credential. The PR documents this. - Rejected upgrades now show the response body: a sanitized
text/plainbody (at most 256 characters) is appended to the error message, on the query client too.
Summary
- Correctness gate: passes. Every upgrade-error catch site and the drainer recycle path were traced, and every outcome change is either intended or the same as base.
- Hot path: the new allocations happen per connect attempt only. No per-row code changed.
- Java 8: no APIs newer than Java 8.
- Findings: 0 Critical / 0 Moderate / 1 Minor, all inside the diff.
Bump java-questdb-client to the commit that adds the designatedTimestamp query option (questdb/java-questdb-client#135), and check the designated timestamp through it, as changes to the QWP wire format require. - QwpEgressQueryDetailsClientTest compares the index the pinned client reports with /exec across table scans, projections, a TIMESTAMP_NS table, SAMPLE BY, an ASOF JOIN and an empty result, with and without a row window, and checks that it names a TIMESTAMP or TIMESTAMP_NS column of the schema the client decoded. It also covers the pooled Query facade, statements and errors, and that the client and server constants match. - QwpEgressFuzzTest asks for the designated timestamp a third of the time, and checks it against /exec in both of its query paths. The bump also brings in questdb/java-questdb-client#130, which adds owned_by to the QWP sender.
…-creates (#82) * feat(qwp): add owned_by to name the owner of the tables a sender auto-creates QWP ingestion auto-creates the tables and columns a sender writes, and QuestDB Enterprise grants their creator the owner permissions on them. An external (OIDC) user cannot hold permissions, so it could not auto-create anything over QWP. SQL solves this with OWNED BY. The owned_by connect-string key and the ownedBy ingress option are the QWP equivalent, as in the Java client (questdb/java-questdb-client#130). - Node.js sends the owner as X-QWP-Owned-By, percent-encoded UTF-8 in the canonical form the server echoes, on every /write/v4 upgrade: reconnects, failovers and orphan drains included. Query sessions never send it, and the connect strings of the other transports reject the key. - The upgrade fails with the new QwpOwnedByMismatchError, exported from the Node.js package, unless the server echoes the owner: a server that predates the header ignores it, and the tables it creates would not get the owner. - That failure is a capability gap, handled like a durable ACK the server does not confirm: a blocking startup fails at once, background replay retries it, and an orphan drainer counts it toward the budget a missing durable ACK draws on, then quarantines the slot. - A rejected upgrade carries the text/plain body that arrived with its headers as QwpUpgradeError.reason, sanitized and capped at 256 characters, and appends it to the message, so a refused owner (403) reads "[reason=owned_by refused: ...]" instead of looking like a rejected credential. - The browser client sends the owner in the qwp_owned_by URL parameter. A browser cannot read the upgrade response, so it cannot confirm the owner, as the option's documentation says. Documents the option in QWP.md and the READMEs, and regenerates the API reference. * fix(qwp): reject an owned_by header conflict when the sender is created ownedBy combined with an X-QWP-Owned-By header in the headers escape hatch was rejected only by the first connection attempt, while a blank owner, or one with a lone surrogate, already failed when the sender or client was created. createQwpNodeSender() and the pooled client's option normalization now reject the conflict as well, against the headers ingress ends up with, so Sender.fromConfig(), new Sender(), createQwpNodeClient() and parseQwpNodeClientConfig() report it up front. The raw connector keeps its connect-time check, and both apply one rule. A Sender's invalid typed ownedBy is reported as qwp.webSocket.ownedBy, the option its caller wrote, rather than as the pooled client's ingress.ownedBy. The display-text test now covers U+2029, the one character class of the sanitizer that no test exercised. * fix(qwp): honor the current sender owner and bound upgrade diagnostics Resolve ownedBy and raw headers at Sender construction so later overrides cannot leave a stale upgrade header. Only read a bounded prefix of complete, uncompressed text/plain upgrade rejections. Document orphan adoption, browser fallback, and reconnect event semantics. Exercise owner changes and replay on the wire, and drain notifications before asserting their absence. * fix(qwp): isolate sender credentials and pin replay ownership Snapshot headers per parsed configuration and honor getter-backed owners on Node and browser ingress. Keep the chosen owner across lazy connects, failover, foreground replay, and orphan adoption. Report the final capability gap separately from the orphan retry budget and decode bounded upgrade refusal text using its declared charset. Cover these paths with transport and replay regressions. * docs(qwp): align factory docs, durable-ack-unavailable counts and a test name with the code The senders no longer call connectQwpNodeIngress(), connectQwpBrowserIngress() or createQwpBrowserConnectionFactory(): they capture ownedBy once, when they are created. Describe those functions as the test entry points they are, and put the auth-validation comment in createQwpBrowserSender() back above its call. durable-ack-unavailable events count the whole capability-gap episode, owner gaps included. Say so for that event and for QwpReconnectEvent.attempt, as the durable-ack-persistent-failure docs already did. Name the rejected-upgrade copy test after what it checks: it decodes at most 4,096 bytes and catches only a concat-based copy. Regenerates the API reference. * docs(qwp): say that connect-string Senders copy their typed headers A Sender built from a ws/wss connect string copies qwp.webSocket.headers when its SenderOptions is created and again when the Sender is built, so edits to that object no longer reach it, reconnects included, and it reads headers and ownedBy from the qwp section it is given. The caller's object used to be read on every connection attempt. Say so in QWP.md and on QwpExtraOptions.webSocket, and pin both copies and the section read in tests. The content-coded rejection test now declares charset=iso-8859-1, which decodes any byte sequence, so it fails without the Content-Encoding check. Under UTF-8, gzip's magic number failed to decode with or without it. Regenerates the API reference. * test(qwp): cover sweeps where every endpoint lacks a capability, and the pooled drainer's owner No test fed the reconnect loop a sweep in which every endpoint completed the upgrade without a capability the session asked for. Disabling its handling of such a sweep left every test passing, while a blocking store-and-forward startup then retried for its whole budget and an orphan slot was never quarantined. Cover it with synthetic sweeps of owner gaps, and of an owner gap followed by a durable-ACK gap, and run the blocking startup test against two real endpoints that both ignore the owner. The pooled client's orphan drainer was untested as well: passing it no owner left every test passing, while a recovered slot then replayed without X-QWP-Owned-By. Drain a slot a pooled sender left behind and check that the recovery upgrade names the pool's owner. * test(qwp): check that a sender's orphan drainer keeps its bound owner createQwpNodeSender() binds ownedBy when the sender is created, so that lazy startup, foreground replay and orphan adoption all use the same owner. Only the first two were tested. The orphan-drain test adopted through connectQwpNodeIngress(), where the live and the bound owner are the same value, so a drainer that read options.ownedBy again left every test passing while it replayed adopted slots under an owner the sender was not created with. Run that test through a sender whose options change after it is created as well. * fix(qwp): name the owner option the caller wrote in the header-conflict error The error for an owner that an X-QWP-Owned-By header also names always called the option 'ownedBy'. A Sender or pooled client that takes its owner from the connect string now reports 'owned_by', and typed owners report 'qwp.webSocket.ownedBy' or 'ingress.ownedBy', as the other owner errors on those paths already do. createQwpNodeSender() and the raw connector keep 'ownedBy'.
Tandem
Companion to questdb/questdb#8504 and questdb/questdb-enterprise#1572; docs in questdb/documentation#652. Matching branch
ia_qwp_owned_by.Problem
QWP ingestion auto-creates the tables and columns a sender writes, and QuestDB Enterprise grants the creator the owner permissions on them. An external user, one authenticated with an OIDC token such as an Entra ID managed identity, cannot hold permissions, so it could not auto-create anything over QWP. SQL solves this with
OWNED BY; QWP had no equivalent.Changes
owned_by=<name>connect-string key (an ingress key inConfigSchema) andLineSenderBuilder.ownedBy(String).ws/wssonly:http,tcpandudpconnect strings and builders reject it. TheQwpQueryClientaccepts it as a no-op, like the other ingress keys.X-QWP-Owned-Byon every upgrade, reconnects, failovers and background drainers included. The value is percent-encoded UTF-8 (RFC 3986 unreserved characters as they are, upper-case hex digits), so names outside ASCII survive.QwpOwnedByMismatchException, a non-421WebSocketUpgradeExceptionthat ends the connect round, also when another endpoint of the round answered 421: like a missing durable-ack echo, it comes from a writable endpoint that lacks the capability, so the round reports it instead of a missing primary. It names that endpoint, in its message and ingetHost()/getPort(), as a missing durable-ack echo does. It carries no HTTP status (STATUS_NONE), as the server answered 101, so connection health reports none, as for a missing durable-ack echo.reconnect_max_duration_millisof gap time, whichever comes first), then quarantines the slot behind a.failedsentinel. A primary that still lacks the feature when that budget runs out, late in a rolling upgrade for example, quarantines the orphan slots a sender adopted in the meantime.CredentialRedaction, appended to theWebSocketUpgradeExceptionmessage and exposed asQwpAuthFailedException.getReason(). A refused owner (403) readsauth-rejected: ... [reason=owned_by refused: bob is not part of group team]instead of looking like a rejected credential.QwpWebSocketSender.connectWithCredentialSupplier(...)overload withownedBy; the previous master delegates to it withnull.Tests
QwpOwnedByTest: the header and its canonical encoding, including the ends of the unreserved ranges, the echo accepted, missing and mismatched, the endpoint that failure names, the header sent again on a reconnect, the reject reason with and without a body, its absence when the body is unusable (a Content-Length beyond the bytes received, malformed or not positive, another content type, a blank body), its sanitizing and length cap, both sender build paths (connect string and builder), a 403 refusal surfacing asQwpAuthFailedExceptionwith its reason, connect rounds that also meet a replica's 421 reporting the missing echo, also behind a 503, and the 403 refusal rather than a missing primary, and connection health on a missing echo.BackgroundDrainerEndToEndTest: an orphan drainer's upgrade names the owner too, and the sender's own drain walk rides out an endpoint that leaves the echo out for two sweeps.BackgroundDrainerDurableAckRetryTestandBackgroundDrainerMidDrainCapabilityGapTest: an unconfirmed owner, at the initial connect and mid-drain, is ridden out within the settle budget and quarantines the slot once the budget runs out, with a reason that names owned_by and the endpoint; it shares one budget with a missing durable-ack echo and fires no durable-ack listener callback.WriteFailoverTest: a 503, a primary without durable ack and a replica, walked in that order, report the durable-ack mismatch.LineSenderBuilderWebSocketTest,WsSenderConfigHonoredTestandQwpQueryClientFromConfigTest: parsing, validation and the key-registry drift guard.