Skip to content

fix(go): bump dotprompt to pick up the latest version - #7262

Merged
pavelgj merged 1 commit into
mainfrom
pj/go-bump-dotprompt-r8m3x6t1qv
Nov 18, 2026
Merged

pavelgj merged 1 commit into
mainfrom
pj/go-bump-dotprompt-r8m3x6t1qv

Conversation

@pavelgj

@pavelgj pavelgj commented Nov 18, 2026

Copy link
Copy Markdown
Member

What's new

Bumps github.com/google/dotprompt/go from v0.0.0-20260708220100-73beb993ac95 to v0.0.0-20261118194220-bdc60beb8a17 (dotprompt main). Only the dotprompt lines in go/go.mod / go/go.sum change.

Why

Picks up the dotprompt template marker injection fix (google/dotprompt#641). Before it, a user-supplied value rendered into a prompt template could contain a literal <<<dotprompt:role:system>>> (or media, history, section) marker and forge a system turn or a media part with an arbitrary URL. dotprompt markers now carry a random per-render nonce, and only markers with that nonce are honored.

The dotprompt Go module isn't tagged, so pseudo-versions are the way to pick up fixes.

Testing

  • go build ./... and go vet on ai, genkit, internal
  • go test -count=1 ./ai/... ./genkit/... ./internal/... ./core/... (16 packages ok)
  • go test -count=1 -short ./plugins/... (37 packages ok)

The functions whose signatures changed in dotprompt (ToMessages, RoleFn, History, Section, the marker prefix constants) aren't used in Genkit.

Not in this PR

  • The sample modules with their own go.mod (mcp-git-pr-explainer, otel-genai, telemetry-test/*) also pin the old dotprompt as // indirect. They already fail go build on main with "updates to go.mod needed", so they need a broader tidy that's unrelated to this bump.

dotprompt's role/history/section/media markers now carry a random
per-render nonce, so user-supplied template values can no longer forge
system turns or media parts (google/dotprompt#641). The changed dotprompt
APIs aren't used by Genkit, so this is a drop-in update.
@github-actions github-actions Bot added the go label Nov 18, 2026
@pavelgj
pavelgj requested a review from apascal07 November 18, 2026 21:42
@pavelgj pavelgj changed the title fix(go): bump dotprompt to pick up template marker injection fix deps(go): bump dotprompt to pick up the latest version Nov 18, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the dependency 'github.com/google/dotprompt/go' to version 'v0.0.0-20261118194220-bdc60beb8a17' in both 'go.mod' and 'go.sum'. There are no review comments to address.

@pavelgj pavelgj changed the title deps(go): bump dotprompt to pick up the latest version fix(go): bump dotprompt to pick up the latest version Nov 18, 2026
@pavelgj
pavelgj merged commit 47f9a5e into main Nov 18, 2026
27 of 28 checks passed
@pavelgj
pavelgj deleted the pj/go-bump-dotprompt-r8m3x6t1qv branch November 18, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants