Repository navigation
fix(training-agent): serve 3.2 for the bare "3.2" pin - #7748
Merged
Merged
Conversation
A request pinned to adcp_version "3.2" downshifted to 3.1 because the supported list carried only 3.2 prereleases, and release pins never downshift onto a prerelease. Advertise and serve the release line derived from TRAINING_AGENT_CURRENT_ADCP_VERSION and keep the exact 3.2-rc.7 pin. Until the SDK ships the GA bundle, an SDK responseEnhancer corrects the bundle-label echo (3.2-rc.7) to the negotiated 3.2 at the source, so the structured result and its text mirror agree. The GA bump stays a one-constant change. Reject viewable_rate optimization goals the seller cannot honor instead of accepting them silently: missing standard or a non-proportion target is INVALID_REQUEST; an undeclared metric, undeclared standard or named vendor is TERMS_REJECTED, on create and package goal updates. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — training-agent (server) PR with no schema/wire changes.
What I checked:
- No changes under
static/schemas/source/**,docs/reference/**, ordist/**— schema↔docs coherence, oneOf discriminator, and released-artifact immutability rules do not apply. - Server-only training-agent change: no protocol surface touched, so no changeset required and not Breaking-class. No
3.1.xpatch-eligibility concern (base ismain). - Reviewer verified the 3.2 release-line resolver fix, version-list dedup/order, per-request AsyncLocalStorage echo isolation + text-mirror consistency, and the viewable_rate goal validator.
Medium findings (1):
- server/src/training-agent/tenants/router.ts — update-path
viewable_ratevalidation branch lacks a test (onlycreate_media_buypath is covered). Missing test on a new branch.
Decision path: No critical/high findings (row 1 N/A). gated_paths is false (row 2 N/A). high_risk false (rows 3/5 N/A). The single medium is a missing-test category, not data-loss/schema/infra (row 4 N/A). No prior escalation (row 6 N/A). No no-auto-approve team match (row 7 N/A). Only 1 medium finding, fewer than 3 (row 8 N/A). Falls through to row 9 → approve.
Note: review_decision is REVIEW_REQUIRED, but with gated_paths: false this does not block auto-approval per the decision table.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Summary
Gets the training agent ready for the 3.2 GA wire pin.
1.
adcp_version: "3.2"is served as 3.2, not 3.1 (GA blocker)TRAINING_AGENT_SUPPORTED_RELEASE_VERSIONSlisted only 3.2 prereleases. versioning.mdx says release pins never downshift onto a prerelease, so the resolver sent"3.2"down to"3.1". That dropped compact lifecycle, Reliable Reporting and the proposal profiles.types.tsnow derivesTRAINING_AGENT_CURRENT_ADCP_RELEASE("3.2") fromTRAINING_AGENT_CURRENT_ADCP_VERSION("3.2-rc.7"). It advertises and serves that value exactly.3.2-rc.7pin stays listed (deduped) for the transition.TRAINING_AGENT_CURRENT_ADCP_VERSION = '3.2'when@adcp/sdkships the 3.2.1 bundle.TRAINING_AGENT_DEFAULT_ADCP_VERSIONstays'3.0', as intended.@adcp/[email protected]sends"3.2-rc.7"by default. It can't be configured with"3.2"because no bundle exists yet, so SDK buyers are unaffected until GA. The GA SDK will send"3.2".3.2-rc.7) on SDK-dispatched responses when the handler doesn't setadcp_version.responseEnhancer(the SDK's documented hook, run inside finalization) changes that stamp to"3.2". It only acts on requests the agent resolved to the release line, marked with AsyncLocalStorage around dispatch.structuredContentandcontent[].textagree. This is covered in the smoke test.adcp_major_version: 3alone now resolves to"3.2". It used to resolve to"3.2-rc.7", which was the highest listed release before this change, so the capability surface is the same. The spec asks for this:adcp_major_versionwas sent, the highest supported release in that major".adcp_major_version: 3→ server serves the highest supported release in major 3".validate_input,list_products, proposal tools) follow the same rule. Unpinnedget_productsand the other legacy tools still get 3.0.Proven with:
server/tests/unit/training-agent-release-pin.test.ts)/salescapabilities at"3.2"match the rc.7 surface exactly, pluslist_products/buy_productsechoing"3.2""3.2"mainfor"3.2"2.
viewable_rateoptimization goals are no longer silently acceptedThe agent now follows
core/optimization-goal.jsonandoptimization-reporting.mdx("Sellers reject mismatches withTERMS_REJECTED"):INVALID_REQUESTfor a missingstandard, or a target that isn't athreshold_ratein (0, 1].TERMS_REJECTEDfor:viewable_rateinmetric_optimization.supported_metrics(true of the whole built-in catalog)standardoutsidesupported_viewability_standardsvendor(the sandbox has no viewability-vendor integration; the spec says sellers MUST reject a vendor they can't optimize against)This applies on create (and so
buy_products/accept_proposal) and on package goal updates. No compliance storyboard or seeded fixture sendsviewable_rate.Out of scope: the general rule that any undeclared
kind: "metric"goal is rejected. It touches many seeded storyboards during the freeze.3. Proposal-profile storyboards in CI
This isn't a config-only change.
typed_proposal_negotiationfails on the profile routes (revise_with_budgetreturnsunable), andrefine_frequency_cap_negotiationcrashes the runner. A CI job today would only lock in failures. Tracked in #7719.How the review feedback was addressed
release-line-echo.tsregisters the SDK'sresponseEnhancerhook (registry.ts). The hook changes the SDK's own3.2-rc.7stamp to"3.2"inside the SDK finalization pipeline.resolveServedAdcpVersionForTool(the resolver the tools use) to the release line.content[0].textonly when that text is an exact JSON mirror ofstructuredContent. The SDK's own mirror is built after the enhancer runs, sostructuredContentandcontent[].textboth say"3.2". The smoke test checks this.3.2-rc.7), andresolveAdcpVersion('3.2')throws because rc.49 has no 3.2 bundle.adcp_major_version: 3changed from"3.2-rc.7"to"3.2". It still resolves to the highest supported release, and the capability surface is identical. The spec requires this; seedocs/reference/versioning.mdx:adcp_major_versionwas sent, the highest supported release in that major)".adcp_major_version: 3→ server serves the highest supported release in major 3."3.0.viewable_ratehandling is described in §2 above. The echoedstandardis length-capped and JSON-quoted in the error message.Overlap
Rebased onto
mainafter #7708 merged, with no conflicts. It doesn't touchv6-*files, storyboard YAML, or creative/brand capabilities. No changeset: training-agent only (check-changeset-protocol-scopepasses).Testing
npx tsc --noEmit -p server/tsconfig.json: clean.npx vitest run --config server/vitest.config.ts server/src/training-agent server/tests/unit/training-agent*.test.tsplus the RR and 3.0-compat integration files, after rebasing on main (which includes fix(training-agent): resolve comply_test_controller account_id targets and run server/src tests in CI #7708): 8 files, 873/873 pass.server/tests/integration/training-agent-*failures on the loaded host:training-agent-webhooks"account-level creative lifecycle webhooks" times out on unmodifiedmainsource too.verification-walkthroughhook timeout that passed on rerun.--no-verify) and the push usedHUSKY=0. The hook failed only on unrelated Addie tests: three break becausenode_modulesis symlinked to the main checkout, and a fixed-trace typecheck test timed out under load and passed when rerun alone. CI runs the full matrix, including storyboards.Follow-ups
TRAINING_AGENT_CURRENT_ADCP_VERSIONto'3.2'together with@adcp/[email protected].v6-sales-platform.tsare left alone to avoid overlap with fix(training-agent): resolve comply_test_controller account_id targets and run server/src tests in CI #7708.🤖 Generated with Claude Code