Skip to content

Bug: A refused video Remove restores the chip without explaining that cancellation failed #3720

Closed

Description

@yannickmonney

Clicking Remove on a queued video chip can silently fail: the chip disappears optimistically and returns without a visible reason, while the native job remains queued. Suggested severity: P3. No unauthorized cancellation or completed provider work is claimed.

Local reproduction:

  1. In an isolated native video fixture, ingest a synthetic video link and render the actual useChatVideoLinks plus VideoLinkChip while the user has membership.
  2. Revoke that synthetic membership after the composer has loaded, using the native membership gate fixture.
  3. Click Remove. The real Hono cancel route returns 403.
  4. Inspect rendered feedback and read the owned job from PostgreSQL.

Observed: The actual hook rolls back its optimistic hide and rejects. The same chip returns; no toast or alert is shown. PostgreSQL still reports queued. The actual ChatSurface discards the returned promise.

Expected: Restore the chip and visibly explain that removal/cancellation failed, retaining a usable retry path.

Controls: The same native 403 on Try again shows a destructive toast and retains the failed chip. Successful Remove returns200, persists skipped, and removes the chip. A held worker result arriving after a successful cancel does not resurrect the job. Thread switching, recovery after a refused read, keyboard button activation and bot-refusal cooldown controls also passed.

Root: cancelJob only logs and rethrows after restoring the chip, unlike adjacent retryJob's user feedback. ChatSurface invokes it with void.

Parent replay: 8/8 cases passed in /Users/yannick/.codex/notes/tale-1000-additional/video-parent-replay/component-batch2.test.tsx, vitest.config.ts, run.log.

bun x --no-install vitest run --config /Users/yannick/.codex/notes/tale-1000-additional/video-parent-replay/vitest.config.ts

Boundaries: actual UI hook/chip, HTTP adapter, Hono authorization/service and isolated PostgreSQL execute. DNS is a deterministic resolver supplied to the real URL validator; metadata/caption, queue, audit and blob transports are closed fixtures. The harness catches the rejected cancel promise only to record it. No real media/provider request, deployed browser failure injection, or claim of production job continuation is included. Existing video dedup #3704 concerns a separate SQL conflict cause.

Verified locally at 480ee6a3e6d33c3414a2c0f8a52fded1ddc4ca2d. The relevant implementation is unchanged in fetched main d351611bd. Production was used only for task-board coordination. Deduplication covered all 1,035 all-state issue bodies in the live batch-02 snapshot, the original 102-report baseline and the new finding ledger. One distinct cause is counted here.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions