Skip to content

fix(compliance): public conformance verifier and served fixtures for provenance truth-of-claim - #8218

Merged
bokelley merged 3 commits into
mainfrom
conductor/33-arr-8199-provenance-truth-of-claim-the-see
Oct 19, 2026
Merged

bokelley merged 3 commits into
mainfrom
conductor/33-arr-8199-provenance-truth-of-claim-the-see

Conversation

@bokelley

@bokelley bokelley commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #8199. One PR, data and harness: the seeded verifier is now a real, callable public endpoint and the fixture images actually exist, so a seller that runs independent AI detection can pass provenance_truth_of_claim without recognizing the fixture.

  • Fixtures. Adds static/test-assets/acme-outdoor/ai-generated-true.jpg and ai-generated-false.jpg. They are 300x250 JPEGs, about 1 KB each, with EXIF ImageDescription, Copyright and Software fields marking them as test fixtures. static/ is served from the site root and the Dockerfile copies it, the same way the existing policy-backed-auto-redirect-http.js in that directory is served. Both scenarios now use https://adcontextprotocol.org/test-assets/acme-outdoor/… instead of the NXDOMAIN test-assets. host.
  • Public route. /governance/creative-features/mcp (server/src/training-agent/creative-features-verifier.ts) serves only get_creative_features. It needs no bearer and has its own per-IP limiter (300/min), separate from the authenticated MCP bucket. Responses come from the existing handleGetCreativeFeatures, so they stay fixture-keyed and deterministic, and the route never fetches asset URLs. It builds a dedicated MCP server per request, with no session, account or tenant state. Every other tool name returns INVALID_REQUEST. I did not add the handler to HANDLER_MAP, because that would expose it on the authenticated tenants. Audit observations over this route name the public verifier URL in details.agent_url.
  • Two prerequisites the route needs in production:
    • The global CSRF middleware would have returned 403 for any bearer-less POST here, because the path has two segments before /mcp. It is now exempted by exact path, with tests that the exemption does not widen.
    • The path gets a 16 KB JSON body cap, since the global default is 10 MB on an unauthenticated route.
    • Both were found in security and protocol review. The route's own unit test uses a bare Express app, so only the CSRF test covers the real middleware.
  • Storyboards. provenance_truth_of_claim.yaml and provenance_audit_observation.yaml now use the public route URL for accepted_verifiers and all verify_agent references. The two "sentinel" paragraphs are deleted. The prerequisite now says: "Sellers allowlist this verifier once in sandbox configuration; sellers MUST NOT call a verifier URL that is not on their own allowlist."
  • Cascade fix. accept_consistent_claim now has depends_on: [discover_verifier], so a failed contradicted step no longer skips it.
  • Docs. A short "Conformance verifier" section in get_creative_features.mdx. It says the allowlist is an SSRF safeguard and not a second accepted_verifiers list, and that the verifier must stay out of production allowlists, because any caller picks the URL that decides the verdict.

Not done, as instructed: no "verifies provenance" capability (option 2).

Hosted grading

Hosted grading only picks this up after the 3.1.x and 3.2.x patch releases ship and the grader bumps its bundle. Until then the hosted 3.1.24 bundle still has the old URLs. The route itself goes live when the training agent deploys.

Out of scope, left as-is

provenance_enforcement.yaml still uses the governance.encypher.seller.example sentinel and test-assets.adcontextprotocol.org/.../hero.jpg. It passes today via the structural path. The brief limits this PR to the two named scenarios, so I did not touch it. It is the same class of issue and could be a follow-up.

Test plan

  • npm run typecheck
  • npm run test:server-unit: 754 files, 12618 tests passed
  • New training-agent-creative-features-verifier.test.ts:
    • The route answers unauthenticated and returns ai_generated: true only for the true asset.
    • It is deterministic across calls and lists exactly one tool.
    • Every other tool is rejected, and malformed feature_ids is rejected.
    • The rate-limit headers are present.
    • /governance/mcp still returns 401 without a bearer.
    • Both storyboards reference served files that exist in static/, and accept_consistent_claim depends only on discover_verifier.
  • CSRF and body-limit tests added to csrf-middleware.test.ts and json-body-limit.test.ts
  • Storyboard lint set: every test:storyboard-* and test:compliance-* script passes
  • Changeset scope check and changeset status: patch, compliance source
  • Security-reviewer and ad-tech-protocol-expert reviews; the findings above are fixed

Sandbox notes

  • The local pre-push storyboard matrix (advisory per the playbook) ran past the sandbox time limit, so I pushed with ADCP_SKIP_STORYBOARD_MATRIX=1. The training-agent-storyboards.yml workflow is the authoritative gate.
  • Local precommit passed in full, so --no-verify was not needed.

🤖 Generated with Claude Code


Open workspace in Conductor

Comment thread server/src/utils/json-body-limit.ts Resolved

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — public conformance verifier + served fixtures for provenance truth-of-claim.

Walked the decision table top-down:

  • Row 1 (critical/high): none. No schema change, so no schema↔docs drift, no oneOf regression, no immutable-artifact modification, no 3.1.x patch-eligibility concern. Changeset is correctly scoped (patch, compliance source). depends_on cascade fix verified (discover_verifier exists).
  • Row 2 (gated_paths): false — does not fire regardless of review_decision=REVIEW_REQUIRED.
  • Row 3/4/5: high_risk is false; the single medium finding is not data-loss/schema/infra category.
  • Row 6: no prior decision.
  • Row 7: no no-auto-approve team match.
  • Row 8: only 1 medium finding (<3).
  • Row 9: approve.

Medium findings

  • server/src/utils/json-body-limit.ts:8 — Body cap exact-matches req.path and misses the /api/training-agent-prefixed spelling of the same unauthenticated verifier route, leaving it on the 10 MB default. Worth a follow-up but non-blocking: single medium, no escalation trigger, falls through to row 9.

Verifier is stateless, single-tool enforced, no asset fetch (no SSRF), per-IP rate limited, CSRF exempt on both reachable spellings, audit observations rewritten to the public URL.

Medium findings

  • server/src/utils/json-body-limit.ts:8 — Body cap misses the /api/training-agent-prefixed verifier path

…provenance truth-of-claim (#8199)

Register get_creative_features on a public, unauthenticated, per-IP rate
limited training-agent route (/governance/creative-features/mcp) that serves
no other tool. Point provenance_truth_of_claim and provenance_audit_observation
at it, publish the two fixture JPEGs at the served test-assets path, drop the
sentinel wording, and add depends_on [discover_verifier] to
accept_consistent_claim so a failed contradicted step no longer cascades.

Closes #8199

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@bokelley
bokelley force-pushed the conductor/33-arr-8199-provenance-truth-of-claim-the-see branch from 598eccc to bfa85b0 Compare October 17, 2026 15:20
Comment thread server/src/utils/json-body-limit.ts Resolved
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Oct 17, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve.

This is a subsequent push after a prior approve. The developer continued iterating on the public conformance verifier at /governance/creative-features/mcp. The reviewer confirmed the right shape: single tool, fixture-keyed, no bearer, per-IP rate limited, no external I/O (so no timeout needed), CSRF exact-exemption correctly scoped and tested against widening, patch-class changeset on compliance assets with no wire-shape break, docs↔code claims cohere, and fixture JPEGs verified real and marked.

Medium findings (1)

  • server/src/utils/json-body-limit.ts:8 — Body cap misses the /api/training-agent-prefixed verifier path; it caps the host-routed spelling but not the prefixed path, which reaches the same unauthenticated verifier with a 10mb body cap.

Single medium finding, not in {data-loss, schema, infra}; high_risk is false; gated_paths is false; no author team gate. Rows 1–8 do not fire (only 1 medium, below the 3-medium threshold for row 8). Falls through to row 9 → approve. Worth a follow-up to close the prefixed-path body-cap gap, but not blocking.

Medium findings

  • server/src/utils/json-body-limit.ts:8 — Body cap misses the /api/training-agent-prefixed verifier path

…path spelling

The 16 KB cap matched only the bare /governance/creative-features/mcp path,
but the verifier is also reachable under the main app's /api/training-agent
mount, which fell through to the 10 MB default on the unauthenticated path
the cap exists to protect. Match a normalized path (lowercased, one trailing
slash and the mount prefix stripped) against a shared path constant, so the
cap, the CSRF exemption and the route cannot drift. Express routing is
case-insensitive and tolerates a trailing slash, so those spellings are
covered too. Tests hit the bare and mounted paths through the real router
and assert 413 above the cap.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — prior Medium resolved, no new findings.

This is a subsequent review following a prior approve. The single prior Medium finding (json-body-limit.ts:8 — body cap missed the /api/training-agent-prefixed verifier path) has been resolved: isCreativeFeaturesVerifierPath now normalizes case, strips one trailing slash, and strips the mount prefix before an exact compare, matching the app-level express.json cap applied ahead of both the mount and bare-host dispatch. The fix is well-tested, including a 413 integration assertion across all five path spellings. The path-constant extraction, CSRF import swap, and re-export are behavior-preserving.

No current findings. No team gate (no no-auto-approve match), no gated paths (gated_paths: false), high_risk: false. The compliance/test-asset and docs additions are new/supporting files with no spec drift and no changeset concerns flagged. Rows 1–8 do not fire; outcome falls through to row 9.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve.

Clean pass with no critical, high, or medium findings. The public unauthenticated creative-features verifier delegates to handleGetCreativeFeatures (context-agnostic, so the empty TrainingContext is safe), performs pure substring detection with no URL fetch (no SSRF surface), enforces a single-tool allowlist, and closes its per-request MCP Server in a finally block. The CSRF exemption and the 16kb transport cap both cover the bare and /api/training-agent-mounted spellings with case/trailing-slash normalization, each backed by regression tests. The changeset is patch-scoped and in-scope (compliance assets); no schema change, no dist mutation, and docs/governance match behavior.

No escalation triggers: high_risk is false, gated_paths is false, review_decision is APPROVED, and the author is not in a no-auto-approve team. Prior decision was approve; this run remains clean. Falls through to row 9.

@bokelley
bokelley merged commit fbd3543 into main Oct 19, 2026
61 checks passed
@bokelley
bokelley deleted the conductor/33-arr-8199-provenance-truth-of-claim-the-see branch October 19, 2026 08:24
@EvgenyAndroid

Copy link
Copy Markdown
Contributor

The description says hosted grading picks this up once the 3.1.x and 3.2.x patch releases ship. Is that backport planned? I don't see a PR for it against either branch yet.

It should be small. #8218's hunks in provenance_truth_of_claim.yaml and provenance_audit_observation.yaml apply cleanly to the current 3.1.x and 3.2.x tips with git apply, and 3.1.29's storyboard schema already accepts the targeted depends_on: [discover_verifier]. Main's full copies differ from 3.1.x outside this PR (requires: [controller], seeded accounts, operator_unit, format_options), so it's the hunks that should move, not the files. No server or static change is needed, since the verifier and fixture images are served from main's deployment: at 14:26Z today initialize and tools/list on https://test-agent.adcontextprotocol.org/governance/creative-features/mcp answered, and both images under https://adcontextprotocol.org/test-assets/acme-outdoor/ returned 200 image/jpeg.

Our case: the sales agent at https://sell.nofluffadvisory.com/mcp reads 33/82 on 3.1.29, and provenance_truth_of_claim (1/3) is its only partial (heartbeat e5fe5448, 02:58Z). We've built the allowlisted get_creative_features call and it passes main's storyboard locally. The card can only show it once a 3.1.x release with this change is registered for hosted grading.

Happy to open the 3.1.x and 3.2.x backport PRs if that saves you time.

bokelley added a commit that referenced this pull request Oct 22, 2026
…provenance truth-of-claim (#8218) (#8405)

Closes #8199. Points provenance_truth_of_claim and provenance_audit_observation at the public conformance verifier and the served fixture JPEGs, and adds depends_on [discover_verifier] to accept_consistent_claim.

Backport to 3.1.x: protocol content only. The storyboards, fixtures, docs
section and changeset apply cleanly. The training-agent route, CSRF
exemption, JSON body cap and their tests are dropped. Production serves the
verifier from the main deployment, 3.1.x is never deployed, and 3.1.x
predates the json-body-limit util and the restructured CSRF exemption lists
the route depends on. The 3.1.x seller's accepted_verifiers check is
URL-agnostic, so the storyboards run against the 3.1.x training agent
unchanged.

(cherry picked from commit fbd3543)

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
bokelley added a commit that referenced this pull request Oct 22, 2026
…provenance truth-of-claim (#8218) (#8403)

Closes #8199. Registers get_creative_features on a public, unauthenticated, per-IP rate-limited training-agent route, publishes the two fixture JPEGs at the served test-assets path, points provenance_truth_of_claim and provenance_audit_observation at them, and adds depends_on [discover_verifier] to accept_consistent_claim.

Backport to 3.2.x. Conflict in server/src/training-agent/index.ts only:
3.2.x has no GCS reporting router, so the verifier import and mount are
added without main's `/sales/reporting` route.

(cherry picked from commit fbd3543)

Co-authored-by: Claude Sonnet 5.5 <[email protected]>
TekWorx pushed a commit to TekWorx/adcp that referenced this pull request Oct 24, 2026
Merge the published v3.2.6 maintenance release (tag v3.2.6,
3523bdc, the adcontextprotocol#8274 Version Packages merge on
3.2.x) into main as a record-only merge, following adcontextprotocol#8278 for 3.2.5.

The merge keeps main's tree (ours strategy) and adds only the 3.2.6 release
records:

- dist/schemas/3.2.6/, dist/compliance/3.2.6/ and the signed
  dist/protocol/3.2.6.tgz{,.crt,.sha256,.sig} tuple, byte-identical to the tag.
- CHANGELOG.md: the 3.2.6 block, verbatim from the tag, inserted below main's
  3.3.0-beta.0 section. (The workflow's take-3.2.x rule would have dropped
  that section.)
- static/compliance/published-versions.json: register 3.2.6, matching the
  3.2.x manifest.
- dist/schemas/index.json and latest.json: regenerated by build:schemas;
  latest_stable, v3 and v3.2 now 3.2.6. main's 3.3.0-beta.0 entry and v3.0
  (3.0.28) are kept; taking 3.2.x's copy would have regressed both.

The 3.2.5..3.2.6 source changes are all backports of work already on main in
its main form (adcontextprotocol#8335, adcontextprotocol#8402, adcontextprotocol#8218, adcontextprotocol#8216, adcontextprotocol#8341/adcontextprotocol#8387, adcontextprotocol#8327/adcontextprotocol#8334, adcontextprotocol#8260,
adcontextprotocol#8261, adcontextprotocol#8263, adcontextprotocol#8244), so no 3.2.x source is taken. The second parent records
that reconciliation so the next 3.2.x forward merge does not re-conflict on it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

provenance_truth_of_claim: the seeded verifier can't be called and both fixture images don't exist, so 3/3 requires recognizing the fixture

2 participants