Fix two samples broken by the previous round, and a contradictory claim - #72
Merged
guanzhousongmicrosoft merged 1 commit intoAug 25, 2026
Conversation
A second review pass, run after the previous fixes merged, executed the samples against a live gateway. Two of the three broken commands it found had been introduced by that round -- which is the point of re-reviewing. nodejs-setup.md: the replacement CRUD example did not run. `const db` was declared inside a connect() that was never called, so the following blocks referenced it out of scope and failed with "ReferenceError: db is not defined"; they also used top-level await outside an async function. Two independent reviewers reproduced both. Replaced with one self-contained main() that connects, operates and closes, and a sentence saying why the statements cannot be pasted at the top level. python-setup.md: moving $vectorSearch from find() to aggregate() was correct but incomplete. The stage needs a vector index, and the page never created one, so the documented query still failed with "Similarity index was not found for a vector similarity search query". Added the createIndexes call, matching the form the mongo-shell quick start uses, plus the dimensions caveat. postgres-api/index.md contradicted itself: the opening said DocumentDB "consists of three PostgreSQL extensions", while the pg_documentdb_gw section correctly describes a standalone process that can optionally run as a background worker via a separate pg_documentdb_gw_host extension. Two extensions and a gateway. 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
approved these changes
Aug 25, 2026
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.
A second review pass — same rubric, same three models — was run after the previous fixes merged. It executed the samples against a live gateway instead of reading them, and two of the three broken commands it found had been introduced by that previous round. That is the re-review doing its job.
1. The replacement Node.js example did not run
Reproduced independently by two models:
const dbwas declared inside aconnect()that is never called, so the following blocks referenced it out of scope. They also used top-levelawaitoutside anasyncfunction — a second paste failure.Replaced with one self-contained
main()that connects, operates and closes, plus a sentence explaining why these statements cannot be pasted at the top level.2. The
$vectorSearchfix was incompleteMoving it from
find()toaggregate()was correct but not sufficient — the stage needs a vector index and the page never created one:The reviewer confirmed the stage works once an index exists. Added the
createIndexescall — matching the form the mongo-shell quick start already uses — and thedimensionscaveat.3.
postgres-api/index.mdcontradicted itselfLine 8 said DocumentDB "consists of three PostgreSQL extensions". Line 56 of the same page correctly describes
pg_documentdb_gwas a standalone process that can optionally run as a background worker via a separatepg_documentdb_gw_hostextension. It is two extensions and a gateway.Verification
The two sample failures were reproduced by both Opus 5 and GPT-5.6 Sol independently, each executing the code against a live
documentdb-localcontainer rather than reading it.Related
documentdb/documentdb.github.io#162 — the website-owned copy of the Node.js prerequisite floor.