docs(mysql): replace 13 stale line-number citations with named citations - #582
Conversation
|
Thanks, the substance checks out. I verified every name against mysql.ts myself: Two things:
|
Same defect and same fix as libredb#542 (oracle.md, merged in libredb#563) applied to docs/providers/mysql.md: 12 citations into mysql.ts and 1 into factory.ts, all rotted. Each is re-anchored to the named declaration it describes and the line number dropped, so the citation cannot go stale on an edit above it. Where the prose cited an expression rather than a method, the enclosing method or the constant is named instead: - 'the pool config' (mysql.ts:114, now inside an unrelated row interface) -> buildPoolConfig() - the transaction rollback timer (mysql.ts:41, a comment) -> the TX_TIMEOUT_MS constant - 'one monitoring field' (mysql.ts:346, a comment) -> slowQueriesEmptyState, returned by getLabels() - the factory citation -> createDatabaseProvider(), as mssql.md does Every named declaration was confirmed to exist in the source and to match the visibility-prefixed form the guard's declarationLine() looks for. mysql.md is added to NAMED_CITATIONS with its eleven methods, so the file is now guarded against both a reintroduced line number and a renamed method. Closes libredb#564
76379ab to
bc0d8ec
Compare
|
Rebased onto Re-verified on the rebased head: |
Section 8 of this doc says the sentence had to stop naming a cause. Section 10 went on quoting the version that named it: "enable the Performance Schema to see them", the wording libredb#463 (e8b0056) replaced. One file asserted both that the label had changed and that it had not. Pinned rather than hand-corrected, because a quoted value rots the way a line number does and the named citations this branch introduced do not reach it. The guard reads the string literal out of getLabels() and looks for it in the doc with whitespace collapsed on both sides, so wrapped prose still matches. It asserts presence only, never absence of the old wording, because section 8 quotes that deliberately in the past tense. Both directions measured: editing the label in mysql.ts fails the guard, and restoring the pre-libredb#463 quotation in the doc fails it too.
|
Merging this once the checks come back. I took the optional item myself rather than hold the PR for it, and pushed it onto your branch as
I pinned the value rather than hand-correcting it, because a quoted value rots the way a line number does and the named citations you added do not reach it. The guard reads the string literal out of Both directions measured: editing the label in Your part is untouched. The 13 named citations and the test that keeps them honest are as you wrote them, and the rebase was the right call: chart |
Closes #564. Follows #563 as the model.
All 13 citations re-anchored, no
.ts:Nleft in the file:The three that cite an expression, not a method — the ones the issue calls out — resolved to the enclosing declaration:
mysql.ts:114"the pool config" (cited twice)buildPoolConfig()mysql.ts:41transaction rollback timerTX_TIMEOUT_MSconstantmysql.ts:346"one monitoring field"slowQueriesEmptyState, returned bygetLabels()The factory citation names
createDatabaseProvider(), matchingmssql.md.Every name was checked against the source before writing it, not just against the issue text — including that each matches the visibility-prefixed form
declarationLine()looks for, since a name that exists but is declared differently would pass review and fail the guard. All eleven do.mysql.mdadded toNAMED_CITATIONSwithgetCapabilities,getLabels,validate,buildPoolConfig,buildSSLConfig,query,cancelQuery,beginTransaction,getSchema,runMaintenance,getAllTablesForMaintenance. I left outgetPoolStatsandprepareQuery— the doc mentions both, but neither is declared inmysql.ts(they come fromSQLBaseProvider), so listing them would make the guard assert something false.Verification:
bun test tests/unit/provider-docs-monitoring-citations.test.ts— 16 pass onmain, 18 pass here, the two new ones being themysql.mdentry. Zero fail.bun test tests/integration/db/mysql-provider.test.ts— 115 pass, 0 fail.mysql.ts:142back on thebuildSSLConfig()line fails the guard, so the file is genuinely covered now rather than merely listed.Docs plus one test-list change; no product code touched.