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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"docs:json-field-audit": "node scripts/docs-json-field-audit.cjs"
},
"dependencies": {
"@adcp/sdk": "13.0.0-rc.26",
"@adcp/sdk": "13.0.0",
"@anthropic-ai/sdk": "^0.115.0",
"@asteasolutions/zod-to-openapi": "^8.5.0",
"@contentauth/c2pa-node": "^0.8.3",
Expand Down
2 changes: 1 addition & 1 deletion static/compliance/published-versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"schema_version": 1,
"description": "Compliance bundles available from a published @adcp/sdk npm package. Hosted grading must use published_versions; package_only_versions are SDK opt-in surfaces that are not hosted protocol releases.",
"npm_tags": ["adcp-3.0", "latest", "rc"],
"package_only_versions": ["3.2.0"],
"package_only_versions": ["3.1.15", "3.2.0"],
"published_versions": [
"3.0.0",
"3.0.1",
Expand Down
58 changes: 32 additions & 26 deletions tests/portfolio-routing-scope.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,36 @@ test("portfolio routing scope is authoritative when present and advisory in 3.2"
1
);

const [legacyRunnerResult] = runValidations(
[
{
check: "all_fields_in_context_array",
path: "products[*].channels[*]",
context_key: "portfolio_channels",
description: "Every product channel stays within declared scope",
},
],
{
taskName: "get_products",
taskResult: {
success: true,
data: { products: [{ channels: ["display"] }] },
},
agentUrl: "https://seller.example",
contributions: new Set(),
storyboardContext: { portfolio_channels: ["display"] },
}
);
assert.equal(legacyRunnerResult.passed, true);
assert.equal(
legacyRunnerResult.not_applicable,
true,
"pre-implementation SDKs must skip the additive check, not false-fail it"
);
const validation = {
check: "all_fields_in_context_array",
path: "products[*].channels[*]",
context_key: "portfolio_channels",
description: "Every product channel stays within declared scope",
};
const runnerContext = {
taskName: "get_products",
agentUrl: "https://seller.example",
contributions: new Set(),
storyboardContext: { portfolio_channels: ["display"] },
};

const [inScopeRunnerResult] = runValidations([validation], {
...runnerContext,
taskResult: {
success: true,
data: { products: [{ channels: ["display"] }] },
},
});
assert.equal(inScopeRunnerResult.passed, true);

const [outOfScopeRunnerResult] = runValidations([validation], {
...runnerContext,
taskResult: {
success: true,
data: { products: [{ channels: ["audio"] }] },
},
});
assert.equal(outOfScopeRunnerResult.passed, false);
assert.deepEqual(outOfScopeRunnerResult.expected, ["display"]);
assert.deepEqual(outOfScopeRunnerResult.actual, ["audio"]);
});
Loading