Up Next priority writes + provenance repin to the exact-target contract (#12380, #12483)

Merged
JE
4mo ago
+2846-45

C4 — the sprint-closing absorption, sequenced last on purpose: it carries the mandatory provenance repin past bc3 #12483.

Why last

DeprioritizeAssignment could not be honestly classified idempotent as BC3 shipped it: the JSON DELETE inherited the web UI's card→step fallback, so a retried DELETE whose first attempt committed cascaded to a child step and deleted a second, different priority. The upstream fix (bc3 #12483, exact-target + no-op-on-absent, with the card+child-step repeat-DELETE regression) merged today; this PR absorbs the surface and repins to it. The bc-api mirror sync is up as bc-api#428.

What

  • Spec (+3 ops, 235 → 238, on the existing MyAssignments tag): PrioritizeAssignment (POST {id}, 204, idempotent — verified against the model: Assignment#prioritize is priority || create_priority!, a repeat is a pure no-op), DeprioritizeAssignment (DELETE, 204, idempotent only because of #12483 — say so in its doc comment), ReorderUpNext (POST {source_id, position}, 204, deliberately not retry-gated — a positional move's meaning shifts as the list changes — with #12380's hardened contract: typed 400s, flat-{error} 422s, bare bodyless 404).
  • Repin: e83b2733 → d0edc1283b with full drift triage in the commit message — the only doc/api or routes change in the entire range is the contract this PR absorbs; everything else is wire-neutral internals. provenance-sync propagates the 2026-07-31 API version date into every SDK's constants.
  • Wiring: Go wrapper methods (Reorder validates the 1-based position client-side); Python's sync and async clients gain the previously missing my_assignments accessor — the generated service was unreachable since the retrieval side shipped (the classic sync-only-wiring miss, surfaced by this PR's tests).
  • Registry: the gap file's original "DELETE is idempotent" claim is corrected on the record (wrong as-shipped; true only past #12483) and the entry flips to absorbed-in-sdk.
  • Conformance: 3 paths cases, idempotent-retry cases for both flagged ops (Ruby GET-only skips), and a ReorderUpNext no-retry case (503 → exactly one request) pinning the non-idempotent classification; dispatch in all five runners.
  • Counts: 238 / 122 / 77 / 199 — the sprint's planned BC3-fixed end state, matching behavior-model exactly. Sprint closes at 8 of 9 absorbed; schedule-recurrence-writes stays honestly addressed-in-bc3-pr-12359 behind its human-credentialed live probe.

Verification

Full make green (exit 0) + make kt-check-generated-drift clean; 22 conformance passes for the new ops + the two justified Ruby skips; TS 8/8, Ruby 7/7, Python 8/8 unit tests.


Summary by cubic

Adds Up Next write APIs to My Assignments—prioritize, exact-target deprioritize, and reorder—repins to the fixed #12483 contract, and models ReorderUpNext’s 404 as bodyless to match the server. Bumps API version to 2026-07-31.

  • New Features

    • PrioritizeAssignment (POST /my/priorities.json with {id}): returns 204, idempotent, retries on 429/503.
    • DeprioritizeAssignment (DELETE /my/priorities/{recordingId}): exact-target per #12483, returns 204, idempotent, retries on 429/503.
    • ReorderUpNext (POST /my/priority_moves.json with {source_id, position}): returns 204, not idempotent (no retries); typed 400, flat {error} 422, and 404 modeled without a body to reflect the wire. Go validates 1-based position.
    • Python sync and async clients gain the missing my_assignments accessor.
    • Metadata updated across SDKs (behavior-model.json and generated files): 238 ops total; 77 idempotent mutations. Conformance/unit tests cover paths, retries, and the no-retry pin for reorder.
  • Dependencies

    • Provenance repinned to the exact-target contract (bc3 d0edc1283b); API version set to 2026-07-31 in Go, Kotlin, Python, Ruby, Swift, and TypeScript.