Skip to content

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

Merged
groupthinking merged 3 commits into
mainfrom
copilot/make-video-pack-redis-claims-atomic
Sep 12, 2026
Merged

Fail closed on non-durable Video Pack claims; preserve atomic Redis claim semantics#1803
groupthinking merged 3 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 12, 2026 9:23am 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
@groupthinking
groupthinking marked this pull request as ready for review September 12, 2026 09:21
@groupthinking
groupthinking enabled auto-merge (squash) September 12, 2026 09:21
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: e62f344f-987a-44ef-897a-28556db285f5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@groupthinking
groupthinking merged commit e62ec29 into main Sep 12, 2026
19 of 22 checks passed
@groupthinking
groupthinking deleted the copilot/make-video-pack-redis-claims-atomic branch September 12, 2026 09:22
@github-actions github-actions Bot added javascript Pull requests that update javascript code tests labels Sep 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Validation

⚠️ PR title should follow conventional commits format

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 228f10f.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

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

Labels

javascript Pull requests that update javascript code tests

Projects

None yet

2 participants