Repository navigation
Conversation
Main is in Changesets beta pre mode for AdCP 4.0, so the next Version Packages cut is 4.0.0-beta.0. The storyboard runner derived the wire candidate 4.0-beta.0 from that bundle, but candidate-version.ts accepted only 3.x and silently ignored it. The agent then advertised only its stable 3.x lines, and every current-surface storyboard failed with "Compliance cache version 4.0.0-beta.0 is not supported". - candidate-wire-version.ts: one pure home for the candidate majors (3 and 4), the wire-value check, and the bundle-to-wire derivation (4.0.0-beta.0 to 4.0-beta.0, 4.0.0 to 4.0, 4.1.2 to 4.1). - candidate-version.ts uses it instead of a 3.x-only regex. - run-storyboards.ts derives the candidate through the same helper, fails fast when a bundle cannot become a candidate or the agent does not adopt it, and logs the served candidate. - Tenants without declared supported_versions let the SDK negotiate by the configured pin's major. On a 4.x pin that list is just "4", which refuses the stable 3.2 default. A cross-major candidate now makes those platforms declare the registry's releases, as sales already does. Empty otherwise: deployed and 3.x candidate behaviour unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Main is in Changesets beta pre mode for 4.0, so the next Version Packages cut is
4.0.0-beta.0. The Version Packages PR for it (#9344) fails every current-surface storyboard withCompliance cache version 4.0.0-beta.0 is not supported. The runner already derived the wire candidate4.0-beta.0correctly. The problem was thatcandidate-version.tsaccepted only^3\.and dropped the candidate without saying so. The agent then advertised only its stable 3.x lines, and the SDK rejected the bundle.This PR makes candidate mode accept 4.x the same way it accepts 3.x. Deployed behaviour doesn't change, and neither does 3.x candidate behaviour.
Changes
server/src/training-agent/candidate-wire-version.ts(new, pure): the candidate majors ([3, 4], extended on purpose rather than accepting any major), the wire-value check, and the bundle-to-wire derivation. The derivation follows the existing 3.x convention:4.0.0-beta.0becomes4.0-beta.0,4.0.0-rc.2becomes4.0-rc.2,4.0.0becomes4.0, and4.1.2becomes4.1. The file has no side effects at load, so the runner can import it before it sets the env.candidate-version.ts: uses that check instead of the 3.x-only regex.server/tests/manual/run-storyboards.ts: derives the candidate through the same helper. It now fails fast in two cases: when the bundle version can't become a candidate, and when the agent doesn't adopt the candidate. Before, either case ended in the opaque compliance-cache error. It also logsCandidate mode: serving AdCP <wire> from compliance bundle <version>.supported_versions(signals, governance, creative, creative-builder, brand, si, inventory): whensupported_versionsis absent,@adcp/sdkbuilds the negotiable list from the major of the configured pin. On a 3.x pin that list is["3"], which covers everything. On a 4.x pin it's["4"], so the stable3.2default fails withdefaultAdcpVersion "3.2" must be present in capabilities.supported_versionsand the tenants never register. The newTRAINING_AGENT_CROSS_MAJOR_CANDIDATE_CAPABILITIES(intypes.ts) has these platforms declare the registry's releases explicitly, as the sales platform already does. It applies only when the candidate's major differs from the current line's major, and it's{}otherwise.What stays the same:
TRAINING_AGENT_CURRENT_ADCP_VERSION(3.2), the unpinned default (3.0), andmajor_versions: [3]. A major-only caller is never served the candidate, so advertising4there would be wrong. The hosted preview and the legacy signing routes are also unchanged. As with 3.x, a legacy route neither advertises nor accepts the candidate.No changeset: the pre-push protocol-scope hook rejects one for training-agent-only changes.
Tests
server/tests/unit/training-agent-candidate-wire-version.test.ts(new, 42 cases):NODE_ENV=testand candidate mode on.server/tests/unit/training-agent-candidate-version-4x.test.ts(new): runs a4.0-beta.0candidate through the real router./sales,/brand,/signals,/governanceand/creativenegotiate4.0-beta.0, explicit3.2, and the unpinned request (served3.2).training-agent-candidate-version,-preview-version,-schema-compat,storyboard-candidate-schema-root,training-agent-inventory-tenants,tenants/tenant-smoke,tenants/served-release-shape.tests/run-storyboards-schema-root-options.test.cjsandrun-storyboards-isolation.test.cjs.Storyboard evidence (local, candidate mode, 4.0.0-beta.0 bundle)
To simulate the bundle, I checked out
package.json,static/schemas/source/index.jsonandstatic/compliance/published-versions.jsonfromchangeset-release/main(#9344's head). I ranbuild-schemasandbuild-compliance, then the runner withADCP_COMPLIANCE_DIR=dist/compliance/latest ADCP_SCHEMA_ROOT=dist/schemas/latest ADCP_STORYBOARD_CANDIDATE_VERSION_MODE=1. The sales tenant needed the one-line SDK change described under Blocker, applied locally innode_modulesand not committed:error_compliance_signals/supported_major_version, see below)error_compliance/supported_major_version)As a 3.x regression check, signals on the restored 3.3.1 bundle in candidate mode was 57/57 clean. The log shows
Candidate mode: serving AdCP 3.3 from compliance bundle 3.3.1.Still blocking the 4.0.0-beta.0 cut (not fixed here)
@adcp/sdk(17.0.0 and beta.40):createAdcpServerthrowsproposalNegotiation requires adcpVersion 3.2 or newerwhenproposalRelease.major !== 3. Because of that, the sales tenant can't register on any 4.x pin, and since every route shares one registry, no storyboard runs at all. The fix belongs in adcp-client:major < 3 || (major === 3 && minor < 2). Other SDK checks of the formmajor === 3are worth auditing too:envelope-status-compat,v2/projection/creative-delivery("adcpVersion must name an AdCP 3.x version"), and the request-signingrequired/eitherdefault increate-adcp-server.static/compliance/source/universal/error-compliance.yamlanderror-compliance-signals.yaml(supported_major_version) sendadcp_major_version: 3while the runner pinsadcp_version: 4.0-beta.0. The agent correctly rejects that with "majors must agree".adcp_major_versionisx-removed-in: 4.0.0, so the step needs a 4.0 decision: send 4, or drop it on 4.x.Other version gates checked:
/schemas/v3/and the other alias middleware: OK. Aliases resolve only to stable releases, so/v3/stays on 3.3.1 and/v4/returns 404 until 4.0.0 GA.check-release-state.cjs: no version gate. It does require every storyboard job, including the sales orchestrators and the proposal-profile jobs, so blocker 1 also blocks verified-merge and the full-verification fallback.scripts/update-release-docs-nav.mjs:previousLine('4.0')is undefined, so the first 4.0 beta selector gets no 3.3-to-4.0 migration link, and its story pages have no predecessor to sit next to. Nowhats-new-in-4-0ormigration/3-3-to-4-0pages exist yet./sales/identity/mcppins3.3, so with a 4.x candidate the salessupported_versionswould exceed it. No CI storyboard uses that route.🤖 Generated with Claude Code