Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .agents/sdk-shim-ledger.json
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
[]
[
{
"id": "creative-build-probe-8240",
"title": "Portable evaluator build probe preparation",
"kind": "integrity-pinned-package-patch",
"status": "temporary",
"owner": "adcp compliance maintainers / issue 8240",
"upstream": "https://github.com/adcontextprotocol/adcp-client/pull/3332",
"problem": "The pinned SDK lacks portable valid build-probe preparation and the served-catalog authority prerequisite required by the merged upstream fix.",
"localBehavior": "Patch only reviewed SDK14.0.0-rc.53 CJS/ESM loader, runner, schema-authority and declaration preimages. A local creative_build_probe ALS scope is established before preflight and pairs served catalog selection with actual JSON capability validation (builtin or external); stock14 behavior remains outside that opt-in and for other tasks. Unlike the initial candidate, authority modules include an explicit maintenance delta and do not claim whole-module identity to15.9.5. Preserve request pins, accounting, general TaskExecutor and all four main helper payloads. Authority regressions use ledgered private scope/validator interfaces and owned temporary stock copies reconstructed by exact reverse hashes; no direct installed-package edits.",
"removalCondition": "Remove after the upstream creative-build-probe runner fix is merged, available in a qualified SDK release, and both full and standalone regression suites pass after upgrading the pinned dependency. Do not release the SDK from this task.",
"paths": [
"scripts/install-sdk-creative-build-probe.cjs",
"tests/evaluator-build-probe-authority.test.cjs"
],
"terms": [
"dist/lib/testing/",
"dist/lib/validation/"
]
}
]
24 changes: 24 additions & 0 deletions .changeset/evaluator-off-list-rejection-coverage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"adcontextprotocol": patch
---

Make both off-list evaluator rejection phases mandatory for agents that advertise evaluator support. Preserve unsupported-feature applicability, prevent later discovery from skipping the security boundary, and check all outbound methods and paths on the off-list evaluator origin.

Bind each required rejection probe to an advertised build operation and a valid
source input. Handle non-build-first and legacy catalogs without relying on
catalog ordering or ranking features. Add an owned, integrity-checked temporary
SDK bridge for shared full/standalone runner preparation; unavailable fixtures
remain explicit coverage gaps with no passing security credit.

Forward authored probe recipes through the manual runner, including recipe-only
kits. Malformed understood catalog declarations retain their catalog cause as
prerequisite failures (actionable dependency failures in hosted classification),
instead of being mislabeled controller setup failures.

Resolve capability catalogs against the validated served release while preserving
the pinned build request and source-input contract, including provisioned legacy
formats when the catalog uses newer canonical vocabulary.

Backport the merged main fix with a separately qualified, all-target guarded
SDK14.0.0-rc.53 adapter and the existing upstream served-catalog authority
prerequisite. Preserve this branch's exact dependency and lockfile.
1 change: 1 addition & 0 deletions .github/workflows/sdk-response-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
go-version-file: scripts/sdk-response-conformance/go/go.mod
cache-dependency-path: scripts/sdk-response-conformance/go/go.sum
- run: npm ci --ignore-scripts
- run: node scripts/install-sdk-creative-build-probe.cjs
- run: python3 -m pip install -r scripts/sdk-response-conformance/requirements.txt
- run: npm run test:sdk-response-conformance
- name: Capture and validate real SDK responses
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ WORKDIR /app

# Copy package files
COPY package*.json ./
COPY scripts/install-sdk-creative-build-probe.cjs ./scripts/install-sdk-creative-build-probe.cjs
COPY patches/sdk-creative-build-probe ./patches/sdk-creative-build-probe

# Install ALL dependencies (including dev dependencies for TypeScript build)
RUN npm ci --ignore-scripts
RUN npm ci --ignore-scripts \
&& node scripts/install-sdk-creative-build-probe.cjs

# Copy source code
COPY . .
Expand Down Expand Up @@ -153,10 +156,13 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

COPY package*.json ./
COPY scripts/install-sdk-creative-build-probe.cjs ./scripts/install-sdk-creative-build-probe.cjs
COPY patches/sdk-creative-build-probe ./patches/sdk-creative-build-probe

# --ignore-scripts blocks arbitrary postinstall lifecycle scripts from the full
# dep tree; native deps are rebuilt explicitly per-package.
RUN npm ci --omit=dev --ignore-scripts \
&& node scripts/install-sdk-creative-build-probe.cjs \
&& npm rebuild sharp \
&& npm cache clean --force

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
"test:pagination-invariant": "node --test --test-force-exit --test-timeout=30000 tests/lint-pagination-invariant.test.cjs",
"test:version-envelope": "node --test --test-force-exit --test-timeout=30000 tests/lint-version-envelope.test.cjs tests/compact-version-envelope.test.cjs",
"test:test-dynamic-imports": "node --test --test-force-exit --test-timeout=30000 tests/lint-test-dynamic-imports.test.cjs",
"test:sdk-shims": "node --test --test-force-exit --test-timeout=30000 tests/lint-sdk-shims.test.cjs tests/sdk-runtime-compat.test.cjs",
"test:sdk-shims": "node --test --test-force-exit --test-timeout=30000 tests/lint-sdk-shims.test.cjs tests/sdk-runtime-compat.test.cjs tests/sdk-creative-build-probe-bridge.test.cjs",
"test:tenant-routing": "vitest run --config server/vitest.config.ts server/src/training-agent/tenants/tenant-smoke.test.ts",
"test:format-identity-boundaries": "node --test --test-force-exit --test-timeout=30000 tests/lint-format-identity-boundaries.test.cjs",
"test:sdk-runner-capability-gates": "node --test --test-force-exit --test-timeout=30000 tests/sdk-runner-capability-gates.test.cjs",
"test:sdk-runner-capability-gates": "node --test --test-force-exit --test-timeout=30000 tests/sdk-runner-capability-gates.test.cjs && node --test --test-timeout=30000 tests/evaluator-allowlist-runner.test.cjs tests/evaluator-build-probe-authority.test.cjs tests/evaluator-build-probe-cleanup.test.cjs",
"test:callapi-state-change": "node --test --test-force-exit --test-timeout=30000 tests/lint-callapi-state-change.test.cjs",
"test:cdn-artifacts-worker": "node --test --test-force-exit --test-timeout=30000 tests/artifact-cdn-worker.test.cjs",
"test:sign-protocol-tarball": "node --test --test-force-exit --test-timeout=30000 tests/sign-protocol-tarball.test.cjs",
Expand Down Expand Up @@ -197,7 +197,8 @@
"eval:addie-fixed-traces-direct-full-suite": "tsx --import dotenv/config server/tests/manual/fixed-trace-direct-full-suite-eval.ts",
"eval:addie-gemini-direct-ablation": "tsx --import dotenv/config server/tests/manual/gemini-direct-ablation-eval.ts",
"eval:addie-matched-v4-plan": "tsx server/tests/manual/matched-v4-evaluation-plan.ts",
"eval:addie-matched-v4-authorized": "tsx --import dotenv/config server/tests/manual/matched-v4-authorized-execution.ts"
"eval:addie-matched-v4-authorized": "tsx --import dotenv/config server/tests/manual/matched-v4-authorized-execution.ts",
"postinstall": "node scripts/install-sdk-creative-build-probe.cjs"
},
"dependencies": {
"@adcp/sdk": "14.0.0-rc.53",
Expand Down
57 changes: 57 additions & 0 deletions patches/sdk-creative-build-probe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Temporary SDK bridge for adcp#8240. Upstream source and executable tests:
https://github.com/adcontextprotocol/adcp-client/pull/3332

Qualified upstream source: `9f932f174e8125e00ec55d64db2a292cba2be7f9`.

The manifest contains bounded insertions into SDK **14.0.0-rc.53** loader, runner and
matching declarations, plus the shared resolver compiled from upstream source.
It does not replace the whole newer SDK runner. Both public CJS and ESM entry
points receive the same preparation, including standalone steps. Existing global
accounting and required-phase/vacuous-pass guards remain unchanged.

`node scripts/install-sdk-creative-build-probe.cjs` validates package identity,
all target preimages/postimages, unique insertion anchors and deterministic helper
bytes before writing. A repeated complete installation is a no-op; drift or a
mixed state fails loudly. Normal installs run this as postinstall. Docker's
`--ignore-scripts` stages explicitly invoke only this trusted installer, as does
the SDK conformance workflow. Tests reconstruct stock bytes and exercise both
public module entry points before and after explicit installation.

The automatic source recipe relies on existing format completeness semantics;
operator recipes assert account-specific valid input for every route matched by
the existing fixture DSL. Capability catalogs follow the SDK-authorized served release; build selectors,
source manifests and dispatch retain the run pin. Missing source/preconditions yield visible coverage
gaps, not passing security credit. See the authored runner test-kit contract.

Qualification/removal: upgrade to a published SDK containing the upstream fix,
remove this directory, installer, lifecycle/Docker/workflow calls and owned shim
ledger entry, then run the complete authored fixture and bridge/standalone
regressions with the public replacement. This task publishes no release.

To refresh after a separately reviewed maintenance qualification, rebuild that SDK commit, copy
only creative-build-probe.{js,mjs,d.ts,d.mts}, and regenerate the bounded insertion
blocks and SHA-256 pre/postimage hashes against a pristine npm SDK 14.0.0-rc.53 install.
Review the resulting manifest and rerun integrity/public-entry regressions.

Maintenance prerequisite: SDK 14 does not export served-release schema selection.
The manifest ports the SDK 15.9.5 selection additions with a reviewed maintenance
delta: an AsyncLocalStorage scope enabled only by the locally authored
`creative_build_probe` directive, before capability preflight. Catalog selection
and its capability response-schema backstop use that same scope. Within it, the
actual authorized JSON schema governs even for builtin roots; stale generated
Zod disagreement remains visible as a warning. Invalid JSON fails and unavailable
schema produces the existing failing `no_schema_registered` harness diagnostic.
These modules are not byte-identical to SDK 15.9.5. Unrelated OAuth or error changes
are excluded.
The four evaluator helper payloads remain byte-identical to main. All 25 target
preimages/postimages are qualified against the exact locked npm SDK 14 tarball.
The branch lockfile and dependency pin are unchanged. No newer runner is copied.

Scope: only opted creative-probe capability preflight and capability response
checks use the added policy. Other storyboards and non-capability checks retain
stock SDK 14 semantics, including external-root authority. Explicit false scopes
shadow parent opt-in. `servedReleaseSchemaRoots` is deferred/inert for other
storyboards and outer bundle discovery; mixed bundles forward it to each opted
storyboard. A direct call of the new probe helper is itself an explicit opt-in.
SDK 14's general TaskExecutor is untouched and remains pin-only. This is not a
claim of whole-SDK parity with 15.9.5.
34 changes: 34 additions & 0 deletions patches/sdk-creative-build-probe/creative-build-probe.d.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { FixtureMatchClause, StoryboardContext } from './types.mjs';
export interface CreativeBuildProbeSpec {
context_prefix: string;
message: string;
}
export interface CreativeBuildProbeInputFixture {
match: FixtureMatchClause[];
/** Operator-provisioned valid input for every route matched by this recipe. */
input: Record<string, unknown>;
}
export type CreativeBuildProbeResolution = {
status: 'resolved';
capabilityId?: string;
formatId?: Record<string, unknown>;
context: StoryboardContext;
source: 'generation' | 'test_kit';
requirements: FixtureMatchClause[];
} | {
status: 'unsatisfied';
detail: string;
} | {
status: 'failed';
detail: string;
};
export declare function validateCreativeBuildProbeSpec(value: unknown): asserts value is CreativeBuildProbeSpec;
/**
* Uses only actual catalog entries and explicitly provisioned test-kit inputs.
* Global generation support does not identify a generation route in a mixed
* catalog: the automatic brief recipe is therefore used only when the catalog
* has exactly one build route (including legacy unaddressable build entries),
* and a complete, understood declaration proves there are no technical seeds.
* Other modes require a matching operator recipe, not inferred source assets.
*/
export declare function resolveCreativeBuildProbe(creative: unknown, spec: CreativeBuildProbeSpec, testKit?: unknown, adcpVersion?: string, governanceEnforcement?: unknown): CreativeBuildProbeResolution;
34 changes: 34 additions & 0 deletions patches/sdk-creative-build-probe/creative-build-probe.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { FixtureMatchClause, StoryboardContext } from './types';
export interface CreativeBuildProbeSpec {
context_prefix: string;
message: string;
}
export interface CreativeBuildProbeInputFixture {
match: FixtureMatchClause[];
/** Operator-provisioned valid input for every route matched by this recipe. */
input: Record<string, unknown>;
}
export type CreativeBuildProbeResolution = {
status: 'resolved';
capabilityId?: string;
formatId?: Record<string, unknown>;
context: StoryboardContext;
source: 'generation' | 'test_kit';
requirements: FixtureMatchClause[];
} | {
status: 'unsatisfied';
detail: string;
} | {
status: 'failed';
detail: string;
};
export declare function validateCreativeBuildProbeSpec(value: unknown): asserts value is CreativeBuildProbeSpec;
/**
* Uses only actual catalog entries and explicitly provisioned test-kit inputs.
* Global generation support does not identify a generation route in a mixed
* catalog: the automatic brief recipe is therefore used only when the catalog
* has exactly one build route (including legacy unaddressable build entries),
* and a complete, understood declaration proves there are no technical seeds.
* Other modes require a matching operator recipe, not inferred source assets.
*/
export declare function resolveCreativeBuildProbe(creative: unknown, spec: CreativeBuildProbeSpec, testKit?: unknown, adcpVersion?: string, governanceEnforcement?: unknown): CreativeBuildProbeResolution;
Loading
Loading