carlos / platform Public

media-spike-fixes

Fixes the three defects the media conversion spike (report on branch media-spike-report, "Defects in the merged code") found in the media code on main.

  1. mediaimage push reaches ECR. ECR answers the blob PATCH with 201 Created where the OCI distribution spec v1.1.0 says 202 (end-5), so the first push failed with "upload: HTTP 201". The PATCH now accepts 202 or 201; every other step keeps exactly the spec's status (end-2 to end-7), each check citing its row. Tests: TestPushToECR (fake registry answering as ECR does; fails on the old code with the spike's error) and TestPushRefusesAnswersTheSpecDoesNotGive.
  2. The media-engine module settles. ECS answers capabilities.add and five top-level container lists as empty lists; the AWS provider's containerdefinitions comparison clears empty top-level lists but not add, so all four definitions were replaced on every plan. DNS Firewall stores domains with a trailing dot (terraform-provider-aws #23543), so both lists updated in place. The module now writes both in that form; skipdestroy and every security assertion stay. Proof: a tftest assertion that every list ECS fills in is written, one that every domain is fully qualified, and TestModuleRendersWhatECSAnswers on the checked-in render (runs in CI). All fail on the old module. Render regenerated.
  3. fmp4 fixtures current. args.txt predated sample_fmts=fltp; TestMuxerArgsMatchTheFixtures compared muxer flags only. It now compares every argument (fails on the old args.txt). The fixtures are the spike's arm64 regeneration by TestRegenerateFMP4Fixtures in the real image, which provenance.txt already named as their replacement.

Local: targeted tests for cmd/mediaimage, internal/mediaaws, internal/mediahandler, internal/medialocal, internal/provision census tests; tofu fmt/validate/test (24 pass, OpenTofu 1.12.5, aws 6.73.0, mock provider); make code-health, staticcheck, gitleaks clean. Census: three module units, Astra approved (#280). Not merged.

Commits 7
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity