Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
contracts/VID-IMPL-P00-003A/** text eol=lf
testing/implementation/VID-IMPL-P00-003A/** text eol=lf
specifications/evidence/PHASE-00-IMPLEMENTATION/VID-IMPL-P00-003A/** text eol=lf
workers/VideoLocalization.Worker/src/waveform_contract.rs text eol=lf
workers/VideoLocalization.Worker/tests/waveform_contract.rs text eol=lf
/.gitattributes text eol=lf
workers/VideoLocalization.Worker/src/lib.rs text eol=lf
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
{
"cache_key_positive_cases": [
{
"case_id": "cache-key-positive-001",
"seed": "waveform-seed-003a",
"resource_profile_id": "VID-WAVEFORM-RESOURCE-P00-003A",
"policy_profile_id": "VID-WAVEFORM-POLICY-P00-003A",
"retry_profile_id": "VID-WAVEFORM-RETRY-P00-003A",
"input_ports": [
{
"order": 0,
"type": "waveform_request",
"schema": "VID-IMPL-P00-003A-WAVEFORM-INPUT",
"content": "source",
"revision": "0.1.0-p00",
"sample_range": "[0,4096)"
}
],
"representation": {
"peak": "waveform-peak-v1",
"time": "sample",
"channel": "stereo-major",
"downmix": "matrix-stereo-downmix-v1",
"resampling": "resample-none",
"stability": "fixed"
},
"expected_cache_key_prefix": "SUI-CACHE-KEY-V1\u0000",
"expected_cache_key_digest": "8eda1f679adc820e35ed450e3ea70707b9a96e4a4e8eddd4a767c5727566a835"
}
],
"cache_key_negative_cases": [
{
"case_id": "cache-key-negative-invalid-seed",
"invalid_seed": true,
"missing_seed": false
},
{
"case_id": "cache-key-negative-missing-seed",
"invalid_seed": false,
"missing_seed": true
}
],
"bulk_descriptor_positive_cases": [
{
"case_id": "bulk-descriptor-positive-001",
"descriptor": {
"version": "VID-WAVEFORM-BULK-DESCRIPTOR-V1",
"mode": "read-only",
"handle_identity": "handle-vid-waveform-003a",
"attempt_id": "attempt-001",
"lease_id": "lease-001",
"cancel_scope": "attempt-001",
"expiry": "2099-01-01T00:00:00Z",
"integrity": {
"algorithm": "sha-256",
"value": "d67c656e01756650d77717b0839985a056ec28ffe174601d690fc407a2ceffca"
},
"chunk_hashes_omitted": true,
"length": 4096,
"payload_schema": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"source_publication_fence": "fence-001",
"representation": {
"peak": "waveform-peak-v1",
"time": "sample",
"channel": "stereo-major",
"downmix": "matrix-stereo-downmix-v1",
"resampling": "resample-none",
"source_timeline": "timeline-001",
"sample_range": "[0,4096)"
},
"descriptor_hash": "3f1aabb75fb6a7aeb4e38f9ccc1d49ad36c5b2e019eed79d6b67adc158ec371d"
},
"expected_descriptor_digest": "3f1aabb75fb6a7aeb4e38f9ccc1d49ad36c5b2e019eed79d6b67adc158ec371d"
}
],
"bulk_descriptor_negative_cases": [
{
"case_id": "bulk-descriptor-negative-missing-descriptor-hash",
"descriptor": {
"version": "VID-WAVEFORM-BULK-DESCRIPTOR-V1",
"mode": "read-only",
"handle_identity": "handle-vid-waveform-003a",
"attempt_id": "attempt-001",
"lease_id": "lease-001",
"cancel_scope": "attempt-001",
"expiry": "2099-01-01T00:00:00Z",
"integrity": {
"algorithm": "sha-256",
"value": "d67c656e01756650d77717b0839985a056ec28ffe174601d690fc407a2ceffca"
},
"chunk_hashes_omitted": true,
"length": 4096,
"payload_schema": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"source_publication_fence": "fence-001",
"representation": {
"peak": "waveform-peak-v1",
"time": "sample",
"channel": "stereo-major",
"downmix": "matrix-stereo-downmix-v1",
"resampling": "resample-none",
"source_timeline": "timeline-001",
"sample_range": "[0,4096)"
},
"descriptor_hash": "3f1aabb75fb6a7aeb4e38f9ccc1d49ad36c5b2e019eed79d6b67adc158ec371d"
},
"reason": "missing-descriptor-hash"
},
{
"case_id": "bulk-descriptor-negative-chunk-hash-required",
"descriptor": {
"version": "VID-WAVEFORM-BULK-DESCRIPTOR-V1",
"mode": "read-only",
"handle_identity": "handle-vid-waveform-003a",
"attempt_id": "attempt-001",
"lease_id": "lease-001",
"cancel_scope": "attempt-001",
"expiry": "2099-01-01T00:00:00Z",
"integrity": {
"algorithm": "sha-256",
"value": "d67c656e01756650d77717b0839985a056ec28ffe174601d690fc407a2ceffca"
},
"chunk_hashes_omitted": true,
"length": 4096,
"payload_schema": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"source_publication_fence": "fence-001",
"representation": {
"peak": "waveform-peak-v1",
"time": "sample",
"channel": "stereo-major",
"downmix": "matrix-stereo-downmix-v1",
"resampling": "resample-none",
"source_timeline": "timeline-001",
"sample_range": "[0,4096)"
},
"descriptor_hash": "3f1aabb75fb6a7aeb4e38f9ccc1d49ad36c5b2e019eed79d6b67adc158ec371d"
},
"reason": "chunk-list"
},
{
"case_id": "bulk-descriptor-negative-non-hex-integrity",
"descriptor": {
"version": "VID-WAVEFORM-BULK-DESCRIPTOR-V1",
"mode": "read-only",
"handle_identity": "handle-vid-waveform-003a",
"attempt_id": "attempt-001",
"lease_id": "lease-001",
"cancel_scope": "attempt-001",
"expiry": "2099-01-01T00:00:00Z",
"integrity": {
"algorithm": "sha-256",
"value": "not-a-digest"
},
"chunk_hashes_omitted": true,
"length": 4096,
"payload_schema": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"source_publication_fence": "fence-001",
"representation": {
"peak": "waveform-peak-v1",
"time": "sample",
"channel": "stereo-major",
"downmix": "matrix-stereo-downmix-v1",
"resampling": "resample-none",
"source_timeline": "timeline-001",
"sample_range": "[0,4096)"
},
"descriptor_hash": "3f1aabb75fb6a7aeb4e38f9ccc1d49ad36c5b2e019eed79d6b67adc158ec371d"
},
"reason": "non-hex"
},
{
"case_id": "bulk-descriptor-negative-misaligned-hash",
"descriptor": {
"version": "VID-WAVEFORM-BULK-DESCRIPTOR-V1",
"mode": "read-only",
"handle_identity": "handle-vid-waveform-003a",
"attempt_id": "attempt-001",
"lease_id": "lease-001",
"cancel_scope": "attempt-001",
"expiry": "2099-01-01T00:00:00Z",
"integrity": {
"algorithm": "sha-256",
"value": "d67c656e01756650d77717b0839985a056ec28ffe174601d690fc407a2ceffca"
},
"chunk_hashes_omitted": true,
"length": 4096,
"payload_schema": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"source_publication_fence": "fence-001",
"representation": {
"peak": "waveform-peak-v1",
"time": "sample",
"channel": "stereo-major",
"downmix": "matrix-stereo-downmix-v1",
"resampling": "resample-none",
"source_timeline": "timeline-001",
"sample_range": "[0,4096)"
},
"descriptor_hash": "3f1aabb75fb6a7aeb4e38f9ccc1d49ad36c5b2e019eed79d6b67adc158ec371d"
},
"reason": "mismatched-length"
}
]
}
97 changes: 97 additions & 0 deletions contracts/VID-IMPL-P00-003A/fixtures/operation-descriptor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"operation_id": "submark.video-localization.waveform.derive",
"operation_version": "0.1.0-p00",
"implementation_id": "VID-IMPL-P00-003A",
"implementation_profile_id": "VID-WAVEFORM-OPERATION-PROFILE-P00-003A",
"input_schema_id": "VID-IMPL-P00-003A-WAVEFORM-INPUT",
"output_schema_id": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"transport": "local-staged-file",
"requested_capabilities": [
"cancellation",
"deadline"
],
"requested_output_capabilities": [],
"input_ports": [
{
"order": 0,
"schema_id": "VID-IMPL-P00-003A-WAVEFORM-INPUT",
"content_type": "application/vnd.video.waveform.request+json",
"port_type": "waveform_request",
"identity": "waveform-request-port-v1",
"revision": "0.1.0-p00",
"sample_range": "[0,18446744073709551615)"
}
],
"output_ports": [
{
"order": 0,
"port_id": "waveform_artifact_port",
"port_type": "waveform_artifact",
"schema_id": "VID-IMPL-P00-003A-WAVEFORM-ARTIFACT",
"max_bytes": 65536,
"max_nesting": 8
},
{
"order": 1,
"port_id": "waveform_error_port",
"port_type": "waveform_error",
"schema_id": "VID-IMPL-P00-003A-WAVEFORM-STRUCTURED-ERROR",
"max_bytes": 32768,
"max_nesting": 8
},
{
"order": 2,
"port_id": "waveform_peak_bulk_port",
"port_type": "waveform_peak_bulk",
"schema_id": "VID-IMPL-P00-003A-WAVEFORM-BULK-DESCRIPTOR",
"max_bytes": 65536,
"max_nesting": 8
}
],
"launch_policy": {
"use_shell": false,
"use_path_lookup": false,
"user_supplied_options": false
},
"staged_lease": {
"lease_id": "LEASE-STATE-3A",
"lease_epoch": 1,
"minimum_acceptable_lease_epoch": 1,
"immutable": true,
"source_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"source_length": 12345,
"staged_copy_identity": "staged-copy-3a-identity",
"staged_copy_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"staged_copy_length": 12345,
"observed_staged_copy_identity": "staged-copy-3a-identity",
"observed_staged_copy_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"observed_staged_copy_length": 12345,
"access_scope": "waveform-lease-scope-3a",
"expires_at": "2099-01-01T00:00:00Z",
"manifest_digest": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"logical_source_ref": "source:waveform:001",
"observed_fence_token": "waveform-fence-token",
"expected_fence_token": "waveform-fence-token"
},
"representation": {
"sample_rate": 48000,
"channel_count": 2,
"target_timebase": [1, 48000],
"max_window_samples": 134217728
},
"parameters": {
"representation": {
"sample_rate": 48000,
"channel_count": 2,
"target_timebase": [1, 48000],
"max_window_samples": 134217728
},
"limits": {
"wall_seconds": 30,
"cpu_seconds": 30,
"resident_memory_bytes": 268435456,
"stream_count": 1
},
"retry_profile": "VID-WAVEFORM-RETRY-P00-003A"
}
}
40 changes: 40 additions & 0 deletions contracts/VID-IMPL-P00-003A/fixtures/worker-hello.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"operation_id": "submark.video-localization.waveform.derive",
"operation_version": "0.1.0-p00",
"implementation_id": "VID-IMPL-P00-003A",
"implementation_profile_id": "VID-WAVEFORM-OPERATION-PROFILE-P00-003A",
"transport": "local-staged-file",
"platform": "Windows",
"architecture": "x64",
"control_protocol_min": "1.0.0",
"control_protocol_max": "1.0.0",
"limits": {
"control_envelope_bytes": 262144,
"stream_count": 1,
"wall_time_seconds": 30,
"child_cpu_seconds": 30,
"resident_memory_bytes": 268435456,
"staging_bytes": 536870912,
"bulk_payload_bytes": 536870912,
"bulk_descriptor_bytes": 65536,
"output_bytes": 65536,
"error_bytes": 32768
},
"supported": [
"cancellation",
"deadline"
],
"unsupported": [
"progress",
"checkpoint",
"pause-resume",
"partial-success",
"degraded-output",
"acceleration",
"auto-fallback",
"network"
],
"resource_profile_id": "VID-WAVEFORM-RESOURCE-P00-003A",
"policy_profile_id": "VID-WAVEFORM-POLICY-P00-003A",
"retry_profile_id": "VID-WAVEFORM-RETRY-P00-003A"
}
Loading
Loading