Skip to content

Fail closed on non-durable Video Pack claims; preserve atomic Redis claim semantics - #1803

Draft
groupthinking with Copilot wants to merge 2 commits into
mainfrom
copilot/make-video-pack-redis-claims-atomic
Draft

Fail closed on non-durable Video Pack claims; preserve atomic Redis claim semantics#1803
groupthinking with Copilot wants to merge 2 commits into
mainfrom
copilot/make-video-pack-redis-claims-atomic

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Canonical issue

Outcome

Video Pack claim/recovery now enforces durable Redis coordination in production. The API no longer returns 202 processing unless a durable processing claim is actually recorded, preventing ready-pack clobber and non-durable acceptance.

Scope

  • Included:
    • Production durability gate (claim path): claimPackProcessing now rejects production claims when Upstash REST credentials/client are unavailable (no isolate-local fallback for claim decisions).
    • API fail-closed behavior: POST /api/video/pack maps claim failures to 503 and does not schedule background extraction.
    • Regression coverage: added focused tests for production fail-closed claim behavior in store and route layers.
    • Example of the behavioral boundary:
      // production, no durable Redis config
      const claimed = await claimPackProcessing(identity); // throws
      // route returns 503 (not 202), and no extract is scheduled
  • Explicitly excluded:
    • Changes to pack schema, extraction content logic, or ready/error record formats.
    • Changes to non-production fallback behavior outside the claim durability contract.

Risk

  • Risk level: medium
  • Failure mode:
    • Production environments missing Upstash REST config will now fail claims with 503 instead of silently proceeding with non-durable processing.
  • Rollback:
    • Revert claim durability guard and route fail-closed handling in video-pack-store.ts and video-pack.ts.

Verification

List exact automated and manual checks, tied to the current head SHA.

  • Focused tests
  • Required CI
  • Review threads resolved

Production evidence

Not applicable for this change set: behavior is a server-side correctness guard for claim durability and response semantics; no UI/runtime production artifact is introduced.

Agent handoff

  • One canonical issue is linked
  • No competing PR implements the same issue
  • Acceptance criteria are satisfied
  • Required checks pass on the current head
  • Human decision is requested only for product, security, irreversible infrastructure, or production approval

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v0-uvai Ready Ready Preview, v0 Sep 8, 2026 11:50pm UTC

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Copilot AI changed the title [WIP] Make video pack Redis claims atomic to prevent races Fail closed on non-durable Video Pack claims; preserve atomic Redis claim semantics Sep 8, 2026
Copilot AI requested a review from groupthinking September 8, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants