docs(redis): replace line-number citations with names - #604
Conversation
|
Verified, and close. All 11 names are declared in Generalising the factory assertion was the right instinct, and it is a follow-up I had already written down for myself. One thing left to finish it: the loop is a hand-listed pair and the population is four. Deriving the list closes that in one line: for (const { doc } of NAMED_CITATIONS.filter((c) => read(c.doc).includes("`createDatabaseProvider()`"))) {I ran it: still 23 pass, and putting The rest is ready to merge as it stands. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
cevheri
left a comment
There was a problem hiding this comment.
The derived list is right, and it measures strictly more than the pair did. Checked on f9e3c293:
- baseline: 23 pass, 207 assertions
factory.ts:63reintroduced intomysql.md: red- the same into
mongodb.md: red
Neither was visible to the hand-listed pair, so the test's plural name now covers the population it promises.
Selecting on the phrase rather than on factory.ts is the detail that makes it correct, and worth spelling out because it is easy to get backwards. Fourteen provider docs link that file. oracle.md:78 links it as "Loaded on demand by the factory" and never names the entry point, so a link-based filter would have failed a doc that is already fine. You picked the narrower signal, which is the difference between a guard that measures a policy and one that dictates a sentence.
One thing I found while probing, and it is mine rather than yours: the one-liner I handed you can derive to nothing. Rename the cited name in all four docs and the loop runs zero times, so 23 still pass and the only trace is the assertion count falling from 207 to 203. Filed as #620 with the fix, which is not pinning the count (that would be one more hand-copied number in a test whose subject is hand-copied numbers) but deriving the population from the filesystem. It is the same lesson as this PR, one level up: a hand-written list rots whether it holds line numbers or filenames.
Thank you for both rounds, and for reporting your numbers each time. That is what made this quick to verify rather than quick to argue about. Merging.
Closes #586
Replaces all 13 Redis provider source coordinates with declaration names and adds the document to the shared named-citation guard. The guard also verifies the cited factory entry point.
Validation:
bun test tests/unit/provider-docs-monitoring-citations.test.ts(23 passed)7zornode:sqliteAssisted-by: OpenAI Codex