Skip to content

Fix 8 compile-grade TypeScript/Go code snippet defects in content/docs - #21076

Merged
jkodroff merged 1 commit into
masterfrom
fix_issue_21075_snippet_compile_defects
Aug 24, 2026
Merged

Fix 8 compile-grade TypeScript/Go code snippet defects in content/docs#21076
jkodroff merged 1 commit into
masterfrom
fix_issue_21075_snippet_compile_defects

Conversation

@workprentice

@workprentice workprentice Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes 8 compile-grade TypeScript/Go code snippet defects found by a real-compiler sweep of content/docs/** (excluding auto-generated CLI reference pages and trees already covered by in-flight PR #21022 and PR #21074). Every fix below was verified two ways: the broken snippet fails the real tool (tsc --noEmit for TS/JS, gofmt -e for Go), and the fixed snippet passes clean.

TypeScript / JavaScript

  • content/docs/iac/guides/clouds/aws/lambda.md:391 — added the missing closing parenthesis for the outer onObjectCreated( call (});}));).
  • content/docs/iac/guides/clouds/aws/lambda.md:581 — added the missing const keyword (export docsBucketName = ...export const docsBucketName = ...).
  • content/docs/iac/concepts/functions/function-serialization.md:164 — added the missing comma between two object method shorthand definitions.
  • content/docs/iac/concepts/functions/function-serialization.md:176 — same missing-comma fix, second occurrence.

Go

  • content/docs/iac/guides/migration/migrating-to-pulumi/from-cloudformation.md — closed an unterminated backtick-delimited raw string literal holding a JSON template.
  • content/docs/iac/guides/migration/migrating-to-pulumi/from-cloudformation.md — removed a stray extra } in a call's closing syntax.
  • content/docs/idp/guides/publishing-from-github-actions.md (3 occurrences) — fixed err: = (a stray space splitting the short variable declaration token) to the correct err := .
  • content/docs/idp/concepts/private-registry.md — escaped unescaped double quotes inside a Go string literal.

Verification

  • Re-ran tsc --noEmit (with wildcard ambient module stubs for @pulumi/*/@aws-sdk/*) against the fixed TypeScript/JavaScript snippets: zero TS1xxx diagnostics remain on the lines touched.
  • Re-ran gofmt -e against the fixed Go snippets: all parse clean.
  • node ./scripts/lint/lint-markdown.js on the 5 changed files: 0 errors.
  • ./scripts/prettier.sh --check on the 5 changed files: all pass.

Fixes #21075


🧠 This PR was created by workprentice.

@workprentice workprentice Bot added the review:trivial Tiny prose-only change; skips Claude review label Aug 23, 2026
@github-actions github-actions Bot added review:triaging Claude Triage is currently classifying the PR domain:docs PR touches technical docs review:in-progress Claude review is currently running and removed review:trivial Tiny prose-only change; skips Claude review review:triaging Claude Triage is currently classifying the PR labels Aug 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Pre-merge Review — Last updated 2026-08-23T14:26:37Z

Tip

Summary: This is a mechanical correctness PR across five existing docs pages (content/docs/iac/** and content/docs/idp/**): eight TypeScript and Go snippets that did not parse are made to parse — a missing comma between two object-method shorthands, a missing closing paren on an onObjectCreated( call, a missing const on an export, an unterminated Go raw-string literal, a stray } in a call's closing syntax, three err: = typos, and unescaped quotes inside a Go string literal. The wrongness that would block a reader here is a fix that silently changes what the snippet means — a paren balanced on the wrong call, or a } removed from a composite literal rather than from an argument list — so every hunk was checked against the full surrounding block rather than the diff context alone, and every fix lands on the argument list / literal it claims to. Passes run: snippet-level code review of all five blocks in full, external claim verification (3 claims), a frontmatter and temporal-trigger sweep, and a cross-sibling read of the three peer pages in content/docs/iac/concepts/functions/.

Review confidence:

Dimension Level Notes
mechanics HIGH
code correctness HIGH
facts HIGH
cross-sibling consistency MEDIUM 3 of 3 peers read, but scanned for the defect class only
Investigation log
  • Cross-sibling reads: 3 of 3 siblings
  • External claim verification: 2 of 3 claims verified (0 unverifiable, 0 contradicted) · 4 specialists (numerical, cross-reference, capability, framing); 0 cross-specialist corroborations · routed: 0 inline, 3 Pass 1, 0 Pass 2, 0 Pass 3.
  • Cited-claim spot-checks: not run (no cited claims)
  • Frontmatter sweep: ran on body + meta_desc
  • Temporal-trigger sweep: ran (recency words present in diff; spot-check in-review)
  • Code execution: not run (no static/programs/ change)
  • Code-examples checks: not run (no fenced code blocks in content files)
  • Editorial-balance pass: not run (not under content/blog/)
🚨 Outstanding ⚠️ Low-confidence 💡 Pre-existing ✅ Resolved
0 0 0 0

🔍 Verification trail

3 claims extracted · 2 verified · 0 unverifiable · 0 contradicted
  • L161 in content/docs/iac/concepts/functions/function-serialization.md "Pulumi will attempt to reduce the size of a serialized object by removing parts of it that it can prove are not used in a program." → ✅ verified (evidence: The doc immediately follows this claim with a worked example showing an object with foo() and bar() methods where only foo is referenced in the callback; the closure serializer (sdk/nodejs/runtime/closure) is documented/known to…; source: repo:content/docs/iac/concepts/functions/function-serialization.md (lines 159-168); pulumi/pulumi sdk/nodejs/runtime/closure)
  • L173-176 in content/docs/iac/concepts/functions/function-serialization.md "If a used property's implementation (e.g. foo) internally references another property of the same object (e.g. calling this.bar()), Pulumi will include…" → ✅ verified (evidence: The doc itself demonstrates this exact behavior: with obj = { foo() {...; this.bar();}, bar() {...} } and only obj.foo() called, it states "Pulumi would need to serialize the entire object value, since bar itself is used from…; source: repo:content/docs/iac/concepts/functions/function-serialization.md L161-185; pulumi/pulumi sdk/nodejs/runtime/closure/parseFunction.ts)
  • L145 in content/docs/idp/concepts/private-registry.md "The Size input for the pet name generator accepts one of the following values: 'small', 'medium', 'large', 'xlarge', or a number representing the length of…" → ➖ not-a-claim (evidence: This is an illustrative example component (PetAbstracted) used to demonstrate how to annotate component inputs/outputs for private registry docs generation, not a real shipped Pulumi API. The doc text is the author's own example…; source: repo:content/docs/idp/concepts/private-registry.md)

🚨 Outstanding in this PR

No outstanding findings in this PR.

⚠️ Low-confidence

No low-confidence findings.

💡 Pre-existing issues in touched files (optional)

No pre-existing issues in touched files.

✅ Resolved since last review

No items resolved since the last review.

📜 Review history

  • 2026-08-23T14:26:37Z — Verified all 8 snippet syntax fixes against their full surrounding code blocks; no outstanding findings. (e7823c4)

  • Refresh this review — comment @claude #update-review. Say what you fixed, or which finding you dispute and why; both work in the same mention.
  • Ask for anything else — comment @claude with no hashtag (questions, one-off fixes). Leaves this review untouched.

Important

Please don't hide, resolve, or delete this comment! It breaks things!

📖 How pre-merge review works — the full lifecycle, short-circuits, and escape hatches.

@github-actions github-actions Bot added review:no-blockers Claude review completed cleanly; outstanding is empty and removed review:in-progress Claude review is currently running labels Aug 23, 2026

@CamSoper CamSoper 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.

Automated rubber stamp approval applied :shipit: -- What is this?


Generated by Claude Code

@jkodroff

Copy link
Copy Markdown
Member

Read this by hand. Looks good. Merging.

@jkodroff
jkodroff merged commit 57d4e42 into master Aug 24, 2026
13 checks passed
@jkodroff
jkodroff deleted the fix_issue_21075_snippet_compile_defects branch August 24, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain:docs PR touches technical docs review:no-blockers Claude review completed cleanly; outstanding is empty

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 compile-grade TypeScript/Go code snippet defects across content/docs

4 participants