Skip to content

feat(training-agent): implement provenance enforcement (provenance_requirements + accepted_verifiers + PROVENANCE_* codes)#3779

Draft
bokelley wants to merge 2 commits intomainfrom
claude/issue-3777-provenance-enforcement
Draft

feat(training-agent): implement provenance enforcement (provenance_requirements + accepted_verifiers + PROVENANCE_* codes)#3779
bokelley wants to merge 2 commits intomainfrom
claude/issue-3777-provenance-enforcement

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 1, 2026

Closes #3777

Implements creative_policy.{provenance_required, provenance_requirements, accepted_verifiers} enforcement in the training agent so the creative_sales_agent/provenance_enforcement conformance storyboard passes (was failing 3 of 5 step validations).

Changes

handleGetProducts (task-handlers.ts)

Seeded products (from comply_test_controller seed_product) are now included in get_products responses via overlaySeededProducts. Previously only the static catalog was used. Seeded products that score zero on brief-mode keyword matching (they have no name/description by default) are prepended to the result so storyboard field_value checks on products[0].creative_policy.* pass.

handleSyncCreatives (task-handlers.ts)

Structural provenance enforcement derived from all seeded products' creative_policy. Checks run in spec order before persisting each creative:

  1. Verifier allowlist (PROVENANCE_VERIFIER_NOT_ACCEPTED) — fires first per spec "cross-check before any outbound call" requirement; compares canonicalized verify_agent.agent_url against the accepted set
  2. Presence (PROVENANCE_REQUIRED) — fires when provenance_required: true and no provenance object
  3. Field-level (PROVENANCE_DIGITAL_SOURCE_TYPE_MISSING, PROVENANCE_DISCLOSURE_MISSING, PROVENANCE_EMBEDDED_MISSING) — gated on provenance_required: true per spec MUST-ignore rule for provenance_requirements when provenance_required is false/absent; short-circuits at first failure

Per-creative failures use action: 'failed' with errors[] (already in the sync-creatives-response.json schema enum; not persisted to session).

SyncCreativeResult type widened to include 'failed' and optional errors.

run-storyboards.ts

Removes creative_sales_agent/provenance_enforcement from KNOWN_FAILING_STORYBOARDS.

Non-breaking justification

Adds enforcement only when seeded products have provenance_required: true in creative_policy. Static catalog products have no such field. Sessions without seeded products are unaffected — hasProvenancePolicy is false and the enforcement block is a no-op. The action: 'failed' path was already defined in the schema.

Known simplification

sync_creatives has no product_id field, so per-product enforcement is not possible. acceptedVerifiers uses union semantics across all seeded products — documented in a code comment. In single-product storyboards (the typical case) union === intersection.

Out of scope / follow-up needed

  • .github/workflows/training-agent-storyboards.yml thresholds (min_clean_storyboards, min_passing_steps) need a human bump after this merges — the routine cannot edit .github/**. The storyboard adds 4 steps (1 new clean storyboard).
  • PROVENANCE_CLAIM_CONTRADICTED (truth-of-claim via get_creative_features against an on-list governance agent) is out of scope per the issue; the structural-rejection codes are sufficient to make the storyboard pass.

Pre-PR review

  • code-reviewer: approved — no blockers; two nits noted above (provenance_requirements MUST-ignore rule fixed before this PR opened; accurate field path for watermarks vs embedded_provenance fixed before this PR opened)
  • ad-tech-protocol-expert: approved — non-breaking per spec; enforcement logic, field paths, check ordering, and disclosure check condition all correct

Triage-managed PR. This bot does not currently iterate on
review comments or PR conversation threads (only on the source
issue). To unblock:

  • Push fixup commits directly: gh pr checkout <num>
    fix → push.
  • Or re-trigger: comment /triage execute on the source
    issue.

See #3121
for context.

Session: https://claude.ai/code/session_013AgZkVzoaN9YBEJp3FeBk8


Generated by Claude Code

claude added 2 commits May 1, 2026 20:06
Surface seeded creative_policy fields in get_products, enforce
provenance_requirements / accepted_verifiers on sync_creatives, remove
creative_sales_agent/provenance_enforcement from KNOWN_FAILING_STORYBOARDS.

https://claude.ai/code/session_013AgZkVzoaN9YBEJp3FeBk8
…red; accurate field paths

Per spec MUST-ignore rule: only extract provenance_requirements when
provenance_required === true. Fix verify_agent field path to name the
correct sub-array (embedded_provenance vs watermarks) on rejection.

https://claude.ai/code/session_013AgZkVzoaN9YBEJp3FeBk8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-triaged Issue has been triaged by the Claude Code triage routine. Remove to re-triage.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Training agent: implement provenance enforcement (provenance_requirements + accepted_verifiers + PROVENANCE_* codes)

2 participants