Skip to content

docs(couchbase): cite code by name, not by line - #644

Merged
cevheri merged 2 commits into
libredb:mainfrom
7487:docs/couchbase-named-citations
Sep 8, 2026
Merged

docs(couchbase): cite code by name, not by line#644
cevheri merged 2 commits into
libredb:mainfrom
7487:docs/couchbase-named-citations

Conversation

@7487

@7487 7487 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

docs/providers/couchbase.md cited code by line number in 29 places on today's main (the 30th in #591, factory.ts:93, already went with #629), plus one ConnectionModal.tsx:139 that the issue's \.ts: grep cannot see. Only the six in introspect.ts and keyspace.ts still hold. The five that name a method beside the line all miss, five more point into the docblock just above their declaration, and the remaining 18 land on closing braces, section banners, a switch case in the parser, MaintenanceResult.executionTime, and a comment about unmount cleanup:

Cited Today Names now
connect() index.ts:335 maintenanceOperationSpecs; declared :399 connect()
getCapabilities() index.ts:276 unquoteIndexKey's closing brace; declared :299 getCapabilities()
getLabels() index.ts:293 the constructor's closing brace; declared :345 getLabels()
query() index.ts:408 transport.close() inside connect(); declared :472 query()
runMaintenance() index.ts:762 inside getIndexStats(); declared :869 runMaintenance()
validate() index.ts:325 maintenanceOperations; declared :389 validate()
index.ts:473 (error 4000 remedy) first line of query() primaryIndexRemedy()
index.ts:189 (degradeTo) the "Pure helpers" banner; declared :196 degradeTo()
index.ts:368 (host lifted from the URL) reindexGlobalDesc hostFromConnectionString()
index.ts:444 (code → error class) hostFromConnectionString's closing brace mapCouchbaseError()
http-transport.ts:445 (endpoint discovery) resolveHost's closing brace pickQueryEndpoint()
http-transport.ts:431 (promise-cached discovery) the docblock above getHost() getQueryEndpoint()
http-transport.ts:418 (SRV lookup) the "Internals" banner resolveHost()
http-transport.ts:249 (payload before HTTP code) inside httpError() throwIfFailed()
http-transport.ts:183 (wildcard signature) end of a docblock; declared :184 fieldNamesFromSignature()
http-transport.ts:55 (request_plus) the docblock; declared :56 DEFAULT_SCAN_CONSISTENCY
http-transport.ts:256 (rejectUnauthorized) networkError's closing brace buildTlsMaterial()
transport.ts:87, :45, :105 each the docblock six lines above CouchbaseTransport, CouchbaseQueryResult, CouchbaseError
connection-string-parser.ts:138 the mssql:// branch parseConnectionString()
src/lib/db/types.ts:93 (ExplainFormat) MaintenanceResult.executionTime; declared :172 ExplainFormat
use-query-execution.ts:165 (Explain always builds analyze) a comment; the check is at :277 explainAccepted
ConnectionModal.tsx:139 (the "Bucket" label) setSSHHost; the label is at :187 databaseFieldLabel
introspect.ts:58, :178, :245, :306, :327, keyspace.ts:31 still right COUCHBASE_DOCUMENT_KEY_COLUMN, columnsFromFlavours(), mapWithConcurrency(), getSchemaList(), getSchemaRelations(), quoteIdentifier()

Every citation now names the declaration and links the file without a coordinate, the shape mongodb.md, postgres.md (#636) and clickhouse.md (#639) already have. No sentence changed meaning. grep -oE '\.tsx?:[0-9]+' docs/providers/couchbase.md returns nothing.

The doc joins NAMED_CITATIONS with src/lib/db/providers/document/couchbase/index.ts as its source and the 24 class members it cites by name, in declaration order (the clickhouse convention). The names in transport.ts, http-transport.ts, introspect.ts, keyspace.ts and the module-level degradeTo() are cited but not measured, as declarationLine reads only access-modified members — the same standing as clickhouse.md's transport names.

One character beyond the issue's spec: the list's cites no line number anywhere test now matches \.tsx?:\d rather than \.ts:\d, the pattern the top-level-docs guard below it already uses. Without it the ConnectionModal.tsx:139 citation this PR removes could come back unseen; no other doc in the list carries a .tsx: coordinate, so nothing else changes state.


Type of Change

  • Documentation update
  • Test addition or update

Related Issue

Fixes #591


Changes Made

  • docs/providers/couchbase.md: 30 citations rewritten, no product code
  • tests/unit/provider-docs-monitoring-citations.test.ts: one NAMED_CITATIONS entry; \.ts:\d\.tsx?:\d in the whole-file test

Testing

  • I have tested this locally
  • I have added/updated tests
  • All existing tests pass
pass fail
bun test tests/unit/provider-docs-monitoring-citations.test.ts 33 0
same, with only the doc reverted to main 31 2 (cites no line number anywhere, names methods that … really declares)
bun run test, phase 1 (tests/unit tests/api tests/integration) 10680 171 — see below
bun test tests/hooks / tests/security / tests/evals 455 / 307 / 198 0
bun run test:components all 0

The 171: 166 are the helm-absent chart tests #570 documents (Executable not found in $PATH: "helm"), 4 are packaging-standalone-zip (7z not found), 1 is sqlite-driver (No such built-in module: node:sqlite under Bun 1.3.11; the repo pins 1.4.2). biome check, oxlint, eslint on the test file and tsc --noEmit are clean.

docs/providers/couchbase.md cited code by line number in 29 places on
today's main (the 30th in libredb#591, factory.ts:93, went with libredb#629), plus one
ConnectionModal.tsx:139 that the `.ts:` grep cannot see. Of the 29, only
the six in introspect.ts and keyspace.ts still hold: the five that name
a method beside the line all miss (connect() :335 -> :399,
getCapabilities() :276 -> :299, getLabels() :293 -> :345, query() :408
-> :472, runMaintenance() :762 -> :869), and the unnamed ones land on
closing braces, section banners and a comment in use-query-execution.ts.

Every citation now names the declaration and links the file without a
coordinate, the shape mongodb.md, postgres.md and clickhouse.md already
use. No sentence changed meaning. The doc joins NAMED_CITATIONS with
index.ts as its source and the 24 class members it cites, and that
list's no-line-number test now reads `\.tsx?:\d` so the .tsx citation
cannot come back either.

Fixes libredb#591

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@cevheri cevheri added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 8, 2026
@cevheri

cevheri commented Sep 8, 2026

Copy link
Copy Markdown
Member

Approved. I resolved the conflict for you: #645 added a druid.md entry at the same
spot in NAMED_CITATIONS, so I kept both. Your change is untouched.

Two things worth naming:

Your numbers reproduce on Linux: 10481 to 10483 pass, fail count unchanged at 345 (local environment, not yours). Your revert probe gives the same 2 fails you named.
All gates clean.

Next one if you want it: #641, making postgres.md and mssql.md derive their lists the way yours does.

Thanks.

@cevheri
cevheri merged commit 35058f0 into libredb:main Sep 8, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs/providers/couchbase.md: replace 30 stale line-number citations with named citations

2 participants