Skip to content

Drop selectedLines from the Google GenAI snippets - #5078

Merged
lennessyy merged 4 commits into
mainfrom
google-genai-snippet-ranges
Aug 10, 2026
Merged

Drop selectedLines from the Google GenAI snippets#5078
lennessyy merged 4 commits into
mainfrom
google-genai-snippet-ranges

Conversation

@brianstrauch

@brianstrauch brianstrauch commented Aug 10, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Removes the stray # ... line at the top of four code samples on the Google GenAI page.

Each of the four used a selectedLines range that started partway into the file, so snipsync rendered a leading elision marker. Because that marker sits at column 0, it also zeroed out the common indent prefix and suppressed snipsync's dedenting, leaving the two worker excerpts indented under a main() you never see.

temporalio/samples-python#346 scopes the SNIPSTART/SNIPEND markers to exactly the code shown here, so the ranges are no longer needed. Dropping them removes both the marker and the stray indentation.

The streaming excerpt also gains the consume() function it was missing. Its old range began at a dangling if and left out the stream.subscribe() call the surrounding prose describes.

Notes to reviewers

Merge temporalio/samples-python#346 first. The daily snipsync job pulls from samples-python main; if this lands alone, that job splices the whole files back in.

Verified by extracting every snippet from the updated sample sources and running snipsync's own deindent.js over them — all 15 blocks on the page match, so the next snipsync run is a no-op. vale --config .vale-ci.ini is clean.

🤖 Generated with Claude Code

┆Attachments: EDU-6926 Drop selectedLines from the Google GenAI snippets

Four snippets on the Google GenAI page used `selectedLines` ranges that
started partway into the file, so each rendered with a leading `# ...`
elision marker. Because that marker sits at column 0, it also suppressed
snipsync's dedenting and left the two worker excerpts indented.

temporalio/samples-python now scopes the SNIPSTART/SNIPEND markers to
exactly this code, so the ranges are no longer needed. Merge the samples
change first: the daily snipsync job pulls from samples-python main and
would otherwise splice the whole files in.

The streaming excerpt gains the consume() function it was missing. Its
old range began at a dangling `if` and left out the stream.subscribe()
call the surrounding prose describes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@brianstrauch
brianstrauch requested a review from a team as a code owner August 10, 2026 17:14
@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview Aug 10, 2026 5:39pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

@lennessyy
lennessyy enabled auto-merge (squash) August 10, 2026 17:32
@lennessyy
lennessyy merged commit 20ae6a6 into main Aug 10, 2026
15 checks passed
@lennessyy
lennessyy deleted the google-genai-snippet-ranges branch August 10, 2026 17:39
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.

3 participants