docs(couchbase): cite code by name, not by line - #644
Merged
Conversation
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>
Member
|
Approved. I resolved the conflict for you: #645 added a 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. Next one if you want it: #641, making Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
docs/providers/couchbase.mdcited code by line number in 29 places on today'smain(the 30th in #591,factory.ts:93, already went with #629), plus oneConnectionModal.tsx:139that the issue's\.ts:grep cannot see. Only the six inintrospect.tsandkeyspace.tsstill 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, aswitchcase in the parser,MaintenanceResult.executionTime, and a comment about unmount cleanup:connect()index.ts:335maintenanceOperationSpecs; declared:399connect()getCapabilities()index.ts:276unquoteIndexKey's closing brace; declared:299getCapabilities()getLabels()index.ts:293:345getLabels()query()index.ts:408transport.close()insideconnect(); declared:472query()runMaintenance()index.ts:762getIndexStats(); declared:869runMaintenance()validate()index.ts:325maintenanceOperations; declared:389validate()index.ts:473(error 4000 remedy)query()primaryIndexRemedy()index.ts:189(degradeTo):196degradeTo()index.ts:368(host lifted from the URL)reindexGlobalDeschostFromConnectionString()index.ts:444(code → error class)hostFromConnectionString's closing bracemapCouchbaseError()http-transport.ts:445(endpoint discovery)resolveHost's closing bracepickQueryEndpoint()http-transport.ts:431(promise-cached discovery)getHost()getQueryEndpoint()http-transport.ts:418(SRV lookup)resolveHost()http-transport.ts:249(payload before HTTP code)httpError()throwIfFailed()http-transport.ts:183(wildcard signature):184fieldNamesFromSignature()http-transport.ts:55(request_plus):56DEFAULT_SCAN_CONSISTENCYhttp-transport.ts:256(rejectUnauthorized)networkError's closing bracebuildTlsMaterial()transport.ts:87,:45,:105CouchbaseTransport,CouchbaseQueryResult,CouchbaseErrorconnection-string-parser.ts:138mssql://branchparseConnectionString()src/lib/db/types.ts:93(ExplainFormat)MaintenanceResult.executionTime; declared:172ExplainFormatuse-query-execution.ts:165(Explain always buildsanalyze):277explainAcceptedConnectionModal.tsx:139(the "Bucket" label)setSSHHost; the label is at:187databaseFieldLabelintrospect.ts:58,:178,:245,:306,:327,keyspace.ts:31COUCHBASE_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) andclickhouse.md(#639) already have. No sentence changed meaning.grep -oE '\.tsx?:[0-9]+' docs/providers/couchbase.mdreturns nothing.The doc joins
NAMED_CITATIONSwithsrc/lib/db/providers/document/couchbase/index.tsas its source and the 24 class members it cites by name, in declaration order (the clickhouse convention). The names intransport.ts,http-transport.ts,introspect.ts,keyspace.tsand the module-leveldegradeTo()are cited but not measured, asdeclarationLinereads only access-modified members — the same standing asclickhouse.md's transport names.One character beyond the issue's spec: the list's
cites no line number anywheretest now matches\.tsx?:\drather than\.ts:\d, the pattern the top-level-docs guard below it already uses. Without it theConnectionModal.tsx:139citation 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
Related Issue
Fixes #591
Changes Made
docs/providers/couchbase.md: 30 citations rewritten, no product codetests/unit/provider-docs-monitoring-citations.test.ts: oneNAMED_CITATIONSentry;\.ts:\d→\.tsx?:\din the whole-file testTesting
bun test tests/unit/provider-docs-monitoring-citations.test.tsmaincites no line number anywhere,names methods that … really declares)bun run test, phase 1 (tests/unit tests/api tests/integration)bun test tests/hooks/tests/security/tests/evalsbun run test:componentsThe 171: 166 are the helm-absent chart tests #570 documents (
Executable not found in $PATH: "helm"), 4 arepackaging-standalone-zip(7z not found), 1 issqlite-driver(No such built-in module: node:sqliteunder Bun 1.3.11; the repo pins 1.4.2).biome check,oxlint,eslinton the test file andtsc --noEmitare clean.