From aeed09f27d9d1f3649282dd94c885850af3ca27e Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Tue, 10 Nov 2026 16:19:58 -0800 Subject: [PATCH 1/4] feat(spec): freeze attachment v1 contract Define neutral schemas, deny-wins conformance tables, and shared fixtures for the feature-off Python voice foundation. Include schema, negative-control, and synthetic HTTP validators without runtime SDK or backend implementation. Co-Authored-By: Claude Code --- .github/workflows/attachment-contracts.yml | 35 + spec/attachments/v1/README.rst | 313 + spec/attachments/v1/constants.json | 36 + spec/attachments/v1/contract.schema.json | 2063 +++++ spec/attachments/v1/identity-fixtures.json | 52 + spec/attachments/v1/lifecycle-fixtures.json | 180 + spec/attachments/v1/openapi.json | 2102 +++++ spec/attachments/v1/otel-schema-pin.json | 16 + spec/attachments/v1/privacy-fixtures.json | 5758 +++++++++++++ spec/attachments/v1/privacy-table.json | 1352 +++ spec/attachments/v1/requirements.txt | 2 + spec/attachments/v1/scope-fixtures.json | 95 + spec/attachments/v1/security-fixtures.json | 8221 +++++++++++++++++++ spec/attachments/v1/security-table.json | 918 +++ spec/attachments/v1/test_contract.py | 182 + spec/attachments/v1/test_protocol.py | 110 + spec/attachments/v1/validate.py | 228 + spec/attachments/v1/wire-fixtures.json | 3318 ++++++++ 18 files changed, 24981 insertions(+) create mode 100644 .github/workflows/attachment-contracts.yml create mode 100644 spec/attachments/v1/README.rst create mode 100644 spec/attachments/v1/constants.json create mode 100644 spec/attachments/v1/contract.schema.json create mode 100644 spec/attachments/v1/identity-fixtures.json create mode 100644 spec/attachments/v1/lifecycle-fixtures.json create mode 100644 spec/attachments/v1/openapi.json create mode 100644 spec/attachments/v1/otel-schema-pin.json create mode 100644 spec/attachments/v1/privacy-fixtures.json create mode 100644 spec/attachments/v1/privacy-table.json create mode 100644 spec/attachments/v1/requirements.txt create mode 100644 spec/attachments/v1/scope-fixtures.json create mode 100644 spec/attachments/v1/security-fixtures.json create mode 100644 spec/attachments/v1/security-table.json create mode 100644 spec/attachments/v1/test_contract.py create mode 100644 spec/attachments/v1/test_protocol.py create mode 100644 spec/attachments/v1/validate.py create mode 100644 spec/attachments/v1/wire-fixtures.json diff --git a/.github/workflows/attachment-contracts.yml b/.github/workflows/attachment-contracts.yml new file mode 100644 index 000000000..d8a9de3ca --- /dev/null +++ b/.github/workflows/attachment-contracts.yml @@ -0,0 +1,35 @@ +name: Attachment contracts + +on: + pull_request: + branches: [dev, main] + paths: + - 'spec/attachments/**' + - '.github/workflows/attachment-contracts.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + conformance: + name: Attachment v1 conformance + runs-on: ubuntu-24.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} + persist-credentials: false + - name: Install isolated fixture validator dependencies + run: | + python3 -m venv "$RUNNER_TEMP/attachment-contract" + "$RUNNER_TEMP/attachment-contract/bin/python" -m pip install -r spec/attachments/v1/requirements.txt + - name: Validate shared fixtures and contract unit tests without egress + run: | + sudo unshare --net -- "$RUNNER_TEMP/attachment-contract/bin/python" -I spec/attachments/v1/validate.py + sudo unshare --net -- "$RUNNER_TEMP/attachment-contract/bin/python" -I spec/attachments/v1/test_contract.py + - name: Validate synthetic HTTP protocol with loopback only + run: | + sudo unshare --net -- bash -c 'ip link set lo up; exec "$@"' bash \ + "$RUNNER_TEMP/attachment-contract/bin/python" -I spec/attachments/v1/test_protocol.py diff --git a/spec/attachments/v1/README.rst b/spec/attachments/v1/README.rst new file mode 100644 index 000000000..d8ef193d4 --- /dev/null +++ b/spec/attachments/v1/README.rst @@ -0,0 +1,313 @@ +Attachment contract v1 +====================== + +Use these schemas and fixtures to implement interoperable attachment producers, +ingestion, storage and viewers without placing media bytes in OTLP. + +This directory freezes ``fi.attachments.v1``. It contains contracts and test-only +validators, not an uploader, recorder, media service or integration-support badge. +The first delivery is Python voice. Image/video/document enum values and privacy +fixtures reserve the shared vocabulary; they do not enable those integrations. + +Contract files +-------------- + +* ``contract.schema.json``: JSON Schema 2020-12 definitions. Select a ``$defs`` + member, not the permissive document root, when validating a payload. +* ``openapi.json``: OpenAPI 3.1 control, import, upload, occurrence, manifest and + authenticated playback routes. Paths have no trailing slash. The trusted + control origin is configured separately from OTLP; never derive it from tool + output or append these paths to an arbitrary collector origin. +* ``constants.json``: semantic names, byte ceilings and bounded default budgets. +* ``privacy-table.json`` and ``security-table.json``: ordered, executable + deny predicates using ordinary JSON Schema. Unknown or missing facts deny. +* ``*-fixtures.json``: shared expected results, consumable by Python, TypeScript, + Go ingestion and the backend without importing a runtime SDK. +* ``otel-schema-pin.json``: immutable OTel schema revision and digests. The + message URI is a custom ``GenericPart`` extension at that revision, not a + standardized upload protocol or provider-readable URL. Existing semantic + convention defaults are unchanged. + +Schemas are closed: unlisted members are rejected, not silently retained. +Implementations also enforce the cross-field/serialization rules below; JSON +Schema ``contentSchema`` is an annotation, not automatic inner-JSON validation. +A schema-valid capability claim is not a verified capability: signature, issuer, +audience, expiry, current authority and exact bindings must all be checked by +its issuer/consumer. These files define claims, not a new token signing format. + +Identity and span projection +---------------------------- + +A trace is the same nonzero 16 bytes in both spellings: lowercase 32-hex in SDKs, +lowercase dashed UUID in API responses/storage. API requests accept either +spelling. Normalize by inserting dashes, never by generating a UUID or changing +version/variant bits. Span IDs are nonzero lowercase 16-hex. Public attachment +and occurrence IDs are canonical nonzero lowercase UUIDs, scoped rather than +globally authoritative. Uppercase, malformed and all-zero IDs are rejected. + +A span carries ``fi.attachment.schema_version=1`` and ``fi.attachment.refs`` as a +JSON string containing ``Reference[]``. Parse the string strictly: reject duplicate +JSON members, duplicate occurrence IDs, unknown fields, invalid identities, +MIME/modality mismatches, more than 64 entries or more than 16,384 UTF-8 bytes. +Project only an admitted bounded prefix; the scoped listing is authoritative +for the rest. A denied capture emits no reference, filename, hash, placeholder +or source-derived count. Unknown reference versions are unsupported; they never +fall through to a legacy URL renderer. + +The optional paired attributes ``fi.attachment.capture_session_id`` and +``fi.attachment.correlation_nonce`` carry nonsecret correlation only. Ingestion +must verify the authenticated writer and stamp the exact session/trace/span +binding server-side. IDs or the nonce alone are never association authority. +An adapter uses the actual emitted span identity, not a later ambient span. +Ended spans are not mutated or held open while upload completes. + +``MessageURI`` uses ``fi-attachment:``. It resolves an occurrence, +not the potentially shared attachment/blob. Reference metadata permits only +bounded direction, modality, MIME, purpose, message-part, role, channel and +opaque conversation/turn/tool correlation. Correlation IDs must be application +identifiers, never human names, URLs, filenames or free text. The allowlist cannot +establish their semantic safety; adapters must establish provenance before use. + +Python capture surface +---------------------- + +The shared manager contract is:: + + attach(span_or_context, source, *, mime_type, direction, purpose=None, + conversation_id=None, turn_id=None, tool_call_id=None, + message_index=None, part_index=None, role=None, channel=None) + start_attachment_stream(context, options) # try_write / finish / abort + +Sources are discriminated ``Bytes``, ``Blob``, ``RemoteUrl``, ``LocalFile``, +``OwnedRecordingFile`` or ``ProviderFile``. Never infer a path/URL from an arbitrary +string or recursively scrape objects. The returned handle has stable client +attachment/occurrence UUIDs, a safe admission reason and nonthrowing completion. +``queued`` is not stored, validated, bound or readable. The handle's private IDs +must not be projected for a denied operation. + +One manager belongs to the configured provider. Explicit capture, auto and +adapters share it and its policy. Admit before copying, decoding, hashing or +retrieval. Unknown ownership is unsupported; instrumentation never advances +caller streams/file positions or creates an eager clone/tee. Bounded owned copies +are permitted only after admission. Flush/shutdown are idempotent and deadline +bounded; they preserve host signal handlers. Hard exit can lose unfinished data. + +Privacy evaluation +------------------ + +Attachments are OFF by default. Creating audio and video recordings has separate +OFF switches. Importing an already-produced recording does not start a recorder. +Enabling attachments grants neither arbitrary filesystem/network access nor +ambient microphone, screen, browser, paid Egress or provider-credential access. + +The table consumes trusted normalized policy/provenance facts. It is not a +request body a caller can use to assert its own authorization. Evaluate server +restriction, credential/session scope, integration restrictions, all directional +and content hide flags, PII/metadata requirements, modality/source policy and +per-call request. Any denial wins. The ordered first matching denial chooses only +the safe diagnostic reason; a lower opt-in cannot override a higher denial. + +Semantic ancestry is monotone. Tool-output screenshots intended as model input +inherit input-image/input-text restrictions. ``mixed`` includes both directions +even if a caller mislabels an ancestry boolean. Hiding either side denies a mixed +recording. A genuinely isolated permitted track can be captured independently; +uploading a mix and hiding a UI track is not removal. Qualified adapters derive +these facts, and backend policy remains independently authoritative. + +Text-only PII scanning is not audio, pixel or PDF sanitization. With PII redaction +on, raw opaque media is denied unless a qualified client-side sanitizer satisfies +the policy. The separately informed ``allow_unredacted_media_with_text_pii`` +exception needs both explicit client configuration and server permission; it +never overrides mandatory server media redaction. Quarantine-side redaction is +too late to meet a pre-egress rule. Required metadata removal likewise needs a +qualified pre-egress transform. No OCR/transcription service is enabled implicitly. + +Do not export default filenames, speaker names, authors, EXIF/GPS/tags or arbitrary +source metadata in spans, lists, audits or diagnostics. Use generic display labels +and session-local roles/tracks. Originals can contain embedded metadata; setup +must disclose this and deny when required removal cannot be done before egress. +Inline base64 image limits remain zero independently of attachment opt-in. + +Recheck before read, upload, retry and serve. Tightening discards queued owned +bytes and revokes capabilities/readability. Re-enabling does not resurrect them. +Unknown bootstrap policy retains no bytes. No authorization/policy/validation +retry; bounded transport retry retains the same upload and remaining reservation. + +Control and transfer protocol +----------------------------- + +``POST /tracer/v1/attachment-sessions`` negotiates v1, finite limits and source +permissions. It shares ingestion's exact organization/workspace/name/type project +resolution, uniqueness and reserved-project behavior. Invalid explicit workspace +never falls back; a legacy default must be the same single authorized active +workspace as ingestion. Project-version ID is not project ID. Ambiguity fails +``scope_unresolved``. Project creation requires existing ingestion authority. +The bootstrap request asks for no manually supplied project UUID. + +Do not broaden generic API-key authentication. Restricted ingest/coding-agent +keys need explicit attachment-write eligibility through a narrow broker. Viewer +keys cannot upload. Write capabilities are bound to issuer-verified actor, full +scope, session, exact parent and upload/occurrence IDs, current policy/deletion +generation, bytes, operations and expiry. They grant only create/upload/complete/ +abort and content-free own-job status: no list, resolve, download, arbitrary +relink, delete-existing or provider-connection access. Browser capabilities and +origins require separate qualification; v1 Wave A adds no browser upload mode. + +Under ``/tracer/v1/projects/{project_id}/attachments``: + +* ``POST /uploads`` authenticates the explicitly eligible original identity, + reserves capacity idempotently and returns the secret upload-bound + ``write_capability``. Do not log/cache/export that response. Subsequent content, + complete, abort and status requests use that capability in the Authorization + header. ``PUT /uploads/{upload_id}/content`` transfers bounded bytes with exact + reserved Content-Length. Do not redirect or log request bodies. Streaming is + the only negotiated mode in this freeze. +* ``POST /uploads/{upload_id}/complete`` requests validation, not readiness. + Server-only multipart completion and immutable validation follow. ``/abort`` + releases this job once; ``GET /status`` exposes only safe state/reason. +* ``POST /imports`` accepts an opaque encrypted-source-envelope reference or an + already registered provider output/connection, never a raw URL, path, arbitrary + headers or provider credentials. Source-envelope creation/resolution belongs + to an independently authorized trusted importer, not the generic import body. +* ``POST /occurrences`` requires ordinary scoped authority over both readable + source and target. ``GET /occurrences`` is paginated and trace-scoped. +* ``POST /resolve`` authorizes each occurrence and expected parent separately. + It is a read-only handler, never a read-only exemption on mutation classes. +* ``DELETE /occurrences/{occurrence_id}`` tombstones only that association. + Whole-attachment deletion is not exposed by this capability/API freeze. +* ``PUT /recordings/{recording_id}/manifest`` is recording completion metadata, + authorized only for the capability's registered recording and exact associated + segment occurrences (the ``complete`` operation). It cannot relink arbitrary + occurrences. The read handler checks expected parent and every surviving link. + +Every lookup, uniqueness key, reservation, job, provider connection, cache and +idempotency decision includes full resolved organization/workspace/project scope +and relevant parent/actor/session/operation. Normalize identities before comparing +requests; reject duplicate JSON members. Same scoped key plus identical normalized +request replays; changed request conflicts. Repeated public IDs across tenants +remain distinct. Unauthorized and nonexistent foreign objects are indistinguishable; +batches never inherit the first item's authorization. Error bodies contain safe +codes and request IDs, never raw exceptions or supplied values. + +The schema caps standalone uploads at 50 MiB, images at 20 MiB and recording +segments at 8 MiB AND 30 seconds. Recordings stop at 1 GiB OR 120 minutes with an +explicit truncation gap. Manifests are at most 1 MiB of serialized UTF-8 and use +bounded update windows; reaching a bound is incomplete, not silent omission. +Server/global admission also reserves decoded resources, parts, objects and links. +Unknown budgets fail readiness. Numeric schema ceilings are safety envelopes, +not billing/edition limits or promised achievable recording lengths. + +Nine mandatory security boundaries +---------------------------------- + +1. **Private storage.** Use a distinct private bucket/provisioning path, never a + new prefix under legacy public media helpers. Verify public-access blocking, + encryption, IAM, ACL/CORS and lifecycle/backend primitives at startup. Original, + quarantine and derivative anonymous GET/HEAD/Range must all fail. Unverifiable + storage prevents readiness; legacy behavior is not globally changed. +2. **Narrow identities.** Attachment-specific eligibility and exact scoped writer + binding replace ID-based trust. A write capability cannot acquire read or + provider-connection authority. Public/shared trace links confer no media access. +3. **PII intersection.** Enforce the preceding deny-wins rules before egress, + including metadata and opaque modalities, and independently on the server. +4. **Immutable promotion.** Validate a fixed quarantine generation or immutable + snapshot, then server-only promote those exact verified bytes. Store immutable + version, verified length/MIME/hash internally; never expose object keys/hashes + in the public metadata schema. No client can overwrite serving identities. + Replay after deletion cannot resurrect data; keep fences through capability + expiry plus accepted transfer duration and sweep late writes/versions/parts. + Direct upload remains disabled until backend-specific guarantees qualify. +5. **Complete scope.** Occurrences, not blob IDs, authorize access. Deduplicate only + verified bytes in the same project with compatible policy/retention; no hash + existence oracle. Relinks and ancestor listings cannot bypass child policy. +6. **Safe retrieval.** SDK and importer both require approved HTTPS provenance, + checking all A/AAAA answers, denying private/reserved/metadata destinations, + pinned-IP TLS hostname verification and revalidation of every bounded redirect. + No ambient cookies, netrc, arbitrary headers or environment proxies. Do not + forward secrets across origins. Secret URLs live only in encrypted envelopes + for <=10 minutes, bounded by source expiry; queues/history/retries/dead letters + contain only opaque references. Browser automatic RemoteUrl fetch is denied. +7. **Session-bound playback.** Resolution returns only the same-origin gateway. + Media session PLUS an occurrence/representation grant binds the original + viewer/application session/scope/parent/policy/generation/expiry and GET/HEAD. + A copied grant under another session fails. Exchange/mutations use CSRF and + exact Origin; cookies are host-only Secure HttpOnly SameSite=Strict with narrow + media path. No wildcard credentialed CORS. Reauthorize GET/HEAD/Range/conditional + before 200/206/304 and cached metadata; private,no-store is mandatory. Logout, + revocation and deletion deny subsequent requests; open streams recheck within + the qualified <=5s bound. Downloaded/browser-buffered bytes cannot be recalled. +8. **Source retention.** Occurrence expiry is derived from authoritative source + trace/session lineage, never upload time, relink time or untrusted event time. + Unknown finite-retention provenance denies. Unbound jobs expire within 24 hours + or sooner with the source. Deletion generations fence initialization, binding, + validation, promotion, derivatives and retries. Wire every trace/session and + tenant deletion/retention path, including ClickHouse-only sources and enterprise + sweeps. Outbox cleanup covers versions, derivatives, temp files, parts and caches; + backups need expiry and restore tombstone replay, not an instant-erasure claim. +9. **Aggregate and decoder bounds.** Enforce atomic project/org/global reservations, + rate/egress/concurrency/response/time bounds, settlement exactly once and bounded + tombstones. Decoders are credential-free, network-disabled, read-only-input + isolated workers with memory/CPU/time/disk/FD/protocol limits. A timeout around an + unrestricted decoder is insufficient. Probe actual MIME/expansion/duration/ + channels and corruption. Never execute HTML/SVG; active document previews need + separately sandboxed inert derivatives. + +Recording and late-arrival truth +-------------------------------- + +Upload lifecycle, occurrence binding and capture completeness are separate. +``ready`` bytes become readable only with a live, retained, authorized, observed +binding. A root arriving after upload can release quarantined bytes without an SDK +retry. Missing/tail-sampled roots never become readable. Terminal deletion/expiry +cannot be reversed by late validation or binding. + +``RecordingManifest`` records session-relative milliseconds, sample format/rate, +codec/container, actual channel/track roles, ordered segment occurrences, gaps and +playout evidence. Channel indexes cover each channel once; segment indexes are +contiguous and ordered by start time. Segments and explicit gaps cover the full +duration without overlaps. For ``separate_tracks``, each segment and gap includes +its ``track_id`` and coverage is checked independently per track; simultaneous +segments on different tracks are valid. Other layouts use one shared timeline +and omit per-segment track IDs. Every interval stays within the declared duration. +``capture_complete=true`` forbids capture gaps. A playable partial recording can +still have ``state=ready``. Unknown playout is labelled unknown, not asserted heard. +Mixed direction is mixed; left channel is never implicitly the customer. + +Pipecat binding observes an application's existing processor without starting it; +creating one needs the separate recording opt-in and explicit pipeline/session +hookup. LiveKit report paths alone confer no filesystem authority: binding must +establish a trusted session-owned regular-file lease, no-follow traversal and an +independent reader held through bounded finalization. Egress start/stop is not +completion. Only authorized terminal outputs, or explicitly labelled allowed +partials, are importable. Exact upstream versions and real-session evidence belong +to adapter qualification, not this schema freeze. + +New recordings use server-produced playable channel derivatives and bounded peaks. +They must bypass whole-file browser stereo decode/splitting. Grant renewal preserves +seek; mixed and multitrack playback expose the same play/pause/seek/time/events +interface. New occurrence IDs never fall back to legacy URLs. Legacy playback is +a separate compatibility/security tier, not retroactively private or revocable. + +Conformance and revisions +------------------------- + +Run on an isolated cloud runner, not in an application process:: + + python3 -m pip install -r spec/attachments/v1/requirements.txt + python3 -I spec/attachments/v1/validate.py + python3 -I spec/attachments/v1/test_contract.py + python3 -I spec/attachments/v1/test_protocol.py + +The validator never fetches remote schemas. Unit tests include deletion of every +privacy/security rule as a negative control. The synthetic loopback protocol test +checks HTTP schema composition and nonreflection of invalid canary fields; it does +not qualify production auth, storage, decoders, networking, providers or playback. +Those boundaries require the same fixtures against real implementations plus the +integrated security and voice gates. No component can claim support from fixture +success or a registry entry alone. + +Consumers pin the exact contract commit and retain fixture IDs/expectations. +Changes to wire shapes, defaults, semantic facts, limits or expected outcomes need +an explicit contract revision and coordinated consumer updates; do not silently +weaken a predicate to make an implementation pass. Local fixture validators are +reference oracles, not production authorization libraries. diff --git a/spec/attachments/v1/constants.json b/spec/attachments/v1/constants.json new file mode 100644 index 000000000..5993d422a --- /dev/null +++ b/spec/attachments/v1/constants.json @@ -0,0 +1,36 @@ +{ + "contract": "fi.attachments.v1", + "schema_version": 1, + "span_attributes": { + "version": "fi.attachment.schema_version", + "references": "fi.attachment.refs", + "session": "fi.attachment.capture_session_id", + "correlation": "fi.attachment.correlation_nonce" + }, + "uri_prefix": "fi-attachment:", + "projection": { + "max_entries": 64, + "max_utf8_bytes": 16384 + }, + "sdk": { + "descriptors": 128, + "owned_bytes": 33554432, + "workers": 2, + "stream_buffer_bytes": 262144, + "transfer_attempts": 3, + "shutdown_seconds": 5, + "finalization_seconds": 30 + }, + "source_envelope_ttl_seconds": 600, + "unbound_ttl_seconds": 86400, + "organization_limits": { + "active_transfers": 32, + "active_recordings": 8, + "reserved_bytes": 2147483648, + "validation_jobs": 2048, + "initializations_per_minute": 240 + }, + "manifest_max_utf8_bytes": 1048576, + "default_transfer_mode": "authenticated_stream", + "default_cache_control": "private, no-store" +} diff --git a/spec/attachments/v1/contract.schema.json b/spec/attachments/v1/contract.schema.json new file mode 100644 index 000000000..0ea22efee --- /dev/null +++ b/spec/attachments/v1/contract.schema.json @@ -0,0 +1,2063 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/future-agi/traceAI/dev/spec/attachments/v1/contract.schema.json", + "title": "fi.attachments.v1", + "description": "Normative closed wire shapes. Cross-field authorization and byte limits also require the conformance tables. This is not an implementation or support declaration.", + "$defs": { + "UUID": { + "type": "string", + "pattern": "^(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "maxLength": 36 + }, + "TraceInput": { + "type": "string", + "oneOf": [ + { + "pattern": "^(?!0{32}$)[0-9a-f]{32}$", + "maxLength": 32 + }, + { + "$ref": "#/$defs/UUID" + } + ] + }, + "SpanID": { + "type": "string", + "pattern": "^(?!0{16}$)[0-9a-f]{16}$", + "maxLength": 16 + }, + "Token": { + "type": "string", + "pattern": "^[a-zA-Z0-9_-]{1,128}$", + "maxLength": 128 + }, + "SafeInteger": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "Timestamp": { + "type": "string", + "format": "date-time", + "maxLength": 40 + }, + "Direction": { + "enum": [ + "input", + "output", + "mixed" + ] + }, + "Modality": { + "enum": [ + "audio", + "image", + "video", + "document", + "file" + ] + }, + "MIME": { + "enum": [ + "audio/wav", + "audio/ogg", + "audio/mpeg", + "audio/mp4", + "audio/webm", + "audio/flac", + "audio/L16", + "image/png", + "image/jpeg", + "image/webp", + "video/mp4", + "video/webm", + "application/pdf", + "application/octet-stream" + ] + }, + "Purpose": { + "enum": [ + "conversation_recording", + "turn_recording", + "model_input", + "model_output", + "tool_result", + "computer_screenshot", + "diagnostic", + "document" + ] + }, + "SourceKind": { + "enum": [ + "Bytes", + "Blob", + "RemoteUrl", + "LocalFile", + "OwnedRecordingFile", + "ProviderFile" + ] + }, + "Status": { + "enum": [ + "pending_upload", + "importing", + "validating", + "ready", + "failed", + "rejected", + "expired", + "deleted" + ] + }, + "Reason": { + "enum": [ + "queued", + "disabled", + "bootstrap_pending", + "policy_denied", + "credential_scope_unsupported", + "source_unavailable", + "unsampled", + "too_large", + "queue_full", + "unsupported_version", + "endpoint_unconfigured", + "scope_unresolved", + "correlation_unavailable", + "redaction_unavailable", + "recording_disabled", + "binding_pending", + "not_found", + "conflict", + "throttled", + "validation_failed", + "expired", + "deleted", + "incomplete", + "ready" + ] + }, + "Scope": { + "type": "object", + "additionalProperties": false, + "required": [ + "organization_id", + "workspace_id", + "project_id" + ], + "properties": { + "organization_id": { + "$ref": "#/$defs/UUID" + }, + "workspace_id": { + "$ref": "#/$defs/UUID" + }, + "project_id": { + "$ref": "#/$defs/UUID" + } + } + }, + "Parent": { + "type": "object", + "additionalProperties": false, + "required": [ + "trace_id", + "span_id" + ], + "properties": { + "trace_id": { + "$ref": "#/$defs/TraceInput" + }, + "span_id": { + "$ref": "#/$defs/SpanID" + } + } + }, + "Association": { + "type": "object", + "additionalProperties": false, + "required": [ + "capture_session_id", + "correlation_nonce", + "parent" + ], + "properties": { + "capture_session_id": { + "$ref": "#/$defs/UUID" + }, + "correlation_nonce": { + "$ref": "#/$defs/UUID" + }, + "parent": { + "$ref": "#/$defs/Parent" + } + } + }, + "Reference": { + "type": "object", + "additionalProperties": false, + "required": [ + "attachment_id", + "occurrence_id", + "direction", + "modality", + "mime_type" + ], + "properties": { + "attachment_id": { + "$ref": "#/$defs/UUID" + }, + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "direction": { + "$ref": "#/$defs/Direction" + }, + "modality": { + "$ref": "#/$defs/Modality" + }, + "mime_type": { + "$ref": "#/$defs/MIME" + }, + "purpose": { + "$ref": "#/$defs/Purpose" + }, + "message_index": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "part_index": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "role": { + "enum": [ + "user", + "assistant", + "tool", + "system", + "unknown" + ] + }, + "channel": { + "type": "integer", + "minimum": 0, + "maximum": 31 + }, + "conversation_id": { + "$ref": "#/$defs/Token" + }, + "turn_id": { + "$ref": "#/$defs/Token" + }, + "tool_call_id": { + "$ref": "#/$defs/Token" + } + }, + "allOf": [ + { + "if": { + "properties": { + "modality": { + "const": "audio" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "audio/wav", + "audio/ogg", + "audio/mpeg", + "audio/mp4", + "audio/webm", + "audio/flac", + "audio/L16" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "image" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "image/png", + "image/jpeg", + "image/webp" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "video" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "video/mp4", + "video/webm" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "document" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "application/pdf" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "file" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "application/octet-stream" + ] + } + } + } + } + ] + }, + "References": { + "type": "array", + "maxItems": 64, + "items": { + "$ref": "#/$defs/Reference" + }, + "uniqueItems": true + }, + "SpanAttributes": { + "type": "object", + "additionalProperties": false, + "required": [ + "fi.attachment.schema_version", + "fi.attachment.refs" + ], + "properties": { + "fi.attachment.schema_version": { + "const": 1 + }, + "fi.attachment.refs": { + "type": "string", + "maxLength": 16384, + "contentMediaType": "application/json", + "contentSchema": { + "$ref": "#/$defs/References" + } + }, + "fi.attachment.capture_session_id": { + "$ref": "#/$defs/UUID" + }, + "fi.attachment.correlation_nonce": { + "$ref": "#/$defs/UUID" + } + }, + "dependentRequired": { + "fi.attachment.capture_session_id": [ + "fi.attachment.correlation_nonce" + ], + "fi.attachment.correlation_nonce": [ + "fi.attachment.capture_session_id" + ] + } + }, + "MessageURI": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "modality", + "mime_type", + "uri" + ], + "properties": { + "type": { + "const": "uri" + }, + "modality": { + "$ref": "#/$defs/Modality" + }, + "mime_type": { + "$ref": "#/$defs/MIME" + }, + "uri": { + "type": "string", + "pattern": "^fi-attachment:(?!00000000-0000-0000-0000-000000000000$)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + "maxLength": 50 + } + }, + "allOf": [ + { + "if": { + "properties": { + "modality": { + "const": "audio" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "audio/wav", + "audio/ogg", + "audio/mpeg", + "audio/mp4", + "audio/webm", + "audio/flac", + "audio/L16" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "image" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "image/png", + "image/jpeg", + "image/webp" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "video" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "video/mp4", + "video/webm" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "document" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "application/pdf" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "file" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "application/octet-stream" + ] + } + } + } + } + ] + }, + "BootstrapRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "schema_versions", + "project_name", + "project_type", + "capture_session_id", + "correlation_nonce" + ], + "properties": { + "schema_versions": { + "type": "array", + "minItems": 1, + "maxItems": 8, + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 1, + "maximum": 65535 + } + }, + "project_name": { + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "project_type": { + "type": "string", + "minLength": 1, + "maxLength": 64 + }, + "workspace_id": { + "$ref": "#/$defs/UUID" + }, + "capture_session_id": { + "$ref": "#/$defs/UUID" + }, + "correlation_nonce": { + "$ref": "#/$defs/UUID" + } + } + }, + "Policy": { + "type": "object", + "additionalProperties": false, + "required": [ + "version", + "enabled", + "allowed_sources", + "allowed_modalities", + "require_media_redaction", + "require_metadata_removal", + "allow_unredacted_media_with_text_pii", + "record_audio", + "record_video" + ], + "properties": { + "version": { + "$ref": "#/$defs/Token" + }, + "enabled": { + "type": "boolean" + }, + "allowed_sources": { + "type": "array", + "uniqueItems": true, + "maxItems": 6, + "items": { + "$ref": "#/$defs/SourceKind" + } + }, + "allowed_modalities": { + "type": "array", + "uniqueItems": true, + "maxItems": 5, + "items": { + "$ref": "#/$defs/Modality" + } + }, + "require_media_redaction": { + "type": "boolean" + }, + "require_metadata_removal": { + "type": "boolean" + }, + "allow_unredacted_media_with_text_pii": { + "type": "boolean" + }, + "record_audio": { + "type": "boolean" + }, + "record_video": { + "type": "boolean" + } + } + }, + "Limits": { + "type": "object", + "additionalProperties": false, + "required": [ + "max_upload_bytes", + "segment_bytes", + "segment_duration_ms", + "recording_bytes", + "recording_duration_ms", + "active_transfers", + "active_recordings", + "reserved_bytes", + "validation_jobs", + "initializations_per_minute", + "links_per_minute", + "upload_bytes_per_second", + "playback_bytes_per_second", + "transfer_timeout_seconds", + "grant_ttl_seconds", + "revocation_check_seconds" + ], + "properties": { + "max_upload_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 52428800 + }, + "segment_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 8388608 + }, + "segment_duration_ms": { + "type": "integer", + "minimum": 1, + "maximum": 30000 + }, + "recording_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 1073741824 + }, + "recording_duration_ms": { + "type": "integer", + "minimum": 1, + "maximum": 7200000 + }, + "active_transfers": { + "type": "integer", + "minimum": 1, + "maximum": 16 + }, + "active_recordings": { + "type": "integer", + "minimum": 1, + "maximum": 4 + }, + "reserved_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 1073741824 + }, + "validation_jobs": { + "type": "integer", + "minimum": 1, + "maximum": 1024 + }, + "initializations_per_minute": { + "type": "integer", + "minimum": 1, + "maximum": 120 + }, + "links_per_minute": { + "type": "integer", + "minimum": 1, + "maximum": 1000 + }, + "upload_bytes_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 1073741824 + }, + "playback_bytes_per_second": { + "type": "integer", + "minimum": 1, + "maximum": 1073741824 + }, + "transfer_timeout_seconds": { + "type": "integer", + "minimum": 1, + "maximum": 600 + }, + "grant_ttl_seconds": { + "type": "integer", + "minimum": 1, + "maximum": 300 + }, + "revocation_check_seconds": { + "type": "integer", + "minimum": 1, + "maximum": 5 + } + } + }, + "BootstrapResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "schema_version", + "scope", + "capture_session_id", + "policy", + "limits", + "expires_at", + "transfer_modes" + ], + "properties": { + "schema_version": { + "const": 1 + }, + "scope": { + "$ref": "#/$defs/Scope" + }, + "capture_session_id": { + "$ref": "#/$defs/UUID" + }, + "policy": { + "$ref": "#/$defs/Policy" + }, + "limits": { + "$ref": "#/$defs/Limits" + }, + "expires_at": { + "$ref": "#/$defs/Timestamp" + }, + "transfer_modes": { + "const": [ + "authenticated_stream" + ] + } + } + }, + "UploadRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "schema_version", + "attachment_id", + "occurrence_id", + "association", + "policy_version", + "deletion_generation", + "mime_type", + "modality", + "direction", + "source_kind", + "declared_bytes" + ], + "properties": { + "schema_version": { + "const": 1 + }, + "attachment_id": { + "$ref": "#/$defs/UUID" + }, + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "association": { + "$ref": "#/$defs/Association" + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + }, + "mime_type": { + "$ref": "#/$defs/MIME" + }, + "modality": { + "$ref": "#/$defs/Modality" + }, + "direction": { + "$ref": "#/$defs/Direction" + }, + "source_kind": { + "$ref": "#/$defs/SourceKind" + }, + "purpose": { + "$ref": "#/$defs/Purpose" + }, + "declared_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 52428800 + }, + "message_index": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "part_index": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "recording_id": { + "$ref": "#/$defs/UUID" + }, + "segment_index": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "conversation_id": { + "$ref": "#/$defs/Token" + }, + "turn_id": { + "$ref": "#/$defs/Token" + }, + "tool_call_id": { + "$ref": "#/$defs/Token" + } + }, + "dependentRequired": { + "recording_id": [ + "segment_index" + ], + "segment_index": [ + "recording_id" + ] + }, + "allOf": [ + { + "if": { + "properties": { + "modality": { + "const": "audio" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "audio/wav", + "audio/ogg", + "audio/mpeg", + "audio/mp4", + "audio/webm", + "audio/flac", + "audio/L16" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "image" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "image/png", + "image/jpeg", + "image/webp" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "video" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "video/mp4", + "video/webm" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "document" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "application/pdf" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "file" + } + } + }, + "then": { + "properties": { + "mime_type": { + "enum": [ + "application/octet-stream" + ] + } + } + } + }, + { + "if": { + "properties": { + "modality": { + "const": "image" + } + } + }, + "then": { + "properties": { + "declared_bytes": { + "maximum": 20971520 + } + } + } + }, + { + "if": { + "required": [ + "recording_id" + ] + }, + "then": { + "properties": { + "declared_bytes": { + "maximum": 8388608 + } + } + } + } + ] + }, + "UploadResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "upload_id", + "attachment_id", + "occurrence_id", + "state", + "reserved_bytes", + "expires_at", + "transfer_mode", + "write_capability" + ], + "properties": { + "upload_id": { + "$ref": "#/$defs/UUID" + }, + "attachment_id": { + "$ref": "#/$defs/UUID" + }, + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "state": { + "const": "pending_upload" + }, + "reserved_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 52428800 + }, + "expires_at": { + "$ref": "#/$defs/Timestamp" + }, + "transfer_mode": { + "const": "authenticated_stream" + }, + "write_capability": { + "type": "string", + "minLength": 16, + "maxLength": 4096, + "pattern": "^[a-zA-Z0-9_.-]+$", + "description": "Secret broker-issued capability for this exact upload/occurrence; never log/export/cache this private response or reuse it for another job." + } + } + }, + "CompleteRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "policy_version", + "deletion_generation" + ], + "properties": { + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + } + } + }, + "StatusResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "upload_id", + "state", + "reason" + ], + "properties": { + "upload_id": { + "$ref": "#/$defs/UUID" + }, + "state": { + "$ref": "#/$defs/Status" + }, + "reason": { + "$ref": "#/$defs/Reason" + } + } + }, + "ImportSource": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "envelope_id" + ], + "properties": { + "kind": { + "const": "RemoteUrlEnvelope" + }, + "envelope_id": { + "$ref": "#/$defs/UUID" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "kind", + "connection_id", + "registered_output_id" + ], + "properties": { + "kind": { + "const": "ProviderFile" + }, + "connection_id": { + "$ref": "#/$defs/UUID" + }, + "registered_output_id": { + "$ref": "#/$defs/UUID" + } + } + } + ] + }, + "ImportRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "upload", + "source" + ], + "properties": { + "upload": { + "$ref": "#/$defs/UploadRequest" + }, + "source": { + "$ref": "#/$defs/ImportSource" + } + } + }, + "ImportResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "job_id", + "upload_id", + "state" + ], + "properties": { + "job_id": { + "$ref": "#/$defs/UUID" + }, + "upload_id": { + "$ref": "#/$defs/UUID" + }, + "state": { + "const": "importing" + } + } + }, + "LinkRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "source_occurrence_id", + "source_parent", + "target_parent", + "occurrence_id", + "policy_version", + "deletion_generation" + ], + "properties": { + "source_occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "source_parent": { + "$ref": "#/$defs/Parent" + }, + "target_parent": { + "$ref": "#/$defs/Parent" + }, + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + } + } + }, + "Occurrence": { + "type": "object", + "additionalProperties": false, + "required": [ + "reference", + "scope", + "parent", + "state", + "binding", + "capture_complete", + "policy_version", + "deletion_generation", + "expires_at" + ], + "properties": { + "reference": { + "$ref": "#/$defs/Reference" + }, + "scope": { + "$ref": "#/$defs/Scope" + }, + "parent": { + "$ref": "#/$defs/CanonicalParent" + }, + "state": { + "$ref": "#/$defs/Status" + }, + "binding": { + "enum": [ + "pending", + "bound" + ] + }, + "capture_complete": { + "type": "boolean" + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + }, + "expires_at": { + "$ref": "#/$defs/Timestamp" + }, + "recording_id": { + "$ref": "#/$defs/UUID" + } + } + }, + "OccurrencePage": { + "type": "object", + "additionalProperties": false, + "required": [ + "items", + "next_cursor" + ], + "properties": { + "items": { + "type": "array", + "maxItems": 100, + "items": { + "$ref": "#/$defs/Occurrence" + } + }, + "next_cursor": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/$defs/Token" + } + ] + } + } + }, + "ResolveItem": { + "type": "object", + "additionalProperties": false, + "required": [ + "occurrence_id", + "parent", + "representation" + ], + "properties": { + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "parent": { + "$ref": "#/$defs/Parent" + }, + "representation": { + "enum": [ + "original", + "playable", + "channel", + "peaks", + "thumbnail" + ] + }, + "channel": { + "type": "integer", + "minimum": 0, + "maximum": 31 + } + }, + "allOf": [ + { + "if": { + "properties": { + "representation": { + "const": "channel" + } + } + }, + "then": { + "required": [ + "channel" + ] + }, + "else": { + "not": { + "required": [ + "channel" + ] + } + } + } + ] + }, + "ResolveRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "minItems": 1, + "maxItems": 64, + "items": { + "$ref": "#/$defs/ResolveItem" + } + } + } + }, + "ResolveResult": { + "oneOf": [ + { + "type": "object", + "additionalProperties": false, + "required": [ + "occurrence_id", + "status", + "gateway_path", + "expires_at" + ], + "properties": { + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "status": { + "const": "ready" + }, + "gateway_path": { + "type": "string", + "pattern": "^/tracer/v1/attachment-media/(?!00000000-0000-0000-0000-000000000000/)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[a-zA-Z0-9_-]{1,128}$", + "maxLength": 194 + }, + "expires_at": { + "$ref": "#/$defs/Timestamp" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "required": [ + "occurrence_id", + "status" + ], + "properties": { + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "status": { + "enum": [ + "not_found", + "pending", + "failed", + "expired", + "deleted" + ] + } + } + } + ] + }, + "ResolveResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "maxItems": 64, + "items": { + "$ref": "#/$defs/ResolveResult" + } + } + } + }, + "WriteCapabilityClaims": { + "type": "object", + "additionalProperties": false, + "required": [ + "audience", + "actor_id", + "scope", + "association", + "upload_id", + "attachment_id", + "occurrence_id", + "policy_version", + "deletion_generation", + "reserved_bytes", + "operations", + "expires_at" + ], + "properties": { + "audience": { + "const": "fi-attachment-write" + }, + "actor_id": { + "$ref": "#/$defs/UUID" + }, + "scope": { + "$ref": "#/$defs/Scope" + }, + "association": { + "$ref": "#/$defs/CanonicalAssociation" + }, + "upload_id": { + "$ref": "#/$defs/UUID" + }, + "attachment_id": { + "$ref": "#/$defs/UUID" + }, + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + }, + "reserved_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 52428800 + }, + "operations": { + "type": "array", + "minItems": 1, + "maxItems": 5, + "uniqueItems": true, + "items": { + "enum": [ + "create", + "upload", + "complete", + "abort", + "status" + ] + } + }, + "expires_at": { + "$ref": "#/$defs/Timestamp" + }, + "recording_id": { + "$ref": "#/$defs/UUID" + } + } + }, + "PlaybackGrantClaims": { + "type": "object", + "additionalProperties": false, + "required": [ + "audience", + "viewer_id", + "application_session_id", + "media_session_id", + "scope", + "occurrence_id", + "parent", + "representation", + "methods", + "policy_version", + "deletion_generation", + "expires_at" + ], + "properties": { + "audience": { + "const": "fi-attachment-playback" + }, + "viewer_id": { + "$ref": "#/$defs/UUID" + }, + "application_session_id": { + "$ref": "#/$defs/UUID" + }, + "media_session_id": { + "$ref": "#/$defs/UUID" + }, + "scope": { + "$ref": "#/$defs/Scope" + }, + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "parent": { + "$ref": "#/$defs/CanonicalParent" + }, + "representation": { + "enum": [ + "original", + "playable", + "channel", + "peaks", + "thumbnail" + ] + }, + "channel": { + "type": "integer", + "minimum": 0, + "maximum": 31 + }, + "methods": { + "const": [ + "GET", + "HEAD" + ] + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + }, + "expires_at": { + "$ref": "#/$defs/Timestamp" + } + }, + "allOf": [ + { + "if": { + "properties": { + "representation": { + "const": "channel" + } + } + }, + "then": { + "required": [ + "channel" + ] + }, + "else": { + "not": { + "required": [ + "channel" + ] + } + } + } + ] + }, + "Track": { + "type": "object", + "additionalProperties": false, + "required": [ + "track_id", + "channels", + "direction", + "role" + ], + "properties": { + "track_id": { + "$ref": "#/$defs/UUID" + }, + "channels": { + "type": "array", + "minItems": 1, + "maxItems": 32, + "uniqueItems": true, + "items": { + "type": "integer", + "minimum": 0, + "maximum": 31 + } + }, + "direction": { + "$ref": "#/$defs/Direction" + }, + "role": { + "enum": [ + "user", + "assistant", + "mixed", + "unknown" + ] + } + } + }, + "Segment": { + "type": "object", + "additionalProperties": false, + "required": [ + "occurrence_id", + "index", + "start_ms", + "duration_ms" + ], + "properties": { + "occurrence_id": { + "$ref": "#/$defs/UUID" + }, + "index": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "start_ms": { + "type": "integer", + "minimum": 0, + "maximum": 7200000 + }, + "duration_ms": { + "type": "integer", + "minimum": 1, + "maximum": 30000 + }, + "track_id": { + "$ref": "#/$defs/UUID" + } + } + }, + "Gap": { + "type": "object", + "additionalProperties": false, + "required": [ + "start_ms", + "duration_ms", + "reason" + ], + "properties": { + "start_ms": { + "type": "integer", + "minimum": 0, + "maximum": 7200000 + }, + "duration_ms": { + "type": "integer", + "minimum": 1, + "maximum": 7200000 + }, + "reason": { + "enum": [ + "queue_full", + "bootstrap_pending", + "source_unavailable", + "policy_denied", + "truncated", + "incomplete" + ] + }, + "track_id": { + "$ref": "#/$defs/UUID" + } + } + }, + "PlayoutInterval": { + "type": "object", + "additionalProperties": false, + "required": [ + "start_ms", + "duration_ms", + "evidence" + ], + "properties": { + "start_ms": { + "type": "integer", + "minimum": 0, + "maximum": 7200000 + }, + "duration_ms": { + "type": "integer", + "minimum": 1, + "maximum": 7200000 + }, + "evidence": { + "enum": [ + "generated", + "played", + "unknown", + "truncated" + ] + } + } + }, + "RecordingManifest": { + "type": "object", + "additionalProperties": false, + "required": [ + "schema_version", + "recording_id", + "timebase", + "sample_format", + "sample_rate_hz", + "channels", + "codec", + "container", + "layout", + "tracks", + "segments", + "gaps", + "playout", + "capture_complete", + "duration_ms" + ], + "properties": { + "schema_version": { + "const": 1 + }, + "recording_id": { + "$ref": "#/$defs/UUID" + }, + "timebase": { + "const": "session_relative_ms" + }, + "sample_format": { + "enum": [ + "s16le", + "s24le", + "s32le", + "f32le", + "encoded" + ] + }, + "sample_rate_hz": { + "type": "integer", + "minimum": 8000, + "maximum": 192000 + }, + "channels": { + "type": "integer", + "minimum": 1, + "maximum": 32 + }, + "codec": { + "enum": [ + "pcm", + "opus", + "mp3", + "aac", + "flac" + ] + }, + "container": { + "enum": [ + "wav", + "ogg", + "mp3", + "mp4", + "webm", + "flac", + "raw" + ] + }, + "layout": { + "enum": [ + "mixed", + "stereo", + "separate_tracks" + ] + }, + "tracks": { + "type": "array", + "minItems": 1, + "maxItems": 32, + "items": { + "$ref": "#/$defs/Track" + } + }, + "segments": { + "type": "array", + "maxItems": 65536, + "items": { + "$ref": "#/$defs/Segment" + } + }, + "gaps": { + "type": "array", + "maxItems": 65536, + "items": { + "$ref": "#/$defs/Gap" + } + }, + "playout": { + "type": "array", + "maxItems": 65536, + "items": { + "$ref": "#/$defs/PlayoutInterval" + } + }, + "capture_complete": { + "type": "boolean" + }, + "duration_ms": { + "type": "integer", + "minimum": 0, + "maximum": 7200000 + } + } + }, + "OperationRegistryEntry": { + "type": "object", + "additionalProperties": false, + "required": [ + "package", + "language", + "operation", + "upstream_version", + "source_kind", + "direction", + "modality", + "lifecycle", + "span_capability", + "attachment_capability", + "policy_requirements", + "component_test_state", + "integrated_gate" + ], + "properties": { + "package": { + "type": "string", + "pattern": "^[a-z0-9@_./-]{1,128}$", + "maxLength": 128 + }, + "language": { + "enum": [ + "python", + "typescript" + ] + }, + "operation": { + "$ref": "#/$defs/Token" + }, + "upstream_version": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "string", + "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+([.-][a-zA-Z0-9.]+)?$", + "maxLength": 64 + } + ] + }, + "source_kind": { + "$ref": "#/$defs/SourceKind" + }, + "direction": { + "$ref": "#/$defs/Direction" + }, + "modality": { + "$ref": "#/$defs/Modality" + }, + "lifecycle": { + "enum": [ + "application_consumed", + "explicit_session_binding", + "completed_provider_output" + ] + }, + "span_capability": { + "enum": [ + "native", + "instrumented", + "unsupported", + "unqualified" + ] + }, + "attachment_capability": { + "enum": [ + "capture", + "reference_only", + "unsupported", + "unqualified" + ] + }, + "policy_requirements": { + "type": "array", + "uniqueItems": true, + "maxItems": 8, + "items": { + "enum": [ + "enabled", + "source_authorized", + "pii_intersection", + "metadata_policy", + "record_audio", + "record_video", + "provider_connection", + "owned_file_lease" + ] + } + }, + "component_test_state": { + "enum": [ + "not_run", + "passed", + "failed", + "blocked" + ] + }, + "integrated_gate": { + "enum": [ + "integrated_not_run", + "Q01", + "Q02", + "Q03", + "Q04", + "blocked" + ] + }, + "evidence_digest": { + "type": "string", + "pattern": "^[0-9a-f]{64}$", + "maxLength": 64 + } + }, + "allOf": [ + { + "if": { + "properties": { + "attachment_capability": { + "const": "capture" + } + } + }, + "then": { + "required": [ + "evidence_digest" + ], + "properties": { + "upstream_version": { + "type": "string" + }, + "component_test_state": { + "const": "passed" + }, + "integrated_gate": { + "enum": [ + "Q02", + "Q03", + "Q04" + ] + } + } + } + } + ] + }, + "Error": { + "type": "object", + "additionalProperties": false, + "required": [ + "code", + "request_id" + ], + "properties": { + "code": { + "$ref": "#/$defs/Reason" + }, + "request_id": { + "$ref": "#/$defs/UUID" + } + } + }, + "AttachmentMetadata": { + "type": "object", + "additionalProperties": false, + "required": [ + "attachment_id", + "modality", + "source_kind", + "provider", + "purpose", + "policy_version", + "state", + "created_at" + ], + "properties": { + "attachment_id": { + "$ref": "#/$defs/UUID" + }, + "modality": { + "$ref": "#/$defs/Modality" + }, + "source_kind": { + "$ref": "#/$defs/SourceKind" + }, + "provider": { + "enum": [ + "pipecat", + "livekit", + "unknown" + ] + }, + "purpose": { + "$ref": "#/$defs/Purpose" + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "state": { + "$ref": "#/$defs/Status" + }, + "created_at": { + "$ref": "#/$defs/Timestamp" + }, + "completed_at": { + "$ref": "#/$defs/Timestamp" + } + } + }, + "CanonicalParent": { + "type": "object", + "additionalProperties": false, + "required": [ + "trace_id", + "span_id" + ], + "properties": { + "trace_id": { + "$ref": "#/$defs/UUID" + }, + "span_id": { + "$ref": "#/$defs/SpanID" + } + } + }, + "CanonicalAssociation": { + "type": "object", + "additionalProperties": false, + "required": [ + "capture_session_id", + "correlation_nonce", + "parent" + ], + "properties": { + "capture_session_id": { + "$ref": "#/$defs/UUID" + }, + "correlation_nonce": { + "$ref": "#/$defs/UUID" + }, + "parent": { + "$ref": "#/$defs/CanonicalParent" + } + } + } + } +} diff --git a/spec/attachments/v1/identity-fixtures.json b/spec/attachments/v1/identity-fixtures.json new file mode 100644 index 000000000..63d4c0958 --- /dev/null +++ b/spec/attachments/v1/identity-fixtures.json @@ -0,0 +1,52 @@ +{ + "schema_version": 1, + "cases": [ + { + "input": "0123456789abcdef0123456789abcdef", + "canonical": "01234567-89ab-cdef-0123-456789abcdef", + "valid": true + }, + { + "input": "01234567-89ab-cdef-0123-456789abcdef", + "canonical": "01234567-89ab-cdef-0123-456789abcdef", + "valid": true + }, + { + "input": "ffffffffffffffffffffffffffffffff", + "canonical": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "valid": true + }, + { + "input": "00000000000000000000000000000000", + "valid": false + }, + { + "input": "00000000-0000-0000-0000-000000000000", + "valid": false + }, + { + "input": "abc", + "valid": false + }, + { + "input": "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG", + "valid": false + }, + { + "input": "0123456789ABCDEF0123456789ABCDEF", + "valid": false + }, + { + "input": "0123456789abcdef0123456789abcdef\n", + "valid": false + }, + { + "input": "{01234567-89ab-cdef-0123-456789abcdef}", + "valid": false + }, + { + "input": 42, + "valid": false + } + ] +} diff --git a/spec/attachments/v1/lifecycle-fixtures.json b/spec/attachments/v1/lifecycle-fixtures.json new file mode 100644 index 000000000..b4d411c84 --- /dev/null +++ b/spec/attachments/v1/lifecycle-fixtures.json @@ -0,0 +1,180 @@ +{ + "schema_version": 1, + "initial": { + "state": "pending_upload", + "binding": "pending", + "generation": 0 + }, + "terminal": [ + "failed", + "rejected", + "expired", + "deleted" + ], + "transitions": [ + { + "event": "complete", + "from": [ + "pending_upload", + "importing" + ], + "to": "validating" + }, + { + "event": "validate", + "from": [ + "validating" + ], + "to": "ready" + }, + { + "event": "fail", + "from": [ + "pending_upload", + "importing", + "validating" + ], + "to": "failed" + }, + { + "event": "reject", + "from": [ + "pending_upload", + "importing", + "validating" + ], + "to": "rejected" + }, + { + "event": "expire", + "from": [ + "pending_upload", + "importing", + "validating", + "ready" + ], + "to": "expired" + }, + { + "event": "delete", + "from": [ + "pending_upload", + "importing", + "validating", + "ready", + "failed", + "rejected", + "expired" + ], + "to": "deleted" + } + ], + "cases": [ + { + "id": "late-root-releases-ready-bytes", + "events": [ + "complete", + "validate", + "bind" + ], + "readable_after_each": [ + false, + false, + true + ], + "final": "ready" + }, + { + "id": "root-first-still-needs-validation", + "events": [ + "bind", + "complete", + "validate" + ], + "readable_after_each": [ + false, + false, + true + ], + "final": "ready" + }, + { + "id": "missing-tail-sampled-root", + "events": [ + "complete", + "validate", + "expire", + "bind" + ], + "readable_after_each": [ + false, + false, + false, + false + ], + "final": "expired" + }, + { + "id": "deletion-fences-completion-and-binding", + "events": [ + "complete", + "delete", + "validate", + "bind" + ], + "readable_after_each": [ + false, + false, + false, + false + ], + "final": "deleted" + }, + { + "id": "ready-delete-replay", + "events": [ + "bind", + "complete", + "validate", + "delete", + "complete", + "validate" + ], + "readable_after_each": [ + false, + false, + true, + false, + false, + false + ], + "final": "deleted" + }, + { + "id": "client-success-not-readiness", + "events": [ + "bind", + "complete" + ], + "readable_after_each": [ + false, + false + ], + "final": "validating" + }, + { + "id": "failed-cannot-retry-validation", + "events": [ + "fail", + "complete", + "validate" + ], + "readable_after_each": [ + false, + false, + false + ], + "final": "failed" + } + ] +} diff --git a/spec/attachments/v1/openapi.json b/spec/attachments/v1/openapi.json new file mode 100644 index 000000000..455d40443 --- /dev/null +++ b/spec/attachments/v1/openapi.json @@ -0,0 +1,2102 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "Future AGI attachment contract", + "version": "1.0.0", + "description": "Contract only. All media private; no support claim. Authentication eligibility and authorization are enforced per operation and occurrence." + }, + "servers": [ + { + "url": "/" + } + ], + "paths": { + "/tracer/v1/attachment-sessions": { + "post": { + "operationId": "bootstrapAttachmentSession", + "description": "Share ingestion project resolution; unknown policy retains no bytes. Invalid explicit workspace never falls back.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "attachment_eligible_identity", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/BootstrapResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/BootstrapRequest" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/uploads": { + "post": { + "operationId": "initializeAttachmentUpload", + "description": "Reserve capacity atomically; server binds writer/session and normalized parent. No write token authorizes existing links. Initialization authenticates the explicitly eligible original identity; the response delivers a secret upload-bound write capability. Never log response bodies; Cache-Control: private, no-store.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "attachment_eligible_identity", + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/UploadResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/UploadRequest" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/uploads/{upload_id}/content": { + "put": { + "operationId": "streamAttachmentContent", + "description": "Bounded streaming content; Content-Length must equal reservation. No redirects. Check capability/generation before and during transfer; suppress body/access logging.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "write", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/StatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "upload_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Content-Length", + "in": "header", + "required": true, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 52428800 + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/uploads/{upload_id}/complete": { + "post": { + "operationId": "completeAttachmentUpload", + "description": "Only server finalizes multipart and validates immutable bytes. Accepted is not ready.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "write", + "responses": { + "202": { + "description": "Accepted; readiness requires validated bytes and authorized binding.", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/StatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "upload_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/CompleteRequest" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/uploads/{upload_id}/abort": { + "post": { + "operationId": "abortAttachmentUpload", + "description": "Abort only this capability-owned job; settle reservation once. Never delete an existing attachment.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "write", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/StatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "upload_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/CompleteRequest" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/uploads/{upload_id}/status": { + "get": { + "operationId": "attachmentUploadStatus", + "description": "Content-free status only for the capability-owned job.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "write", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/StatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "upload_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + } + ] + } + }, + "/tracer/v1/projects/{project_id}/attachments/imports": { + "post": { + "operationId": "importAttachment", + "description": "Private envelope reference or registered completed provider output only. Provider connection authority is separate; write-only upload capabilities cannot select a connection.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_import_identity", + "responses": { + "202": { + "description": "Accepted; readiness requires validated bytes and authorized binding.", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/ImportResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/ImportRequest" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/occurrences": { + "post": { + "operationId": "linkAttachmentOccurrence", + "description": "Authorize readable source occurrence AND target parent; never infer association from IDs.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_application_identity", + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Occurrence" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/LinkRequest" + } + } + } + } + }, + "get": { + "operationId": "listAttachmentOccurrences", + "description": "Require trace parent scope; per-item policy. Never expose locations, hashes, filenames or denied child counts.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_application_identity", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/OccurrencePage" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/TraceInput" + } + }, + { + "name": "span_id", + "in": "query", + "schema": { + "$ref": "contract.schema.json#/$defs/SpanID" + } + }, + { + "name": "cursor", + "in": "query", + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + } + }, + { + "name": "limit", + "in": "query", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 50 + } + } + ] + } + }, + "/tracer/v1/projects/{project_id}/attachments/resolve": { + "post": { + "operationId": "resolveAttachmentOccurrences", + "description": "Read-only handler, separate from mutations. Current viewer + expected parent for EACH item; unknown/foreign both not_found. Private no-store. Same-origin session-bound gateway only.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_application_identity", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/ResolveResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/ResolveRequest" + } + } + } + } + } + }, + "/tracer/v1/projects/{project_id}/attachments/occurrences/{occurrence_id}": { + "delete": { + "operationId": "deleteAttachmentOccurrence", + "description": "Tombstone just this occurrence; generation fences in-flight work. Source parent provided in query; authorize full tuple.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_application_identity", + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "occurrence_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/TraceInput" + } + }, + { + "name": "span_id", + "in": "query", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/SpanID" + } + } + ] + } + }, + "/tracer/v1/projects/{project_id}/attachments/recordings/{recording_id}/manifest": { + "put": { + "operationId": "updateRecordingManifest", + "description": "Same registered recording/session/parent capability only; monotonically append ordered segments under reserved moving window; 1 MiB body ceiling. Never authorize arbitrary occurrence relinks. Requires recording_id in verified write-capability claims and complete operation. Every segment is bound to that recording/session/parent.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "write", + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "recording_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + }, + "description": "Scoped to full tenant/parent/actor/session/operation. Identical normalized request replays; changed request returns 409." + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/RecordingManifest" + } + } + } + } + }, + "get": { + "operationId": "readRecordingManifest", + "description": "Authorize every surviving occurrence against expected parent. Source locations and speaker names are forbidden.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_application_identity", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/RecordingManifest" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "recording_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "trace_id", + "in": "query", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/TraceInput" + } + }, + { + "name": "span_id", + "in": "query", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/SpanID" + } + } + ] + } + }, + "/tracer/v1/attachment-media-sessions": { + "post": { + "operationId": "exchangeAttachmentMediaSession", + "description": "Authenticated application-session exchange; CSRF + exact Origin. Set host-only Secure HttpOnly SameSite=Strict fi_media_session cookie with Path=/tracer/v1/attachment-media/. Bound to original application session; revoke on logout/membership change.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_application_identity", + "responses": { + "204": { + "description": "Success" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + } + } + }, + "/tracer/v1/attachment-media/{occurrence_id}/{grant_id}": { + "get": { + "operationId": "getAttachmentMedia", + "description": "Media session plus narrow occurrence grant; reauthorize before 200/206/304 and every bounded chunk (<=5s). No public storage/source URL. GET/HEAD/Range/conditional all private,no-store; nosniff; same-origin CORP; inert Content-Disposition. Range validated and bounded. Grant identifier alone is insufficient.", + "security": [ + { + "MediaSession": [] + } + ], + "x-authority": "media", + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "206": { + "description": "Authorized bounded byte range" + }, + "304": { + "description": "Authorized conditional response; never before authorization" + }, + "416": { + "description": "Unsatisfiable byte range" + } + }, + "parameters": [ + { + "name": "occurrence_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "grant_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + } + }, + { + "name": "Range", + "in": "header", + "schema": { + "type": "string", + "maxLength": 128 + } + }, + { + "name": "If-None-Match", + "in": "header", + "schema": { + "type": "string", + "maxLength": 128 + } + } + ] + }, + "head": { + "operationId": "headAttachmentMedia", + "description": "Media session plus narrow occurrence grant; reauthorize before 200/206/304 and every bounded chunk (<=5s). No public storage/source URL. GET/HEAD/Range/conditional all private,no-store; nosniff; same-origin CORP; inert Content-Disposition. Range validated and bounded. Grant identifier alone is insufficient.", + "security": [ + { + "MediaSession": [] + } + ], + "x-authority": "media", + "responses": { + "200": { + "description": "Success" + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "206": { + "description": "Authorized bounded byte range" + }, + "304": { + "description": "Authorized conditional response; never before authorization" + }, + "416": { + "description": "Unsatisfiable byte range" + } + }, + "parameters": [ + { + "name": "occurrence_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "grant_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/Token" + } + }, + { + "name": "Range", + "in": "header", + "schema": { + "type": "string", + "maxLength": 128 + } + }, + { + "name": "If-None-Match", + "in": "header", + "schema": { + "type": "string", + "maxLength": 128 + } + } + ] + } + } + }, + "components": { + "securitySchemes": { + "AttachmentCredential": { + "type": "http", + "scheme": "bearer", + "description": "Eligible existing application identity or broker-issued narrow attachment write capability; never a provider key. This scheme does not widen existing ingest key eligibility." + }, + "ApplicationSession": { + "type": "apiKey", + "in": "cookie", + "name": "sessionid" + }, + "MediaSession": { + "type": "apiKey", + "in": "cookie", + "name": "fi_media_session" + } + }, + "schemas": { + "BootstrapRequest": { + "$ref": "contract.schema.json#/$defs/BootstrapRequest" + }, + "BootstrapResponse": { + "$ref": "contract.schema.json#/$defs/BootstrapResponse" + }, + "UploadRequest": { + "$ref": "contract.schema.json#/$defs/UploadRequest" + }, + "UploadResponse": { + "$ref": "contract.schema.json#/$defs/UploadResponse" + }, + "CompleteRequest": { + "$ref": "contract.schema.json#/$defs/CompleteRequest" + }, + "StatusResponse": { + "$ref": "contract.schema.json#/$defs/StatusResponse" + }, + "ImportRequest": { + "$ref": "contract.schema.json#/$defs/ImportRequest" + }, + "ImportResponse": { + "$ref": "contract.schema.json#/$defs/ImportResponse" + }, + "LinkRequest": { + "$ref": "contract.schema.json#/$defs/LinkRequest" + }, + "Reference": { + "$ref": "contract.schema.json#/$defs/Reference" + }, + "References": { + "$ref": "contract.schema.json#/$defs/References" + }, + "SpanAttributes": { + "$ref": "contract.schema.json#/$defs/SpanAttributes" + }, + "MessageURI": { + "$ref": "contract.schema.json#/$defs/MessageURI" + }, + "Occurrence": { + "$ref": "contract.schema.json#/$defs/Occurrence" + }, + "OccurrencePage": { + "$ref": "contract.schema.json#/$defs/OccurrencePage" + }, + "ResolveRequest": { + "$ref": "contract.schema.json#/$defs/ResolveRequest" + }, + "ResolveResponse": { + "$ref": "contract.schema.json#/$defs/ResolveResponse" + }, + "WriteCapabilityClaims": { + "$ref": "contract.schema.json#/$defs/WriteCapabilityClaims" + }, + "PlaybackGrantClaims": { + "$ref": "contract.schema.json#/$defs/PlaybackGrantClaims" + }, + "RecordingManifest": { + "$ref": "contract.schema.json#/$defs/RecordingManifest" + }, + "OperationRegistryEntry": { + "$ref": "contract.schema.json#/$defs/OperationRegistryEntry" + }, + "Error": { + "$ref": "contract.schema.json#/$defs/Error" + }, + "AttachmentMetadata": { + "$ref": "contract.schema.json#/$defs/AttachmentMetadata" + } + } + } +} diff --git a/spec/attachments/v1/otel-schema-pin.json b/spec/attachments/v1/otel-schema-pin.json new file mode 100644 index 000000000..cb34cc0db --- /dev/null +++ b/spec/attachments/v1/otel-schema-pin.json @@ -0,0 +1,16 @@ +{ + "repository": "open-telemetry/semantic-conventions", + "revision": "aec6e9d3e86754683dab7c707655d69d953b2768", + "tag": "v1.37.0", + "projection": "GenericPart extension; fi-attachment is not a standardized OTel upload or provider-readable protocol", + "schemas": [ + { + "path": "docs/gen-ai/gen-ai-input-messages.json", + "sha256": "ea8840ce42bbbbf067840db2404931ac78b8993ede3ca9d6730829ff89d6921e" + }, + { + "path": "docs/gen-ai/gen-ai-output-messages.json", + "sha256": "589490c7cd7f201a29f70ad66df0b27cd8965ce4a48ceb7ace8a050056562af5" + } + ] +} diff --git a/spec/attachments/v1/privacy-fixtures.json b/spec/attachments/v1/privacy-fixtures.json new file mode 100644 index 000000000..1419df0cf --- /dev/null +++ b/spec/attachments/v1/privacy-fixtures.json @@ -0,0 +1,5758 @@ +{ + "schema_version": 1, + "cases": [ + { + "id": "explicit-import-does-not-start-recording", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "deny-enabled", + "stage": "admission", + "context": { + "enabled": false, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "disabled", + "effects": [] + } + }, + { + "id": "deny-endpoint_configured", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": false, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "endpoint_unconfigured", + "effects": [] + } + }, + { + "id": "deny-policy_known", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": false, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "bootstrap_pending", + "effects": [] + } + }, + { + "id": "deny-server_allowed", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": false, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-credential_allowed", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": false, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "credential_scope_unsupported", + "effects": [] + } + }, + { + "id": "deny-integration_capture_content", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": false, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-integration_record_inputs", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": false, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-integration_record_outputs", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": false, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-muted", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": true, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-temporary_chat", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": true, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-hide_inputs", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": true, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-hide_outputs", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": true, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-hide_input_messages", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": true, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-hide_output_messages", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": true, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-hide_input_text", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": true, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-hide_output_text", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": true, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-pii_redaction", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "deny-server_require_media_redaction", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": true, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "deny-require_metadata_removal", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": true, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "deny-modality_allowed", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": false, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-source_authorized", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": false, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-call_requested", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": false, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "deny-sampled", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": false, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "unsampled", + "effects": [] + } + }, + { + "id": "deny-correlation_available", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": false, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "correlation_unavailable", + "effects": [] + } + }, + { + "id": "deny-generation_current", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": false, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "deleted", + "effects": [] + } + }, + { + "id": "deny-source_available", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": false, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "source_unavailable", + "effects": [] + } + }, + { + "id": "deny-budget_available", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": false, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "too_large", + "effects": [] + } + }, + { + "id": "deny-queue_available", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": false, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "queue_full", + "effects": [] + } + }, + { + "id": "deny-browser_remote_fetch", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": true, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "lower-call-opt-in-cannot-override-server", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": false, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "tool-output-model-input-image-ancestry", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": true, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "output", + "semantic_input": false, + "semantic_output": true, + "model_bound_image": true, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "image", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "direct-input-image-hide", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": true, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "input", + "semantic_input": true, + "semantic_output": false, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "image", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "ancestor-input-hide-denies-tool-output", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": true, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "output", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "genuinely-isolated-output-track", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": true, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "output", + "semantic_input": false, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "mixed-track-cannot-claim-input-isolation", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": true, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": false, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "input-image-cannot-reintroduce-hidden-text", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": true, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "input", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "image", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "error-body-denied", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": true, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": true, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "safe-non-error-media", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": true, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "pii-raw-audio", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "pii-qualified-local-audio", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "pii-raw-image", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "image", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "pii-qualified-local-image", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "image", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "pii-raw-video", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "video", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "pii-qualified-local-video", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "video", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "pii-raw-document", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "document", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "pii-qualified-local-document", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "document", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "pii-raw-file", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "file", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "pii-qualified-local-file", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "file", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "pii-client-exception-alone-insufficient", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": true, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "pii-explicit-bilateral-exception", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": true, + "server_allow_unredacted_media_with_text_pii": true, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "server-redaction-non-overridable", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": true, + "server_require_media_redaction": true, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": true, + "server_allow_unredacted_media_with_text_pii": true, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "metadata-client-transform", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": true, + "qualified_client_metadata_removal": true, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "server-transform-is-not-before-egress", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": true, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": true, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "redaction_unavailable", + "effects": [] + } + }, + { + "id": "remote-deny-remote_destination_approved", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "RemoteUrl", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": false, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "remote-deny-all_addresses_public", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "RemoteUrl", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": false, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "remote-deny-tls_ip_pinned", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "RemoteUrl", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": false, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "remote-deny-redirects_revalidated", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "RemoteUrl", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": false, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "remote-deny-ambient_credentials_absent", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "RemoteUrl", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": false, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "remote-qualified-source", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "RemoteUrl", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "owned-file-deny-owned_session_bound", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "OwnedRecordingFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": false, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "owned-file-deny-owned_file_lease_valid", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "OwnedRecordingFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": false, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "owned-file-explicit-lease", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "OwnedRecordingFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "provider-connection-not-granted", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "ProviderFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": false, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "credential_scope_unsupported", + "effects": [] + } + }, + { + "id": "egress-start-is-not-complete", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "ProviderFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": false, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "source_unavailable", + "effects": [] + } + }, + { + "id": "egress-completed-output", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "ProviderFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "egress-labelled-partial", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "ProviderFile", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": false, + "explicit_partial_allowed": true + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "new-audio-off", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "create_recording", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "recording_disabled", + "effects": [] + } + }, + { + "id": "new-audio-client-only", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "create_recording", + "record_audio": true, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "recording_disabled", + "effects": [] + } + }, + { + "id": "new-audio-explicit", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "create_recording", + "record_audio": true, + "record_video": false, + "server_record_audio": true, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "new-video-off", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "video", + "source_kind": "Bytes", + "operation": "create_recording", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "recording_disabled", + "effects": [] + } + }, + { + "id": "new-video-client-only", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "video", + "source_kind": "Bytes", + "operation": "create_recording", + "record_audio": false, + "record_video": true, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "recording_disabled", + "effects": [] + } + }, + { + "id": "new-video-explicit", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "video", + "source_kind": "Bytes", + "operation": "create_recording", + "record_audio": false, + "record_video": true, + "server_record_audio": false, + "server_record_video": true, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + } + }, + { + "id": "tightened-policy-read", + "stage": "read", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": false, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "tightened-generation-read", + "stage": "read", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": false, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "deleted", + "effects": [] + } + }, + { + "id": "tightened-policy-upload", + "stage": "upload", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": false, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "tightened-generation-upload", + "stage": "upload", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": false, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "deleted", + "effects": [] + } + }, + { + "id": "tightened-policy-retry", + "stage": "retry", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": false, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "tightened-generation-retry", + "stage": "retry", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": false, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "deleted", + "effects": [] + } + }, + { + "id": "tightened-policy-serve", + "stage": "serve", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": false, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + }, + { + "id": "tightened-generation-serve", + "stage": "serve", + "context": { + "enabled": true, + "endpoint_configured": true, + "policy_known": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": false, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "deleted", + "effects": [] + } + }, + { + "id": "unknown-policy-fact-fails-closed", + "stage": "admission", + "context": { + "enabled": true, + "endpoint_configured": true, + "server_allowed": true, + "credential_allowed": true, + "integration_capture_content": true, + "integration_record_inputs": true, + "integration_record_outputs": true, + "muted": false, + "temporary_chat": false, + "hide_inputs": false, + "hide_outputs": false, + "hide_input_messages": false, + "hide_output_messages": false, + "hide_input_images": false, + "hide_input_text": false, + "hide_output_text": false, + "hide_error_details": false, + "pii_redaction": false, + "server_require_media_redaction": false, + "qualified_client_sanitizer": false, + "allow_unredacted_media_with_text_pii": false, + "server_allow_unredacted_media_with_text_pii": false, + "require_metadata_removal": false, + "qualified_client_metadata_removal": false, + "modality_allowed": true, + "source_authorized": true, + "call_requested": true, + "sampled": true, + "correlation_available": true, + "generation_current": true, + "source_available": true, + "budget_available": true, + "queue_available": true, + "direction": "mixed", + "semantic_input": true, + "semantic_output": true, + "model_bound_image": false, + "opaque_text_possible": true, + "error_diagnostic": false, + "modality": "audio", + "source_kind": "Bytes", + "operation": "import_existing", + "record_audio": false, + "record_video": false, + "server_record_audio": false, + "server_record_video": false, + "browser_remote_fetch": false, + "remote_destination_approved": true, + "all_addresses_public": true, + "tls_ip_pinned": true, + "redirects_revalidated": true, + "ambient_credentials_absent": true, + "owned_session_bound": true, + "owned_file_lease_valid": true, + "provider_connection_authorized": true, + "provider_output_completed": true, + "explicit_partial_allowed": false + }, + "expected": { + "decision": "deny", + "reason": "policy_denied", + "effects": [] + } + } + ] +} diff --git a/spec/attachments/v1/privacy-table.json b/spec/attachments/v1/privacy-table.json new file mode 100644 index 000000000..95c3ca347 --- /dev/null +++ b/spec/attachments/v1/privacy-table.json @@ -0,0 +1,1352 @@ +{ + "schema_version": 1, + "evaluation": "Validate context; invalid/unknown/missing facts deny. Evaluate every matching rule; any denial wins. The first matching rule supplies the safe reason. No allow rule overrides a denial. Re-evaluate before read/copy/hash/upload/retry/serve. On tightening discard owned bytes and revoke capability; never wait for re-enable.", + "context_schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false, + "required": [ + "enabled", + "endpoint_configured", + "policy_known", + "server_allowed", + "credential_allowed", + "integration_capture_content", + "integration_record_inputs", + "integration_record_outputs", + "muted", + "temporary_chat", + "hide_inputs", + "hide_outputs", + "hide_input_messages", + "hide_output_messages", + "hide_input_images", + "hide_input_text", + "hide_output_text", + "hide_error_details", + "pii_redaction", + "server_require_media_redaction", + "qualified_client_sanitizer", + "allow_unredacted_media_with_text_pii", + "server_allow_unredacted_media_with_text_pii", + "require_metadata_removal", + "qualified_client_metadata_removal", + "modality_allowed", + "source_authorized", + "call_requested", + "sampled", + "correlation_available", + "generation_current", + "source_available", + "budget_available", + "queue_available", + "direction", + "semantic_input", + "semantic_output", + "model_bound_image", + "opaque_text_possible", + "error_diagnostic", + "modality", + "source_kind", + "operation", + "record_audio", + "record_video", + "server_record_audio", + "server_record_video", + "browser_remote_fetch", + "remote_destination_approved", + "all_addresses_public", + "tls_ip_pinned", + "redirects_revalidated", + "ambient_credentials_absent", + "owned_session_bound", + "owned_file_lease_valid", + "provider_connection_authorized", + "provider_output_completed", + "explicit_partial_allowed" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "endpoint_configured": { + "type": "boolean" + }, + "policy_known": { + "type": "boolean" + }, + "server_allowed": { + "type": "boolean" + }, + "credential_allowed": { + "type": "boolean" + }, + "integration_capture_content": { + "type": "boolean" + }, + "integration_record_inputs": { + "type": "boolean" + }, + "integration_record_outputs": { + "type": "boolean" + }, + "muted": { + "type": "boolean" + }, + "temporary_chat": { + "type": "boolean" + }, + "hide_inputs": { + "type": "boolean" + }, + "hide_outputs": { + "type": "boolean" + }, + "hide_input_messages": { + "type": "boolean" + }, + "hide_output_messages": { + "type": "boolean" + }, + "hide_input_images": { + "type": "boolean" + }, + "hide_input_text": { + "type": "boolean" + }, + "hide_output_text": { + "type": "boolean" + }, + "hide_error_details": { + "type": "boolean" + }, + "pii_redaction": { + "type": "boolean" + }, + "server_require_media_redaction": { + "type": "boolean" + }, + "qualified_client_sanitizer": { + "type": "boolean" + }, + "allow_unredacted_media_with_text_pii": { + "type": "boolean" + }, + "server_allow_unredacted_media_with_text_pii": { + "type": "boolean" + }, + "require_metadata_removal": { + "type": "boolean" + }, + "qualified_client_metadata_removal": { + "type": "boolean" + }, + "modality_allowed": { + "type": "boolean" + }, + "source_authorized": { + "type": "boolean" + }, + "call_requested": { + "type": "boolean" + }, + "sampled": { + "type": "boolean" + }, + "correlation_available": { + "type": "boolean" + }, + "generation_current": { + "type": "boolean" + }, + "source_available": { + "type": "boolean" + }, + "budget_available": { + "type": "boolean" + }, + "queue_available": { + "type": "boolean" + }, + "semantic_input": { + "type": "boolean" + }, + "semantic_output": { + "type": "boolean" + }, + "model_bound_image": { + "type": "boolean" + }, + "opaque_text_possible": { + "type": "boolean" + }, + "error_diagnostic": { + "type": "boolean" + }, + "record_audio": { + "type": "boolean" + }, + "record_video": { + "type": "boolean" + }, + "server_record_audio": { + "type": "boolean" + }, + "server_record_video": { + "type": "boolean" + }, + "browser_remote_fetch": { + "type": "boolean" + }, + "remote_destination_approved": { + "type": "boolean" + }, + "all_addresses_public": { + "type": "boolean" + }, + "tls_ip_pinned": { + "type": "boolean" + }, + "redirects_revalidated": { + "type": "boolean" + }, + "ambient_credentials_absent": { + "type": "boolean" + }, + "owned_session_bound": { + "type": "boolean" + }, + "owned_file_lease_valid": { + "type": "boolean" + }, + "provider_connection_authorized": { + "type": "boolean" + }, + "provider_output_completed": { + "type": "boolean" + }, + "explicit_partial_allowed": { + "type": "boolean" + }, + "direction": { + "enum": [ + "input", + "output", + "mixed" + ] + }, + "modality": { + "enum": [ + "audio", + "image", + "video", + "document", + "file" + ] + }, + "source_kind": { + "enum": [ + "Bytes", + "Blob", + "RemoteUrl", + "LocalFile", + "OwnedRecordingFile", + "ProviderFile" + ] + }, + "operation": { + "enum": [ + "import_existing", + "observe_consumed", + "create_recording" + ] + } + } + }, + "rules": [ + { + "id": "disabled", + "reason": "disabled", + "deny_if": { + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "const": false + } + } + } + }, + { + "id": "endpoint", + "reason": "endpoint_unconfigured", + "deny_if": { + "required": [ + "endpoint_configured" + ], + "properties": { + "endpoint_configured": { + "const": false + } + } + } + }, + { + "id": "bootstrap", + "reason": "bootstrap_pending", + "deny_if": { + "required": [ + "policy_known" + ], + "properties": { + "policy_known": { + "const": false + } + } + } + }, + { + "id": "server", + "reason": "policy_denied", + "deny_if": { + "required": [ + "server_allowed" + ], + "properties": { + "server_allowed": { + "const": false + } + } + } + }, + { + "id": "credential", + "reason": "credential_scope_unsupported", + "deny_if": { + "required": [ + "credential_allowed" + ], + "properties": { + "credential_allowed": { + "const": false + } + } + } + }, + { + "id": "capture-content", + "reason": "policy_denied", + "deny_if": { + "required": [ + "integration_capture_content" + ], + "properties": { + "integration_capture_content": { + "const": false + } + } + } + }, + { + "id": "muted", + "reason": "policy_denied", + "deny_if": { + "anyOf": [ + { + "required": [ + "muted" + ], + "properties": { + "muted": { + "const": true + } + } + }, + { + "required": [ + "temporary_chat" + ], + "properties": { + "temporary_chat": { + "const": true + } + } + } + ] + } + }, + { + "id": "input", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "anyOf": [ + { + "required": [ + "semantic_input" + ], + "properties": { + "semantic_input": { + "const": true + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "input" + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "mixed" + } + } + }, + { + "required": [ + "model_bound_image" + ], + "properties": { + "model_bound_image": { + "const": true + } + } + } + ] + }, + { + "anyOf": [ + { + "required": [ + "integration_record_inputs" + ], + "properties": { + "integration_record_inputs": { + "const": false + } + } + }, + { + "required": [ + "hide_inputs" + ], + "properties": { + "hide_inputs": { + "const": true + } + } + }, + { + "required": [ + "hide_input_messages" + ], + "properties": { + "hide_input_messages": { + "const": true + } + } + } + ] + } + ] + } + }, + { + "id": "output", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "anyOf": [ + { + "required": [ + "semantic_output" + ], + "properties": { + "semantic_output": { + "const": true + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "output" + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "mixed" + } + } + } + ] + }, + { + "anyOf": [ + { + "required": [ + "integration_record_outputs" + ], + "properties": { + "integration_record_outputs": { + "const": false + } + } + }, + { + "required": [ + "hide_outputs" + ], + "properties": { + "hide_outputs": { + "const": true + } + } + }, + { + "required": [ + "hide_output_messages" + ], + "properties": { + "hide_output_messages": { + "const": true + } + } + } + ] + } + ] + } + }, + { + "id": "input-image-ancestry", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "anyOf": [ + { + "required": [ + "model_bound_image" + ], + "properties": { + "model_bound_image": { + "const": true + } + } + }, + { + "allOf": [ + { + "required": [ + "modality" + ], + "properties": { + "modality": { + "const": "image" + } + } + }, + { + "anyOf": [ + { + "required": [ + "semantic_input" + ], + "properties": { + "semantic_input": { + "const": true + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "input" + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "mixed" + } + } + }, + { + "required": [ + "model_bound_image" + ], + "properties": { + "model_bound_image": { + "const": true + } + } + } + ] + } + ] + } + ] + }, + { + "required": [ + "hide_input_images" + ], + "properties": { + "hide_input_images": { + "const": true + } + } + } + ] + } + }, + { + "id": "hidden-input-text", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "anyOf": [ + { + "required": [ + "semantic_input" + ], + "properties": { + "semantic_input": { + "const": true + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "input" + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "mixed" + } + } + }, + { + "required": [ + "model_bound_image" + ], + "properties": { + "model_bound_image": { + "const": true + } + } + } + ] + }, + { + "required": [ + "opaque_text_possible" + ], + "properties": { + "opaque_text_possible": { + "const": true + } + } + }, + { + "required": [ + "hide_input_text" + ], + "properties": { + "hide_input_text": { + "const": true + } + } + } + ] + } + }, + { + "id": "hidden-output-text", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "anyOf": [ + { + "required": [ + "semantic_output" + ], + "properties": { + "semantic_output": { + "const": true + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "output" + } + } + }, + { + "required": [ + "direction" + ], + "properties": { + "direction": { + "const": "mixed" + } + } + } + ] + }, + { + "required": [ + "opaque_text_possible" + ], + "properties": { + "opaque_text_possible": { + "const": true + } + } + }, + { + "required": [ + "hide_output_text" + ], + "properties": { + "hide_output_text": { + "const": true + } + } + } + ] + } + }, + { + "id": "error-details", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "required": [ + "error_diagnostic" + ], + "properties": { + "error_diagnostic": { + "const": true + } + } + }, + { + "required": [ + "hide_error_details" + ], + "properties": { + "hide_error_details": { + "const": true + } + } + } + ] + } + }, + { + "id": "server-media-redaction", + "reason": "redaction_unavailable", + "deny_if": { + "allOf": [ + { + "required": [ + "server_require_media_redaction" + ], + "properties": { + "server_require_media_redaction": { + "const": true + } + } + }, + { + "required": [ + "qualified_client_sanitizer" + ], + "properties": { + "qualified_client_sanitizer": { + "const": false + } + } + } + ] + } + }, + { + "id": "pii-intersection", + "reason": "redaction_unavailable", + "deny_if": { + "allOf": [ + { + "required": [ + "pii_redaction" + ], + "properties": { + "pii_redaction": { + "const": true + } + } + }, + { + "required": [ + "qualified_client_sanitizer" + ], + "properties": { + "qualified_client_sanitizer": { + "const": false + } + } + }, + { + "not": { + "allOf": [ + { + "required": [ + "allow_unredacted_media_with_text_pii" + ], + "properties": { + "allow_unredacted_media_with_text_pii": { + "const": true + } + } + }, + { + "required": [ + "server_allow_unredacted_media_with_text_pii" + ], + "properties": { + "server_allow_unredacted_media_with_text_pii": { + "const": true + } + } + } + ] + } + } + ] + } + }, + { + "id": "metadata-before-egress", + "reason": "redaction_unavailable", + "deny_if": { + "allOf": [ + { + "required": [ + "require_metadata_removal" + ], + "properties": { + "require_metadata_removal": { + "const": true + } + } + }, + { + "required": [ + "qualified_client_metadata_removal" + ], + "properties": { + "qualified_client_metadata_removal": { + "const": false + } + } + } + ] + } + }, + { + "id": "modality", + "reason": "policy_denied", + "deny_if": { + "required": [ + "modality_allowed" + ], + "properties": { + "modality_allowed": { + "const": false + } + } + } + }, + { + "id": "source", + "reason": "policy_denied", + "deny_if": { + "required": [ + "source_authorized" + ], + "properties": { + "source_authorized": { + "const": false + } + } + } + }, + { + "id": "browser-remote", + "reason": "policy_denied", + "deny_if": { + "required": [ + "browser_remote_fetch" + ], + "properties": { + "browser_remote_fetch": { + "const": true + } + } + } + }, + { + "id": "remote-destination", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "required": [ + "source_kind" + ], + "properties": { + "source_kind": { + "const": "RemoteUrl" + } + } + }, + { + "anyOf": [ + { + "required": [ + "remote_destination_approved" + ], + "properties": { + "remote_destination_approved": { + "const": false + } + } + }, + { + "required": [ + "all_addresses_public" + ], + "properties": { + "all_addresses_public": { + "const": false + } + } + }, + { + "required": [ + "tls_ip_pinned" + ], + "properties": { + "tls_ip_pinned": { + "const": false + } + } + }, + { + "required": [ + "redirects_revalidated" + ], + "properties": { + "redirects_revalidated": { + "const": false + } + } + }, + { + "required": [ + "ambient_credentials_absent" + ], + "properties": { + "ambient_credentials_absent": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "owned-recording", + "reason": "policy_denied", + "deny_if": { + "allOf": [ + { + "required": [ + "source_kind" + ], + "properties": { + "source_kind": { + "const": "OwnedRecordingFile" + } + } + }, + { + "anyOf": [ + { + "required": [ + "owned_session_bound" + ], + "properties": { + "owned_session_bound": { + "const": false + } + } + }, + { + "required": [ + "owned_file_lease_valid" + ], + "properties": { + "owned_file_lease_valid": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "provider-connection", + "reason": "credential_scope_unsupported", + "deny_if": { + "allOf": [ + { + "required": [ + "source_kind" + ], + "properties": { + "source_kind": { + "const": "ProviderFile" + } + } + }, + { + "required": [ + "provider_connection_authorized" + ], + "properties": { + "provider_connection_authorized": { + "const": false + } + } + } + ] + } + }, + { + "id": "provider-not-complete", + "reason": "source_unavailable", + "deny_if": { + "allOf": [ + { + "required": [ + "source_kind" + ], + "properties": { + "source_kind": { + "const": "ProviderFile" + } + } + }, + { + "required": [ + "provider_output_completed" + ], + "properties": { + "provider_output_completed": { + "const": false + } + } + }, + { + "required": [ + "explicit_partial_allowed" + ], + "properties": { + "explicit_partial_allowed": { + "const": false + } + } + } + ] + } + }, + { + "id": "new-audio", + "reason": "recording_disabled", + "deny_if": { + "allOf": [ + { + "required": [ + "operation" + ], + "properties": { + "operation": { + "const": "create_recording" + } + } + }, + { + "required": [ + "modality" + ], + "properties": { + "modality": { + "const": "audio" + } + } + }, + { + "anyOf": [ + { + "required": [ + "record_audio" + ], + "properties": { + "record_audio": { + "const": false + } + } + }, + { + "required": [ + "server_record_audio" + ], + "properties": { + "server_record_audio": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "new-video", + "reason": "recording_disabled", + "deny_if": { + "allOf": [ + { + "required": [ + "operation" + ], + "properties": { + "operation": { + "const": "create_recording" + } + } + }, + { + "required": [ + "modality" + ], + "properties": { + "modality": { + "const": "video" + } + } + }, + { + "anyOf": [ + { + "required": [ + "record_video" + ], + "properties": { + "record_video": { + "const": false + } + } + }, + { + "required": [ + "server_record_video" + ], + "properties": { + "server_record_video": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "per-call", + "reason": "policy_denied", + "deny_if": { + "required": [ + "call_requested" + ], + "properties": { + "call_requested": { + "const": false + } + } + } + }, + { + "id": "sampled", + "reason": "unsampled", + "deny_if": { + "required": [ + "sampled" + ], + "properties": { + "sampled": { + "const": false + } + } + } + }, + { + "id": "correlation", + "reason": "correlation_unavailable", + "deny_if": { + "required": [ + "correlation_available" + ], + "properties": { + "correlation_available": { + "const": false + } + } + } + }, + { + "id": "deletion-generation", + "reason": "deleted", + "deny_if": { + "required": [ + "generation_current" + ], + "properties": { + "generation_current": { + "const": false + } + } + } + }, + { + "id": "source-available", + "reason": "source_unavailable", + "deny_if": { + "required": [ + "source_available" + ], + "properties": { + "source_available": { + "const": false + } + } + } + }, + { + "id": "budget", + "reason": "too_large", + "deny_if": { + "required": [ + "budget_available" + ], + "properties": { + "budget_available": { + "const": false + } + } + } + }, + { + "id": "queue", + "reason": "queue_full", + "deny_if": { + "required": [ + "queue_available" + ], + "properties": { + "queue_available": { + "const": false + } + } + } + } + ], + "allow": { + "decision": "allow", + "reason": "queued", + "effects": [ + "read", + "copy", + "hash", + "upload", + "reference" + ] + }, + "deny_effects": [], + "defaults": { + "FI_ATTACHMENTS_ENABLED": false, + "FI_ATTACHMENTS_RECORD_AUDIO": false, + "FI_ATTACHMENTS_RECORD_VIDEO": false, + "inline_base64_image_bytes": 0, + "LocalFile": false, + "RemoteUrl": false, + "disk_spool": false, + "public_link_media": false, + "evaluation_reuse": false, + "backfill": false + } +} diff --git a/spec/attachments/v1/requirements.txt b/spec/attachments/v1/requirements.txt new file mode 100644 index 000000000..46a1d6513 --- /dev/null +++ b/spec/attachments/v1/requirements.txt @@ -0,0 +1,2 @@ +jsonschema==4.23.0 +openapi-spec-validator==0.7.2 diff --git a/spec/attachments/v1/scope-fixtures.json b/spec/attachments/v1/scope-fixtures.json new file mode 100644 index 000000000..d2d5fe029 --- /dev/null +++ b/spec/attachments/v1/scope-fixtures.json @@ -0,0 +1,95 @@ +{ + "schema_version": 1, + "key_fields": [ + "organization_id", + "workspace_id", + "project_id", + "trace_id", + "span_id", + "actor_id", + "capture_session_id", + "operation", + "idempotency_key" + ], + "base": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001", + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "operation": "initialize", + "idempotency_key": "same_public_id" + }, + "cases": [ + { + "id": "same-scope-same-request", + "overrides": {}, + "request_equal": true, + "expected": "replay" + }, + { + "id": "same-key-different-body", + "overrides": {}, + "request_equal": false, + "expected": "conflict" + }, + { + "id": "same-public-id-different-organization_id", + "overrides": { + "organization_id": "00000012-0000-0000-0000-000000000001" + }, + "request_equal": true, + "expected": "distinct" + }, + { + "id": "same-public-id-different-workspace_id", + "overrides": { + "workspace_id": "00000012-0000-0000-0000-000000000001" + }, + "request_equal": true, + "expected": "distinct" + }, + { + "id": "same-public-id-different-project_id", + "overrides": { + "project_id": "00000012-0000-0000-0000-000000000001" + }, + "request_equal": true, + "expected": "distinct" + }, + { + "id": "same-public-id-different-trace_id", + "overrides": { + "trace_id": "fedcba9876543210fedcba9876543210" + }, + "request_equal": true, + "expected": "distinct" + }, + { + "id": "same-public-id-different-span_id", + "overrides": { + "span_id": "abcdef0123456789" + }, + "request_equal": true, + "expected": "distinct" + }, + { + "id": "same-public-id-different-actor_id", + "overrides": { + "actor_id": "00000012-0000-0000-0000-000000000001" + }, + "request_equal": true, + "expected": "distinct" + }, + { + "id": "same-public-id-different-capture_session_id", + "overrides": { + "capture_session_id": "00000012-0000-0000-0000-000000000001" + }, + "request_equal": true, + "expected": "distinct" + } + ] +} diff --git a/spec/attachments/v1/security-fixtures.json b/spec/attachments/v1/security-fixtures.json new file mode 100644 index 000000000..af2e07f98 --- /dev/null +++ b/spec/attachments/v1/security-fixtures.json @@ -0,0 +1,8221 @@ +{ + "schema_version": 1, + "cases": [ + { + "id": "authorized-initialize", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-transfer", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-complete", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-promote", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-bind", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-link", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-resolve", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-GET", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-HEAD", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-Range", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-conditional", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-import", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "authorized-direct_upload", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + } + }, + { + "id": "scope-parent-initialize-scope_matches", + "context": { + "action": "initialize", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-initialize-parent_matches", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-transfer-scope_matches", + "context": { + "action": "transfer", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-transfer-parent_matches", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-complete-scope_matches", + "context": { + "action": "complete", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-complete-parent_matches", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-promote-scope_matches", + "context": { + "action": "promote", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-promote-parent_matches", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-bind-scope_matches", + "context": { + "action": "bind", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-bind-parent_matches", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-link-scope_matches", + "context": { + "action": "link", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-link-parent_matches", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-resolve-scope_matches", + "context": { + "action": "resolve", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-resolve-parent_matches", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-GET-scope_matches", + "context": { + "action": "GET", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-GET-parent_matches", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-HEAD-scope_matches", + "context": { + "action": "HEAD", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-HEAD-parent_matches", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-Range-scope_matches", + "context": { + "action": "Range", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-Range-parent_matches", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-conditional-scope_matches", + "context": { + "action": "conditional", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-conditional-parent_matches", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-import-scope_matches", + "context": { + "action": "import", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-import-parent_matches", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-direct_upload-scope_matches", + "context": { + "action": "direct_upload", + "scope_matches": false, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "scope-parent-direct_upload-parent_matches", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": false, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-initialize-credential_eligible", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-initialize-operation_allowed", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-initialize-policy_current", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-initialize-generation_current", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-initialize-not_expired", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-transfer-credential_eligible", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-transfer-operation_allowed", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-transfer-policy_current", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-transfer-generation_current", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-transfer-not_expired", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-complete-credential_eligible", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-complete-operation_allowed", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-complete-policy_current", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-complete-generation_current", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-complete-not_expired", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-promote-credential_eligible", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-promote-operation_allowed", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-promote-policy_current", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-promote-generation_current", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-promote-not_expired", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-bind-credential_eligible", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-bind-operation_allowed", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-bind-policy_current", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-bind-generation_current", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-bind-not_expired", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-link-credential_eligible", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-link-operation_allowed", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-link-policy_current", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-link-generation_current", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-link-not_expired", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-resolve-credential_eligible", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-resolve-operation_allowed", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-resolve-policy_current", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-resolve-generation_current", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-resolve-not_expired", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-GET-credential_eligible", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-GET-operation_allowed", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-GET-policy_current", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-GET-generation_current", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-GET-not_expired", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-HEAD-credential_eligible", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-HEAD-operation_allowed", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-HEAD-policy_current", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-HEAD-generation_current", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-HEAD-not_expired", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-Range-credential_eligible", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-Range-operation_allowed", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-Range-policy_current", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-Range-generation_current", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-Range-not_expired", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-conditional-credential_eligible", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-conditional-operation_allowed", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-conditional-policy_current", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-conditional-generation_current", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-conditional-not_expired", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-import-credential_eligible", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-import-operation_allowed", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-import-policy_current", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-import-generation_current", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-import-not_expired", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-direct_upload-credential_eligible", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-direct_upload-operation_allowed", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": false, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-direct_upload-policy_current", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": false, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-direct_upload-generation_current", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": false, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-authority-direct_upload-not_expired", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": false, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-initialize-private_storage_verified", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-transfer-private_storage_verified", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-complete-private_storage_verified", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-promote-private_storage_verified", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-bind-private_storage_verified", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-link-private_storage_verified", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-resolve-private_storage_verified", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-GET-private_storage_verified", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-HEAD-private_storage_verified", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-Range-private_storage_verified", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-conditional-private_storage_verified", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-import-private_storage_verified", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-storage-direct_upload-private_storage_verified", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": false, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-initialize-writer_matches", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": false, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-initialize-nonce_matches", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": false, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-transfer-writer_matches", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": false, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-transfer-nonce_matches", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": false, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-complete-writer_matches", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": false, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-complete-nonce_matches", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": false, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-bind-writer_matches", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": false, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-bind-nonce_matches", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": false, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-import-writer_matches", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": false, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "writer-binding-import-nonce_matches", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": false, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "aggregate-reservation-initialize-reservation_available", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": false, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "throttled", + "effects": [] + } + }, + { + "id": "aggregate-reservation-transfer-reservation_available", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": false, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "throttled", + "effects": [] + } + }, + { + "id": "aggregate-reservation-import-reservation_available", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": false, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "throttled", + "effects": [] + } + }, + { + "id": "aggregate-reservation-direct_upload-reservation_available", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": false, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "throttled", + "effects": [] + } + }, + { + "id": "idempotency-conflict-initialize-idempotency_matches", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": false, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "conflict", + "effects": [] + } + }, + { + "id": "idempotency-conflict-complete-idempotency_matches", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": false, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "conflict", + "effects": [] + } + }, + { + "id": "idempotency-conflict-import-idempotency_matches", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": false, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "conflict", + "effects": [] + } + }, + { + "id": "idempotency-conflict-link-idempotency_matches", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": false, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "conflict", + "effects": [] + } + }, + { + "id": "immutable-promotion-promote-immutable_version_verified", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": false, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-promote-serving_identity_server_owned", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": false, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-GET-immutable_version_verified", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": false, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-GET-serving_identity_server_owned", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": false, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-HEAD-immutable_version_verified", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": false, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-HEAD-serving_identity_server_owned", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": false, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-Range-immutable_version_verified", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": false, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-Range-serving_identity_server_owned", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": false, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-conditional-immutable_version_verified", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": false, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "immutable-promotion-conditional-serving_identity_server_owned", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": false, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "decoder-isolation-promote-decoder_isolated", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": false, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-bind-source_retained", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-bind-retention_provenance_known", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-link-source_retained", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-link-retention_provenance_known", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-resolve-source_retained", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-resolve-retention_provenance_known", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-GET-source_retained", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-GET-retention_provenance_known", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-HEAD-source_retained", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-HEAD-retention_provenance_known", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-Range-source_retained", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-Range-retention_provenance_known", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-conditional-source_retained", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "retention-binding-conditional-retention_provenance_known", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": false, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-resolve-bytes_ready", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": false, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-resolve-binding_observed", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": false, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-GET-bytes_ready", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": false, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-GET-binding_observed", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": false, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-HEAD-bytes_ready", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": false, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-HEAD-binding_observed", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": false, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-Range-bytes_ready", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": false, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-Range-binding_observed", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": false, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-conditional-bytes_ready", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": false, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "ready-bound-conditional-binding_observed", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": false, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-resolve-viewer_authorized", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": false, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-resolve-live_authorization_checked", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": false + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-GET-viewer_authorized", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": false, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-GET-live_authorization_checked", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": false + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-HEAD-viewer_authorized", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": false, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-HEAD-live_authorization_checked", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": false + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-Range-viewer_authorized", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": false, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-Range-live_authorization_checked", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": false + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-conditional-viewer_authorized", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": false, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "current-viewer-conditional-live_authorization_checked", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": false + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-GET-session_matches", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-GET-representation_matches", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": false, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-HEAD-session_matches", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-HEAD-representation_matches", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": false, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-Range-session_matches", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-Range-representation_matches", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": false, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-conditional-session_matches", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "session-grant-conditional-representation_matches", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": false, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "csrf-origin-initialize-csrf_origin_valid", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "csrf-origin-complete-csrf_origin_valid", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "csrf-origin-link-csrf_origin_valid", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "csrf-origin-resolve-csrf_origin_valid", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "csrf-origin-import-csrf_origin_valid", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "two-sided-relink-link-source_occurrence_authorized", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": false, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "two-sided-relink-link-target_authorized", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": false, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "private-source-envelope-import-source_envelope_private", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": false, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "qualified-direct-upload-direct_upload-direct_upload_qualified", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": false, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-initialize", + "context": { + "action": "initialize", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-transfer", + "context": { + "action": "transfer", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-complete", + "context": { + "action": "complete", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-promote", + "context": { + "action": "promote", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-bind", + "context": { + "action": "bind", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-link", + "context": { + "action": "link", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-resolve", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-GET", + "context": { + "action": "GET", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-HEAD", + "context": { + "action": "HEAD", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-Range", + "context": { + "action": "Range", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-conditional", + "context": { + "action": "conditional", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-import", + "context": { + "action": "import", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "source-live-direct_upload", + "context": { + "action": "direct_upload", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": false, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + } + ] +} diff --git a/spec/attachments/v1/security-table.json b/spec/attachments/v1/security-table.json new file mode 100644 index 000000000..6cd726d26 --- /dev/null +++ b/spec/attachments/v1/security-table.json @@ -0,0 +1,918 @@ +{ + "schema_version": 1, + "context_schema": { + "type": "object", + "additionalProperties": false, + "required": [ + "action", + "scope_matches", + "parent_matches", + "writer_matches", + "nonce_matches", + "credential_eligible", + "operation_allowed", + "policy_current", + "generation_current", + "not_expired", + "private_storage_verified", + "immutable_version_verified", + "serving_identity_server_owned", + "bytes_ready", + "binding_observed", + "source_retained", + "retention_provenance_known", + "viewer_authorized", + "session_matches", + "representation_matches", + "csrf_origin_valid", + "source_occurrence_authorized", + "target_authorized", + "reservation_available", + "idempotency_matches", + "decoder_isolated", + "source_envelope_private", + "direct_upload_qualified", + "live_authorization_checked" + ], + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "complete", + "promote", + "bind", + "link", + "resolve", + "GET", + "HEAD", + "Range", + "conditional", + "import", + "direct_upload" + ] + }, + "scope_matches": { + "type": "boolean" + }, + "parent_matches": { + "type": "boolean" + }, + "writer_matches": { + "type": "boolean" + }, + "nonce_matches": { + "type": "boolean" + }, + "credential_eligible": { + "type": "boolean" + }, + "operation_allowed": { + "type": "boolean" + }, + "policy_current": { + "type": "boolean" + }, + "generation_current": { + "type": "boolean" + }, + "not_expired": { + "type": "boolean" + }, + "private_storage_verified": { + "type": "boolean" + }, + "immutable_version_verified": { + "type": "boolean" + }, + "serving_identity_server_owned": { + "type": "boolean" + }, + "bytes_ready": { + "type": "boolean" + }, + "binding_observed": { + "type": "boolean" + }, + "source_retained": { + "type": "boolean" + }, + "retention_provenance_known": { + "type": "boolean" + }, + "viewer_authorized": { + "type": "boolean" + }, + "session_matches": { + "type": "boolean" + }, + "representation_matches": { + "type": "boolean" + }, + "csrf_origin_valid": { + "type": "boolean" + }, + "source_occurrence_authorized": { + "type": "boolean" + }, + "target_authorized": { + "type": "boolean" + }, + "reservation_available": { + "type": "boolean" + }, + "idempotency_matches": { + "type": "boolean" + }, + "decoder_isolated": { + "type": "boolean" + }, + "source_envelope_private": { + "type": "boolean" + }, + "direct_upload_qualified": { + "type": "boolean" + }, + "live_authorization_checked": { + "type": "boolean" + } + } + }, + "rules": [ + { + "id": "scope-parent", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "complete", + "promote", + "bind", + "link", + "resolve", + "GET", + "HEAD", + "Range", + "conditional", + "import", + "direct_upload" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "scope_matches" + ], + "properties": { + "scope_matches": { + "const": false + } + } + }, + { + "required": [ + "parent_matches" + ], + "properties": { + "parent_matches": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "current-authority", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "complete", + "promote", + "bind", + "link", + "resolve", + "GET", + "HEAD", + "Range", + "conditional", + "import", + "direct_upload" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "credential_eligible" + ], + "properties": { + "credential_eligible": { + "const": false + } + } + }, + { + "required": [ + "operation_allowed" + ], + "properties": { + "operation_allowed": { + "const": false + } + } + }, + { + "required": [ + "policy_current" + ], + "properties": { + "policy_current": { + "const": false + } + } + }, + { + "required": [ + "generation_current" + ], + "properties": { + "generation_current": { + "const": false + } + } + }, + { + "required": [ + "not_expired" + ], + "properties": { + "not_expired": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "source-live", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "required": [ + "action" + ], + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "complete", + "promote", + "bind", + "link", + "resolve", + "GET", + "HEAD", + "Range", + "conditional", + "import", + "direct_upload" + ] + } + } + }, + { + "required": [ + "source_retained" + ], + "properties": { + "source_retained": { + "const": false + } + } + } + ] + } + }, + { + "id": "private-storage", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "complete", + "promote", + "bind", + "link", + "resolve", + "GET", + "HEAD", + "Range", + "conditional", + "import", + "direct_upload" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "private_storage_verified" + ], + "properties": { + "private_storage_verified": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "writer-binding", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "complete", + "bind", + "import" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "writer_matches" + ], + "properties": { + "writer_matches": { + "const": false + } + } + }, + { + "required": [ + "nonce_matches" + ], + "properties": { + "nonce_matches": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "aggregate-reservation", + "reason": "throttled", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "transfer", + "import", + "direct_upload" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "reservation_available" + ], + "properties": { + "reservation_available": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "idempotency-conflict", + "reason": "conflict", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "complete", + "import", + "link" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "idempotency_matches" + ], + "properties": { + "idempotency_matches": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "immutable-promotion", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "promote", + "GET", + "HEAD", + "Range", + "conditional" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "immutable_version_verified" + ], + "properties": { + "immutable_version_verified": { + "const": false + } + } + }, + { + "required": [ + "serving_identity_server_owned" + ], + "properties": { + "serving_identity_server_owned": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "decoder-isolation", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "promote" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "decoder_isolated" + ], + "properties": { + "decoder_isolated": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "retention-binding", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "bind", + "link", + "resolve", + "GET", + "HEAD", + "Range", + "conditional" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "retention_provenance_known" + ], + "properties": { + "retention_provenance_known": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "ready-bound", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "resolve", + "GET", + "HEAD", + "Range", + "conditional" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "bytes_ready" + ], + "properties": { + "bytes_ready": { + "const": false + } + } + }, + { + "required": [ + "binding_observed" + ], + "properties": { + "binding_observed": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "current-viewer", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "resolve", + "GET", + "HEAD", + "Range", + "conditional" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "viewer_authorized" + ], + "properties": { + "viewer_authorized": { + "const": false + } + } + }, + { + "required": [ + "live_authorization_checked" + ], + "properties": { + "live_authorization_checked": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "session-grant", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "GET", + "HEAD", + "Range", + "conditional" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "session_matches" + ], + "properties": { + "session_matches": { + "const": false + } + } + }, + { + "required": [ + "representation_matches" + ], + "properties": { + "representation_matches": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "csrf-origin", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "initialize", + "complete", + "link", + "resolve", + "import" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "csrf_origin_valid" + ], + "properties": { + "csrf_origin_valid": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "two-sided-relink", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "link" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "source_occurrence_authorized" + ], + "properties": { + "source_occurrence_authorized": { + "const": false + } + } + }, + { + "required": [ + "target_authorized" + ], + "properties": { + "target_authorized": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "private-source-envelope", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "import" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "source_envelope_private" + ], + "properties": { + "source_envelope_private": { + "const": false + } + } + } + ] + } + ] + } + }, + { + "id": "qualified-direct-upload", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "properties": { + "action": { + "enum": [ + "direct_upload" + ] + } + }, + "required": [ + "action" + ] + }, + { + "anyOf": [ + { + "required": [ + "direct_upload_qualified" + ], + "properties": { + "direct_upload_qualified": { + "const": false + } + } + } + ] + } + ] + } + } + ], + "allow": { + "decision": "allow", + "reason": "ready", + "effects": [ + "operation" + ] + }, + "deny_effects": [] +} diff --git a/spec/attachments/v1/test_contract.py b/spec/attachments/v1/test_contract.py new file mode 100644 index 000000000..6bd31710a --- /dev/null +++ b/spec/attachments/v1/test_contract.py @@ -0,0 +1,182 @@ +"""Contract tests only: no SDK, backend, provider or storage qualification.""" +from __future__ import annotations + +import copy +import importlib.util +import json +import unittest +from pathlib import Path + +from jsonschema import Draft202012Validator +from jsonschema.exceptions import ValidationError +from openapi_spec_validator import validate as validate_openapi + +ROOT = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("attachment_fixture_validator", ROOT / "validate.py") +contract = importlib.util.module_from_spec(spec) +spec.loader.exec_module(contract) + + +class ContractTests(unittest.TestCase): + def test_all_shared_fixture_expectations(self): + counts = contract.validate_all() + self.assertGreater(counts["privacy"], 70) + self.assertGreater(counts["security"], 150) + print("FIXTURE_COUNTS " + json.dumps(counts, sort_keys=True)) + + def test_openapi_resolves_all_local_shapes(self): + validate_openapi(contract.load("openapi.json"), base_uri=(ROOT / "openapi.json").as_uri()) + + def test_all_definitions_are_valid_schemas(self): + for name, shape in contract.SCHEMA["$defs"].items(): + with self.subTest(name=name): + Draft202012Validator.check_schema(shape) + + def test_every_wire_object_rejects_unknown_fields_and_missing_required_fields(self): + for case in contract.load("wire-fixtures.json")["cases"]: + if not case["valid"] or not isinstance(case["value"], dict): + continue + shape = contract.SCHEMA["$defs"][case["schema"]] + with self.subTest(schema=case["schema"], change="unknown"): + with self.assertRaises((ValidationError, ValueError)): + contract.validate_wire(case["schema"], {**case["value"], "secret": "SYNTHETIC_CANARY"}) + for field in shape.get("required", []): + value = {key: item for key, item in case["value"].items() if key != field} + with self.subTest(schema=case["schema"], missing=field): + with self.assertRaises((ValidationError, ValueError)): + contract.validate_wire(case["schema"], value) + + def test_every_privacy_and_security_rule_has_a_sensitive_negative_control(self): + # Deleting each rule MUST change an expected denial, otherwise its fixtures + # are vacuous or shadowed and do not protect that normative requirement. + for prefix in ("privacy", "security"): + table = contract.load(prefix + "-table.json") + cases = contract.load(prefix + "-fixtures.json")["cases"] + for index, rule in enumerate(table["rules"]): + mutant = {**table, "rules": table["rules"][:index] + table["rules"][index + 1:]} + with self.subTest(table=prefix, rule=rule["id"]): + self.assertTrue(any(contract.decide(mutant, case["context"]) != case["expected"] for case in cases)) + + def test_denied_contract_fixture_has_zero_source_and_sink_effects(self): + # This is a contract double, not evidence that a production transport + # enforces these boundaries. Every SDK/backend lane must reuse the cases. + table = contract.load("privacy-table.json") + cases = contract.load("privacy-fixtures.json")["cases"] + attempted = [] + for case in cases: + result = contract.decide(table, case["context"]) + effects = ["SYNTHETIC_CANARY:" + effect for effect in result["effects"]] + if case["expected"]["decision"] == "deny": + self.assertEqual(effects, [], case["id"]) + else: + attempted.extend(effects) + self.assertGreater(len(attempted), 0) # negative control: sink is observable + + def test_unknown_and_nonboolean_policy_facts_fail_closed(self): + table = contract.load("privacy-table.json") + allowed = contract.load("privacy-fixtures.json")["cases"][0]["context"] + for key in allowed: + context = dict(allowed) + del context[key] + self.assertEqual(contract.decide(table, context)["decision"], "deny", key) + for value in (None, "false", 0, 1): + self.assertEqual(contract.decide(table, {**allowed, "enabled": value})["decision"], "deny") + self.assertEqual(contract.decide(table, {**allowed, "new_unknown_policy": True})["decision"], "deny") + + def test_policy_tightening_discards_and_reenable_does_not_restore(self): + table = contract.load("privacy-table.json") + context = contract.load("privacy-fixtures.json")["cases"][0]["context"] + owned = None + # Test-only queue oracle. A later allow is not permission to resurrect + # bytes discarded by a prior tightening; only new explicit capture can. + for phase, allowed in (("admission", True), ("retry", False), ("retry", True)): + decision = contract.decide(table, {**context, "server_allowed": allowed}) + if decision["decision"] == "deny": + owned = None + elif phase == "admission": + owned = b"synthetic" + self.assertIsNone(owned) + + def test_span_projection_validates_inner_json_not_only_content_annotation(self): + attrs = next(case["value"] for case in contract.load("wire-fixtures.json")["cases"] if case["schema"] == "SpanAttributes" and case["valid"]) + for inner in ("not-json", "{}", '[{"source_url":"SYNTHETIC_CANARY"}]', "null"): + with self.subTest(inner=inner): + with self.assertRaises((ValueError, ValidationError)): + contract.validate_wire("SpanAttributes", {**attrs, "fi.attachment.refs": inner}) + duplicate = json.loads(attrs["fi.attachment.refs"]) * 2 + with self.assertRaises((ValueError, ValidationError)): + contract.validate_wire("SpanAttributes", {**attrs, "fi.attachment.refs": json.dumps(duplicate)}) + with self.assertRaises((ValueError, ValidationError)): + contract.validate_wire("SpanAttributes", {**attrs, "fi.attachment.refs": " " * 16385}) + + def test_strict_json_rejects_duplicate_members_and_non_json_numbers(self): + for raw in ('{"x":1,"x":2}', '{"x":NaN}', '{"x":Infinity}'): + with self.subTest(raw=raw), self.assertRaises(ValueError): + contract.strict_json(raw) + self.assertEqual(contract.strict_json('{"x":1}'), {"x": 1}) + + def test_reference_and_mime_byte_limits(self): + value = next(case["value"] for case in contract.load("wire-fixtures.json")["cases"] if case["schema"] == "UploadRequest" and case["valid"]) + for changes in ({"modality": "image"}, {"modality": "image", "mime_type": "image/png", "declared_bytes": 20971521}, {"recording_id": value["attachment_id"], "segment_index": 0, "declared_bytes": 8388609}): + with self.subTest(changes=changes): + with self.assertRaises((ValueError, ValidationError)): + contract.validate_wire("UploadRequest", {**value, **changes}) + + def test_trace_bits_and_scoped_hex_uuid_equivalence(self): + for value in ("f" * 32, "1" * 32, "0123456789abcdef0123456789abcdef"): + result = contract.normalize_trace(value) + self.assertEqual(result.replace("-", ""), value) + table = contract.load("scope-fixtures.json") + canonical = {**table["base"], "trace_id": contract.normalize_trace(table["base"]["trace_id"])} + self.assertEqual(contract.scoped_key(table["base"], table["key_fields"]), contract.scoped_key(canonical, table["key_fields"])) + for invalid in ("0" * 16, "A" * 16, "1" * 17, "1" * 16 + "\n"): + self.assertFalse(contract.validator("SpanID").is_valid(invalid)) + + def test_recording_truth_and_channel_mapping(self): + value = next(case["value"] for case in contract.load("wire-fixtures.json")["cases"] if case["schema"] == "RecordingManifest" and case["valid"]) + invalid = [ + {**value, "capture_complete": True}, + {**value, "layout": "stereo"}, + {**value, "duration_ms": 500}, + {**value, "segments": value["segments"] * 2}, + {**value, "tracks": [{**value["tracks"][0], "direction": "output"}]}, + {**value, "tracks": [{**value["tracks"][0], "channels": [1]}]}, + ] + for index, item in enumerate(invalid): + with self.subTest(index=index), self.assertRaises(ValueError): + contract.validate_wire("RecordingManifest", item) + stereo = copy.deepcopy(value) + stereo.update(layout="stereo", channels=2) + stereo["tracks"] = [ + {**value["tracks"][0], "channels": [0], "direction": "output", "role": "assistant"}, + {**value["tracks"][0], "track_id": "ffffffff-ffff-ffff-ffff-ffffffffffff", "channels": [1], "direction": "input", "role": "user"}, + ] + contract.validate_wire("RecordingManifest", stereo) # left is not assumed user + + def test_write_capabilities_never_gain_read_operations(self): + cases = contract.load("wire-fixtures.json")["cases"] + denied = [case for case in cases if case["id"].startswith("write-capability-forbids-")] + self.assertEqual(len(denied), 6) + for case in denied: + with self.assertRaises(ValidationError): + contract.validate_wire(case["schema"], case["value"]) + + def test_protocol_composition_uses_same_occurrence_not_bare_blob(self): + objects = {case["schema"]: case["value"] for case in contract.load("wire-fixtures.json")["cases"] if case["valid"]} + occurrence_id = objects["UploadRequest"]["occurrence_id"] + self.assertEqual(objects["UploadResponse"]["occurrence_id"], occurrence_id) + self.assertEqual(objects["Occurrence"]["reference"]["occurrence_id"], occurrence_id) + self.assertEqual(objects["MessageURI"]["uri"], "fi-attachment:" + occurrence_id) + self.assertEqual(objects["ResolveRequest"]["items"][0]["occurrence_id"], occurrence_id) + self.assertIn('/' + occurrence_id + '/', objects["ResolveResponse"]["items"][0]["gateway_path"]) + self.assertNotEqual(occurrence_id, objects["UploadRequest"]["attachment_id"]) + + def test_security_fixture_covers_every_request_path(self): + cases = contract.load("security-fixtures.json")["cases"] + for action in ("GET", "HEAD", "Range", "conditional", "resolve"): + for fact in ("generation_current", "viewer_authorized", "live_authorization_checked"): + self.assertTrue(any(case["context"]["action"] == action and not case["context"][fact] and case["expected"]["decision"] == "deny" for case in cases)) + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/spec/attachments/v1/test_protocol.py b/spec/attachments/v1/test_protocol.py new file mode 100644 index 000000000..0cad30789 --- /dev/null +++ b/spec/attachments/v1/test_protocol.py @@ -0,0 +1,110 @@ +"""Synthetic loopback HTTP contract integration; not a production service test.""" +from __future__ import annotations + +import importlib.util +import json +import threading +import unittest +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from pathlib import Path +from urllib.error import HTTPError +from urllib.request import Request, urlopen + +from jsonschema.exceptions import ValidationError + +ROOT = Path(__file__).resolve().parent +spec = importlib.util.spec_from_file_location("attachment_contract", ROOT / "validate.py") +contract = importlib.util.module_from_spec(spec) +spec.loader.exec_module(contract) + +OBJECTS = {case["schema"]: case["value"] for case in contract.load("wire-fixtures.json")["cases"] if case["valid"]} +PROJECT = OBJECTS["BootstrapResponse"]["scope"]["project_id"] +UPLOAD = OBJECTS["UploadResponse"]["upload_id"] +BASE = "/tracer/v1/projects/" + PROJECT + "/attachments" +ROUTES = { + "/tracer/v1/attachment-sessions": ("BootstrapRequest", "BootstrapResponse", 200), + BASE + "/uploads": ("UploadRequest", "UploadResponse", 201), + BASE + "/uploads/" + UPLOAD + "/complete": ("CompleteRequest", "StatusResponse", 202), + BASE + "/imports": ("ImportRequest", "ImportResponse", 202), + BASE + "/resolve": ("ResolveRequest", "ResolveResponse", 200), +} + + +class FixtureReceiver(BaseHTTPRequestHandler): + """Validate fixture wire requests, returning only checked-in synthetic data.""" + def log_message(self, *args): + pass + + def do_POST(self): + route = ROUTES.get(self.path) + code = 404 + response = OBJECTS["Error"] + if route: + incoming, outgoing, code = route + try: + length = int(self.headers.get("Content-Length", "0")) + if not 0 < length <= 65536: + raise ValueError("bounded request") + value = contract.strict_json(self.rfile.read(length).decode("utf-8")) + contract.validate_wire(incoming, value) + response = OBJECTS[outgoing] + except (ValueError, ValidationError): + code = 400 + body = json.dumps(response).encode() + self.send_response(code) + self.send_header("Content-Type", "application/json") + self.send_header("Cache-Control", "private, no-store") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + +class ProtocolTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.server = ThreadingHTTPServer(("127.0.0.1", 0), FixtureReceiver) + cls.worker = threading.Thread(target=cls.server.serve_forever, daemon=True) + cls.worker.start() + cls.origin = "http://127.0.0.1:" + str(cls.server.server_port) + + @classmethod + def tearDownClass(cls): + cls.server.shutdown() + cls.server.server_close() + cls.worker.join(timeout=2) + + def post(self, path, value): + request = Request(self.origin + path, data=json.dumps(value).encode(), headers={"Content-Type": "application/json"}, method="POST") + try: + response = urlopen(request, timeout=2) + except HTTPError as error: + response = error + with response: + return response.status, response.headers, response.read() + + def test_bootstrap_upload_validation_resolve_composition(self): + for path, (incoming, outgoing, status) in ROUTES.items(): + with self.subTest(operation=incoming): + actual_status, headers, raw = self.post(path, OBJECTS[incoming]) + self.assertEqual(actual_status, status) + self.assertEqual(headers["Cache-Control"], "private, no-store") + contract.validate_wire(outgoing, json.loads(raw)) + # The complete response remains validating; it is never a playback URL. + self.assertEqual(OBJECTS["StatusResponse"]["state"], "validating") + + def test_raw_url_secret_fields_rejected_and_not_reflected(self): + for path, (incoming, _, _) in ROUTES.items(): + value = {**OBJECTS[incoming], "source_url": "https://example.invalid/SYNTHETIC_SECRET?token=SYNTHETIC_SECRET"} + status, _, raw = self.post(path, value) + self.assertEqual(status, 400) + self.assertNotIn(b"SYNTHETIC_SECRET", raw) + contract.validate_wire("Error", json.loads(raw)) + + def test_unknown_version_and_foreign_route_fail(self): + value = {**OBJECTS["UploadRequest"], "schema_version": 99} + self.assertEqual(self.post(BASE + "/uploads", value)[0], 400) + self.assertEqual(self.post(BASE.replace(PROJECT, "ffffffff-ffff-ffff-ffff-ffffffffffff") + "/uploads", OBJECTS["UploadRequest"])[0], 404) + + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/spec/attachments/v1/validate.py b/spec/attachments/v1/validate.py new file mode 100644 index 000000000..8806bfeca --- /dev/null +++ b/spec/attachments/v1/validate.py @@ -0,0 +1,228 @@ +"""Offline fixture validators for fi.attachments.v1; not a runtime SDK or server. + +Consumers load the JSON fixtures directly. This executable reference oracle never +reads a media source, sends a request, accesses credentials, or retrieves schemas. +""" +from __future__ import annotations + +import copy +import json +import sys +from pathlib import Path +from typing import Any +from uuid import UUID + +from jsonschema import Draft202012Validator, FormatChecker +from jsonschema.exceptions import ValidationError as jsonschema_error + +ROOT = Path(__file__).resolve().parent + + +def load(name: str) -> Any: + """Read only this checked-in contract's data files.""" + return json.loads((ROOT / name).read_text(encoding="utf-8")) + + +SCHEMA = load("contract.schema.json") + + +def validator(name: str) -> Draft202012Validator: + """Use local definitions; never resolve a network schema.""" + return Draft202012Validator( + {"$schema": SCHEMA["$schema"], "$defs": SCHEMA["$defs"], "$ref": "#/$defs/" + name}, + format_checker=FormatChecker(), + ) + + +def normalize_trace(value: str) -> str: + """Validate before conversion; preserve all 128 bits including UUID variant.""" + validator("TraceInput").validate(value) + return str(UUID(hex=value.replace("-", ""))) + + +def decide(table: dict[str, Any], context: dict[str, Any]) -> dict[str, Any]: + """Interpret the ordered JSON Schema predicates in a conformance table.""" + if not Draft202012Validator(table["context_schema"]).is_valid(context): + return {"decision": "deny", "reason": "policy_denied", "effects": []} + for rule in table["rules"]: + if Draft202012Validator(rule["deny_if"]).is_valid(context): + return {"decision": "deny", "reason": rule["reason"], "effects": []} + return copy.deepcopy(table["allow"]) + + +def strict_json(raw: str) -> Any: + """Duplicate keys and non-JSON numbers must not hide a conflicting request.""" + def pairs(items: list[tuple[str, Any]]) -> dict[str, Any]: + result = {} + for key, value in items: + if key in result: + raise ValueError("duplicate JSON member") + result[key] = value + return result + + def invalid_constant(_value: str) -> None: + raise ValueError("non-JSON number") + + return json.loads(raw, object_pairs_hook=pairs, parse_constant=invalid_constant) + + +def validate_wire(name: str, value: Any) -> None: + """Enforce JSON Schema plus serialization and cross-field invariants.""" + validator(name).validate(value) + if name == "SpanAttributes": + raw = value["fi.attachment.refs"] + if len(raw.encode("utf-8")) > 16384: + raise ValueError("reference byte limit") + validate_wire("References", strict_json(raw)) + if name == "References": + ids = [entry["occurrence_id"] for entry in value] + if len(ids) != len(set(ids)): + raise ValueError("duplicate occurrence projection") + for entry in value: + validate_wire("Reference", entry) + if name in {"Reference", "UploadRequest", "MessageURI"}: + modality, mime = value["modality"], value["mime_type"] + allowed = { + "audio": mime.startswith("audio/"), "image": mime.startswith("image/"), + "video": mime.startswith("video/"), "document": mime == "application/pdf", + "file": mime == "application/octet-stream", + } + if not allowed[modality]: + raise ValueError("modality/MIME mismatch") + if name == "UploadRequest": + if value["modality"] == "image" and value["declared_bytes"] > 20971520: + raise ValueError("image byte limit") + if "recording_id" in value and value["declared_bytes"] > 8388608: + raise ValueError("recording segment byte limit") + if name == "Occurrence": + validate_wire("Reference", value["reference"]) + if name == "OccurrencePage": + for occurrence in value["items"]: + validate_wire("Occurrence", occurrence) + if name == "ResolveResponse": + for item in value["items"]: + if item["status"] == "ready" and item["gateway_path"].split("/")[4] != item["occurrence_id"]: + raise ValueError("gateway occurrence mismatch") + if name == "ImportRequest": + validate_wire("UploadRequest", value["upload"]) + expected = "RemoteUrl" if value["source"]["kind"] == "RemoteUrlEnvelope" else "ProviderFile" + if value["upload"]["source_kind"] != expected: + raise ValueError("import source mismatch") + if name == "RecordingManifest": + if len(json.dumps(value, separators=(",", ":")).encode("utf-8")) > 1048576: + raise ValueError("manifest byte limit") + if value["capture_complete"] and value["gaps"]: + raise ValueError("complete recording has capture gaps") + track_ids = [track["track_id"] for track in value["tracks"]] + if len(track_ids) != len(set(track_ids)): + raise ValueError("duplicate track") + channels = [channel for track in value["tracks"] for channel in track["channels"]] + if sorted(channels) != list(range(value["channels"])): + raise ValueError("channel mapping must cover each channel exactly once") + if value["layout"] == "mixed" and any(track["direction"] != "mixed" for track in value["tracks"]): + raise ValueError("mixed recording cannot claim isolated directions") + if value["layout"] == "stereo" and value["channels"] != 2: + raise ValueError("stereo needs two channels") + seen = set() + previous_start = -1 + for index, segment in enumerate(value["segments"]): + if segment["index"] != index or segment["start_ms"] < previous_start or segment["occurrence_id"] in seen: + raise ValueError("unordered or duplicate segment") + seen.add(segment["occurrence_id"]) + previous_start = segment["start_ms"] + timelines = {track: [] for track in track_ids} if value["layout"] == "separate_tracks" else {None: []} + for interval in value["segments"] + value["gaps"]: + track = interval.get("track_id") + if track not in timelines: + raise ValueError("missing or unrelated track identity") + timelines[track].append(interval) + for intervals in timelines.values(): + end = 0 + for interval in sorted(intervals, key=lambda item: item["start_ms"]): + if interval["start_ms"] != end: + raise ValueError("overlap or unmarked capture gap") + end += interval["duration_ms"] + if end != value["duration_ms"]: + raise ValueError("missing recording coverage") + for interval in value["segments"] + value["gaps"] + value["playout"]: + if interval["start_ms"] + interval["duration_ms"] > value["duration_ms"]: + raise ValueError("interval exceeds recording") + + +def scoped_key(scope: dict[str, Any], fields: list[str]) -> tuple[Any, ...]: + """Fixture key oracle: normalize trace IDs, retain the complete scope.""" + normalized = {**scope, "trace_id": normalize_trace(scope["trace_id"])} + return tuple(normalized[field] for field in fields) + + +def lifecycle_result(table: dict[str, Any], events: list[str]) -> tuple[list[bool], str]: + """Interpret only the contract's transition fixtures (no jobs or storage).""" + state = table["initial"]["state"] + bound = False + readable = [] + for event in events: + if event == "bind": + if state not in table["terminal"]: + bound = True + else: + for transition in table["transitions"]: + if transition["event"] == event and state in transition["from"]: + state = transition["to"] + break + readable.append(state == "ready" and bound) + return readable, state + + +def validate_all() -> dict[str, int]: + """Fail nonzero on any changed expectation; report only fixture IDs/counts.""" + Draft202012Validator.check_schema(SCHEMA) + counts = {} + for prefix in ("privacy", "security"): + table = load(prefix + "-table.json") + Draft202012Validator.check_schema(table["context_schema"]) + for rule in table["rules"]: + Draft202012Validator.check_schema(rule["deny_if"]) + cases = load(prefix + "-fixtures.json")["cases"] + for case in cases: + if decide(table, case["context"]) != case["expected"]: + raise AssertionError(prefix + ": " + case["id"]) + counts[prefix] = len(cases) + cases = load("wire-fixtures.json")["cases"] + for case in cases: + try: + validate_wire(case["schema"], case["value"]) + valid = True + except (ValueError, jsonschema_error): + valid = False + if valid != case["valid"]: + raise AssertionError("wire: " + case["id"]) + counts["wire"] = len(cases) + cases = load("identity-fixtures.json")["cases"] + for index, case in enumerate(cases): + if validator("TraceInput").is_valid(case["input"]) != case["valid"]: + raise AssertionError("identity: " + str(index)) + if case["valid"] and normalize_trace(case["input"]) != case["canonical"]: + raise AssertionError("identity normalization: " + str(index)) + counts["identity"] = len(cases) + table = load("scope-fixtures.json") + for case in table["cases"]: + same = scoped_key(table["base"], table["key_fields"]) == scoped_key({**table["base"], **case["overrides"]}, table["key_fields"]) + actual = "distinct" if not same else "replay" if case["request_equal"] else "conflict" + if actual != case["expected"]: + raise AssertionError("scope: " + case["id"]) + counts["scope"] = len(table["cases"]) + table = load("lifecycle-fixtures.json") + for case in table["cases"]: + if lifecycle_result(table, case["events"]) != (case["readable_after_each"], case["final"]): + raise AssertionError("lifecycle: " + case["id"]) + counts["lifecycle"] = len(table["cases"]) + return counts + + +if __name__ == "__main__": + try: + print(json.dumps({"status": "PASS", "cases": validate_all()}, sort_keys=True)) + except (AssertionError, ValueError, jsonschema_error) as error: + # Wire validation errors can include payloads. Print only type, not contents. + print(json.dumps({"status": "FAIL", "error_type": type(error).__name__})) + sys.exit(1) diff --git a/spec/attachments/v1/wire-fixtures.json b/spec/attachments/v1/wire-fixtures.json new file mode 100644 index 000000000..9d1cae5c3 --- /dev/null +++ b/spec/attachments/v1/wire-fixtures.json @@ -0,0 +1,3318 @@ +{ + "schema_version": 1, + "cases": [ + { + "id": "valid-BootstrapRequest", + "schema": "BootstrapRequest", + "value": { + "schema_versions": [ + 1 + ], + "project_name": "synthetic-voice", + "project_type": "observe", + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001" + }, + "valid": true + }, + { + "id": "valid-BootstrapResponse", + "schema": "BootstrapResponse", + "value": { + "schema_version": 1, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "policy": { + "version": "policy_v1", + "enabled": true, + "allowed_sources": [ + "Bytes", + "OwnedRecordingFile", + "ProviderFile" + ], + "allowed_modalities": [ + "audio" + ], + "require_media_redaction": false, + "require_metadata_removal": false, + "allow_unredacted_media_with_text_pii": false, + "record_audio": false, + "record_video": false + }, + "limits": { + "max_upload_bytes": 52428800, + "segment_bytes": 8388608, + "segment_duration_ms": 30000, + "recording_bytes": 1073741824, + "recording_duration_ms": 7200000, + "active_transfers": 16, + "active_recordings": 4, + "reserved_bytes": 1073741824, + "validation_jobs": 1024, + "initializations_per_minute": 120, + "links_per_minute": 1000, + "upload_bytes_per_second": 1048576, + "playback_bytes_per_second": 1048576, + "transfer_timeout_seconds": 120, + "grant_ttl_seconds": 60, + "revocation_check_seconds": 5 + }, + "expires_at": "2030-01-01T00:10:00Z", + "transfer_modes": [ + "authenticated_stream" + ] + }, + "valid": true + }, + { + "id": "valid-UploadRequest", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044 + }, + "valid": true + }, + { + "id": "valid-UploadResponse", + "schema": "UploadResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "state": "pending_upload", + "reserved_bytes": 48044, + "expires_at": "2030-01-01T00:10:00Z", + "transfer_mode": "authenticated_stream", + "write_capability": "SYNTHETIC_WRITE_CAPABILITY_NOT_A_CREDENTIAL" + }, + "valid": true + }, + { + "id": "valid-CompleteRequest", + "schema": "CompleteRequest", + "value": { + "policy_version": "policy_v1", + "deletion_generation": 0 + }, + "valid": true + }, + { + "id": "valid-StatusResponse", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending" + }, + "valid": true + }, + { + "id": "valid-ImportRequest", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": true + }, + { + "id": "valid-ImportResponse", + "schema": "ImportResponse", + "value": { + "job_id": "0000000d-0000-0000-0000-000000000001", + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "importing" + }, + "valid": true + }, + { + "id": "valid-LinkRequest", + "schema": "LinkRequest", + "value": { + "source_occurrence_id": "00000007-0000-0000-0000-000000000001", + "source_parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + }, + "target_parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "abcdef0123456789" + }, + "occurrence_id": "0000000e-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0 + }, + "valid": true + }, + { + "id": "valid-Reference", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "valid": true + }, + { + "id": "valid-References", + "schema": "References", + "value": [ + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + } + ], + "valid": true + }, + { + "id": "valid-SpanAttributes", + "schema": "SpanAttributes", + "value": { + "fi.attachment.schema_version": 1, + "fi.attachment.refs": "[{\"attachment_id\":\"00000006-0000-0000-0000-000000000001\",\"occurrence_id\":\"00000007-0000-0000-0000-000000000001\",\"direction\":\"mixed\",\"modality\":\"audio\",\"mime_type\":\"audio/wav\",\"purpose\":\"conversation_recording\"}]", + "fi.attachment.capture_session_id": "00000004-0000-0000-0000-000000000001", + "fi.attachment.correlation_nonce": "00000005-0000-0000-0000-000000000001" + }, + "valid": true + }, + { + "id": "valid-MessageURI", + "schema": "MessageURI", + "value": { + "type": "uri", + "modality": "audio", + "mime_type": "audio/wav", + "uri": "fi-attachment:00000007-0000-0000-0000-000000000001" + }, + "valid": true + }, + { + "id": "valid-Occurrence", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": true + }, + { + "id": "valid-OccurrencePage", + "schema": "OccurrencePage", + "value": { + "items": [ + { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z" + } + ], + "next_cursor": null + }, + "valid": true + }, + { + "id": "valid-ResolveRequest", + "schema": "ResolveRequest", + "value": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + }, + "representation": "playable" + } + ] + }, + "valid": true + }, + { + "id": "valid-ResolveResponse", + "schema": "ResolveResponse", + "value": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "/tracer/v1/attachment-media/00000007-0000-0000-0000-000000000001/synthetic_grant", + "expires_at": "2030-01-01T00:10:00Z" + }, + { + "occurrence_id": "0000000e-0000-0000-0000-000000000001", + "status": "not_found" + } + ] + }, + "valid": true + }, + { + "id": "valid-WriteCapabilityClaims", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "create", + "upload", + "complete", + "abort", + "status" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": true + }, + { + "id": "valid-PlaybackGrantClaims", + "schema": "PlaybackGrantClaims", + "value": { + "audience": "fi-attachment-playback", + "viewer_id": "0000000f-0000-0000-0000-000000000001", + "application_session_id": "00000010-0000-0000-0000-000000000001", + "media_session_id": "00000011-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "representation": "playable", + "methods": [ + "GET", + "HEAD" + ], + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": true + }, + { + "id": "valid-RecordingManifest", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000 + }, + "valid": true + }, + { + "id": "valid-OperationRegistryEntry", + "schema": "OperationRegistryEntry", + "value": { + "package": "traceai-pipecat", + "language": "python", + "operation": "bound_audio_processor", + "upstream_version": null, + "source_kind": "Bytes", + "direction": "mixed", + "modality": "audio", + "lifecycle": "explicit_session_binding", + "span_capability": "unqualified", + "attachment_capability": "unqualified", + "policy_requirements": [ + "enabled", + "source_authorized", + "pii_intersection" + ], + "component_test_state": "not_run", + "integrated_gate": "integrated_not_run" + }, + "valid": true + }, + { + "id": "valid-Error", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001" + }, + "valid": true + }, + { + "id": "forbidden-Reference-source_url", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-local_path", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-provider_credential", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-object_key", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-content_hash", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-filename", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-speaker_name", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-exif", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Reference-playback_signature", + "schema": "Reference", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording", + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-source_url", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-local_path", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-provider_credential", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-object_key", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-content_hash", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-filename", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-speaker_name", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-exif", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Occurrence-playback_signature", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z", + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-source_url", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-local_path", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-provider_credential", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-object_key", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-content_hash", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-filename", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-speaker_name", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-exif", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-UploadRequest-playback_signature", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 48044, + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-source_url", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-local_path", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-provider_credential", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-object_key", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-content_hash", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-filename", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-speaker_name", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-exif", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-ImportRequest-playback_signature", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-source_url", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-local_path", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-provider_credential", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-object_key", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-content_hash", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-filename", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-speaker_name", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-exif", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-StatusResponse-playback_signature", + "schema": "StatusResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending", + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-source_url", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-local_path", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-provider_credential", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-object_key", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-content_hash", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-filename", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-speaker_name", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-exif", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-RecordingManifest-playback_signature", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000, + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-source_url", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "source_url": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-local_path", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "local_path": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-provider_credential", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "provider_credential": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-object_key", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "object_key": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-content_hash", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "content_hash": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-filename", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "filename": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-speaker_name", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "speaker_name": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-exif", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "exif": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "forbidden-Error-playback_signature", + "schema": "Error", + "value": { + "code": "not_found", + "request_id": "00000013-0000-0000-0000-000000000001", + "playback_signature": "SYNTHETIC_CANARY_DO_NOT_EXPORT" + }, + "valid": false + }, + { + "id": "write-capability-forbids-list", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "list" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "write-capability-forbids-resolve", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "resolve" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "write-capability-forbids-download", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "download" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "write-capability-forbids-delete", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "delete" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "write-capability-forbids-relink", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "relink" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "write-capability-forbids-provider_connection", + "schema": "WriteCapabilityClaims", + "value": { + "audience": "fi-attachment-write", + "actor_id": "0000000f-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "policy_version": "policy_v1", + "deletion_generation": 0, + "reserved_bytes": 48044, + "operations": [ + "provider_connection" + ], + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "reject-null-scope", + "schema": "Scope", + "value": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": null, + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "valid": false + }, + { + "id": "reject-raw-import-url", + "schema": "ImportSource", + "value": { + "kind": "RemoteUrl", + "url": "https://example.invalid/SYNTHETIC_SECRET" + }, + "valid": false + }, + { + "id": "accept-private-envelope-reference", + "schema": "ImportSource", + "value": { + "kind": "RemoteUrlEnvelope", + "envelope_id": "0000000b-0000-0000-0000-000000000001" + }, + "valid": true + }, + { + "id": "forbid-public-playback", + "schema": "ResolveResponse", + "value": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "https://example.invalid/audio.wav", + "expires_at": "2030-01-01T00:10:00Z" + } + ] + }, + "valid": false + }, + { + "id": "forbid-provider-query-playback", + "schema": "ResolveResponse", + "value": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "/tracer/v1/attachment-media/00000007-0000-0000-0000-000000000001/grant?token=secret", + "expires_at": "2030-01-01T00:10:00Z" + } + ] + }, + "valid": false + }, + { + "id": "forbid-unknown-reference-version", + "schema": "SpanAttributes", + "value": { + "fi.attachment.schema_version": 2, + "fi.attachment.refs": "[{\"attachment_id\":\"00000006-0000-0000-0000-000000000001\",\"occurrence_id\":\"00000007-0000-0000-0000-000000000001\",\"direction\":\"mixed\",\"modality\":\"audio\",\"mime_type\":\"audio/wav\",\"purpose\":\"conversation_recording\"}]", + "fi.attachment.capture_session_id": "00000004-0000-0000-0000-000000000001", + "fi.attachment.correlation_nonce": "00000005-0000-0000-0000-000000000001" + }, + "valid": false + }, + { + "id": "forbid-65-references", + "schema": "References", + "value": [ + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + } + ], + "valid": false + }, + { + "id": "forbid-unbounded-upload", + "schema": "UploadRequest", + "value": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "Bytes", + "declared_bytes": 52428801 + }, + "valid": false + }, + { + "id": "no-capture-badge-without-evidence", + "schema": "OperationRegistryEntry", + "value": { + "package": "traceai-pipecat", + "language": "python", + "operation": "bound_audio_processor", + "upstream_version": null, + "source_kind": "Bytes", + "direction": "mixed", + "modality": "audio", + "lifecycle": "explicit_session_binding", + "span_capability": "unqualified", + "attachment_capability": "capture", + "policy_requirements": [ + "enabled", + "source_authorized", + "pii_intersection" + ], + "component_test_state": "not_run", + "integrated_gate": "integrated_not_run" + }, + "valid": false + }, + { + "id": "complete-without-any-media", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [], + "gaps": [], + "playout": [], + "capture_complete": true, + "duration_ms": 2000 + }, + "valid": false + }, + { + "id": "unmarked-capture-gap", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000 + }, + "valid": false + }, + { + "id": "overlapping-gap-and-media", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 500, + "duration_ms": 1500, + "reason": "queue_full" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000 + }, + "valid": false + }, + { + "id": "nested-page-mime-mismatch", + "schema": "OccurrencePage", + "value": { + "items": [ + { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "image/png", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z" + } + ], + "next_cursor": null + }, + "valid": false + }, + { + "id": "response-parent-must-be-canonical", + "schema": "Occurrence", + "value": { + "reference": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + }, + "state": "ready", + "binding": "bound", + "capture_complete": false, + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z" + }, + "valid": false + }, + { + "id": "gateway-path-must-match-occurrence", + "schema": "ResolveResponse", + "value": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "/tracer/v1/attachment-media/ffffffff-ffff-ffff-ffff-ffffffffffff/synthetic_grant", + "expires_at": "2030-01-01T00:10:00Z" + }, + { + "occurrence_id": "0000000e-0000-0000-0000-000000000001", + "status": "not_found" + } + ] + }, + "valid": false + }, + { + "id": "missing-upload-capability", + "schema": "UploadResponse", + "value": { + "upload_id": "00000008-0000-0000-0000-000000000001", + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "state": "pending_upload", + "reserved_bytes": 48044, + "expires_at": "2030-01-01T00:10:00Z", + "transfer_mode": "authenticated_stream" + }, + "valid": false + }, + { + "id": "safe-attachment-metadata", + "schema": "AttachmentMetadata", + "value": { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "modality": "audio", + "source_kind": "Bytes", + "provider": "pipecat", + "purpose": "conversation_recording", + "policy_version": "policy_v1", + "state": "pending_upload", + "created_at": "2030-01-01T00:00:00Z" + }, + "valid": true + }, + { + "id": "separate-tracks-have-independent-timelines", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 2, + "codec": "pcm", + "container": "wav", + "layout": "separate_tracks", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "output", + "role": "assistant" + }, + { + "track_id": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "channels": [ + 1 + ], + "direction": "input", + "role": "user" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000, + "track_id": "0000000a-0000-0000-0000-000000000001" + }, + { + "occurrence_id": "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee", + "index": 1, + "start_ms": 0, + "duration_ms": 1000, + "track_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full", + "track_id": "0000000a-0000-0000-0000-000000000001" + }, + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full", + "track_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000 + }, + "valid": true + }, + { + "id": "separate-track-needs-track-identity", + "schema": "RecordingManifest", + "value": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 2, + "codec": "pcm", + "container": "wav", + "layout": "separate_tracks", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "output", + "role": "assistant" + }, + { + "track_id": "ffffffff-ffff-ffff-ffff-ffffffffffff", + "channels": [ + 1 + ], + "direction": "input", + "role": "user" + } + ], + "segments": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 1000, + "track_id": "0000000a-0000-0000-0000-000000000001" + }, + { + "occurrence_id": "eeeeeeee-eeee-eeee-eeee-eeeeeeeeeeee", + "index": 1, + "start_ms": 0, + "duration_ms": 1000 + } + ], + "gaps": [ + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full", + "track_id": "0000000a-0000-0000-0000-000000000001" + }, + { + "start_ms": 1000, + "duration_ms": 1000, + "reason": "queue_full", + "track_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + ], + "playout": [ + { + "start_ms": 0, + "duration_ms": 2000, + "evidence": "unknown" + } + ], + "capture_complete": false, + "duration_ms": 2000 + }, + "valid": false + }, + { + "id": "same-occurrence-with-different-metadata", + "schema": "References", + "value": [ + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "conversation_recording" + }, + { + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "direction": "mixed", + "modality": "audio", + "mime_type": "audio/wav", + "purpose": "turn_recording" + } + ], + "valid": false + } + ] +} From f3b0923c62d43b3a52bf4c16a2226c39c22b690d Mon Sep 17 00:00:00 2001 From: Nikhil Pareek Date: Tue, 10 Nov 2026 17:47:45 -0800 Subject: [PATCH 2/4] fix(spec): bound completed recording imports separately Define a completed-recording job with exact source declarations, immutable bounded reads, scoped reservations and server-produced segments. Preserve single-upload and segment ceilings; cover source-length and resource-bound failures with shared fixtures and a one-hour synthetic WAV regression. Co-Authored-By: Claude Code --- spec/attachments/v1/README.rst | 113 + spec/attachments/v1/constants.json | 13 +- spec/attachments/v1/contract.schema.json | 208 +- spec/attachments/v1/openapi.json | 117 +- .../v1/recording-import-fixtures.json | 2885 +++++++++++++++++ spec/attachments/v1/test_contract.py | 124 + spec/attachments/v1/test_protocol.py | 20 + spec/attachments/v1/validate.py | 109 +- spec/attachments/v1/wire-fixtures.json | 848 +++++ 9 files changed, 4404 insertions(+), 33 deletions(-) create mode 100644 spec/attachments/v1/recording-import-fixtures.json diff --git a/spec/attachments/v1/README.rst b/spec/attachments/v1/README.rst index d8ef193d4..432f20dbb 100644 --- a/spec/attachments/v1/README.rst +++ b/spec/attachments/v1/README.rst @@ -197,6 +197,119 @@ Server/global admission also reserves decoded resources, parts, objects and link Unknown budgets fail readiness. Numeric schema ceilings are safety envelopes, not billing/edition limits or promised achievable recording lengths. +Completed-recording import +-------------------------- + +``ImportRequest`` has two disjoint forms. The existing ``{upload, source}`` form +imports one attachment or one already-segmented recording part; its 50 MiB upload +and 8 MiB recording-segment limits are unchanged. A completed whole audio output +uses ``{mode: "completed_recording", recording, source}`` instead. The +``CompletedRecordingImport`` descriptor supplies a new ``recording_id``, exact +``declared_bytes`` and ``declared_duration_ms``, association, policy/generation, +MIME, modality, direction and source kind. It has no upload, attachment, occurrence +or segment ID: the server allocates segment identities under that exact binding. +The descriptor is not an ``UploadRequest`` and never authorizes a larger PUT. + +Admission and handoff +~~~~~~~~~~~~~~~~~~~~ + +* Use an authorized registered terminal-completed provider output or a private + source envelope referencing a completed output. The trusted resolver verifies + completion, exact encoded length, immutable version and bounded-range support + before accepting the job. Unknown length, mutable/growing output, unsupported + range semantics or an uncompleted Egress job fails closed. No recorder or + billable Egress is started. Partial-output import is not this mode. +* Require both explicit attachment/source permission and the ordinary scoped + import identity, including separate provider-connection authority. Apply the + same deny-wins privacy/PII/hide rules before source retrieval and on every retry; + the new-recording switch is not an import permission. Client-supplied direction + cannot override trusted source ancestry. A write-only upload capability cannot + submit this job or select a connection. +* The source is bounded by negotiated ``recording_bytes`` (ceiling 1 GiB) AND + ``recording_duration_ms`` (ceiling 120 minutes). Duration is the decoded duration + rounded UP to the next whole millisecond. These are admission declarations, + independently verified after reading. Over-limit completed sources are rejected, + never silently truncated to an apparently complete recording. +* Allocate a new recording under the exact tenant/project/actor/session/parent, + policy and deletion generation. An already occupied recording ID conflicts + unless it is an identical scoped idempotent replay. Retries reuse the job and + its allocations; they cannot append to or replace another recording. +* Before fetching, atomically reserve the entire declared immutable-source size + PLUS one output segment window of ``min(max_upload_bytes, segment_bytes)``. This + staging reservation is distinct from the recording's lifetime byte accounting. + Check project, organization AND global remaining capacity, active transfer and + recording slots, validation jobs, initialization rate, objects, links and decoded + memory/disk/CPU budgets. Unknown capacity denies. The initial byte reservation + must fit ``reserved_bytes``; project 1 GiB and organization 2 GiB defaults do not + increase for imports. Exhaustion returns 429 with Retry-After, without a fetch. + A source at the maximum envelope therefore needs a smaller encoding to leave + staging headroom under the v1 reservation ceiling; the envelope is not a guarantee. +* Return ``RecordingImportResponse`` with mode, ``job_id``, ``recording_id`` and + ``state=importing``. No upload capability or whole-source occurrence is issued. + ``GET /imports/{job_id}/status`` is content-free and restricted to the original + scoped importer. Keep only opaque source references in durable jobs/history. + The job deadline is at most three hours and also capped by source retention and + deletion. An expired envelope is renewed only by its authorized fixed-ID resolver; + otherwise fail ``source_unavailable``. No indefinite URL retention or polling. + +Bounded source transfers and segment production +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +1. Read the exact registered immutable version through sequential bounded ranges, + each at most ``min(max_upload_bytes, segment_bytes)`` (at most 8 MiB), with at most + 256 KiB owned stream buffers. Verify each offset, response length, total encoded + length and generation; a server ignoring a Range and returning the whole body + is rejected, not buffered. Apply the negotiated per-transfer timeout, egress + token bucket and transfer slots to every range. All safe-retrieval/DNS/TLS/ + redirect rules still apply. Bytes are streamed to private reserved quarantine, + not through an expanded SDK upload. A connector without these guarantees is + unsupported, not a full-download fallback. +2. Count actual bytes, not just headers. Short reads, excess bytes, a changed total + length/generation or actual decoded duration differing from the declaration + reject the job. A reader may consume at most one bounded overrun-detection byte + without retaining it, then must abort; it cannot drain an oversized response. + Retries are bounded to three attempts, reuse the range/reservation and recheck + policy/generation. No policy or validation retries. +3. A credential-free, network-disabled isolated worker probes the fixed snapshot + and emits independently valid playable segments, each within BOTH the negotiated + segment duration (at most 30 seconds) and byte ceiling (at most 8 MiB, further + bounded by ``max_upload_bytes``). Splitting encoded bytes arbitrarily is not + segmentation. Container overhead counts. If a frame/format cannot fit, reject + rather than emit an oversized segment. Source encoded bytes and total playable + segment bytes must EACH fit ``recording_bytes``; decoding/transcoding expansion + never gets a free pass. Channel derivatives/peaks have separately reserved + finite budgets and follow the same private immutable promotion boundary. +4. Maintain a moving output window, not a reservation for an unbounded manifest. + Before every new segment/derivative, atomically acquire its byte/object/link/ + job/decoder budget under all three scopes. Settle verified bytes once, release + failed reservations once, and do not release the source snapshot's reservation + while its staged bytes still exist. Retrying a segment does not allocate a new + occurrence. Loss of window capacity pauses within the finite job deadline or + fails; it never overruns capacity. At all times actual uncommitted bytes must + be covered by live reservations, including simultaneous source/output copies. +5. Produce ``RecordingManifest`` with actual codec/channel/track mappings and + contiguous ordered segment occurrences bound to this job's parent. Preserve + mixed-direction ancestry; unknown speaker or playout evidence stays unknown. + A successful completed import has full per-track duration coverage, no gaps, + and ``capture_complete=true``. Enforce the existing 1 MiB manifest bound and + segment/object counts. Reject over-budget output instead of silently omitting it. +6. Only after exact source validation, all bounded segment validation and a live + authorized source binding may the server publish the segment occurrences and + manifest atomically under the current policy/deletion generation. Whole-source + quarantine is never playable. Before that, staged segments are not readable. + Failure, expiry, deletion or policy tightening fences late workers and sweeps + staged snapshots, segments, derivatives and reservations idempotently. Playback + still uses occurrence authorization and the authenticated media gateway. + +``recording-import-fixtures.json`` supplies language-neutral admission headroom +and verified-worker observations for this protocol. They are conformance inputs, +not wire fields clients can assert as authority. The one-hour 24-kHz mono s16 WAV +example declares 172,800,044 source bytes and produces 120 thirty-second WAV parts +of 1,440,044 bytes each; the output total includes 120 container headers. It exceeds +both old import ceilings without changing either per-transfer ceiling. Consumers +must additionally run these cases against their real importer, decoder, reservation +ledger and authenticated provider connector before claiming support. + Nine mandatory security boundaries ---------------------------------- diff --git a/spec/attachments/v1/constants.json b/spec/attachments/v1/constants.json index 5993d422a..247762f2f 100644 --- a/spec/attachments/v1/constants.json +++ b/spec/attachments/v1/constants.json @@ -32,5 +32,16 @@ }, "manifest_max_utf8_bytes": 1048576, "default_transfer_mode": "authenticated_stream", - "default_cache_control": "private, no-store" + "default_cache_control": "private, no-store", + "completed_recording_import": { + "mode": "completed_recording", + "source_bytes": 1073741824, + "duration_ms": 7200000, + "source_range_bytes": 8388608, + "stream_buffer_bytes": 262144, + "output_window_segments": 1, + "max_job_seconds": 10800, + "source_requirement": "terminal_completed_immutable_bounded_ranges", + "publication": "all_validated_segments_and_bound_manifest_atomically" + } } diff --git a/spec/attachments/v1/contract.schema.json b/spec/attachments/v1/contract.schema.json index 0ea22efee..7287fbc44 100644 --- a/spec/attachments/v1/contract.schema.json +++ b/spec/attachments/v1/contract.schema.json @@ -1113,40 +1113,24 @@ ] }, "ImportRequest": { - "type": "object", - "additionalProperties": false, - "required": [ - "upload", - "source" - ], - "properties": { - "upload": { - "$ref": "#/$defs/UploadRequest" + "oneOf": [ + { + "$ref": "#/$defs/SingleAttachmentImportRequest" }, - "source": { - "$ref": "#/$defs/ImportSource" + { + "$ref": "#/$defs/RecordingImportRequest" } - } + ] }, "ImportResponse": { - "type": "object", - "additionalProperties": false, - "required": [ - "job_id", - "upload_id", - "state" - ], - "properties": { - "job_id": { - "$ref": "#/$defs/UUID" - }, - "upload_id": { - "$ref": "#/$defs/UUID" + "oneOf": [ + { + "$ref": "#/$defs/SingleAttachmentImportResponse" }, - "state": { - "const": "importing" + { + "$ref": "#/$defs/RecordingImportResponse" } - } + ] }, "LinkRequest": { "type": "object", @@ -2058,6 +2042,174 @@ "$ref": "#/$defs/CanonicalParent" } } + }, + "SingleAttachmentImportRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "upload", + "source" + ], + "properties": { + "upload": { + "$ref": "#/$defs/UploadRequest" + }, + "source": { + "$ref": "#/$defs/ImportSource" + } + } + }, + "SingleAttachmentImportResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "job_id", + "upload_id", + "state" + ], + "properties": { + "job_id": { + "$ref": "#/$defs/UUID" + }, + "upload_id": { + "$ref": "#/$defs/UUID" + }, + "state": { + "const": "importing" + } + } + }, + "CompletedRecordingImport": { + "type": "object", + "additionalProperties": false, + "required": [ + "schema_version", + "association", + "policy_version", + "deletion_generation", + "mime_type", + "direction", + "source_kind", + "recording_id", + "modality", + "declared_bytes", + "declared_duration_ms" + ], + "properties": { + "schema_version": { + "const": 1 + }, + "association": { + "$ref": "#/$defs/Association" + }, + "policy_version": { + "$ref": "#/$defs/Token" + }, + "deletion_generation": { + "$ref": "#/$defs/SafeInteger" + }, + "mime_type": { + "enum": [ + "audio/wav", + "audio/ogg", + "audio/mpeg", + "audio/mp4", + "audio/webm", + "audio/flac", + "audio/L16" + ] + }, + "direction": { + "$ref": "#/$defs/Direction" + }, + "source_kind": { + "enum": [ + "ProviderFile", + "RemoteUrl" + ] + }, + "recording_id": { + "$ref": "#/$defs/UUID" + }, + "modality": { + "const": "audio" + }, + "declared_bytes": { + "type": "integer", + "minimum": 1, + "maximum": 1073741824 + }, + "declared_duration_ms": { + "type": "integer", + "minimum": 1, + "maximum": 7200000 + } + }, + "description": "Admission for a new completed audio recording, not an upload or segment. Exact source length and ceil-to-millisecond duration are required. Server produces bounded segments; no whole-source occurrence is readable. Negotiated limits and atomic reservations also apply." + }, + "RecordingImportRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "mode", + "recording", + "source" + ], + "properties": { + "mode": { + "const": "completed_recording" + }, + "recording": { + "$ref": "#/$defs/CompletedRecordingImport" + }, + "source": { + "$ref": "#/$defs/ImportSource" + } + } + }, + "RecordingImportResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "mode", + "job_id", + "recording_id", + "state" + ], + "properties": { + "mode": { + "const": "completed_recording" + }, + "job_id": { + "$ref": "#/$defs/UUID" + }, + "recording_id": { + "$ref": "#/$defs/UUID" + }, + "state": { + "const": "importing" + } + } + }, + "ImportStatusResponse": { + "type": "object", + "additionalProperties": false, + "required": [ + "job_id", + "state", + "reason" + ], + "properties": { + "job_id": { + "$ref": "#/$defs/UUID" + }, + "state": { + "$ref": "#/$defs/Status" + }, + "reason": { + "$ref": "#/$defs/Reason" + } + } } } } diff --git a/spec/attachments/v1/openapi.json b/spec/attachments/v1/openapi.json index 455d40443..12c53ad7d 100644 --- a/spec/attachments/v1/openapi.json +++ b/spec/attachments/v1/openapi.json @@ -777,7 +777,7 @@ "/tracer/v1/projects/{project_id}/attachments/imports": { "post": { "operationId": "importAttachment", - "description": "Private envelope reference or registered completed provider output only. Provider connection authority is separate; write-only upload capabilities cannot select a connection.", + "description": "Private envelope reference or registered completed provider output only. Provider connection authority is separate; write-only upload capabilities cannot select a connection. Single-attachment imports retain UploadRequest ceilings. mode=completed_recording uses RecordingImportRequest, reserves exact whole-source bytes plus a bounded output window, reads immutable source ranges no larger than min(max_upload_bytes, segment_bytes), and produces recording segments under both byte and duration limits. It requires a terminal completed source; it never starts a recorder or Egress. See README completed-recording protocol for length, reservation and publication invariants.", "security": [ { "AttachmentCredential": [] @@ -2007,6 +2007,121 @@ } ] } + }, + "/tracer/v1/projects/{project_id}/attachments/imports/{job_id}/status": { + "get": { + "operationId": "getAttachmentImportStatus", + "description": "Content-free status for the original scoped import identity and exact job. No upload capability, provider location or playback authority is returned. Foreign and absent jobs are indistinguishable.", + "security": [ + { + "AttachmentCredential": [] + }, + { + "ApplicationSession": [] + } + ], + "x-authority": "scoped_import_identity", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/ImportStatusResponse" + } + } + } + }, + "400": { + "description": "Invalid request", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "403": { + "description": "Operation not allowed", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "404": { + "description": "Unknown or unauthorized occurrence; indistinguishable", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "409": { + "description": "Conflicting request or stale generation", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "413": { + "description": "Limit exceeded", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + }, + "429": { + "description": "Admission throttled; Retry-After required", + "content": { + "application/json": { + "schema": { + "$ref": "contract.schema.json#/$defs/Error" + } + } + } + } + }, + "parameters": [ + { + "name": "project_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + }, + { + "name": "job_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/UUID" + } + } + ] + } } }, "components": { diff --git a/spec/attachments/v1/recording-import-fixtures.json b/spec/attachments/v1/recording-import-fixtures.json new file mode 100644 index 000000000..452488901 --- /dev/null +++ b/spec/attachments/v1/recording-import-fixtures.json @@ -0,0 +1,2885 @@ +{ + "contract": "fi.attachments.v1", + "description": "Test-only admission headroom and verified execution observations, never caller-supplied authority or production importer code. Apply recursive object overrides; replace arrays. Each case checks only its named stage.", + "base": { + "request": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "limits": { + "max_upload_bytes": 52428800, + "segment_bytes": 8388608, + "segment_duration_ms": 30000, + "recording_bytes": 1073741824, + "recording_duration_ms": 7200000, + "active_transfers": 16, + "active_recordings": 4, + "reserved_bytes": 1073741824, + "validation_jobs": 1024, + "initializations_per_minute": 120, + "links_per_minute": 1000, + "upload_bytes_per_second": 1048576, + "playback_bytes_per_second": 1048576, + "transfer_timeout_seconds": 120, + "grant_ttl_seconds": 60, + "revocation_check_seconds": 5 + }, + "headroom": { + "project": { + "bytes": 1073741824, + "transfers": 1, + "recordings": 1, + "validation_jobs": 1, + "objects": 2, + "links": 1 + }, + "organization": { + "bytes": 2147483648, + "transfers": 1, + "recordings": 1, + "validation_jobs": 1, + "objects": 2, + "links": 1 + }, + "global": { + "bytes": 2147483648, + "transfers": 1, + "recordings": 1, + "validation_jobs": 1, + "objects": 2, + "links": 1 + } + }, + "source": { + "terminal_completed": true, + "immutable": true, + "bounded_ranges": true + }, + "observation": { + "source_bytes": 172800044, + "source_duration_ms": 3600000, + "generation_matches": true, + "reads": [ + { + "offset": 0, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 8388608, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 16777216, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 25165824, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 33554432, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 41943040, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 50331648, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 58720256, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 67108864, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 75497472, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 83886080, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 92274688, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 100663296, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 109051904, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 117440512, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 125829120, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 134217728, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 142606336, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 150994944, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 159383552, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 167772160, + "bytes": 5027884, + "total_bytes": 172800044 + } + ], + "manifest": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000100-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000101-0000-0000-0000-000000000001", + "index": 1, + "start_ms": 30000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000102-0000-0000-0000-000000000001", + "index": 2, + "start_ms": 60000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000103-0000-0000-0000-000000000001", + "index": 3, + "start_ms": 90000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000104-0000-0000-0000-000000000001", + "index": 4, + "start_ms": 120000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000105-0000-0000-0000-000000000001", + "index": 5, + "start_ms": 150000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000106-0000-0000-0000-000000000001", + "index": 6, + "start_ms": 180000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000107-0000-0000-0000-000000000001", + "index": 7, + "start_ms": 210000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000108-0000-0000-0000-000000000001", + "index": 8, + "start_ms": 240000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000109-0000-0000-0000-000000000001", + "index": 9, + "start_ms": 270000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010a-0000-0000-0000-000000000001", + "index": 10, + "start_ms": 300000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010b-0000-0000-0000-000000000001", + "index": 11, + "start_ms": 330000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010c-0000-0000-0000-000000000001", + "index": 12, + "start_ms": 360000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010d-0000-0000-0000-000000000001", + "index": 13, + "start_ms": 390000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010e-0000-0000-0000-000000000001", + "index": 14, + "start_ms": 420000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010f-0000-0000-0000-000000000001", + "index": 15, + "start_ms": 450000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000110-0000-0000-0000-000000000001", + "index": 16, + "start_ms": 480000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000111-0000-0000-0000-000000000001", + "index": 17, + "start_ms": 510000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000112-0000-0000-0000-000000000001", + "index": 18, + "start_ms": 540000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000113-0000-0000-0000-000000000001", + "index": 19, + "start_ms": 570000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000114-0000-0000-0000-000000000001", + "index": 20, + "start_ms": 600000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000115-0000-0000-0000-000000000001", + "index": 21, + "start_ms": 630000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000116-0000-0000-0000-000000000001", + "index": 22, + "start_ms": 660000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000117-0000-0000-0000-000000000001", + "index": 23, + "start_ms": 690000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000118-0000-0000-0000-000000000001", + "index": 24, + "start_ms": 720000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000119-0000-0000-0000-000000000001", + "index": 25, + "start_ms": 750000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011a-0000-0000-0000-000000000001", + "index": 26, + "start_ms": 780000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011b-0000-0000-0000-000000000001", + "index": 27, + "start_ms": 810000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011c-0000-0000-0000-000000000001", + "index": 28, + "start_ms": 840000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011d-0000-0000-0000-000000000001", + "index": 29, + "start_ms": 870000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011e-0000-0000-0000-000000000001", + "index": 30, + "start_ms": 900000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011f-0000-0000-0000-000000000001", + "index": 31, + "start_ms": 930000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000120-0000-0000-0000-000000000001", + "index": 32, + "start_ms": 960000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000121-0000-0000-0000-000000000001", + "index": 33, + "start_ms": 990000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000122-0000-0000-0000-000000000001", + "index": 34, + "start_ms": 1020000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000123-0000-0000-0000-000000000001", + "index": 35, + "start_ms": 1050000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000124-0000-0000-0000-000000000001", + "index": 36, + "start_ms": 1080000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000125-0000-0000-0000-000000000001", + "index": 37, + "start_ms": 1110000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000126-0000-0000-0000-000000000001", + "index": 38, + "start_ms": 1140000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000127-0000-0000-0000-000000000001", + "index": 39, + "start_ms": 1170000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000128-0000-0000-0000-000000000001", + "index": 40, + "start_ms": 1200000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000129-0000-0000-0000-000000000001", + "index": 41, + "start_ms": 1230000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012a-0000-0000-0000-000000000001", + "index": 42, + "start_ms": 1260000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012b-0000-0000-0000-000000000001", + "index": 43, + "start_ms": 1290000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012c-0000-0000-0000-000000000001", + "index": 44, + "start_ms": 1320000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012d-0000-0000-0000-000000000001", + "index": 45, + "start_ms": 1350000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012e-0000-0000-0000-000000000001", + "index": 46, + "start_ms": 1380000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012f-0000-0000-0000-000000000001", + "index": 47, + "start_ms": 1410000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000130-0000-0000-0000-000000000001", + "index": 48, + "start_ms": 1440000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000131-0000-0000-0000-000000000001", + "index": 49, + "start_ms": 1470000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000132-0000-0000-0000-000000000001", + "index": 50, + "start_ms": 1500000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000133-0000-0000-0000-000000000001", + "index": 51, + "start_ms": 1530000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000134-0000-0000-0000-000000000001", + "index": 52, + "start_ms": 1560000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000135-0000-0000-0000-000000000001", + "index": 53, + "start_ms": 1590000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000136-0000-0000-0000-000000000001", + "index": 54, + "start_ms": 1620000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000137-0000-0000-0000-000000000001", + "index": 55, + "start_ms": 1650000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000138-0000-0000-0000-000000000001", + "index": 56, + "start_ms": 1680000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000139-0000-0000-0000-000000000001", + "index": 57, + "start_ms": 1710000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013a-0000-0000-0000-000000000001", + "index": 58, + "start_ms": 1740000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013b-0000-0000-0000-000000000001", + "index": 59, + "start_ms": 1770000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013c-0000-0000-0000-000000000001", + "index": 60, + "start_ms": 1800000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013d-0000-0000-0000-000000000001", + "index": 61, + "start_ms": 1830000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013e-0000-0000-0000-000000000001", + "index": 62, + "start_ms": 1860000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013f-0000-0000-0000-000000000001", + "index": 63, + "start_ms": 1890000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000140-0000-0000-0000-000000000001", + "index": 64, + "start_ms": 1920000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000141-0000-0000-0000-000000000001", + "index": 65, + "start_ms": 1950000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000142-0000-0000-0000-000000000001", + "index": 66, + "start_ms": 1980000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000143-0000-0000-0000-000000000001", + "index": 67, + "start_ms": 2010000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000144-0000-0000-0000-000000000001", + "index": 68, + "start_ms": 2040000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000145-0000-0000-0000-000000000001", + "index": 69, + "start_ms": 2070000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000146-0000-0000-0000-000000000001", + "index": 70, + "start_ms": 2100000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000147-0000-0000-0000-000000000001", + "index": 71, + "start_ms": 2130000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000148-0000-0000-0000-000000000001", + "index": 72, + "start_ms": 2160000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000149-0000-0000-0000-000000000001", + "index": 73, + "start_ms": 2190000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014a-0000-0000-0000-000000000001", + "index": 74, + "start_ms": 2220000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014b-0000-0000-0000-000000000001", + "index": 75, + "start_ms": 2250000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014c-0000-0000-0000-000000000001", + "index": 76, + "start_ms": 2280000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014d-0000-0000-0000-000000000001", + "index": 77, + "start_ms": 2310000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014e-0000-0000-0000-000000000001", + "index": 78, + "start_ms": 2340000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014f-0000-0000-0000-000000000001", + "index": 79, + "start_ms": 2370000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000150-0000-0000-0000-000000000001", + "index": 80, + "start_ms": 2400000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000151-0000-0000-0000-000000000001", + "index": 81, + "start_ms": 2430000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000152-0000-0000-0000-000000000001", + "index": 82, + "start_ms": 2460000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000153-0000-0000-0000-000000000001", + "index": 83, + "start_ms": 2490000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000154-0000-0000-0000-000000000001", + "index": 84, + "start_ms": 2520000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000155-0000-0000-0000-000000000001", + "index": 85, + "start_ms": 2550000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000156-0000-0000-0000-000000000001", + "index": 86, + "start_ms": 2580000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000157-0000-0000-0000-000000000001", + "index": 87, + "start_ms": 2610000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000158-0000-0000-0000-000000000001", + "index": 88, + "start_ms": 2640000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000159-0000-0000-0000-000000000001", + "index": 89, + "start_ms": 2670000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015a-0000-0000-0000-000000000001", + "index": 90, + "start_ms": 2700000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015b-0000-0000-0000-000000000001", + "index": 91, + "start_ms": 2730000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015c-0000-0000-0000-000000000001", + "index": 92, + "start_ms": 2760000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015d-0000-0000-0000-000000000001", + "index": 93, + "start_ms": 2790000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015e-0000-0000-0000-000000000001", + "index": 94, + "start_ms": 2820000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015f-0000-0000-0000-000000000001", + "index": 95, + "start_ms": 2850000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000160-0000-0000-0000-000000000001", + "index": 96, + "start_ms": 2880000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000161-0000-0000-0000-000000000001", + "index": 97, + "start_ms": 2910000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000162-0000-0000-0000-000000000001", + "index": 98, + "start_ms": 2940000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000163-0000-0000-0000-000000000001", + "index": 99, + "start_ms": 2970000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000164-0000-0000-0000-000000000001", + "index": 100, + "start_ms": 3000000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000165-0000-0000-0000-000000000001", + "index": 101, + "start_ms": 3030000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000166-0000-0000-0000-000000000001", + "index": 102, + "start_ms": 3060000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000167-0000-0000-0000-000000000001", + "index": 103, + "start_ms": 3090000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000168-0000-0000-0000-000000000001", + "index": 104, + "start_ms": 3120000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000169-0000-0000-0000-000000000001", + "index": 105, + "start_ms": 3150000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016a-0000-0000-0000-000000000001", + "index": 106, + "start_ms": 3180000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016b-0000-0000-0000-000000000001", + "index": 107, + "start_ms": 3210000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016c-0000-0000-0000-000000000001", + "index": 108, + "start_ms": 3240000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016d-0000-0000-0000-000000000001", + "index": 109, + "start_ms": 3270000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016e-0000-0000-0000-000000000001", + "index": 110, + "start_ms": 3300000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016f-0000-0000-0000-000000000001", + "index": 111, + "start_ms": 3330000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000170-0000-0000-0000-000000000001", + "index": 112, + "start_ms": 3360000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000171-0000-0000-0000-000000000001", + "index": 113, + "start_ms": 3390000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000172-0000-0000-0000-000000000001", + "index": 114, + "start_ms": 3420000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000173-0000-0000-0000-000000000001", + "index": 115, + "start_ms": 3450000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000174-0000-0000-0000-000000000001", + "index": 116, + "start_ms": 3480000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000175-0000-0000-0000-000000000001", + "index": 117, + "start_ms": 3510000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000176-0000-0000-0000-000000000001", + "index": 118, + "start_ms": 3540000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000177-0000-0000-0000-000000000001", + "index": 119, + "start_ms": 3570000, + "duration_ms": 30000 + } + ], + "gaps": [], + "playout": [ + { + "start_ms": 0, + "duration_ms": 3600000, + "evidence": "unknown" + } + ], + "capture_complete": true, + "duration_ms": 3600000 + }, + "segment_bytes": [ + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044 + ] + } + }, + "cases": [ + { + "id": "one-hour-completed-provider-admitted", + "stage": "admission", + "overrides": {}, + "valid": true + }, + { + "id": "one-hour-produces-120-bounded-segments", + "stage": "completion", + "overrides": {}, + "valid": true + }, + { + "id": "five-minute-completed-recording-admitted", + "stage": "admission", + "overrides": { + "request": { + "recording": { + "declared_bytes": 14400044, + "declared_duration_ms": 300000 + } + } + }, + "valid": true + }, + { + "id": "source-recording-byte-budget", + "stage": "admission", + "overrides": { + "limits": { + "recording_bytes": 172800043 + } + }, + "valid": false + }, + { + "id": "source-recording-duration-budget", + "stage": "admission", + "overrides": { + "limits": { + "recording_duration_ms": 3599999 + } + }, + "valid": false + }, + { + "id": "project-bytes-budget", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "bytes": 181188651 + } + } + }, + "valid": false + }, + { + "id": "project-transfers-budget", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "transfers": 0 + } + } + }, + "valid": false + }, + { + "id": "project-recordings-budget", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "recordings": 0 + } + } + }, + "valid": false + }, + { + "id": "project-validation_jobs-budget", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "validation_jobs": 0 + } + } + }, + "valid": false + }, + { + "id": "project-objects-budget", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "objects": 0 + } + } + }, + "valid": false + }, + { + "id": "project-links-budget", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "links": 0 + } + } + }, + "valid": false + }, + { + "id": "organization-bytes-budget", + "stage": "admission", + "overrides": { + "headroom": { + "organization": { + "bytes": 181188651 + } + } + }, + "valid": false + }, + { + "id": "organization-transfers-budget", + "stage": "admission", + "overrides": { + "headroom": { + "organization": { + "transfers": 0 + } + } + }, + "valid": false + }, + { + "id": "organization-recordings-budget", + "stage": "admission", + "overrides": { + "headroom": { + "organization": { + "recordings": 0 + } + } + }, + "valid": false + }, + { + "id": "organization-validation_jobs-budget", + "stage": "admission", + "overrides": { + "headroom": { + "organization": { + "validation_jobs": 0 + } + } + }, + "valid": false + }, + { + "id": "organization-objects-budget", + "stage": "admission", + "overrides": { + "headroom": { + "organization": { + "objects": 0 + } + } + }, + "valid": false + }, + { + "id": "organization-links-budget", + "stage": "admission", + "overrides": { + "headroom": { + "organization": { + "links": 0 + } + } + }, + "valid": false + }, + { + "id": "global-bytes-budget", + "stage": "admission", + "overrides": { + "headroom": { + "global": { + "bytes": 181188651 + } + } + }, + "valid": false + }, + { + "id": "global-transfers-budget", + "stage": "admission", + "overrides": { + "headroom": { + "global": { + "transfers": 0 + } + } + }, + "valid": false + }, + { + "id": "global-recordings-budget", + "stage": "admission", + "overrides": { + "headroom": { + "global": { + "recordings": 0 + } + } + }, + "valid": false + }, + { + "id": "global-validation_jobs-budget", + "stage": "admission", + "overrides": { + "headroom": { + "global": { + "validation_jobs": 0 + } + } + }, + "valid": false + }, + { + "id": "global-objects-budget", + "stage": "admission", + "overrides": { + "headroom": { + "global": { + "objects": 0 + } + } + }, + "valid": false + }, + { + "id": "global-links-budget", + "stage": "admission", + "overrides": { + "headroom": { + "global": { + "links": 0 + } + } + }, + "valid": false + }, + { + "id": "source-alone-fits-but-output-window-does-not", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "bytes": 172800044 + } + } + }, + "valid": false + }, + { + "id": "exact-initial-reservation-fits", + "stage": "admission", + "overrides": { + "headroom": { + "project": { + "bytes": 181188652 + } + } + }, + "valid": true + }, + { + "id": "deny-source-without-terminal_completed", + "stage": "admission", + "overrides": { + "source": { + "terminal_completed": false + } + }, + "valid": false + }, + { + "id": "deny-source-without-immutable", + "stage": "admission", + "overrides": { + "source": { + "immutable": false + } + }, + "valid": false + }, + { + "id": "deny-source-without-bounded_ranges", + "stage": "admission", + "overrides": { + "source": { + "bounded_ranges": false + } + }, + "valid": false + }, + { + "id": "source-length-mismatch--1", + "stage": "completion", + "overrides": { + "observation": { + "source_bytes": 172800043 + } + }, + "valid": false + }, + { + "id": "source-length-mismatch-1", + "stage": "completion", + "overrides": { + "observation": { + "source_bytes": 172800045 + } + }, + "valid": false + }, + { + "id": "actual-duration-mismatch", + "stage": "completion", + "overrides": { + "observation": { + "source_duration_ms": 3600001 + } + }, + "valid": false + }, + { + "id": "source-generation-changed", + "stage": "completion", + "overrides": { + "observation": { + "generation_matches": false + } + }, + "valid": false + }, + { + "id": "range-not-honored-whole-body", + "stage": "completion", + "overrides": { + "observation": { + "reads": [ + { + "offset": 0, + "bytes": 172800044, + "total_bytes": 172800044 + } + ] + } + }, + "valid": false + }, + { + "id": "range-gap", + "stage": "completion", + "overrides": { + "observation": { + "reads": [ + { + "offset": 0, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 8388609, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 16777216, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 25165824, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 33554432, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 41943040, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 50331648, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 58720256, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 67108864, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 75497472, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 83886080, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 92274688, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 100663296, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 109051904, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 117440512, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 125829120, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 134217728, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 142606336, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 150994944, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 159383552, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 167772160, + "bytes": 5027884, + "total_bytes": 172800044 + } + ] + } + }, + "valid": false + }, + { + "id": "range-declared-total-mismatch", + "stage": "completion", + "overrides": { + "observation": { + "reads": [ + { + "offset": 0, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 8388608, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 16777216, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 25165824, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 33554432, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 41943040, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 50331648, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 58720256, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 67108864, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 75497472, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 83886080, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 92274688, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 100663296, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 109051904, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 117440512, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 125829120, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 134217728, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 142606336, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 150994944, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 159383552, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 167772160, + "bytes": 5027884, + "total_bytes": 172800045 + } + ] + } + }, + "valid": false + }, + { + "id": "missing-final-range", + "stage": "completion", + "overrides": { + "observation": { + "reads": [ + { + "offset": 0, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 8388608, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 16777216, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 25165824, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 33554432, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 41943040, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 50331648, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 58720256, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 67108864, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 75497472, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 83886080, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 92274688, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 100663296, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 109051904, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 117440512, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 125829120, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 134217728, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 142606336, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 150994944, + "bytes": 8388608, + "total_bytes": 172800044 + }, + { + "offset": 159383552, + "bytes": 8388608, + "total_bytes": 172800044 + } + ] + } + }, + "valid": false + }, + { + "id": "segment-over-byte-limit", + "stage": "completion", + "overrides": { + "observation": { + "segment_bytes": [ + 8388609, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044 + ] + } + }, + "valid": false + }, + { + "id": "segment-total-over-recording-budget", + "stage": "completion", + "overrides": { + "limits": { + "recording_bytes": 172800044 + } + }, + "valid": false + }, + { + "id": "negotiated-segment-size-enforced", + "stage": "completion", + "overrides": { + "limits": { + "segment_bytes": 1440043 + } + }, + "valid": false + }, + { + "id": "negotiated-upload-size-enforced", + "stage": "completion", + "overrides": { + "limits": { + "max_upload_bytes": 1048576 + } + }, + "valid": false + }, + { + "id": "negotiated-segment-duration-enforced", + "stage": "completion", + "overrides": { + "limits": { + "segment_duration_ms": 29999 + } + }, + "valid": false + }, + { + "id": "missing-segment-size", + "stage": "completion", + "overrides": { + "observation": { + "segment_bytes": [ + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044, + 1440044 + ] + } + }, + "valid": false + }, + { + "id": "segment-over-duration-limit", + "stage": "completion", + "overrides": { + "observation": { + "manifest": { + "schema_version": 1, + "recording_id": "00000009-0000-0000-0000-000000000001", + "timebase": "session_relative_ms", + "sample_format": "s16le", + "sample_rate_hz": 24000, + "channels": 1, + "codec": "pcm", + "container": "wav", + "layout": "mixed", + "tracks": [ + { + "track_id": "0000000a-0000-0000-0000-000000000001", + "channels": [ + 0 + ], + "direction": "mixed", + "role": "mixed" + } + ], + "segments": [ + { + "occurrence_id": "00000100-0000-0000-0000-000000000001", + "index": 0, + "start_ms": 0, + "duration_ms": 30001 + }, + { + "occurrence_id": "00000101-0000-0000-0000-000000000001", + "index": 1, + "start_ms": 30000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000102-0000-0000-0000-000000000001", + "index": 2, + "start_ms": 60000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000103-0000-0000-0000-000000000001", + "index": 3, + "start_ms": 90000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000104-0000-0000-0000-000000000001", + "index": 4, + "start_ms": 120000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000105-0000-0000-0000-000000000001", + "index": 5, + "start_ms": 150000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000106-0000-0000-0000-000000000001", + "index": 6, + "start_ms": 180000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000107-0000-0000-0000-000000000001", + "index": 7, + "start_ms": 210000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000108-0000-0000-0000-000000000001", + "index": 8, + "start_ms": 240000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000109-0000-0000-0000-000000000001", + "index": 9, + "start_ms": 270000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010a-0000-0000-0000-000000000001", + "index": 10, + "start_ms": 300000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010b-0000-0000-0000-000000000001", + "index": 11, + "start_ms": 330000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010c-0000-0000-0000-000000000001", + "index": 12, + "start_ms": 360000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010d-0000-0000-0000-000000000001", + "index": 13, + "start_ms": 390000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010e-0000-0000-0000-000000000001", + "index": 14, + "start_ms": 420000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000010f-0000-0000-0000-000000000001", + "index": 15, + "start_ms": 450000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000110-0000-0000-0000-000000000001", + "index": 16, + "start_ms": 480000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000111-0000-0000-0000-000000000001", + "index": 17, + "start_ms": 510000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000112-0000-0000-0000-000000000001", + "index": 18, + "start_ms": 540000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000113-0000-0000-0000-000000000001", + "index": 19, + "start_ms": 570000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000114-0000-0000-0000-000000000001", + "index": 20, + "start_ms": 600000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000115-0000-0000-0000-000000000001", + "index": 21, + "start_ms": 630000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000116-0000-0000-0000-000000000001", + "index": 22, + "start_ms": 660000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000117-0000-0000-0000-000000000001", + "index": 23, + "start_ms": 690000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000118-0000-0000-0000-000000000001", + "index": 24, + "start_ms": 720000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000119-0000-0000-0000-000000000001", + "index": 25, + "start_ms": 750000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011a-0000-0000-0000-000000000001", + "index": 26, + "start_ms": 780000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011b-0000-0000-0000-000000000001", + "index": 27, + "start_ms": 810000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011c-0000-0000-0000-000000000001", + "index": 28, + "start_ms": 840000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011d-0000-0000-0000-000000000001", + "index": 29, + "start_ms": 870000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011e-0000-0000-0000-000000000001", + "index": 30, + "start_ms": 900000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000011f-0000-0000-0000-000000000001", + "index": 31, + "start_ms": 930000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000120-0000-0000-0000-000000000001", + "index": 32, + "start_ms": 960000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000121-0000-0000-0000-000000000001", + "index": 33, + "start_ms": 990000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000122-0000-0000-0000-000000000001", + "index": 34, + "start_ms": 1020000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000123-0000-0000-0000-000000000001", + "index": 35, + "start_ms": 1050000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000124-0000-0000-0000-000000000001", + "index": 36, + "start_ms": 1080000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000125-0000-0000-0000-000000000001", + "index": 37, + "start_ms": 1110000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000126-0000-0000-0000-000000000001", + "index": 38, + "start_ms": 1140000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000127-0000-0000-0000-000000000001", + "index": 39, + "start_ms": 1170000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000128-0000-0000-0000-000000000001", + "index": 40, + "start_ms": 1200000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000129-0000-0000-0000-000000000001", + "index": 41, + "start_ms": 1230000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012a-0000-0000-0000-000000000001", + "index": 42, + "start_ms": 1260000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012b-0000-0000-0000-000000000001", + "index": 43, + "start_ms": 1290000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012c-0000-0000-0000-000000000001", + "index": 44, + "start_ms": 1320000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012d-0000-0000-0000-000000000001", + "index": 45, + "start_ms": 1350000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012e-0000-0000-0000-000000000001", + "index": 46, + "start_ms": 1380000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000012f-0000-0000-0000-000000000001", + "index": 47, + "start_ms": 1410000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000130-0000-0000-0000-000000000001", + "index": 48, + "start_ms": 1440000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000131-0000-0000-0000-000000000001", + "index": 49, + "start_ms": 1470000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000132-0000-0000-0000-000000000001", + "index": 50, + "start_ms": 1500000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000133-0000-0000-0000-000000000001", + "index": 51, + "start_ms": 1530000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000134-0000-0000-0000-000000000001", + "index": 52, + "start_ms": 1560000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000135-0000-0000-0000-000000000001", + "index": 53, + "start_ms": 1590000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000136-0000-0000-0000-000000000001", + "index": 54, + "start_ms": 1620000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000137-0000-0000-0000-000000000001", + "index": 55, + "start_ms": 1650000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000138-0000-0000-0000-000000000001", + "index": 56, + "start_ms": 1680000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000139-0000-0000-0000-000000000001", + "index": 57, + "start_ms": 1710000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013a-0000-0000-0000-000000000001", + "index": 58, + "start_ms": 1740000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013b-0000-0000-0000-000000000001", + "index": 59, + "start_ms": 1770000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013c-0000-0000-0000-000000000001", + "index": 60, + "start_ms": 1800000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013d-0000-0000-0000-000000000001", + "index": 61, + "start_ms": 1830000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013e-0000-0000-0000-000000000001", + "index": 62, + "start_ms": 1860000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000013f-0000-0000-0000-000000000001", + "index": 63, + "start_ms": 1890000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000140-0000-0000-0000-000000000001", + "index": 64, + "start_ms": 1920000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000141-0000-0000-0000-000000000001", + "index": 65, + "start_ms": 1950000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000142-0000-0000-0000-000000000001", + "index": 66, + "start_ms": 1980000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000143-0000-0000-0000-000000000001", + "index": 67, + "start_ms": 2010000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000144-0000-0000-0000-000000000001", + "index": 68, + "start_ms": 2040000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000145-0000-0000-0000-000000000001", + "index": 69, + "start_ms": 2070000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000146-0000-0000-0000-000000000001", + "index": 70, + "start_ms": 2100000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000147-0000-0000-0000-000000000001", + "index": 71, + "start_ms": 2130000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000148-0000-0000-0000-000000000001", + "index": 72, + "start_ms": 2160000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000149-0000-0000-0000-000000000001", + "index": 73, + "start_ms": 2190000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014a-0000-0000-0000-000000000001", + "index": 74, + "start_ms": 2220000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014b-0000-0000-0000-000000000001", + "index": 75, + "start_ms": 2250000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014c-0000-0000-0000-000000000001", + "index": 76, + "start_ms": 2280000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014d-0000-0000-0000-000000000001", + "index": 77, + "start_ms": 2310000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014e-0000-0000-0000-000000000001", + "index": 78, + "start_ms": 2340000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000014f-0000-0000-0000-000000000001", + "index": 79, + "start_ms": 2370000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000150-0000-0000-0000-000000000001", + "index": 80, + "start_ms": 2400000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000151-0000-0000-0000-000000000001", + "index": 81, + "start_ms": 2430000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000152-0000-0000-0000-000000000001", + "index": 82, + "start_ms": 2460000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000153-0000-0000-0000-000000000001", + "index": 83, + "start_ms": 2490000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000154-0000-0000-0000-000000000001", + "index": 84, + "start_ms": 2520000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000155-0000-0000-0000-000000000001", + "index": 85, + "start_ms": 2550000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000156-0000-0000-0000-000000000001", + "index": 86, + "start_ms": 2580000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000157-0000-0000-0000-000000000001", + "index": 87, + "start_ms": 2610000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000158-0000-0000-0000-000000000001", + "index": 88, + "start_ms": 2640000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000159-0000-0000-0000-000000000001", + "index": 89, + "start_ms": 2670000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015a-0000-0000-0000-000000000001", + "index": 90, + "start_ms": 2700000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015b-0000-0000-0000-000000000001", + "index": 91, + "start_ms": 2730000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015c-0000-0000-0000-000000000001", + "index": 92, + "start_ms": 2760000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015d-0000-0000-0000-000000000001", + "index": 93, + "start_ms": 2790000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015e-0000-0000-0000-000000000001", + "index": 94, + "start_ms": 2820000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000015f-0000-0000-0000-000000000001", + "index": 95, + "start_ms": 2850000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000160-0000-0000-0000-000000000001", + "index": 96, + "start_ms": 2880000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000161-0000-0000-0000-000000000001", + "index": 97, + "start_ms": 2910000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000162-0000-0000-0000-000000000001", + "index": 98, + "start_ms": 2940000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000163-0000-0000-0000-000000000001", + "index": 99, + "start_ms": 2970000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000164-0000-0000-0000-000000000001", + "index": 100, + "start_ms": 3000000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000165-0000-0000-0000-000000000001", + "index": 101, + "start_ms": 3030000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000166-0000-0000-0000-000000000001", + "index": 102, + "start_ms": 3060000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000167-0000-0000-0000-000000000001", + "index": 103, + "start_ms": 3090000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000168-0000-0000-0000-000000000001", + "index": 104, + "start_ms": 3120000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000169-0000-0000-0000-000000000001", + "index": 105, + "start_ms": 3150000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016a-0000-0000-0000-000000000001", + "index": 106, + "start_ms": 3180000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016b-0000-0000-0000-000000000001", + "index": 107, + "start_ms": 3210000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016c-0000-0000-0000-000000000001", + "index": 108, + "start_ms": 3240000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016d-0000-0000-0000-000000000001", + "index": 109, + "start_ms": 3270000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016e-0000-0000-0000-000000000001", + "index": 110, + "start_ms": 3300000, + "duration_ms": 30000 + }, + { + "occurrence_id": "0000016f-0000-0000-0000-000000000001", + "index": 111, + "start_ms": 3330000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000170-0000-0000-0000-000000000001", + "index": 112, + "start_ms": 3360000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000171-0000-0000-0000-000000000001", + "index": 113, + "start_ms": 3390000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000172-0000-0000-0000-000000000001", + "index": 114, + "start_ms": 3420000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000173-0000-0000-0000-000000000001", + "index": 115, + "start_ms": 3450000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000174-0000-0000-0000-000000000001", + "index": 116, + "start_ms": 3480000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000175-0000-0000-0000-000000000001", + "index": 117, + "start_ms": 3510000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000176-0000-0000-0000-000000000001", + "index": 118, + "start_ms": 3540000, + "duration_ms": 30000 + }, + { + "occurrence_id": "00000177-0000-0000-0000-000000000001", + "index": 119, + "start_ms": 3570000, + "duration_ms": 30000 + } + ], + "gaps": [], + "playout": [ + { + "start_ms": 0, + "duration_ms": 3600000, + "evidence": "unknown" + } + ], + "capture_complete": true, + "duration_ms": 3600000 + } + } + }, + "valid": false + }, + { + "id": "wrong-recording", + "stage": "completion", + "overrides": { + "observation": { + "manifest": { + "recording_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + }, + "valid": false + }, + { + "id": "not-a-complete-manifest", + "stage": "completion", + "overrides": { + "observation": { + "manifest": { + "capture_complete": false + } + } + }, + "valid": false + }, + { + "id": "mixed-source-cannot-be-relabeled", + "stage": "completion", + "overrides": { + "request": { + "recording": { + "direction": "output" + } + } + }, + "valid": false + } + ] +} diff --git a/spec/attachments/v1/test_contract.py b/spec/attachments/v1/test_contract.py index 6bd31710a..0815f6792 100644 --- a/spec/attachments/v1/test_contract.py +++ b/spec/attachments/v1/test_contract.py @@ -3,8 +3,12 @@ import copy import importlib.util +import hashlib +import io import json +import tempfile import unittest +import wave from pathlib import Path from jsonschema import Draft202012Validator @@ -171,6 +175,126 @@ def test_protocol_composition_uses_same_occurrence_not_bare_blob(self): self.assertIn('/' + occurrence_id + '/', objects["ResolveResponse"]["items"][0]["gateway_path"]) self.assertNotEqual(occurrence_id, objects["UploadRequest"]["attachment_id"]) + def test_completed_import_has_separate_admission_without_relaxing_uploads(self): + scenario = contract.load("recording-import-fixtures.json")["base"] + recording = scenario["request"]["recording"] + self.assertEqual(recording["declared_bytes"], 172800044) + contract.validate_wire("ImportRequest", scenario["request"]) + contract.validate_import_admission(scenario) + old = next(c["value"] for c in contract.load("wire-fixtures.json")["cases"] if c["id"] == "valid-ImportRequest") + for size, linked in ((172800044, False), (172800044, True), (14400044, True)): + candidate = copy.deepcopy(old) + candidate["upload"]["declared_bytes"] = size + if linked: + candidate["upload"].update(recording_id=recording["recording_id"], segment_index=0) + with self.subTest(size=size, linked=linked), self.assertRaises((ValidationError, ValueError)): + contract.validate_wire("ImportRequest", candidate) + contract.validate_wire("ImportRequest", old) # small import compatibility + + def test_import_budgets_deny_before_any_source_effect(self): + table = contract.load("recording-import-fixtures.json") + attempted = [] + for case in table["cases"]: + if case["stage"] != "admission": + continue + scenario = contract.fixture_override(table["base"], case["overrides"]) + before = len(attempted) + try: + contract.validate_import_admission(scenario) + attempted.append(case["id"]) # synthetic source read boundary + except (ValueError, ValidationError): + pass + self.assertEqual(len(attempted) - before, int(case["valid"]), case["id"]) + self.assertGreater(len(attempted), 0) + + def test_import_length_and_segment_negative_controls(self): + table = contract.load("recording-import-fixtures.json") + for case in table["cases"]: + if case["stage"] != "completion": + continue + scenario = contract.fixture_override(table["base"], case["overrides"]) + with self.subTest(case=case["id"]): + if case["valid"]: + contract.validate_import_completion(scenario) + else: + with self.assertRaises((ValidationError, ValueError)): + contract.validate_import_completion(scenario) + + def test_import_requires_all_reservation_scopes_and_known_resources(self): + base = contract.load("recording-import-fixtures.json")["base"] + for scope in ("project", "organization", "global"): + scenario = copy.deepcopy(base) + del scenario["headroom"][scope] + with self.subTest(scope=scope), self.assertRaises(ValueError): + contract.validate_import_admission(scenario) + for resource in base["headroom"]["project"]: + scenario = copy.deepcopy(base) + del scenario["headroom"]["project"][resource] + with self.subTest(resource=resource), self.assertRaises(ValueError): + contract.validate_import_admission(scenario) + + def test_one_hour_wav_produces_independently_playable_bounded_segments(self): + # A real synthetic PCM file exercises the contract's byte/duration math. + # This stdlib test double does NOT qualify the production codec/importer. + scenario = contract.load("recording-import-fixtures.json")["base"] + contract.validate_import_admission(scenario) + expected_hash = hashlib.sha256() + actual_hash = hashlib.sha256() + one_second = b"\x01\x00" * 24000 + with tempfile.TemporaryFile() as source: + with wave.open(source, "wb") as output: + output.setparams((1, 2, 24000, 0, "NONE", "not compressed")) + for _ in range(3600): + output.writeframesraw(one_second) + expected_hash.update(one_second) + scenario["observation"]["source_bytes"] = source.tell() + source.seek(0) + # Read the admitted source as <=8 MiB ranges and <=256 KiB buffers. + reads = [] + total = scenario["observation"]["source_bytes"] + offset = 0 + while offset < total: + count = min(contract.import_window(scenario["limits"]), total - offset) + remaining = count + while remaining: + chunk = source.read(min(262144, remaining)) + self.assertTrue(chunk) + remaining -= len(chunk) + reads.append({"offset": offset, "bytes": count, "total_bytes": total}) + offset += count + self.assertEqual(source.read(1), b"") + scenario["observation"]["reads"] = reads + source.seek(0) + sizes = [] + with wave.open(source, "rb") as decoder: + self.assertEqual((decoder.getnchannels(), decoder.getsampwidth(), decoder.getframerate()), (1, 2, 24000)) + scenario["observation"]["source_duration_ms"] = (decoder.getnframes() * 1000 + 23999) // 24000 + for segment in scenario["observation"]["manifest"]["segments"]: + frames = segment["duration_ms"] * 24 + buffer = io.BytesIO() + with wave.open(buffer, "wb") as encoder: + encoder.setparams((1, 2, 24000, 0, "NONE", "not compressed")) + remaining = frames + while remaining: + chunk = decoder.readframes(min(131072, remaining)) + self.assertTrue(chunk) + self.assertLessEqual(len(chunk), 262144) + encoder.writeframesraw(chunk) + remaining -= len(chunk) // 2 + sizes.append(buffer.tell()) + buffer.seek(0) + with wave.open(buffer, "rb") as independent: + self.assertEqual(independent.getnframes(), frames) + while chunk := independent.readframes(131072): + actual_hash.update(chunk) + self.assertEqual(decoder.readframes(1), b"") + scenario["observation"]["segment_bytes"] = sizes + contract.validate_import_completion(scenario) + self.assertEqual(actual_hash.digest(), expected_hash.digest()) + self.assertEqual(len(sizes), 120) + self.assertEqual(set(sizes), {1440044}) + print("PCM_IMPORT " + json.dumps({"source_bytes": total, "segments": len(sizes), "segment_bytes": sizes[0], "output_bytes": sum(sizes), "pcm_sha256": actual_hash.hexdigest()}, sort_keys=True)) + def test_security_fixture_covers_every_request_path(self): cases = contract.load("security-fixtures.json")["cases"] for action in ("GET", "HEAD", "Range", "conditional", "resolve"): diff --git a/spec/attachments/v1/test_protocol.py b/spec/attachments/v1/test_protocol.py index 0cad30789..458ef5600 100644 --- a/spec/attachments/v1/test_protocol.py +++ b/spec/attachments/v1/test_protocol.py @@ -48,6 +48,8 @@ def do_POST(self): value = contract.strict_json(self.rfile.read(length).decode("utf-8")) contract.validate_wire(incoming, value) response = OBJECTS[outgoing] + if incoming == "ImportRequest" and value.get("mode") == "completed_recording": + response = OBJECTS["RecordingImportResponse"] except (ValueError, ValidationError): code = 400 body = json.dumps(response).encode() @@ -100,6 +102,24 @@ def test_raw_url_secret_fields_rejected_and_not_reflected(self): self.assertNotIn(b"SYNTHETIC_SECRET", raw) contract.validate_wire("Error", json.loads(raw)) + def test_completed_recording_handoff_does_not_create_large_upload(self): + request = OBJECTS["RecordingImportRequest"] + status, headers, raw = self.post(BASE + "/imports", request) + self.assertEqual(status, 202) + self.assertEqual(headers["Cache-Control"], "private, no-store") + response = json.loads(raw) + contract.validate_wire("RecordingImportResponse", response) + self.assertEqual(response["recording_id"], request["recording"]["recording_id"]) + for forbidden in ("upload_id", "write_capability", "occurrence_id", "gateway_path"): + self.assertNotIn(forbidden, response) + oversized = {**OBJECTS["UploadRequest"], "declared_bytes": request["recording"]["declared_bytes"]} + self.assertEqual(self.post(BASE + "/uploads", oversized)[0], 400) + for field in ("source_url", "provider_credential", "filename"): + denied = {**request, "source": {**request["source"], field: "SYNTHETIC_SECRET"}} + status, _, raw = self.post(BASE + "/imports", denied) + self.assertEqual(status, 400) + self.assertNotIn(b"SYNTHETIC_SECRET", raw) + def test_unknown_version_and_foreign_route_fail(self): value = {**OBJECTS["UploadRequest"], "schema_version": 99} self.assertEqual(self.post(BASE + "/uploads", value)[0], 400) diff --git a/spec/attachments/v1/validate.py b/spec/attachments/v1/validate.py index 8806bfeca..8a3155758 100644 --- a/spec/attachments/v1/validate.py +++ b/spec/attachments/v1/validate.py @@ -103,10 +103,12 @@ def validate_wire(name: str, value: Any) -> None: for item in value["items"]: if item["status"] == "ready" and item["gateway_path"].split("/")[4] != item["occurrence_id"]: raise ValueError("gateway occurrence mismatch") - if name == "ImportRequest": - validate_wire("UploadRequest", value["upload"]) + if name in {"ImportRequest", "SingleAttachmentImportRequest", "RecordingImportRequest"}: + recording = value.get("mode") == "completed_recording" + descriptor = value["recording" if recording else "upload"] + validate_wire("CompletedRecordingImport" if recording else "UploadRequest", descriptor) expected = "RemoteUrl" if value["source"]["kind"] == "RemoteUrlEnvelope" else "ProviderFile" - if value["upload"]["source_kind"] != expected: + if descriptor["source_kind"] != expected: raise ValueError("import source mismatch") if name == "RecordingManifest": if len(json.dumps(value, separators=(",", ":")).encode("utf-8")) > 1048576: @@ -149,6 +151,95 @@ def validate_wire(name: str, value: Any) -> None: raise ValueError("interval exceeds recording") +def fixture_override(base: Any, overrides: Any) -> Any: + """Recursive object overrides; arrays/scalars replace. Fixture data only.""" + if isinstance(base, dict) and isinstance(overrides, dict): + result = copy.deepcopy(base) + for key, value in overrides.items(): + result[key] = fixture_override(result.get(key), value) + return result + return copy.deepcopy(overrides) + + +def import_window(limits: dict[str, Any]) -> int: + return min(limits["max_upload_bytes"], limits["segment_bytes"]) + + +def validate_import_admission(scenario: dict[str, Any]) -> None: + """Test-only size/reservation oracle, not authorization or a source reader. + + The source facts and headroom are trusted server observations in fixtures, + never client assertions. Privacy/security conformance remains independently + required. Byte reservations cover the complete immutable snapshot PLUS one + output window; completed sources do not get an unreserved streaming bypass. + """ + validate_wire("RecordingImportRequest", scenario["request"]) + limits = scenario["limits"] + validate_wire("Limits", limits) + recording = scenario["request"]["recording"] + if (recording["declared_bytes"] > limits["recording_bytes"] or + recording["declared_duration_ms"] > limits["recording_duration_ms"]): + raise ValueError("recording budget") + if scenario["source"] != {"terminal_completed": True, "immutable": True, "bounded_ranges": True}: + raise ValueError("unsupported completed source") + reservation = recording["declared_bytes"] + import_window(limits) + if reservation > limits["reserved_bytes"]: + raise ValueError("project reservation budget") + required = {"bytes": reservation, "transfers": 1, "recordings": 1, + "validation_jobs": 1, "objects": 2, "links": 1} + if set(scenario["headroom"]) != {"project", "organization", "global"}: + raise ValueError("unknown admission capacity") + for available in scenario["headroom"].values(): + if set(available) != set(required): + raise ValueError("unknown resource capacity") + for resource, minimum in required.items(): + if type(available[resource]) is not int or available[resource] < minimum: + raise ValueError("aggregate reservation budget") + + +def validate_import_completion(scenario: dict[str, Any]) -> None: + """Validate synthetic worker observations; never decode or retrieve media.""" + validate_wire("RecordingImportRequest", scenario["request"]) + limits = scenario["limits"] + validate_wire("Limits", limits) + recording = scenario["request"]["recording"] + observed = scenario["observation"] + if (observed["source_bytes"] != recording["declared_bytes"] or + observed["source_bytes"] > limits["recording_bytes"] or + observed["source_duration_ms"] != recording["declared_duration_ms"] or + observed["source_duration_ms"] > limits["recording_duration_ms"] or + observed["generation_matches"] is not True): + raise ValueError("source length, duration or generation mismatch") + end = 0 + window = import_window(limits) + for part in observed["reads"]: + if (part["offset"] != end or type(part["bytes"]) is not int or + not 0 < part["bytes"] <= window or + part["total_bytes"] != recording["declared_bytes"]): + raise ValueError("source range mismatch") + end += part["bytes"] + if end != recording["declared_bytes"]: + raise ValueError("incomplete or excess source ranges") + manifest = observed["manifest"] + validate_wire("RecordingManifest", manifest) + if (manifest["recording_id"] != recording["recording_id"] or + manifest["duration_ms"] != recording["declared_duration_ms"] or + not manifest["capture_complete"] or not manifest["segments"]): + raise ValueError("completed import manifest mismatch") + if recording["direction"] != "mixed" and any( + track["direction"] != recording["direction"] for track in manifest["tracks"]): + raise ValueError("import direction understates source ancestry") + sizes = observed["segment_bytes"] + if len(sizes) != len(manifest["segments"]): + raise ValueError("missing verified segment sizes") + if any(type(size) is not int or not 0 < size <= window for size in sizes): + raise ValueError("import segment byte limit") + if sum(sizes) > limits["recording_bytes"]: + raise ValueError("aggregate output recording byte limit") + if any(segment["duration_ms"] > limits["segment_duration_ms"] for segment in manifest["segments"]): + raise ValueError("import segment duration limit") + + def scoped_key(scope: dict[str, Any], fields: list[str]) -> tuple[Any, ...]: """Fixture key oracle: normalize trace IDs, retain the complete scope.""" normalized = {**scope, "trace_id": normalize_trace(scope["trace_id"])} @@ -216,6 +307,18 @@ def validate_all() -> dict[str, int]: if lifecycle_result(table, case["events"]) != (case["readable_after_each"], case["final"]): raise AssertionError("lifecycle: " + case["id"]) counts["lifecycle"] = len(table["cases"]) + table = load("recording-import-fixtures.json") + for case in table["cases"]: + scenario = fixture_override(table["base"], case["overrides"]) + check = {"admission": validate_import_admission, "completion": validate_import_completion}[case["stage"]] + try: + check(scenario) + valid = True + except (ValueError, jsonschema_error): + valid = False + if valid != case["valid"]: + raise AssertionError("recording import: " + case["id"]) + counts["recording_import"] = len(table["cases"]) return counts diff --git a/spec/attachments/v1/wire-fixtures.json b/spec/attachments/v1/wire-fixtures.json index 9d1cae5c3..6fd0aa37d 100644 --- a/spec/attachments/v1/wire-fixtures.json +++ b/spec/attachments/v1/wire-fixtures.json @@ -3313,6 +3313,854 @@ } ], "valid": false + }, + { + "id": "completed-provider-recording-over-50-mib", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": true + }, + { + "id": "valid-RecordingImportRequest", + "schema": "RecordingImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": true + }, + { + "id": "valid-CompletedRecordingImport", + "schema": "CompletedRecordingImport", + "value": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "valid": true + }, + { + "id": "valid-RecordingImportResponse", + "schema": "RecordingImportResponse", + "value": { + "mode": "completed_recording", + "job_id": "0000000d-0000-0000-0000-000000000001", + "recording_id": "00000009-0000-0000-0000-000000000001", + "state": "importing" + }, + "valid": true + }, + { + "id": "completed-recording-import-response", + "schema": "ImportResponse", + "value": { + "mode": "completed_recording", + "job_id": "0000000d-0000-0000-0000-000000000001", + "recording_id": "00000009-0000-0000-0000-000000000001", + "state": "importing" + }, + "valid": true + }, + { + "id": "valid-ImportStatusResponse", + "schema": "ImportStatusResponse", + "value": { + "job_id": "0000000d-0000-0000-0000-000000000001", + "state": "validating", + "reason": "binding_pending" + }, + "valid": true + }, + { + "id": "completed-five-minute-recording-over-8-mib", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 14400044, + "declared_duration_ms": 300000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": true + }, + { + "id": "completed-private-envelope-recording", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "RemoteUrl", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "RemoteUrlEnvelope", + "envelope_id": "00000009-0000-0000-0000-000000000001" + } + }, + "valid": true + }, + { + "id": "reject-completed-declared_bytes-1073741825", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 1073741825, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-declared_duration_ms-7200001", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 7200001 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-declared_bytes-0", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 0, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-declared_duration_ms-0", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 0 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-segment_index-0", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000, + "segment_index": 0 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-attachment_id-00000006-0000-0000-0000-000000000001", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000, + "attachment_id": "00000006-0000-0000-0000-000000000001" + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-occurrence_id-00000007-0000-0000-0000-000000000001", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000, + "occurrence_id": "00000007-0000-0000-0000-000000000001" + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-modality-video", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "video", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-source_kind-LocalFile", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "LocalFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-mime_type-image/png", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "image/png", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-completed-source-source_url", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001", + "source_url": "SYNTHETIC_CANARY" + } + }, + "valid": false + }, + { + "id": "reject-completed-source-provider_credential", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001", + "provider_credential": "SYNTHETIC_CANARY" + } + }, + "valid": false + }, + { + "id": "reject-completed-source-filename", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001", + "filename": "SYNTHETIC_CANARY" + } + }, + "valid": false + }, + { + "id": "reject-ambiguous-import-mode", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + }, + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + } + }, + "valid": false + }, + { + "id": "reject-completed-source-kind-mismatch", + "schema": "ImportRequest", + "value": { + "mode": "completed_recording", + "recording": { + "schema_version": 1, + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "direction": "mixed", + "source_kind": "ProviderFile", + "recording_id": "00000009-0000-0000-0000-000000000001", + "modality": "audio", + "declared_bytes": 172800044, + "declared_duration_ms": 3600000 + }, + "source": { + "kind": "RemoteUrlEnvelope", + "envelope_id": "00000009-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-single-import-unchanged-ceiling-8388609", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 8388609, + "recording_id": "00000009-0000-0000-0000-000000000001", + "segment_index": 0 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-single-import-unchanged-ceiling-52428801", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 52428801 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "reject-single-import-unchanged-ceiling-172800044", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 172800044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": false + }, + { + "id": "single-attachment-import-still-supported", + "schema": "ImportRequest", + "value": { + "upload": { + "schema_version": 1, + "attachment_id": "00000006-0000-0000-0000-000000000001", + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "association": { + "capture_session_id": "00000004-0000-0000-0000-000000000001", + "correlation_nonce": "00000005-0000-0000-0000-000000000001", + "parent": { + "trace_id": "0123456789abcdef0123456789abcdef", + "span_id": "0123456789abcdef" + } + }, + "policy_version": "policy_v1", + "deletion_generation": 0, + "mime_type": "audio/wav", + "modality": "audio", + "direction": "mixed", + "source_kind": "ProviderFile", + "declared_bytes": 48044 + }, + "source": { + "kind": "ProviderFile", + "connection_id": "0000000b-0000-0000-0000-000000000001", + "registered_output_id": "0000000c-0000-0000-0000-000000000001" + } + }, + "valid": true + }, + { + "id": "single-attachment-import-response-still-supported", + "schema": "ImportResponse", + "value": { + "job_id": "0000000d-0000-0000-0000-000000000001", + "upload_id": "00000008-0000-0000-0000-000000000001", + "state": "importing" + }, + "valid": true } ] } From f07600671cc0b08ddbcdfd7ed421d4f0fc60e0b9 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek <8347993+nik13@users.noreply.github.com> Date: Sat, 14 Nov 2026 21:28:26 -0800 Subject: [PATCH 3/4] fix(spec): bind playback to explicit media sessions Amend the unreleased wire contract with non-secret exchange headers, exact resolve selection, session-scoped v2 cookies and gateway identity equality. Preserve occurrence authorization and document bearer-mode Origin defenses and the inherited refresh/logout boundary. Add synthetic binding, cookie-path and wire conformance coverage; real browser qualification remains downstream. Part of TH-2379 (Linear). Co-Authored-By: Claude Code --- spec/attachments/v1/README.rst | 139 ++- spec/attachments/v1/contract.schema.json | 48 +- .../v1/media-session-fixtures.json | 994 ++++++++++++++++++ spec/attachments/v1/openapi.json | 122 ++- spec/attachments/v1/security-fixtures.json | 273 +++++ spec/attachments/v1/security-table.json | 6 +- spec/attachments/v1/test_contract.py | 134 +++ spec/attachments/v1/test_protocol.py | 67 +- spec/attachments/v1/validate.py | 119 ++- spec/attachments/v1/wire-fixtures.json | 225 +++- 10 files changed, 2090 insertions(+), 37 deletions(-) create mode 100644 spec/attachments/v1/media-session-fixtures.json diff --git a/spec/attachments/v1/README.rst b/spec/attachments/v1/README.rst index 432f20dbb..a4e8657a4 100644 --- a/spec/attachments/v1/README.rst +++ b/spec/attachments/v1/README.rst @@ -343,12 +343,17 @@ Nine mandatory security boundaries 7. **Session-bound playback.** Resolution returns only the same-origin gateway. Media session PLUS an occurrence/representation grant binds the original viewer/application session/scope/parent/policy/generation/expiry and GET/HEAD. - A copied grant under another session fails. Exchange/mutations use CSRF and - exact Origin; cookies are host-only Secure HttpOnly SameSite=Strict with narrow - media path. No wildcard credentialed CORS. Reauthorize GET/HEAD/Range/conditional - before 200/206/304 and cached metadata; private,no-store is mandatory. Logout, - revocation and deletion deny subsequent requests; open streams recheck within - the qualified <=5s bound. Downloaded/browser-buffered bytes cannot be recalled. + A copied grant under another session fails. Exchange and resolve require an + explicit application bearer and exact Origin (the bearer-mode CSRF defense), + not ambient application cookies or a claim of Django CSRF-token enforcement. + Existing enforced mutation controls remain unchanged. Media cookies are + host-only Secure HttpOnly SameSite=Strict with a session-specific path, below. + No wildcard credentialed CORS. Reauthorize GET/HEAD/Range/conditional before + 200/206/304 and cached metadata; private,no-store is mandatory. Revocation of + the original access-token row, membership/source denial and deletion deny + subsequent requests; open streams recheck within the qualified <=5s bound. + See the inherited refresh/logout limitation below. Downloaded/browser-buffered + bytes cannot be recalled. 8. **Source retention.** Occurrence expiry is derived from authoritative source trace/session lineage, never upload time, relink time or untrusted event time. Unknown finite-retention provenance denies. Unbound jobs expire within 24 hours @@ -365,6 +370,128 @@ Nine mandatory security boundaries channels and corruption. Never execute HTML/SVG; active document previews need separately sandboxed inert derivatives. +Explicit media-session binding (unreleased wire amendment) +---------------------------------------------------------- + +The earlier draft combined fresh random exchange cookies at one shared path with +implicit newest-row selection at resolve. Concurrent exchanges can overwrite that +cookie or select a row other than the caller's exchange, including equal-expiry +rows. Exact gateway binding then correctly denies otherwise authorized playback. +This is a concurrency/availability defect, not evidence of unauthorized access. +Timestamp or UUID sorting, unconditional revoke-on-exchange and browser-only locks +are not fixes. + +The amended wire protocol is: + +* ``POST /tracer/v1/attachment-media-sessions`` remains authenticated ``204`` with + no response body. It returns ``X-Attachment-Media-Session`` (the existing row's + non-secret canonical non-nil UUID) and ``X-Attachment-Media-Expires-At`` (its fixed + RFC 3339 expiry). Neither field is a credential. The random credential is only + in ``Set-Cookie``; persistence remains digest-only. Do not expose the secret or + digest in JSON, JS-visible headers, URLs, logs or telemetry. +* Set ``fi_media_session_v2`` with + ``Path=/tracer/v1/attachment-media/{media_session_id}/``, no Domain, Secure, + HttpOnly, SameSite=Strict and a lifetime bounded by the fixed session expiry. + Distinct handles have distinct paths even though the cookie name is identical. +* ``POST /tracer/v1/projects/{project_id}/attachments/resolve`` requires + ``X-Attachment-Media-Session``. Select only that exact row and check the current + authenticated user, original access-token row ID, resolved project organization, + expiry and revocation. Absent/malformed/duplicate handles fail as invalid request; + unknown, foreign or dead handles are indistinguishable not-found with no grants. + Never use a latest-row fallback. Resolve does not need the path-scoped cookie. +* Each ready result uses exactly + ``/tracer/v1/attachment-media/{media_session_id}/{occurrence_id}/{grant_id}``. + Canonical lowercase non-nil UUIDs, bounded URL-safe grant token, no query, + fragment, encoding aliases, trailing slash or extra path segment are accepted. + The response's session segment must equal the captured request handle, and its + occurrence segment must equal that item's occurrence. Request bodies, ordered + per-item results, expected parents, channels and occurrence identity are unchanged. +* Before metadata or bytes, the gateway requires + ``route media_session_id == cookie-derived row.id == grant.media_session_id``. + The session's original user/access row must still be live and its organization + must match the grant scope. Existing occurrence/parent/representation/membership/ + policy/generation/retention/deletion and bounded streaming checks remain mandatory. + A handle or grant alone never authorizes media. Reject ambiguous duplicate v2 + request cookies rather than choosing first or last. + +Both issuance endpoints require explicit application bearer identity and exact +configured HTTPS Origin. Missing, null or foreign Origin denies. The current +exchange adapter bypasses Django token-CSRF enforcement; this amendment documents +its actual bearer-only defense and requires exact Origin on resolve as well. +Configured client ``X-CSRFToken`` is not evidence of enforcement. Do not add +cookie-only application authentication, accept write/API credentials for these +operations, loosen enforced controls elsewhere, or use wildcard credentialed CORS. +These same-origin responses remain private/no-store; no cross-origin header exposure +is needed. ``MediaSession*Headers`` schemas are closed projections of protocol +headers, not a prohibition on ordinary HTTP transport/security headers. + +Renewal and authentication boundary +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Session and grant deadlines are fixed. A grant expires no later than its session, +source retention or other existing authorization bound. New exchange B must not +revoke session/grants A, extend an old grant, or revive expired/revoked application +sessions. Keep A's cookie through its normal expiry while B serves new grants. +Concurrent players and independent tabs, including authorized different-org tabs, +coexist without a shared lock. Organization navigation is not session revocation. + +Clients keep only bounded auth/organization-scoped in-memory handle/expiry state. +Capture that handle, bearer context and organization for each request; do not use a +shared mutable latest selector. Discard late exchange/resolve results after auth or +organization changes. Renew before insufficient lifetime remains, preserve seek/play +state when replacing a grant, and bound issuance/cookie churn. Per-tab single-flight +is optional optimization, never a correctness dependency. Browser cookie eviction +must yield unavailable/re-exchange, never weaker authorization or legacy fallback. + +Application refresh creates a different access-token row, not a stable login-family +identity. A refreshed bearer cannot resolve with the prior row's media handle. +Revoking the ORIGINAL access row denies its existing cookies/grants, including HEAD, +Range, conditional requests and subsequent stream rechecks; delayed exchange results +cannot resurrect it. Current logout only deactivates the presented access row. +Logout of a post-refresh row therefore does NOT automatically revoke pre-refresh +rows. This inherited limitation is a separate release/security item; no token-family, +log-out-every-device or ordinary authentication policy change is included here. + +Gated cutover and consumer coordination +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is an unreleased coordinated cutover, not a broad compatibility mode. Gate +issuance/playback while adopting both endpoints and clients; stop old issuance, +invalidate pre-cutover media rows/grants using existing revocation fields, then +open v2 and reload old clients. This one-time gate is not revoke-on-every-exchange. +The old two-identity route is not part of the amended API. Legacy missing-handle +issuance fails closed. ``fi_media_session`` at the parent path is never an authority +for the new route, even alongside a valid v2 cookie. A renamed legacy secret must +also fail because its old row is invalidated. HTTP Cookie contains no Path metadata: +servers must not pretend to detect a parent path from it. Do not infer v2 authority +by timestamp/UUID sorting or introduce a compatibility bypass. + +Existing session UUID, organization/access-row binding, secret digest, fixed expiry, +revocation fields and grant FK suffice. No new migration or recoverable-secret +persistence is required. ``wire_version`` in synthetic fixtures denotes issuance +under the v2 gate, not a requested database column. A deployment needing a legacy +playback drain instead of the gated reload needs a separately reviewed bounded plan; +this amendment neither enables that route nor authorizes legacy issuance. + +Consumers must pin this amendment's exact commit. Copy the canonical schema +byte-for-byte from ``spec/attachments/v1/contract.schema.json`` to the product's +vendored F01 schema and update its provenance pin; never hand-edit the vendored copy. +Backend owners must update route/header serializer documentation and regenerate the +full product OpenAPI via its existing generator, then regenerate frontend API +contracts and update the explicit client URL validation/fixtures. Regeneration that +removes the old route must be inspected as this deliberate wire cutover, not a blanket +permission to shrink unrelated API surface. No application, SDK, UI or database +implementation is supplied in this contract lane. + +``media-session-fixtures.json`` checks trusted synthetic identities, cookie/route/ +grant combinations and original-row liveness, in addition to unchanged occurrence +security predicates. The stdlib cookie-jar test only checks path selection; the +loopback HTTP receiver only checks wire composition. Neither is browser race proof. +Implementation qualification must cover actual reversed exchange response completion, +equal expiries, interleaved resolves, independent tabs/orgs, renewal during Range and +open streams, original-row revocation, actual deletion, stale auth/org results, +cookie eviction and player seek/play continuity against the integrated backend/UI. + Recording and late-arrival truth -------------------------------- diff --git a/spec/attachments/v1/contract.schema.json b/spec/attachments/v1/contract.schema.json index 7287fbc44..ce4348dd9 100644 --- a/spec/attachments/v1/contract.schema.json +++ b/spec/attachments/v1/contract.schema.json @@ -1331,9 +1331,7 @@ "const": "ready" }, "gateway_path": { - "type": "string", - "pattern": "^/tracer/v1/attachment-media/(?!00000000-0000-0000-0000-000000000000/)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[a-zA-Z0-9_-]{1,128}$", - "maxLength": 194 + "$ref": "#/$defs/MediaGatewayPath" }, "expires_at": { "$ref": "#/$defs/Timestamp" @@ -2210,6 +2208,50 @@ "$ref": "#/$defs/Reason" } } + }, + "MediaSessionHandle": { + "description": "Non-secret existing media-session UUID; selector only, never a bearer credential.", + "allOf": [ + { + "$ref": "#/$defs/UUID" + } + ], + "minLength": 36 + }, + "MediaGatewayPath": { + "type": "string", + "pattern": "^/tracer/v1/attachment-media/(?!00000000-0000-0000-0000-000000000000/)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/(?!00000000-0000-0000-0000-000000000000/)[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/[a-zA-Z0-9_-]{1,128}$(?![\\s\\S])", + "maxLength": 230 + }, + "MediaSessionExchangeHeaders": { + "description": "Closed projection of the two required JS-visible exchange headers, not the entire HTTP header map. Set-Cookie is deliberately excluded.", + "type": "object", + "additionalProperties": false, + "required": [ + "X-Attachment-Media-Session", + "X-Attachment-Media-Expires-At" + ], + "properties": { + "X-Attachment-Media-Session": { + "$ref": "#/$defs/MediaSessionHandle" + }, + "X-Attachment-Media-Expires-At": { + "$ref": "#/$defs/Timestamp" + } + } + }, + "MediaSessionResolveHeaders": { + "description": "Closed projection of the required resolve selector header. Explicit application bearer and exact Origin are independently mandatory.", + "type": "object", + "additionalProperties": false, + "required": [ + "X-Attachment-Media-Session" + ], + "properties": { + "X-Attachment-Media-Session": { + "$ref": "#/$defs/MediaSessionHandle" + } + } } } } diff --git a/spec/attachments/v1/media-session-fixtures.json b/spec/attachments/v1/media-session-fixtures.json new file mode 100644 index 000000000..36edc1525 --- /dev/null +++ b/spec/attachments/v1/media-session-fixtures.json @@ -0,0 +1,994 @@ +{ + "description": "Synthetic trusted observations for explicit session binding, not client assertions or browser race proof. Existing security-table controls remain independently required. A cookie request has no Path metadata; v2-only issuance and row provenance are a cutover requirement. wire_version is a test observation of issuance under the v2 gate, not a required persistence column or timestamp-based selector.", + "base": { + "now": "2030-01-01T00:00:00Z", + "origin": "https://example.invalid", + "request": { + "bearer_authenticated": true, + "origin": "https://example.invalid", + "user_id": "0000000f-0000-0000-0000-000000000001", + "application_session_id": "00000010-0000-0000-0000-000000000001", + "organization_id": "00000001-0000-0000-0000-000000000001", + "headers": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001" + } + }, + "session": { + "id": "00000011-0000-0000-0000-000000000001", + "user_id": "0000000f-0000-0000-0000-000000000001", + "application_session_id": "00000010-0000-0000-0000-000000000001", + "organization_id": "00000001-0000-0000-0000-000000000001", + "expires_at": "2030-01-01T00:15:00Z", + "revoked": false, + "wire_version": 2, + "credential_digest": "25c9d2d1566bcef6d9ca65acb46067723936cf5cb4f7e63fab15cb182e3004ef" + }, + "access_rows": { + "00000010-0000-0000-0000-000000000001": { + "user_id": "0000000f-0000-0000-0000-000000000001", + "active": true + }, + "ffffffff-ffff-ffff-ffff-ffffffffffff": { + "user_id": "0000000f-0000-0000-0000-000000000001", + "active": true + } + }, + "gateway": { + "path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", + "cookies": [ + { + "name": "fi_media_session_v2", + "value": "synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "grant": { + "audience": "fi-attachment-playback", + "viewer_id": "0000000f-0000-0000-0000-000000000001", + "application_session_id": "00000010-0000-0000-0000-000000000001", + "media_session_id": "00000011-0000-0000-0000-000000000001", + "scope": { + "organization_id": "00000001-0000-0000-0000-000000000001", + "workspace_id": "00000002-0000-0000-0000-000000000001", + "project_id": "00000003-0000-0000-0000-000000000001" + }, + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "parent": { + "trace_id": "01234567-89ab-cdef-0123-456789abcdef", + "span_id": "0123456789abcdef" + }, + "representation": "playable", + "methods": [ + "GET", + "HEAD" + ], + "policy_version": "policy_v1", + "deletion_generation": 0, + "expires_at": "2030-01-01T00:10:00Z" + }, + "grant_token": "synthetic_grant", + "resolve_response": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", + "expires_at": "2030-01-01T00:10:00Z" + }, + { + "occurrence_id": "0000000e-0000-0000-0000-000000000001", + "status": "not_found" + } + ] + }, + "controls": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "exchange_response": { + "status": 204, + "body": "", + "safe_headers": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001", + "X-Attachment-Media-Expires-At": "2030-01-01T00:15:00Z" + }, + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=900; Secure; HttpOnly; SameSite=Strict", + "cache_control": "private, no-store" + } + }, + "cases": [ + { + "id": "resolve-authorized", + "stage": "resolve", + "overrides": {}, + "valid": true + }, + { + "id": "resolve-session-revoked", + "stage": "resolve", + "overrides": { + "session": { + "revoked": true + } + }, + "valid": false + }, + { + "id": "resolve-session-expired", + "stage": "resolve", + "overrides": { + "session": { + "expires_at": "2030-01-01T00:00:00Z" + } + }, + "valid": false + }, + { + "id": "resolve-session-legacy-row", + "stage": "resolve", + "overrides": { + "session": { + "wire_version": 1 + } + }, + "valid": false + }, + { + "id": "resolve-original-access-revoked", + "stage": "resolve", + "overrides": { + "access_rows": { + "00000010-0000-0000-0000-000000000001": { + "active": false + } + } + }, + "valid": false + }, + { + "id": "resolve-original-access-user-mismatch", + "stage": "resolve", + "overrides": { + "access_rows": { + "00000010-0000-0000-0000-000000000001": { + "user_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + }, + "valid": false + }, + { + "id": "resolve-missing-original-access-row", + "stage": "resolve", + "overrides": { + "access_rows": { + "00000010-0000-0000-0000-000000000001": null + } + }, + "valid": false + }, + { + "id": "resolve-post-refresh-logout-is-not-family-revocation", + "stage": "resolve", + "overrides": { + "access_rows": { + "ffffffff-ffff-ffff-ffff-ffffffffffff": { + "active": false + } + } + }, + "valid": true + }, + { + "id": "resolve-occurrence-parent_matches", + "stage": "resolve", + "overrides": { + "controls": { + "parent_matches": false + } + }, + "valid": false + }, + { + "id": "resolve-occurrence-scope_matches", + "stage": "resolve", + "overrides": { + "controls": { + "scope_matches": false + } + }, + "valid": false + }, + { + "id": "resolve-occurrence-viewer_authorized", + "stage": "resolve", + "overrides": { + "controls": { + "viewer_authorized": false + } + }, + "valid": false + }, + { + "id": "resolve-occurrence-source_retained", + "stage": "resolve", + "overrides": { + "controls": { + "source_retained": false + } + }, + "valid": false + }, + { + "id": "resolve-occurrence-generation_current", + "stage": "resolve", + "overrides": { + "controls": { + "generation_current": false + } + }, + "valid": false + }, + { + "id": "resolve-occurrence-live_authorization_checked", + "stage": "resolve", + "overrides": { + "controls": { + "live_authorization_checked": false + } + }, + "valid": false + }, + { + "id": "gateway-authorized", + "stage": "gateway", + "overrides": {}, + "valid": true + }, + { + "id": "gateway-session-revoked", + "stage": "gateway", + "overrides": { + "session": { + "revoked": true + } + }, + "valid": false + }, + { + "id": "gateway-session-expired", + "stage": "gateway", + "overrides": { + "session": { + "expires_at": "2030-01-01T00:00:00Z" + } + }, + "valid": false + }, + { + "id": "gateway-session-legacy-row", + "stage": "gateway", + "overrides": { + "session": { + "wire_version": 1 + } + }, + "valid": false + }, + { + "id": "gateway-original-access-revoked", + "stage": "gateway", + "overrides": { + "access_rows": { + "00000010-0000-0000-0000-000000000001": { + "active": false + } + } + }, + "valid": false + }, + { + "id": "gateway-original-access-user-mismatch", + "stage": "gateway", + "overrides": { + "access_rows": { + "00000010-0000-0000-0000-000000000001": { + "user_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + }, + "valid": false + }, + { + "id": "gateway-missing-original-access-row", + "stage": "gateway", + "overrides": { + "access_rows": { + "00000010-0000-0000-0000-000000000001": null + } + }, + "valid": false + }, + { + "id": "gateway-post-refresh-logout-is-not-family-revocation", + "stage": "gateway", + "overrides": { + "access_rows": { + "ffffffff-ffff-ffff-ffff-ffffffffffff": { + "active": false + } + } + }, + "valid": true + }, + { + "id": "gateway-occurrence-parent_matches", + "stage": "gateway", + "overrides": { + "controls": { + "parent_matches": false + } + }, + "valid": false + }, + { + "id": "gateway-occurrence-scope_matches", + "stage": "gateway", + "overrides": { + "controls": { + "scope_matches": false + } + }, + "valid": false + }, + { + "id": "gateway-occurrence-viewer_authorized", + "stage": "gateway", + "overrides": { + "controls": { + "viewer_authorized": false + } + }, + "valid": false + }, + { + "id": "gateway-occurrence-source_retained", + "stage": "gateway", + "overrides": { + "controls": { + "source_retained": false + } + }, + "valid": false + }, + { + "id": "gateway-occurrence-generation_current", + "stage": "gateway", + "overrides": { + "controls": { + "generation_current": false + } + }, + "valid": false + }, + { + "id": "gateway-occurrence-representation_matches", + "stage": "gateway", + "overrides": { + "controls": { + "representation_matches": false + } + }, + "valid": false + }, + { + "id": "gateway-occurrence-live_authorization_checked", + "stage": "gateway", + "overrides": { + "controls": { + "live_authorization_checked": false + } + }, + "valid": false + }, + { + "id": "resolve-wrong-user_id", + "stage": "resolve", + "overrides": { + "request": { + "user_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "resolve-missing-user_id", + "stage": "resolve", + "overrides": { + "request": { + "user_id": null + } + }, + "valid": false + }, + { + "id": "resolve-wrong-application_session_id", + "stage": "resolve", + "overrides": { + "request": { + "application_session_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "resolve-missing-application_session_id", + "stage": "resolve", + "overrides": { + "request": { + "application_session_id": null + } + }, + "valid": false + }, + { + "id": "resolve-wrong-organization_id", + "stage": "resolve", + "overrides": { + "request": { + "organization_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "resolve-missing-organization_id", + "stage": "resolve", + "overrides": { + "request": { + "organization_id": null + } + }, + "valid": false + }, + { + "id": "resolve-missing-handle", + "stage": "resolve", + "overrides": { + "request": { + "headers": { + "X-Attachment-Media-Session": null + } + } + }, + "valid": false + }, + { + "id": "resolve-wrong-handle", + "stage": "resolve", + "overrides": { + "request": { + "headers": { + "X-Attachment-Media-Session": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + }, + "valid": false + }, + { + "id": "resolve-malformed-handle", + "stage": "resolve", + "overrides": { + "request": { + "headers": { + "X-Attachment-Media-Session": "not-a-uuid" + } + } + }, + "valid": false + }, + { + "id": "resolve-no-bearer", + "stage": "resolve", + "overrides": { + "request": { + "bearer_authenticated": false + } + }, + "valid": false + }, + { + "id": "resolve-no-origin", + "stage": "resolve", + "overrides": { + "request": { + "origin": null + } + }, + "valid": false + }, + { + "id": "resolve-wrong-origin", + "stage": "resolve", + "overrides": { + "request": { + "origin": "https://foreign.invalid" + } + }, + "valid": false + }, + { + "id": "resolve-null-origin", + "stage": "resolve", + "overrides": { + "request": { + "origin": "null" + } + }, + "valid": false + }, + { + "id": "resolve-returned-wrong-session", + "stage": "resolve", + "overrides": { + "resolve_response": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "/tracer/v1/attachment-media/ffffffff-ffff-ffff-ffff-ffffffffffff/00000007-0000-0000-0000-000000000001/synthetic_grant", + "expires_at": "2030-01-01T00:10:00Z" + } + ] + } + }, + "valid": false + }, + { + "id": "resolve-response-outlives-session", + "stage": "resolve", + "overrides": { + "resolve_response": { + "items": [ + { + "occurrence_id": "00000007-0000-0000-0000-000000000001", + "status": "ready", + "gateway_path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", + "expires_at": "2030-01-01T00:15:01Z" + } + ] + } + }, + "valid": false + }, + { + "id": "gateway-wrong-route-session", + "stage": "gateway", + "overrides": { + "gateway": { + "path": "/tracer/v1/attachment-media/ffffffff-ffff-ffff-ffff-ffffffffffff/00000007-0000-0000-0000-000000000001/synthetic_grant" + } + }, + "valid": false + }, + { + "id": "gateway-wrong-route-occurrence", + "stage": "gateway", + "overrides": { + "gateway": { + "path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/ffffffff-ffff-ffff-ffff-ffffffffffff/synthetic_grant" + } + }, + "valid": false + }, + { + "id": "gateway-wrong-route-grant", + "stage": "gateway", + "overrides": { + "gateway": { + "path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/other_grant" + } + }, + "valid": false + }, + { + "id": "gateway-no-cookie", + "stage": "gateway", + "overrides": { + "gateway": { + "cookies": [] + } + }, + "valid": false + }, + { + "id": "gateway-wrong-cookie", + "stage": "gateway", + "overrides": { + "gateway": { + "cookies": [ + { + "name": "fi_media_session_v2", + "value": "wrong_secret" + } + ] + } + }, + "valid": false + }, + { + "id": "gateway-old-parent-cookie", + "stage": "gateway", + "overrides": { + "gateway": { + "cookies": [ + { + "name": "fi_media_session", + "value": "synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + } + }, + "valid": false + }, + { + "id": "gateway-legacy-cookie-alongside-v2", + "stage": "gateway", + "overrides": { + "gateway": { + "cookies": [ + { + "name": "fi_media_session", + "value": "old_secret" + }, + { + "name": "fi_media_session_v2", + "value": "synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + } + }, + "valid": true + }, + { + "id": "gateway-duplicate-v2-cookie", + "stage": "gateway", + "overrides": { + "gateway": { + "cookies": [ + { + "name": "fi_media_session_v2", + "value": "synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + { + "name": "fi_media_session_v2", + "value": "synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + } + }, + "valid": false + }, + { + "id": "gateway-wrong-grant-viewer_id", + "stage": "gateway", + "overrides": { + "grant": { + "viewer_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "gateway-wrong-grant-application_session_id", + "stage": "gateway", + "overrides": { + "grant": { + "application_session_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "gateway-wrong-grant-media_session_id", + "stage": "gateway", + "overrides": { + "grant": { + "media_session_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "gateway-wrong-grant-occurrence_id", + "stage": "gateway", + "overrides": { + "grant": { + "occurrence_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "gateway-wrong-grant-org", + "stage": "gateway", + "overrides": { + "grant": { + "scope": { + "organization_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + }, + "valid": false + }, + { + "id": "gateway-grant-expired", + "stage": "gateway", + "overrides": { + "grant": { + "expires_at": "2030-01-01T00:00:00Z" + } + }, + "valid": false + }, + { + "id": "gateway-grant-outlives-session", + "stage": "gateway", + "overrides": { + "grant": { + "expires_at": "2030-01-01T00:15:01Z" + } + }, + "valid": false + }, + { + "id": "exchange-authorized", + "stage": "exchange", + "overrides": {}, + "valid": true + }, + { + "id": "exchange-missing-bearer", + "stage": "exchange", + "overrides": { + "request": { + "bearer_authenticated": false + } + }, + "valid": false + }, + { + "id": "exchange-missing-origin", + "stage": "exchange", + "overrides": { + "request": { + "origin": null + } + }, + "valid": false + }, + { + "id": "exchange-foreign-origin", + "stage": "exchange", + "overrides": { + "request": { + "origin": "https://foreign.invalid" + } + }, + "valid": false + }, + { + "id": "exchange-wrong-user", + "stage": "exchange", + "overrides": { + "request": { + "user_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "exchange-wrong-access", + "stage": "exchange", + "overrides": { + "request": { + "application_session_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "exchange-wrong-org", + "stage": "exchange", + "overrides": { + "request": { + "organization_id": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + }, + "valid": false + }, + { + "id": "exchange-status", + "stage": "exchange", + "overrides": { + "exchange_response": { + "status": 200 + } + }, + "valid": false + }, + { + "id": "exchange-body", + "stage": "exchange", + "overrides": { + "exchange_response": { + "body": "SYNTHETIC_SECRET" + } + }, + "valid": false + }, + { + "id": "exchange-cache", + "stage": "exchange", + "overrides": { + "exchange_response": { + "cache_control": "public" + } + }, + "valid": false + }, + { + "id": "exchange-wrong-handle", + "stage": "exchange", + "overrides": { + "exchange_response": { + "safe_headers": { + "X-Attachment-Media-Session": "ffffffff-ffff-ffff-ffff-ffffffffffff" + } + } + }, + "valid": false + }, + { + "id": "exchange-wrong-expiry", + "stage": "exchange", + "overrides": { + "exchange_response": { + "safe_headers": { + "X-Attachment-Media-Expires-At": "2030-01-01T00:16:00Z" + } + } + }, + "valid": false + }, + { + "id": "exchange-secret-header", + "stage": "exchange", + "overrides": { + "exchange_response": { + "safe_headers": { + "media_secret": "synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + }, + "valid": false + }, + { + "id": "exchange-parent-path", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/; Max-Age=900; Secure; HttpOnly; SameSite=Strict" + } + }, + "valid": false + }, + { + "id": "exchange-old-name", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=900; Secure; HttpOnly; SameSite=Strict" + } + }, + "valid": false + }, + { + "id": "exchange-domain", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=900; Secure; HttpOnly; SameSite=Strict; Domain=example.invalid" + } + }, + "valid": false + }, + { + "id": "exchange-no-secure", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=900; HttpOnly; SameSite=Strict" + } + }, + "valid": false + }, + { + "id": "exchange-no-httponly", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=900; Secure; SameSite=Strict" + } + }, + "valid": false + }, + { + "id": "exchange-lax", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=900; Secure; HttpOnly; SameSite=Lax" + } + }, + "valid": false + }, + { + "id": "exchange-overlong-age", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Max-Age=901; Secure; HttpOnly; SameSite=Strict" + } + }, + "valid": false + }, + { + "id": "exchange-missing-age", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/; Secure; HttpOnly; SameSite=Strict" + } + }, + "valid": false + }, + { + "id": "exchange-wrong-path", + "stage": "exchange", + "overrides": { + "exchange_response": { + "set_cookie": "fi_media_session_v2=synthetic_cookie_aaaaaaaaaaaaaaaaaaaaaaaaaa; Path=/tracer/v1/attachment-media/ffffffff-ffff-ffff-ffff-ffffffffffff/; Max-Age=900; Secure; HttpOnly; SameSite=Strict" + } + }, + "valid": false + } + ] +} diff --git a/spec/attachments/v1/openapi.json b/spec/attachments/v1/openapi.json index 12c53ad7d..6d68f949c 100644 --- a/spec/attachments/v1/openapi.json +++ b/spec/attachments/v1/openapi.json @@ -1166,13 +1166,10 @@ "/tracer/v1/projects/{project_id}/attachments/resolve": { "post": { "operationId": "resolveAttachmentOccurrences", - "description": "Read-only handler, separate from mutations. Current viewer + expected parent for EACH item; unknown/foreign both not_found. Private no-store. Same-origin session-bound gateway only.", + "description": "Read-only handler with explicit application bearer, exact Origin and required non-secret media-session handle. Select that exact row; authorize its user, original access-token row ID, resolved project organization, fixed expiry and revocation. Missing/malformed selector is invalid_request; unknown/foreign/dead selector is indistinguishable not_found. No latest-row, timestamp/UUID sorting or legacy missing-handle fallback. Each occurrence retains independent expected-parent/scope/representation/policy/deletion/retention authorization. Private no-store; ready paths contain the captured handle. Resolve does not receive or need the path-scoped media cookie.", "security": [ { - "AttachmentCredential": [] - }, - { - "ApplicationSession": [] + "ApplicationBearer": [] } ], "x-authority": "scoped_application_identity", @@ -1185,10 +1182,19 @@ "$ref": "contract.schema.json#/$defs/ResolveResponse" } } + }, + "headers": { + "Cache-Control": { + "required": true, + "schema": { + "type": "string", + "const": "private, no-store" + } + } } }, "400": { - "description": "Invalid request", + "description": "Invalid request, including missing or malformed media-session handle", "content": { "application/json": { "schema": { @@ -1218,7 +1224,7 @@ } }, "404": { - "description": "Unknown or unauthorized occurrence; indistinguishable", + "description": "Unknown, foreign, revoked or expired media-session handle; indistinguishable. No grants issued.", "content": { "application/json": { "schema": { @@ -1266,6 +1272,25 @@ "schema": { "$ref": "contract.schema.json#/$defs/UUID" } + }, + { + "name": "Origin", + "in": "header", + "required": true, + "description": "Must equal the configured HTTPS application origin exactly; absent, null, foreign or wildcard origins deny. No cookie-only application authentication or wildcard credentialed CORS.", + "schema": { + "type": "string", + "maxLength": 2048 + } + }, + { + "name": "X-Attachment-Media-Session", + "in": "header", + "required": true, + "description": "Exact handle returned by the exchange for this captured bearer/organization context, never a mutable latest-session selector or the secret cookie.", + "schema": { + "$ref": "contract.schema.json#/$defs/MediaSessionHandle" + } } ], "requestBody": { @@ -1663,19 +1688,46 @@ "/tracer/v1/attachment-media-sessions": { "post": { "operationId": "exchangeAttachmentMediaSession", - "description": "Authenticated application-session exchange; CSRF + exact Origin. Set host-only Secure HttpOnly SameSite=Strict fi_media_session cookie with Path=/tracer/v1/attachment-media/. Bound to original application session; revoke on logout/membership change.", + "description": "Explicit application bearer plus exact Origin; these bearer-only adapters do not enforce a Django CSRF token and do not accept ambient application cookies. Return 204 with no body and the non-secret existing session UUID/fixed expiry headers. Keep the random secret exclusively in host-only Secure HttpOnly SameSite=Strict fi_media_session_v2 Set-Cookie at /tracer/v1/attachment-media/{media_session_id}/, with digest-only persistence. Concurrent exchanges create independent sessions without revoking predecessors. Original access-row revocation denies media; refresh-family logout is not solved by this contract.", "security": [ { - "AttachmentCredential": [] - }, - { - "ApplicationSession": [] + "ApplicationBearer": [] } ], "x-authority": "scoped_application_identity", "responses": { "204": { - "description": "Success" + "description": "No body. All listed headers are mandatory; only the handle and expiry are JS-visible protocol data. No raw media credential in JSON, selectors or URLs.", + "headers": { + "X-Attachment-Media-Session": { + "required": true, + "description": "Non-secret UUID of the exact newly issued media-session row.", + "schema": { + "$ref": "contract.schema.json#/$defs/MediaSessionHandle" + } + }, + "X-Attachment-Media-Expires-At": { + "required": true, + "description": "Fixed session expiry; renewal never extends this deadline.", + "schema": { + "$ref": "contract.schema.json#/$defs/Timestamp" + } + }, + "Set-Cookie": { + "required": true, + "description": "fi_media_session_v2=; Path=/tracer/v1/attachment-media/{media_session_id}/; Secure; HttpOnly; SameSite=Strict; Max-Age bounded by fixed session expiry. Omit Domain. Never expose or log the secret. Reject legacy credentials even if renamed to v2; do not select the first/last of duplicate same-name request cookies.", + "schema": { + "type": "string" + } + }, + "Cache-Control": { + "required": true, + "schema": { + "type": "string", + "const": "private, no-store" + } + } + } }, "400": { "description": "Invalid request", @@ -1747,13 +1799,25 @@ } } } - } + }, + "parameters": [ + { + "name": "Origin", + "in": "header", + "required": true, + "description": "Must equal the configured HTTPS application origin exactly; absent, null, foreign or wildcard origins deny. No cookie-only application authentication or wildcard credentialed CORS.", + "schema": { + "type": "string", + "maxLength": 2048 + } + } + ] } }, - "/tracer/v1/attachment-media/{occurrence_id}/{grant_id}": { + "/tracer/v1/attachment-media/{media_session_id}/{occurrence_id}/{grant_id}": { "get": { "operationId": "getAttachmentMedia", - "description": "Media session plus narrow occurrence grant; reauthorize before 200/206/304 and every bounded chunk (<=5s). No public storage/source URL. GET/HEAD/Range/conditional all private,no-store; nosniff; same-origin CORP; inert Content-Disposition. Range validated and bounded. Grant identifier alone is insufficient.", + "description": "Media session plus narrow occurrence grant; reauthorize before 200/206/304 and every bounded chunk (<=5s). No public storage/source URL. GET/HEAD/Range/conditional all private,no-store; nosniff; same-origin CORP; inert Content-Disposition. Range validated and bounded. Grant identifier alone is insufficient. Exact route media_session_id == cookie-derived row.id == grant.media_session_id, with matching organization and live original user/access row. Accept only v2-issued credentials; old parent-path fi_media_session cookies, including renamed legacy values, do not authorize this route. Ambiguous duplicate v2 cookie values deny. Neither handle nor grant alone is authority. New exchanges never extend or revoke an unrelated live session/grant.", "security": [ { "MediaSession": [] @@ -1845,6 +1909,14 @@ } }, "parameters": [ + { + "name": "media_session_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/MediaSessionHandle" + } + }, { "name": "occurrence_id", "in": "path", @@ -1881,7 +1953,7 @@ }, "head": { "operationId": "headAttachmentMedia", - "description": "Media session plus narrow occurrence grant; reauthorize before 200/206/304 and every bounded chunk (<=5s). No public storage/source URL. GET/HEAD/Range/conditional all private,no-store; nosniff; same-origin CORP; inert Content-Disposition. Range validated and bounded. Grant identifier alone is insufficient.", + "description": "Media session plus narrow occurrence grant; reauthorize before 200/206/304 and every bounded chunk (<=5s). No public storage/source URL. GET/HEAD/Range/conditional all private,no-store; nosniff; same-origin CORP; inert Content-Disposition. Range validated and bounded. Grant identifier alone is insufficient. Exact route media_session_id == cookie-derived row.id == grant.media_session_id, with matching organization and live original user/access row. Accept only v2-issued credentials; old parent-path fi_media_session cookies, including renamed legacy values, do not authorize this route. Ambiguous duplicate v2 cookie values deny. Neither handle nor grant alone is authority. New exchanges never extend or revoke an unrelated live session/grant.", "security": [ { "MediaSession": [] @@ -1973,6 +2045,14 @@ } }, "parameters": [ + { + "name": "media_session_id", + "in": "path", + "required": true, + "schema": { + "$ref": "contract.schema.json#/$defs/MediaSessionHandle" + } + }, { "name": "occurrence_id", "in": "path", @@ -2139,7 +2219,13 @@ "MediaSession": { "type": "apiKey", "in": "cookie", - "name": "fi_media_session" + "name": "fi_media_session_v2", + "description": "Host-only Secure HttpOnly SameSite=Strict secret cookie, Path=/tracer/v1/attachment-media/{media_session_id}/. Route session ID, cookie-derived session row and grant media-session FK must agree; legacy fi_media_session is never accepted here." + }, + "ApplicationBearer": { + "type": "http", + "scheme": "bearer", + "description": "Live application access-token identity only; neither session cookies, API keys nor attachment write capabilities. Binding uses the original access-token row ID, not a refresh/login-family identity." } }, "schemas": { diff --git a/spec/attachments/v1/security-fixtures.json b/spec/attachments/v1/security-fixtures.json index af2e07f98..59f864199 100644 --- a/spec/attachments/v1/security-fixtures.json +++ b/spec/attachments/v1/security-fixtures.json @@ -8216,6 +8216,279 @@ "reason": "not_found", "effects": [] } + }, + { + "id": "explicit-resolve-missing-handle", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "explicit-resolve-foreign-user-handle", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "explicit-resolve-different-access-row-handle", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "explicit-resolve-foreign-organization-handle", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": false, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "explicit-resolve-missing-bearer", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": false, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": true, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "explicit-resolve-missing-origin", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } + }, + { + "id": "explicit-resolve-foreign-origin", + "context": { + "action": "resolve", + "scope_matches": true, + "parent_matches": true, + "writer_matches": true, + "nonce_matches": true, + "credential_eligible": true, + "operation_allowed": true, + "policy_current": true, + "generation_current": true, + "not_expired": true, + "private_storage_verified": true, + "immutable_version_verified": true, + "serving_identity_server_owned": true, + "bytes_ready": true, + "binding_observed": true, + "source_retained": true, + "retention_provenance_known": true, + "viewer_authorized": true, + "session_matches": true, + "representation_matches": true, + "csrf_origin_valid": false, + "source_occurrence_authorized": true, + "target_authorized": true, + "reservation_available": true, + "idempotency_matches": true, + "decoder_isolated": true, + "source_envelope_private": true, + "direct_upload_qualified": true, + "live_authorization_checked": true + }, + "expected": { + "decision": "deny", + "reason": "not_found", + "effects": [] + } } ] } diff --git a/spec/attachments/v1/security-table.json b/spec/attachments/v1/security-table.json index 6cd726d26..8d6de7e4d 100644 --- a/spec/attachments/v1/security-table.json +++ b/spec/attachments/v1/security-table.json @@ -104,13 +104,15 @@ "type": "boolean" }, "session_matches": { - "type": "boolean" + "type": "boolean", + "description": "For resolve: exact required handle matches the authenticated user, original access-token row ID and resolved organization. For media: route session ID == cookie-derived v2 row ID == grant FK; original access row remains live. Never latest-row selection." }, "representation_matches": { "type": "boolean" }, "csrf_origin_valid": { - "type": "boolean" + "type": "boolean", + "description": "Exchange and resolve require explicit application bearer plus exact Origin, not a Django CSRF-token claim. Other operations retain their existing enforced CSRF/Origin controls. Ambient cookie-only application auth is not supported by the media issuance adapters." }, "source_occurrence_authorized": { "type": "boolean" diff --git a/spec/attachments/v1/test_contract.py b/spec/attachments/v1/test_contract.py index 0815f6792..06b847c69 100644 --- a/spec/attachments/v1/test_contract.py +++ b/spec/attachments/v1/test_contract.py @@ -5,6 +5,9 @@ import importlib.util import hashlib import io +from email.message import Message +from http.cookiejar import CookieJar +from urllib.request import Request import json import tempfile import unittest @@ -295,6 +298,137 @@ def test_one_hour_wav_produces_independently_playable_bounded_segments(self): self.assertEqual(set(sizes), {1440044}) print("PCM_IMPORT " + json.dumps({"source_bytes": total, "segments": len(sizes), "segment_bytes": sizes[0], "output_bytes": sum(sizes), "pcm_sha256": actual_hash.hexdigest()}, sort_keys=True)) + def test_other_attachment_schema_definitions_preserve_reviewed_baseline(self): + # f3b0923c62 baseline: only ResolveResult's gateway shape changes. + amended = {"ResolveResult", "MediaSessionHandle", "MediaGatewayPath", "MediaSessionExchangeHeaders", "MediaSessionResolveHeaders"} + preserved = {key: value for key, value in contract.SCHEMA["$defs"].items() if key not in amended} + digest = hashlib.sha256(json.dumps(preserved, sort_keys=True, separators=(",", ":")).encode()).hexdigest() + self.assertEqual(digest, "5e74054fb23e72fbc5320e122126fe53f57565963b82459c522ecbeae839f272") + + def test_media_openapi_requires_bearer_origin_handle_and_bodyless_exchange(self): + paths = contract.load("openapi.json")["paths"] + exchange = paths["/tracer/v1/attachment-media-sessions"]["post"] + resolve = paths["/tracer/v1/projects/{project_id}/attachments/resolve"]["post"] + for operation in (exchange, resolve): + self.assertEqual(operation["security"], [{"ApplicationBearer": []}]) + origin = next(p for p in operation["parameters"] if p["name"] == "Origin") + self.assertTrue(origin["required"]) + selector = next(p for p in resolve["parameters"] if p["name"] == contract.MEDIA_HANDLE) + self.assertTrue(selector["required"]) + self.assertEqual(selector["schema"]["$ref"], "contract.schema.json#/$defs/MediaSessionHandle") + success = exchange["responses"]["204"] + self.assertNotIn("content", success) + self.assertEqual(set(success["headers"]), {contract.MEDIA_HANDLE, contract.MEDIA_EXPIRY, "Set-Cookie", "Cache-Control"}) + self.assertTrue(all(h["required"] for h in success["headers"].values())) + self.assertNotIn("/tracer/v1/attachment-media/{occurrence_id}/{grant_id}", paths) + route = paths["/tracer/v1/attachment-media/{media_session_id}/{occurrence_id}/{grant_id}"] + for operation in route.values(): + self.assertEqual(operation["security"], [{"MediaSession": []}]) + self.assertEqual([p["name"] for p in operation["parameters"] if p["in"] == "path"], ["media_session_id", "occurrence_id", "grant_id"]) + + def test_media_binding_fixtures_are_decisive_on_all_gateway_actions(self): + table = contract.load("media-session-fixtures.json") + for case in table["cases"]: + scenario = contract.fixture_override(table["base"], case["overrides"]) + actions = ("GET", "HEAD", "Range", "conditional") if case["stage"] == "gateway" else ("GET",) + for action in actions: + with self.subTest(case=case["id"], action=action): + if case["valid"]: + contract.validate_media_session(case["stage"], scenario, action=action) + else: + with self.assertRaises((ValueError, ValidationError)): + contract.validate_media_session(case["stage"], scenario, action=action) + + def test_distinct_same_name_cookie_paths_with_stdlib_not_browser_proof(self): + # This tests HTTP cookie path selection in the stdlib, not real browser + # concurrency, response ordering, tab coordination or cookie eviction. + base = contract.load("media-session-fixtures.json")["base"] + first = base["exchange_response"]["set_cookie"] + other = "ffffffff-ffff-ffff-ffff-ffffffffffff" + second = first.replace(base["session"]["id"], other).replace("synthetic_cookie_", "alternate_cookie_") + class CookieResponse: + def __init__(self, value): + self.headers = Message() + self.headers["Set-Cookie"] = value + def info(self): + return self.headers + for order in ((first, second), (second, first)): + jar = CookieJar() + for value in order: + jar.extract_cookies(CookieResponse(value), Request(base["origin"] + "/tracer/v1/attachment-media-sessions")) + self.assertEqual(len(jar), 2) + for handle, marker in ((base["session"]["id"], "synthetic_cookie_"), (other, "alternate_cookie_")): + request = Request(base["origin"] + base["gateway"]["path"].replace(base["session"]["id"], handle)) + jar.add_cookie_header(request) + self.assertEqual(request.get_header("Cookie").count(contract.MEDIA_COOKIE + "="), 1) + self.assertIn(marker, request.get_header("Cookie")) + for path in ("/tracer/v1/attachment-media-sessions", "/tracer/v1/projects/example/attachments/resolve"): + request = Request(base["origin"] + path) + jar.add_cookie_header(request) + self.assertIsNone(request.get_header("Cookie")) + + def test_fixed_deadlines_and_independent_renewal_in_fixture_model(self): + first = contract.load("media-session-fixtures.json")["base"] + second = copy.deepcopy(first) + old_id, new_id = first["session"]["id"], "ffffffff-ffff-ffff-ffff-ffffffffffff" + second["session"]["id"] = new_id + second["request"]["headers"][contract.MEDIA_HANDLE] = new_id + second["grant"]["media_session_id"] = new_id + second["gateway"]["path"] = second["gateway"]["path"].replace(old_id, new_id) + second["resolve_response"]["items"][0]["gateway_path"] = second["gateway"]["path"] + secret = "alternate_synthetic_secret" + second["session"]["credential_digest"] = hashlib.sha256(secret.encode()).hexdigest() + second["gateway"]["cookies"][0]["value"] = secret + # Equal expiry is intentional: no timestamp/UUID ordering participates. + for scenario in (second, first, first, second): + contract.validate_media_session("resolve", scenario) + contract.validate_media_session("gateway", scenario) + old_expiry = first["grant"]["expires_at"] + second["grant"]["expires_at"] = "2030-01-01T00:12:00Z" + for scenario in (first, second): + scenario["now"] = old_expiry + with self.assertRaises(ValueError): + contract.validate_media_session("gateway", first) + contract.validate_media_session("gateway", second) + self.assertEqual(first["grant"]["expires_at"], old_expiry) + first["session"]["revoked"] = True + with self.assertRaises(ValueError): + contract.validate_media_session("resolve", first) + contract.validate_media_session("gateway", second) + + def test_original_access_row_revocation_and_inherited_refresh_logout_limit(self): + base = contract.load("media-session-fixtures.json")["base"] + original = base["session"]["application_session_id"] + refreshed = "ffffffff-ffff-ffff-ffff-ffffffffffff" + # A refreshed bearer is not the original access-row identity. + changed = copy.deepcopy(base) + changed["request"]["application_session_id"] = refreshed + with self.assertRaises(ValueError): + contract.validate_media_session("resolve", changed) + # This explicitly records the inherited limit, not a family-logout fix. + changed = copy.deepcopy(base) + changed["access_rows"][refreshed]["active"] = False + contract.validate_media_session("gateway", changed) + # Rechecking the ORIGINAL row after a previously allowed chunk denies. + for stage in ("exchange", "resolve", "gateway"): + changed = copy.deepcopy(base) + contract.validate_media_session(stage, changed) + changed["access_rows"][original]["active"] = False + with self.subTest(stage=stage), self.assertRaises(ValueError): + contract.validate_media_session(stage, changed) + + def test_media_secret_absent_from_js_visible_outputs(self): + base = contract.load("media-session-fixtures.json")["base"] + secret = base["gateway"]["cookies"][0]["value"] + safe = base["exchange_response"]["safe_headers"] + self.assertNotIn(secret, json.dumps(safe)) + self.assertNotIn(secret, json.dumps(base["resolve_response"])) + self.assertNotIn(base["session"]["credential_digest"], json.dumps(safe)) + self.assertNotEqual(safe[contract.MEDIA_HANDLE], secret) + for value in (secret, base["session"]["credential_digest"]): + with self.assertRaises(ValidationError): + contract.validate_wire("MediaSessionHandle", value) + def test_security_fixture_covers_every_request_path(self): cases = contract.load("security-fixtures.json")["cases"] for action in ("GET", "HEAD", "Range", "conditional", "resolve"): diff --git a/spec/attachments/v1/test_protocol.py b/spec/attachments/v1/test_protocol.py index 458ef5600..feadd5382 100644 --- a/spec/attachments/v1/test_protocol.py +++ b/spec/attachments/v1/test_protocol.py @@ -18,6 +18,10 @@ spec.loader.exec_module(contract) OBJECTS = {case["schema"]: case["value"] for case in contract.load("wire-fixtures.json")["cases"] if case["valid"]} +MEDIA = contract.load("media-session-fixtures.json")["base"] +EXCHANGE_PATH = "/tracer/v1/attachment-media-sessions" +# Deliberately fake identity; this receiver does not qualify application auth. +MEDIA_HEADERS = {"Authorization": "Bearer synthetic_application_identity", "Origin": MEDIA["origin"], **MEDIA["request"]["headers"]} PROJECT = OBJECTS["BootstrapResponse"]["scope"]["project_id"] UPLOAD = OBJECTS["UploadResponse"]["upload_id"] BASE = "/tracer/v1/projects/" + PROJECT + "/attachments" @@ -36,6 +40,23 @@ def log_message(self, *args): pass def do_POST(self): + if self.path in {EXCHANGE_PATH, BASE + "/resolve"}: + # Test-only exact header checks, not production authentication. + if any(self.headers.get_all(key) != [MEDIA_HEADERS[key]] for key in ("Authorization", "Origin")): + self.send_response(404) + self.send_header("Cache-Control", "private, no-store") + self.end_headers() + return + if self.path == EXCHANGE_PATH: + observed = MEDIA["exchange_response"] + contract.validate_media_session("exchange", MEDIA) + self.send_response(observed["status"]) + for key, value in observed["safe_headers"].items(): + self.send_header(key, value) + self.send_header("Set-Cookie", observed["set_cookie"]) + self.send_header("Cache-Control", observed["cache_control"]) + self.end_headers() + return route = ROUTES.get(self.path) code = 404 response = OBJECTS["Error"] @@ -47,11 +68,22 @@ def do_POST(self): raise ValueError("bounded request") value = contract.strict_json(self.rfile.read(length).decode("utf-8")) contract.validate_wire(incoming, value) + if incoming == "ResolveRequest": + handles = self.headers.get_all(contract.MEDIA_HANDLE) or [] + if len(handles) != 1: + raise ValueError("one exact handle required") + contract.validate_wire("MediaSessionResolveHeaders", {contract.MEDIA_HANDLE: handles[0]}) + if handles[0] != MEDIA["session"]["id"]: + code = 404 + raise LookupError("unknown selector") + contract.validate_media_session("resolve", MEDIA) response = OBJECTS[outgoing] if incoming == "ImportRequest" and value.get("mode") == "completed_recording": response = OBJECTS["RecordingImportResponse"] except (ValueError, ValidationError): code = 400 + except LookupError: + code = 404 body = json.dumps(response).encode() self.send_response(code) self.send_header("Content-Type", "application/json") @@ -75,8 +107,9 @@ def tearDownClass(cls): cls.server.server_close() cls.worker.join(timeout=2) - def post(self, path, value): - request = Request(self.origin + path, data=json.dumps(value).encode(), headers={"Content-Type": "application/json"}, method="POST") + def post(self, path, value, *, headers=None): + headers = MEDIA_HEADERS if headers is None else headers + request = Request(self.origin + path, data=json.dumps(value).encode(), headers={"Content-Type": "application/json", **headers}, method="POST") try: response = urlopen(request, timeout=2) except HTTPError as error: @@ -120,6 +153,36 @@ def test_completed_recording_handoff_does_not_create_large_upload(self): self.assertEqual(status, 400) self.assertNotIn(b"SYNTHETIC_SECRET", raw) + def test_exchange_is_204_headers_only_and_resolve_captures_exact_handle(self): + status, headers, body = self.post(EXCHANGE_PATH, {}) + observed = {"status": status, "body": body.decode(), "safe_headers": {key: headers[key] for key in (contract.MEDIA_HANDLE, contract.MEDIA_EXPIRY)}, "set_cookie": headers["Set-Cookie"], "cache_control": headers["Cache-Control"]} + contract.validate_exchange_response(observed, MEDIA["session"], MEDIA["now"]) + self.assertNotIn(MEDIA["gateway"]["cookies"][0]["value"], json.dumps(observed["safe_headers"])) + # X-CSRFToken is intentionally absent; these adapters are bearer-only. + status, _, body = self.post(BASE + "/resolve", OBJECTS["ResolveRequest"], headers={**MEDIA_HEADERS, contract.MEDIA_HANDLE: headers[contract.MEDIA_HANDLE]}) + self.assertEqual(status, 200) + contract.validate_resolve_binding(json.loads(body), observed["safe_headers"][contract.MEDIA_HANDLE], observed["safe_headers"][contract.MEDIA_EXPIRY]) + + def test_media_issuance_missing_auth_origin_or_handle_fails_closed(self): + for path in (EXCHANGE_PATH, BASE + "/resolve"): + body = {} if path == EXCHANGE_PATH else OBJECTS["ResolveRequest"] + for key in ("Authorization", "Origin"): + headers = {k: v for k, v in MEDIA_HEADERS.items() if k != key} + with self.subTest(path=path, missing=key): + self.assertEqual(self.post(path, body, headers=headers)[0], 404) + for origin in ("null", "https://foreign.invalid"): + self.assertEqual(self.post(path, body, headers={**MEDIA_HEADERS, "Origin": origin})[0], 404) + for value in (None, "", "synthetic_media_secret", "00000000-0000-0000-0000-000000000000"): + headers = {k: v for k, v in MEDIA_HEADERS.items() if k != contract.MEDIA_HANDLE} + if value is not None: + headers[contract.MEDIA_HANDLE] = value + status, _, body = self.post(BASE + "/resolve", OBJECTS["ResolveRequest"], headers=headers) + self.assertEqual(status, 400) + self.assertNotIn(b"gateway_path", body) + self.assertNotIn(b"synthetic_media_secret", body) + foreign = {**MEDIA_HEADERS, contract.MEDIA_HANDLE: "ffffffff-ffff-ffff-ffff-ffffffffffff"} + self.assertEqual(self.post(BASE + "/resolve", OBJECTS["ResolveRequest"], headers=foreign)[0], 404) + def test_unknown_version_and_foreign_route_fail(self): value = {**OBJECTS["UploadRequest"], "schema_version": 99} self.assertEqual(self.post(BASE + "/uploads", value)[0], 400) diff --git a/spec/attachments/v1/validate.py b/spec/attachments/v1/validate.py index 8a3155758..23f525f5a 100644 --- a/spec/attachments/v1/validate.py +++ b/spec/attachments/v1/validate.py @@ -6,8 +6,11 @@ from __future__ import annotations import copy +import hashlib import json import sys +from datetime import datetime +from http.cookies import SimpleCookie from pathlib import Path from typing import Any from uuid import UUID @@ -99,9 +102,9 @@ def validate_wire(name: str, value: Any) -> None: if name == "OccurrencePage": for occurrence in value["items"]: validate_wire("Occurrence", occurrence) - if name == "ResolveResponse": - for item in value["items"]: - if item["status"] == "ready" and item["gateway_path"].split("/")[4] != item["occurrence_id"]: + if name in {"ResolveResult", "ResolveResponse"}: + for item in value["items"] if name == "ResolveResponse" else [value]: + if item["status"] == "ready" and item["gateway_path"].split("/")[5] != item["occurrence_id"]: raise ValueError("gateway occurrence mismatch") if name in {"ImportRequest", "SingleAttachmentImportRequest", "RecordingImportRequest"}: recording = value.get("mode") == "completed_recording" @@ -240,6 +243,105 @@ def validate_import_completion(scenario: dict[str, Any]) -> None: raise ValueError("import segment duration limit") +MEDIA_HANDLE = "X-Attachment-Media-Session" +MEDIA_EXPIRY = "X-Attachment-Media-Expires-At" +MEDIA_COOKIE = "fi_media_session_v2" +MEDIA_PREFIX = "/tracer/v1/attachment-media/" + + +def instant(value: str) -> datetime: + validate_wire("Timestamp", value) + return datetime.fromisoformat(value.replace("Z", "+00:00")) + + +def validate_resolve_binding(response: dict[str, Any], handle: str, expiry: str) -> None: + """Cross-message invariant: a response uses the request's captured selector.""" + validate_wire("MediaSessionHandle", handle) + validate_wire("ResolveResponse", response) + for item in response["items"]: + if item["status"] == "ready" and ( + item["gateway_path"].split("/")[4] != handle or + instant(item["expires_at"]) > instant(expiry)): + raise ValueError("resolve session mismatch") + + +def validate_exchange_response(response: dict[str, Any], session: dict[str, Any], now: str) -> None: + """Synthetic HTTP observations, not a browser cookie implementation. + + safe_headers is only the two protocol headers visible to application JS; + set_cookie is inspected by the test harness, never exposed to that JS. + """ + if response["status"] != 204 or response["body"] != "": + raise ValueError("exchange must be bodyless 204") + headers = response["safe_headers"] + validate_wire("MediaSessionExchangeHeaders", headers) + if headers != {MEDIA_HANDLE: session["id"], MEDIA_EXPIRY: session["expires_at"]}: + raise ValueError("exchange row mismatch") + if response["cache_control"] != "private, no-store": + raise ValueError("private exchange required") + cookies = SimpleCookie() + cookies.load(response["set_cookie"]) + if set(cookies) != {MEDIA_COOKIE}: + raise ValueError("v2 cookie required") + cookie = cookies[MEDIA_COOKIE] + if (cookie["path"] != MEDIA_PREFIX + session["id"] + "/" or + cookie["domain"] or not cookie["secure"] or not cookie["httponly"] or + cookie["samesite"] != "Strict" or + not 0 < int(cookie["max-age"]) <= (instant(session["expires_at"]) - instant(now)).total_seconds() or + hashlib.sha256(cookie.value.encode()).hexdigest() != session["credential_digest"]): + raise ValueError("cookie attributes or credential mismatch") + if cookie.value in json.dumps(headers) or cookie.value == session["id"]: + raise ValueError("credential exposed") + + +def validate_media_session(stage: str, scenario: dict[str, Any], *, action: str = "GET") -> None: + """Fixture-only binding oracle over trusted synthetic rows/observations. + + wire_version denotes issuance under the v2 cutover gate, NOT a new database + column. Invalidating legacy rows once before enabling v2 prevents renaming an + old secret into a v2 cookie. HTTP Cookie does not report cookie Path. + Existing occurrence security predicates remain independently necessary. + """ + session, request = scenario["session"], scenario["request"] + now, expiry = instant(scenario["now"]), instant(session["expires_at"]) + access = scenario["access_rows"].get(session["application_session_id"]) + if (session["wire_version"] != 2 or session["revoked"] is not False or now >= expiry or + not access or access["active"] is not True or access["user_id"] != session["user_id"]): + raise ValueError("dead original session") + if stage in {"exchange", "resolve"}: + if (request["bearer_authenticated"] is not True or request["origin"] != scenario["origin"] or + any(request[key] != session[key] for key in ("user_id", "application_session_id", "organization_id"))): + raise ValueError("bearer origin or identity mismatch") + if stage == "exchange": + validate_exchange_response(scenario["exchange_response"], session, scenario["now"]) + return + if stage == "resolve": + validate_wire("MediaSessionResolveHeaders", request["headers"]) + if request["headers"][MEDIA_HANDLE] != session["id"]: + raise ValueError("exact selector required") + validate_resolve_binding(scenario["resolve_response"], request["headers"][MEDIA_HANDLE], session["expires_at"]) + elif stage == "gateway": + gateway, grant = scenario["gateway"], scenario["grant"] + validate_wire("MediaGatewayPath", gateway["path"]) + validate_wire("PlaybackGrantClaims", grant) + selected = [c["value"] for c in gateway["cookies"] if c["name"] == MEDIA_COOKIE] + if len(selected) != 1 or hashlib.sha256(selected[0].encode()).hexdigest() != session["credential_digest"]: + raise ValueError("missing wrong or ambiguous v2 cookie") + route_session, occurrence, token = gateway["path"].split("/")[4:] + if (route_session != session["id"] or grant["media_session_id"] != session["id"] or + grant["viewer_id"] != session["user_id"] or + grant["application_session_id"] != session["application_session_id"] or + grant["scope"]["organization_id"] != session["organization_id"] or + occurrence != grant["occurrence_id"] or token != scenario["grant_token"] or + not now < instant(grant["expires_at"]) <= expiry): + raise ValueError("route cookie grant binding mismatch") + else: + raise ValueError("unknown media fixture stage") + controls = {**scenario["controls"], "action": "resolve" if stage == "resolve" else action} + if decide(load("security-table.json"), controls)["decision"] != "allow": + raise ValueError("occurrence authorization denied") + + def scoped_key(scope: dict[str, Any], fields: list[str]) -> tuple[Any, ...]: """Fixture key oracle: normalize trace IDs, retain the complete scope.""" normalized = {**scope, "trace_id": normalize_trace(scope["trace_id"])} @@ -319,6 +421,17 @@ def validate_all() -> dict[str, int]: if valid != case["valid"]: raise AssertionError("recording import: " + case["id"]) counts["recording_import"] = len(table["cases"]) + table = load("media-session-fixtures.json") + for case in table["cases"]: + scenario = fixture_override(table["base"], case["overrides"]) + try: + validate_media_session(case["stage"], scenario) + valid = True + except (ValueError, jsonschema_error): + valid = False + if valid != case["valid"]: + raise AssertionError("media session: " + case["id"]) + counts["media_session"] = len(table["cases"]) return counts diff --git a/spec/attachments/v1/wire-fixtures.json b/spec/attachments/v1/wire-fixtures.json index 6fd0aa37d..991a2a68b 100644 --- a/spec/attachments/v1/wire-fixtures.json +++ b/spec/attachments/v1/wire-fixtures.json @@ -328,7 +328,7 @@ { "occurrence_id": "00000007-0000-0000-0000-000000000001", "status": "ready", - "gateway_path": "/tracer/v1/attachment-media/00000007-0000-0000-0000-000000000001/synthetic_grant", + "gateway_path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", "expires_at": "2030-01-01T00:10:00Z" }, { @@ -2314,7 +2314,7 @@ { "occurrence_id": "00000007-0000-0000-0000-000000000001", "status": "ready", - "gateway_path": "/tracer/v1/attachment-media/00000007-0000-0000-0000-000000000001/grant?token=secret", + "gateway_path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/grant?token=secret", "expires_at": "2030-01-01T00:10:00Z" } ] @@ -3106,7 +3106,7 @@ { "occurrence_id": "00000007-0000-0000-0000-000000000001", "status": "ready", - "gateway_path": "/tracer/v1/attachment-media/ffffffff-ffff-ffff-ffff-ffffffffffff/synthetic_grant", + "gateway_path": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/ffffffff-ffff-ffff-ffff-ffffffffffff/synthetic_grant", "expires_at": "2030-01-01T00:10:00Z" }, { @@ -4161,6 +4161,225 @@ "state": "importing" }, "valid": true + }, + { + "id": "valid-MediaSessionExchangeHeaders", + "schema": "MediaSessionExchangeHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001", + "X-Attachment-Media-Expires-At": "2030-01-01T00:15:00Z" + }, + "valid": true + }, + { + "id": "valid-MediaSessionResolveHeaders", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001" + }, + "valid": true + }, + { + "id": "resolve-handle-null", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": null + }, + "valid": false + }, + { + "id": "resolve-handle-empty", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "" + }, + "valid": false + }, + { + "id": "resolve-handle-secret", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "raw_media_secret" + }, + "valid": false + }, + { + "id": "resolve-handle-malformed", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "000000000000000000000000000000000000" + }, + "valid": false + }, + { + "id": "resolve-handle-nil", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "00000000-0000-0000-0000-000000000000" + }, + "valid": false + }, + { + "id": "resolve-handle-uppercase", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "000000AF-0000-0000-0000-000000000001" + }, + "valid": false + }, + { + "id": "resolve-handle-newline", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001\n" + }, + "valid": false + }, + { + "id": "resolve-handle-duplicate", + "schema": "MediaSessionResolveHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001,ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "valid": false + }, + { + "id": "resolve-handle-missing", + "schema": "MediaSessionResolveHeaders", + "value": {}, + "valid": false + }, + { + "id": "exchange-no-secret-header", + "schema": "MediaSessionExchangeHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001", + "X-Attachment-Media-Expires-At": "2030-01-01T00:15:00Z", + "media_secret": "SYNTHETIC_SECRET" + }, + "valid": false + }, + { + "id": "exchange-no-secret-selector", + "schema": "MediaSessionExchangeHeaders", + "value": { + "X-Attachment-Media-Session": "SYNTHETIC_SECRET", + "X-Attachment-Media-Expires-At": "2030-01-01T00:15:00Z" + }, + "valid": false + }, + { + "id": "exchange-expiry-required", + "schema": "MediaSessionExchangeHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001" + }, + "valid": false + }, + { + "id": "exchange-expiry-malformed", + "schema": "MediaSessionExchangeHeaders", + "value": { + "X-Attachment-Media-Session": "00000011-0000-0000-0000-000000000001", + "X-Attachment-Media-Expires-At": "tomorrow" + }, + "valid": false + }, + { + "id": "valid-session-gateway-max-token", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "valid": true + }, + { + "id": "session-gateway-legacy-route", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-nil-session", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000000-0000-0000-0000-000000000000/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-empty-session", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media//00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-uppercase-session", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-short-session", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/123/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-encoded-session", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/%300000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-empty-grant", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/", + "valid": false + }, + { + "id": "session-gateway-long-grant", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "valid": false + }, + { + "id": "session-gateway-trailing-slash", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant/", + "valid": false + }, + { + "id": "session-gateway-newline", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant\n", + "valid": false + }, + { + "id": "session-gateway-fragment", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant#x", + "valid": false + }, + { + "id": "session-gateway-query", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant?x=y", + "valid": false + }, + { + "id": "session-gateway-extra-segment", + "schema": "MediaGatewayPath", + "value": "/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant/x", + "valid": false + }, + { + "id": "session-gateway-absolute", + "schema": "MediaGatewayPath", + "value": "https://example.invalid/tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false + }, + { + "id": "session-gateway-backslash", + "schema": "MediaGatewayPath", + "value": "\\tracer/v1/attachment-media/00000011-0000-0000-0000-000000000001/00000007-0000-0000-0000-000000000001/synthetic_grant", + "valid": false } ] } From f0d52e7a409858677c6911a2ac051f38905ac074 Mon Sep 17 00:00:00 2001 From: Nikhil Pareek <8347993+nik13@users.noreply.github.com> Date: Sat, 14 Nov 2026 21:31:15 -0800 Subject: [PATCH 4/4] test(spec): enforce resolve session decision predicate The first cloud conformance run caught that the existing session-grant rule covered gateway reads only. Add a distinct deny-wins resolve selector rule, covered by the new missing/foreign binding fixtures, and report fixture IDs without payloads on conformance failure. Co-Authored-By: Claude Code --- spec/attachments/v1/security-table.json | 28 +++++++++++++++++++++++++ spec/attachments/v1/validate.py | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/spec/attachments/v1/security-table.json b/spec/attachments/v1/security-table.json index 8d6de7e4d..b4dc96ad7 100644 --- a/spec/attachments/v1/security-table.json +++ b/spec/attachments/v1/security-table.json @@ -711,6 +711,34 @@ ] } }, + { + "id": "resolve-exact-session", + "reason": "not_found", + "deny_if": { + "allOf": [ + { + "required": [ + "action" + ], + "properties": { + "action": { + "const": "resolve" + } + } + }, + { + "required": [ + "session_matches" + ], + "properties": { + "session_matches": { + "const": false + } + } + } + ] + } + }, { "id": "session-grant", "reason": "not_found", diff --git a/spec/attachments/v1/validate.py b/spec/attachments/v1/validate.py index 23f525f5a..f022a38d7 100644 --- a/spec/attachments/v1/validate.py +++ b/spec/attachments/v1/validate.py @@ -438,7 +438,12 @@ def validate_all() -> dict[str, int]: if __name__ == "__main__": try: print(json.dumps({"status": "PASS", "cases": validate_all()}, sort_keys=True)) - except (AssertionError, ValueError, jsonschema_error) as error: + except AssertionError as error: + # These assertions contain only checked-in fixture IDs/count positions, + # never wire values. Keep cloud failures diagnosable without payloads. + print(json.dumps({"status": "FAIL", "fixture": str(error)})) + sys.exit(1) + except (ValueError, jsonschema_error) as error: # Wire validation errors can include payloads. Print only type, not contents. print(json.dumps({"status": "FAIL", "error_type": type(error).__name__})) sys.exit(1)