Migrate CI LLM judges to Claude Sonnet 5#2829
Conversation
Add resolveSemverAnthropicModel() defaulting to claude-sonnet-5 for semver-analysis.mjs. Sonnet 5 rejects non-default sampling parameters, so drop temperature: 0 from the semver API request. Dependabot gate stays on the shared claude-sonnet-4-6 default until migrated separately. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
Use claude-sonnet-5 as the shared default in anthropic-config.mjs and drop the semver-specific resolver. Remove temperature: 0 from dependabot-anthropic-gate.mjs — Sonnet 5 rejects non-default sampling parameters. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
This PR requires a manual review and approval from a member of one of the following teams:
|
There was a problem hiding this comment.
Stale comment
Injected PR Evaluation: Web Compatibility & Security
PR: Migrate CI LLM judges to Claude Sonnet 5 (
jkt/auto/semver-sonnet-5-63fb)This PR updates three CI-only scripts under
.github/scripts/:
anthropic-config.mjs— default modelclaude-sonnet-4-6→claude-sonnet-5dependabot-anthropic-gate.mjs— removestemperature: 0from two Anthropic API callssemver-analysis.mjs— removestemperature: 0from one Anthropic API callNo files under
injected/,messaging/, orspecial-pages/runtime bundles are modified.
Web Compatibility Assessment
No findings. This change does not touch page-world injection, API overrides, DOM manipulation, messaging transports, or platform entry points. Zero web compatibility impact.
Security Assessment
No injected-runtime findings.
Info — CI automation determinism (
.github/scripts/dependabot-anthropic-gate.mjs,.github/scripts/semver-analysis.mjs): Removingtemperature: 0may increase variability in Dependabot auto-merge gate and semver-label LLM decisions. This is an operational/consistency consideration for CI automation, not a page-world security vulnerability. The existing trust boundaries (Cursor check-run triple validation, authenticated-app author filtering, tool-choice constrained outputs, fail-closed gate logic) are unchanged.Info — model ID (
anthropic-config.mjs):claude-sonnet-5matches Anthropic's documented drop-in replacement forclaude-sonnet-4-6.
Risk Level
Low Risk — CI-only LLM judge configuration; no injected runtime, messaging, or captured-globals changes.
Recommendations
- Verify first CI run with the new model on
dependabot-auto-merge.ymlandsemver-label.ymlworkflows to confirm the API accepts requests withouttemperature(Sonnet 5 uses adaptive thinking; parameter support may differ).- Monitor gate behavior for a few Dependabot PRs after merge — if auto-merge/semver decisions become noisier, consider whether Sonnet 5 exposes an equivalent determinism knob (e.g. effort level) rather than
temperature.- No injected-code tests or rollout actions required.
Sent by Cursor Automation: Web compat and sec
[Beta] Generated file diffTime updated: Wed, 01 Jul 2026 14:48:33 GMT |
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/jkt/auto/semver-sonnet-5-63fb")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/semver-sonnet-5-63fb
git -C submodules/content-scope-scripts checkout origin/pr-releases/jkt/auto/semver-sonnet-5-63fbPin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "c7a1a5356e7a93d42977e196feedebd5b6387a4e")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/semver-sonnet-5-63fb
git -C submodules/content-scope-scripts checkout c7a1a5356e7a93d42977e196feedebd5b6387a4e |
There was a problem hiding this comment.
Stale comment
Injected PR Evaluation: Web Compatibility & Security
Reviewed synchronize diff
c5a328e→126f601(3 files under.github/scripts/only). Noinjected/,messaging/, orspecial-pages/runtime code is touched.Web Compatibility Assessment
File Lines Severity Finding — — info No findings. Changes are confined to CI LLM judge configuration. No browser API overrides, wrapper utilities, DOM interaction, platform entry points, or page-world injection code is modified. Zero impact on third-party site compatibility. Security Assessment
File Lines Severity Finding — — info No injected-runtime findings. No changes to captured-globals.js, message bridge trust boundaries, messaging transports,nativeDatahandling, or origin validation..github/scripts/dependabot-anthropic-gate.mjs882–994 info Dependabot merge gate trust model is unchanged: Cursor check triple-validation (name + app slug + details host), TRUSTED_AUTOMATION_AUTHORSallowlist, forcedtool_choicewith schema-validated structured output, and fail-closed evidence requirements remain intact..github/scripts/anthropic-config.mjs7 info Model ID claude-sonnet-5is Anthropic's documented drop-in replacement forclaude-sonnet-4-6. Override viaANTHROPIC_MODELenv var still supported..github/scripts/dependabot-anthropic-gate.mjs,.github/scripts/semver-analysis.mjs885, 991, 120 info Removing temperature: 0is required for Sonnet 5 — non-default sampling parameters return HTTP 400 per Anthropic's migration guide. This is an API compatibility fix, not a security relaxation.Risk Level
Low Risk — CI-only LLM judge configuration with no injected runtime code changes and no modification to existing security trust boundaries.
Recommendations
- (info) Merge after CI is green. No injected-runtime blockers.
- (info) Monitor the first
dependabot-auto-merge.ymlandsemver-label.ymlruns on Sonnet 5 — adaptive thinking is on by default andmax_tokensis a hard cap on thinking + response. Current budgets (400/512/800) should be sufficient for these short structured-judge calls, but watch for truncated tool-use responses.- (info) Expect slightly less deterministic LLM judge output now that
temperature: 0is removed (Sonnet 5 constraint). The dependabot gate mitigates this via forcedtool_choice+ schema validation; semver analysis still parses free-form JSON and may see minor classification variance across runs — acceptable for this use case.
Cursor Automation: Web compat and sec
Sent by Cursor Automation: Web compat and sec
Remove the patch early-exit when build output is unchanged. Generate a git source diff in semver-label.yml and include it alongside the build diff so Claude can classify CI-only and source-only changes. Add unit tests for prompt formatting. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
There was a problem hiding this comment.
Stale comment
Web Compatibility Assessment
No findings. This PR touches only
.github/scripts/and.github/workflows/— CI automation for LLM judges and semver labeling. There are zero changes toinjected/,messaging/,special-pages/runtime bundles,wrapper-utils.js,captured-globals.js, or any page-world API overrides. Web compatibility categories (API surface fidelity, prototype chain integrity, DOM interaction, timing, platform-specific breakage, third-party script compatibility) are not applicable.
File Severity Note (none) — CI-only scope; no runtime impact Security Assessment
No injected-runtime security findings. Trust boundaries in CI automation remain intact.
File Lines Severity Note .github/scripts/anthropic-config.mjs7 info Model ID bump claude-sonnet-4-6→claude-sonnet-5; CI-only, no page-world exposure.github/scripts/dependabot-anthropic-gate.mjs882–989 info temperature: 0removed — required for Sonnet 5 (non-default sampling params return HTTP 400). Gate trust boundaries (author allowlists, tool-choice outputs, fail-closed) unchanged.github/scripts/semver-analysis.mjs143–146 info Same temperatureremoval for API compatibility.github/scripts/semver-analysis.mjs184–191 info New SOURCE_DIFFinput sent to Anthropic API — same trust boundary as existingBUILD_DIFF; fork PRs remain excluded by workflow guard (!head.repo.fork).github/workflows/semver-label.yml13 info Existing fork-PR exclusion prevents untrusted PRs from triggering LLM analysis with repo secrets No changes to: captured globals, message bridge,
nativeDatahandling, origin validation,postMessage, stack-trace exemptions, or config-gated feature code.Risk Level
Low Risk — CI-only automation changes with no injected runtime, messaging, or page-world code modifications.
Recommendations
- Monitor first CI runs on
semver-label.ymlanddependabot-auto-merge.ymlafter merge — Sonnet 5 uses adaptive thinking by default; verifymax_tokens(400/512/800) remains sufficient for tool-use / JSON responses.- Positive change: Removing the early-exit when
BUILD_DIFFis empty (now always consulting the LLM withSOURCE_DIFF) improves semver accuracy for source-only API/schema changes without affecting runtime security.- No injected-runtime tests required; existing unit tests for
semver-analysisprompt formatting are appropriate coverage.Sent by Cursor Automation: Web compat and sec
Separate shallow checkouts do not share the base SHA object, so `git -C pr diff $BASE_SHA` fails with 'bad object'. Use gh pr diff instead, which fetches the diff via the GitHub API. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
There was a problem hiding this comment.
Stale comment
Injected PR Evaluation: Web Compatibility & Security
Scope: This PR touches only
.github/scripts/and.github/workflows/— CI LLM judge configuration and semver labeling. No changes underinjected/,messaging/, orspecial-pages/runtime code.Web Compatibility Assessment
No findings. This PR does not modify page-world injection, API shims, messaging transports, captured globals, or any code shipped to DuckDuckGo browsers.
Security Assessment
File Severity Finding (none) — No injected-runtime security surface affected. .github/scripts/semver-analysis.mjsinfo SOURCE_DIFF,PR_TITLE,PR_BODY, andPR_FILESare sent to the Anthropic API. This extends an existing CI trust boundary (build diff was already sent). Fork PRs remain excluded by thesemver-label.ymlguard (!github.event.pull_request.head.repo.fork)..github/scripts/dependabot-anthropic-gate.mjs,semver-analysis.mjsinfo Removing temperature: 0is required for Sonnet 5 (non-default sampling params return HTTP 400). May increase LLM output variance for semver labels and Dependabot gate decisions — operational, not a page-world vulnerability..github/workflows/semver-label.ymlinfo gh pr diffadds full source diff to the LLM prompt. Pre-existing prompt-injection risk via PR title/body remains; no new exfiltration vector to end users.Risk Level
Low Risk — CI-only changes (model bump, sampling-param fix, semver judge prompt enrichment); zero injected runtime impact.
Recommendations
- Monitor first CI runs after merge for Sonnet 5 adaptive-thinking behavior under existing
max_tokenscaps (512 for semver, 400/800 for Dependabot gate) — truncated or malformed JSON would fail the label step rather than mislabel silently.- No injected-code action required. The
SOURCE_DIFFchange is a positive semver-classification improvement for source-only API changes that produce identical build artifacts.- Unit tests for
formatBuildDiffSection/formatSourceDiffSection/buildUserPromptpass locally;semver-analysis.test.mjsis wired intotests.yml.Sent by Cursor Automation: Web compat and sec
Fetch the base commit into the pr checkout via a local remote so git diff matches the merge ref used for builds. Remove silent error swallowing on diff generation and fail when changed files exist but the diff is empty. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
There was a problem hiding this comment.
Stale comment
Web Compatibility Assessment
No findings. This PR touches only
.github/scripts/and.github/workflows/— CI automation for LLM semver classification and Dependabot gating. No changes toinjected/,messaging/,special-pages/runtime bundles, wrapper utilities, captured globals, or message bridge code. Zero page-world API surface impact.
Security Assessment
No findings at error/warning/critical severity.
File Lines Severity Notes .github/workflows/semver-label.yml13 info Fork PRs excluded ( !head.repo.fork); Dependabot PRs skipped. Trust boundary unchanged..github/workflows/semver-label.yml54–74 info Latest commit ( 6d8b7d) aligns source diff with the merge-ref build checkout via localbase-checkoutfetch. Removes priorgh pr diffsilent error swallowing; fails fast when changed files exist but diff is empty. Positive CI hardening — no new secret exposure..github/scripts/semver-analysis.mjs184–191 info SOURCE_DIFFsent to Anthropic alongsideBUILD_DIFFunder the same existing API-key trust boundary. Truncated at 80k chars each (pre-existing pattern)..github/scripts/dependabot-anthropic-gate.mjs882–988 info temperature: 0removed — required for Claude Sonnet 5 API (non-default sampling params return HTTP 400)..github/scripts/semver-analysis.mjs145 info max_tokens: 512with Sonnet 5 adaptive thinking may truncate reasoning on very large diffs; affects label accuracy only, not runtime security.No changes to messaging transports,
nativeDatahandling, origin validation, captured globals, or injectedload()/init()lifecycle.
Risk Level
Low Risk — CI-only LLM model migration and semver workflow improvements with no injected runtime code changes.
Recommendations
- Merge after CI green — unit tests for
semver-analysishelpers pass locally (4/4).- Monitor first Sonnet 5 CI runs — confirm semver labels and Dependabot gate decisions remain stable without
temperature: 0; watch for truncated JSON undermax_tokens: 512on large PRs.- No injected web-compat or security follow-ups required.
Sent by Cursor Automation: Web compat and sec
Shallow checkouts reject updating named refs (refs/base-sha). Fetch the base commit with --depth=1 into FETCH_HEAD instead, then diff FETCH_HEAD..HEAD to match the merge build checkout. Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6d8b7d1. Configure here.
There was a problem hiding this comment.
Injected PR Evaluation: Web Compatibility & Security
Reviewed PR #2829 (Migrate CI LLM judges to Claude Sonnet 5). All changes are confined to .github/scripts/ and .github/workflows/ — no injected/, messaging/, or special-pages/ runtime code is touched.
Web Compatibility Assessment
No findings. This PR does not modify browser-injected code, API shims, messaging transports, or feature initialization.
Security Assessment
| File | Lines | Severity | Finding |
|---|---|---|---|
.github/workflows/semver-label.yml |
54–74 | info | New source-diff step fetches base SHA from the local base checkout ($GITHUB_WORKSPACE/base), not from PR-controlled input. Fork PRs are already excluded (!github.event.pull_request.head.repo.fork). No injected-runtime trust-boundary impact. |
.github/scripts/semver-analysis.mjs |
184–190 | info | SOURCE_DIFF and PR_BODY are forwarded to the Anthropic API, same pre-existing pattern as BUILD_DIFF. Acceptable for a CI-only semver judge; no page-world exposure. |
.github/scripts/dependabot-anthropic-gate.mjs |
882–989 | info | Removing temperature: 0 may increase LLM output variance for merge-gate decisions. Not a security vulnerability, but worth monitoring gate consistency after the Sonnet 5 migration. |
No critical, error, or warning findings.
Risk Level
Low Risk — CI/tooling-only changes (model default bump, semver prompt enrichment, test coverage). Zero impact on code shipped to end-user browsers.
Recommendations
- (info) After merge, spot-check a few PRs where build output is unchanged but source changes are semver-sensitive (e.g. new message schemas) to confirm the new source-diff path classifies correctly under Sonnet 5.
- (info) Consider asserting
DEFAULT_ANTHROPIC_MODEL === 'claude-sonnet-5'inanthropic-config.test.mjsso future model bumps are caught by CI. - (info) The removal of the empty-build-diff early-exit (
severity: patchshortcut) is a correctness improvement — CI-only PRs like this one will now be evaluated by the LLM instead of auto-labeled patch.
Sent by Cursor Automation: Web compat and sec



Asana Task/Github Issue: N/A
Description
CI-only changes across three areas:
1. Migrate CI LLM judges to Claude Sonnet 5
DEFAULT_ANTHROPIC_MODELtoclaude-sonnet-5inanthropic-config.mjstemperature: 0from Anthropic API calls insemver-analysis.mjsanddependabot-anthropic-gate.mjs— Sonnet 5 returns HTTP 400 for non-default sampling parameters2. Improve semver classification
3. Fix semver-label workflow source diff generation
The workflow builds from the PR merge ref; source diff now matches that:
FETCH_HEAD..HEADin theprcheckout against thebasecheckout SHAprclone via a localbase-checkoutremote (named refs are rejected on shallow clones)Files changed
anthropic-config.mjsclaude-sonnet-5dependabot-anthropic-gate.mjstemperature: 0semver-analysis.mjstemperature, export prompt helperssemver-analysis.test.mjssemver-label.ymltests.ymlTesting Steps
Verify Semver Label workflow passes on this PR after merge.
Checklist
Please tick all that apply: