Module adcp.types.domains.creative.audit_observation
Classes
class ClaimedValue (**data: Any)-
Expand source code
class ClaimedValue(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) human_oversight: Annotated[ HumanOversight, Field(description='Human oversight level declared by the creative provenance.'), ] disclosure_required: Annotated[ Literal[False], Field(description='Disclosure-required claim declared by the creative provenance.'), ]Base model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var disclosure_required : Literal[False]var human_oversight : HumanOversightvar model_config
Inherited members
class CreativeAuditObservation (**data: Any)-
Expand source code
class CreativeAuditObservation(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) code: Annotated[ Literal['OVERSIGHT_DISCLOSURE_CARVEOUT_CLAIMED'], Field( description='Machine-readable observation code. `OVERSIGHT_DISCLOSURE_CARVEOUT_CLAIMED` means provenance declares `human_oversight` as `edited` or `directed` while also declaring `disclosure.required: false`; the verifier is surfacing the carve-out claim for audit, not adjudicating it.' ), ] = 'OVERSIGHT_DISCLOSURE_CARVEOUT_CLAIMED' severity: Annotated[ Literal['audit-worthy'], Field( description='Routing severity. `audit-worthy` means the observation should be retained and may be routed to human or downstream audit review, but it is not a protocol rejection signal.' ), ] = 'audit-worthy' recovery: Annotated[ Literal['informational'], Field( description='Caller recovery category for audit observations, distinct from the canonical error-code recovery enum. `informational` means the creative can continue through the normal flow; the observation is audit context rather than a required correction.' ), ] = 'informational' field: Annotated[ str, Field( description='Resolved creative manifest path for the risky claim side of the observation, for example `creative_manifest.provenance.disclosure.required`. Some observations are triggered by a combination of fields; `field` anchors the primary claim, not necessarily every field in the trigger condition.' ), ] message: Annotated[ str, Field( description='Human-readable summary suitable for an audit queue. Do not include PII, cross-tenant data, or vendor-only report details.' ), ] details: Annotated[ Details, Field( description='Audit-safe structured details. Mirrors the safe allowlist keys used for `PROVENANCE_CLAIM_CONTRADICTED`; value shapes remain observation-specific. Top-level `ext` remains the standard protocol extension point, but details do not allow arbitrary verifier response fields.' ), ] ext: ext_1.ExtensionObject | None = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var code : Literal['OVERSIGHT_DISCLOSURE_CARVEOUT_CLAIMED']var details : Detailsvar ext : ExtensionObject | Nonevar field : strvar message : strvar model_configvar recovery : Literal['informational']var severity : Literal['audit-worthy']
Inherited members
class Details (**data: Any)-
Expand source code
class Details(AdCPBaseModel): model_config = ConfigDict( extra='forbid', ) agent_url: Annotated[ AnyUrl, Field(description='Governance agent URL that produced the observation.') ] feature_id: Annotated[ str | None, Field(description='Feature or policy check that produced the observation.') ] = None claimed_value: Annotated[ ClaimedValue, Field( description='Compact object of claimed provenance values that triggered the observation.' ), ] observed_value: Annotated[ StrictBool | StrictFloat | str | None, Field(description='Verifier observation relevant to the claim, when applicable.'), ] = None confidence: Annotated[ StrictFloat | None, Field(description='Confidence score for the observation, when applicable.', ge=0.0, le=1.0), ] = None substituted_for: Annotated[ AnyUrl | None, Field( description='Buyer-nominated verifier URL when the seller or orchestrator used a different on-list governance agent.' ), ] = NoneBase model for AdCP types with spec-compliant serialization.
Defaults to
extra='ignore'so unknown fields from newer spec versions are silently dropped rather than causing validation errors. Generated types whose schemas setadditionalProperties: trueoverride this withextra='allow'in their ownmodel_config.Set
ADCP_STRICT_VALIDATION=1in the environment ("1","true","yes","on"are accepted) to flip the default toextra='forbid'. Use this during spec upgrades to catch silently-dropped renamed fields in tests. See :func:_resolve_extra_policy.Important
The env var is resolved once at module import time. Set it in your shell or CI environment before
import adcpruns — mutatingos.environ["ADCP_STRICT_VALIDATION"]after the firstadcpimport has no effect on already-imported model classes (they captured the policy at class-body evaluation).Consumers who want per-model strict validation can override
model_configon their subclass.Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- AdCPBaseModel
- pydantic.main.BaseModel
Class variables
var agent_url : pydantic.networks.AnyUrlvar claimed_value : ClaimedValuevar confidence : float | Nonevar feature_id : str | Nonevar model_configvar observed_value : str | float | bool | Nonevar substituted_for : pydantic.networks.AnyUrl | None
Inherited members
class HumanOversight (*args, **kwds)-
Expand source code
class HumanOversight(StrEnum): edited = 'edited' directed = 'directed'Enum where members are also (and must be) strings
Ancestors
- enum.StrEnum
- builtins.str
- enum.ReprEnum
- enum.Enum
Class variables
var directedvar edited