Skip to content

Fix broken commands and false claims in the connect guides - #161

Merged
guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
GuanzhouSong:users/guanzhousong/docs-quality-fixes
Aug 25, 2026
Merged

Fix broken commands and false claims in the connect guides#161
guanzhousongmicrosoft merged 1 commit into
documentdb:mainfrom
GuanzhouSong:users/guanzhousong/docs-quality-fixes

Conversation

@GuanzhouSong

@GuanzhouSong GuanzhouSong commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Six reviews (Opus 5, Opus 4.8, GPT-5.6 Sol — two repos each) scored the docs against a written standard derived from Diátaxis, the CloudNativePG layout, the PostgreSQL documentation guide, and failures reproduced against DocumentDB's own published pages.

Website mean: 29/50. The packages page scored ~46 on its own; the connect guides — which never got the same cold-start treatment — dragged the rest down. Every item below was reproduced against the published 0.116.0 image.


1. The certificate command was wrong on three pages

docker cp documentdb:/home/documentdb/gateway/pg_documentdb_gw/cert.pem ~/documentdb-cert.pem
Error: Could not find the file ... in container

Real path: /home/documentdb/.local/state/documentdb-gateway/tls/cert.pem. One wrong string, retyped on three pages — exactly the drift a single source prevents.

2. "Sample data loads by default" was false

--init-data defaults to false. A container started as the guides showed returns listDatabases → [], so every use sampledb block silently returned nothing. The documentdb-local page already said the opposite ("starts empty"), so the two contradicted each other.

Now stated as opt-in, and stated where the reader starts the container rather than where they hit the empty result.

3. The projection referenced a field that doesn't exist

sampledb.users has firstName/lastName, no name. The documented { name: 1, email: 1 } printed only the email while the prose promised names.

4. mongosh install broke on ARM

The RHEL repo was pinned to .../mongodb-org/8.0/x86_64/. This page already carries an ARM substitution table for the DocumentDB and PGDG lines — the MongoDB line was missed. Now $(uname -m), matching the EL-9-$(uname -m) form already documented for PGDG.

5. Docker Quick Start: three gaps the standard treats as defects

  • Published on every interface. -p 10260:10260 while calling the instance "local" → now -p 127.0.0.1:10260:10260, with a note on when to widen it.
  • Readiness race. The page ran docker ps, then immediately told the reader to connect. docker ps reports Up well before the gateway accepts connections — documentdb-local documents this race; this page ignored it. Now waits for === DocumentDB is ready ===.
  • No day-2 lifecycle at all. The fastest and most-recommended path had no stop/start/restart/remove. Anyone following two guides in sequence hit Conflict. The container name "/documentdb" is already in use with no documented recovery.

Verification

  • All edits confirmed in rendered output via getArticleByPath; the old cert path returns zero matches across all four guides.
  • npm test 130 passed · eslint clean · tsc --noEmit clean.

Note on the review process

Two of six reviewers reported a "broken URI" containing ******. That was the credential-redaction filter masking mongodb://user:pass@host in their own transcripts — ****** appears nowhere in either repo. Verified against raw bytes and discarded; one reviewer (Opus 5) caught it independently. No finding here was acted on without confirming it in the actual file.

Related

documentdb/docs#71 — the docs-repo half: non-functional Python samples, a vector index that cannot be created as documented, stale version floors, and five orphaned stub pages.

Three models reviewed the site against a written standard. The packages
page scored well; the connect guides, which never got the same cold-start
treatment, did not. Every item below was reproduced against the published
0.116.0 image before being changed.

The certificate copy command was wrong on three pages. The path
/home/documentdb/gateway/pg_documentdb_gw/cert.pem does not exist in the
image and docker cp fails outright; the real path is
/home/documentdb/.local/state/documentdb-gateway/tls/cert.pem. One wrong
string, duplicated three times, is exactly the drift a single source would
have prevented.

Sample data was documented as loading by default. It does not: --init-data
defaults to false, so a container started as the guides show returns an
empty listDatabases, and every "use sampledb" block silently returned
nothing. Say it is opt-in, and say so where the reader starts the
container rather than where they hit the empty result.

The sample users collection has firstName/lastName and no name field, so
the documented { name: 1, email: 1 } projection printed only the email
while the surrounding prose promised names. Project the fields that exist.

The mongosh RHEL repository was pinned to .../8.0/x86_64/, so the install
failed on ARM. This page already carries an ARM substitution table for the
DocumentDB and PGDG lines; the MongoDB repository line was missed. Use
$(uname -m), consistent with the EL-9-$(uname -m) form already documented
for PGDG.

Docker Quick Start also had two gaps the standard treats as defects. It
published the endpoint on every interface with -p 10260:10260 while
describing the instance as local; it now binds loopback and explains when
to widen it. And it ran docker ps, which reports Up well before the
gateway accepts connections, then immediately told the reader to connect.
DocumentDB Local documents that race; this page now waits for the same
readiness banner.

Finally the Docker path, the fastest and most recommended one, documented
no day-2 lifecycle at all. Anyone following two guides in sequence hit
"Conflict. The container name /documentdb is already in use" with no
instruction to recover. Add stop/start/restart/logs, destructive removal,
and the named-volume note.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f18515db-c52f-4197-aa50-d81359c7c763
Signed-off-by: Guanzhou Song <guanzhou.song@gmail.com>

@guanzhousongmicrosoft guanzhousongmicrosoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified against the published 0.116.0 image. Approving.

@guanzhousongmicrosoft
guanzhousongmicrosoft merged commit 01e98fb into documentdb:main Aug 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants