Skip to content

[codex] Align CLI upload preprocess with app#39

Merged
bjay-wk merged 4 commits into
mainfrom
codex/app-aligned-upload-openapi
May 19, 2026
Merged

[codex] Align CLI upload preprocess with app#39
bjay-wk merged 4 commits into
mainfrom
codex/app-aligned-upload-openapi

Conversation

@bjay-wk

@bjay-wk bjay-wk commented May 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Copy the backend openapi.filtered.yaml into the CLI public OpenAPI spec and regenerate the Rust client.
  • Align upload/preprocess with tellers-app: upload requests include file_type, preprocess uses cutter_sensitivity = 0.2, and MXF UMIDs are no longer sent as override_entity_ids.
  • Remove the public --generate-proxy upload option. The behavior is now fixed: --local-encoding sends generate_proxy: []; non-local uploads omit generate_proxy.
  • Add a machine-readable local-encoding path that avoids initializing the terminal progress UI, so local downscale/upload can run in non-interactive contexts.
  • Update dry-run preprocess output to reflect the payload that will be sent.

Why

CLI uploads with local downscale, especially MXF, diverged from app uploads and could interfere with config-driven description generation. The main issue was that the CLI could send backend preprocess fields that the app does not send, including MXF-derived override_entity_ids. For local encoding, the backend still needs an explicit empty proxy list so it does not enqueue server-side proxy generation after the CLI has already uploaded the locally generated proxy.

Validation

  • cargo check
  • cargo check --all-targets
  • cargo test --no-run
  • cargo build
  • rustfmt --edition 2021 --check src/commands/upload/main.rs src/commands/upload/dry_run.rs
  • Verified target/debug/tellers upload upload --help no longer lists --generate-proxy.
  • Tested MXF local upload against localhost: --local-encoding --qualities 720p --show-status-until-analysed --V01BV.mxf succeeded with asset 0fb83a6f-0fcd-4f4f-b819-1fcd6eedd827 in 42s.

@bjay-wk bjay-wk marked this pull request as ready for review May 19, 2026 09:52
@bjay-wk bjay-wk merged commit 0102a3f into main May 19, 2026
1 check passed
@bjay-wk bjay-wk deleted the codex/app-aligned-upload-openapi branch May 19, 2026 09:53
@bjay-wk

bjay-wk commented May 20, 2026

Copy link
Copy Markdown
Collaborator Author

Update: added --api-key to tellers upload upload. It uses the provided argument first and still falls back to TELLERS_API_KEY when omitted.\n\nValidation:\n- cargo check --all-targets\n- cargo build\n- Verified target/debug/tellers upload upload --help lists --api-key <API_KEY>.

@bjay-wk

bjay-wk commented May 20, 2026

Copy link
Copy Markdown
Collaborator Author

Fix: the 401 was caused by the CLI passing the API key as the generated client's authorization parameter for /users/assets/preprocess, leaving x-api-key unset. Updated both preprocess call sites to pass Some(api_key) as the x_api_key argument and the bearer token separately.\n\nValidation:\n- cargo check --all-targets\n- cargo build\n\nNote: a local end-to-end retry got past the immediate 401 point but the local backend task endpoint stopped returning, so I stopped the waiting client process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant