Skip to content

fix(knowledge): remove video-digest watch temp dirs when the watch fails before bootstrap #6833

Closed

Description

@kyle-sexton

Severity: low (probe severity, uncalibrated)
Readiness: agent-ready.

Summary

run-watch.js creates its three temp dirs before acquisition and returns on any failure without removing them, so every failed watch leaves the downloaded video and info JSON in OS temp. Only a successful close removes temp; run-transcript.js already cleans its work dir in a finally.

Failure scenario

  1. Run a watch that fails in acquisition (a 429, or an unsupported URL).

Expected: the temp dirs are removed, since no slice records them.

Actual: video-extraction-* (with the mp4, 477 KB in the probe) plus empty video-frames-* and video-sheets-* remain. An unsupported URL also leaves three empty dirs.

Evidence

Suggested fix (cheapest first)

  1. Remove the three dirs on any non-zero return before the slice records tempSession, mirroring run-transcript's finally.
  2. Create the dirs only after URL validation.

Related

Audit reference: plugin-quality audit run 20261010T195441Z, finding P9 (runtime probes 5 and 8). Validated against main 28a5541cbb91f5ca0aeb3c361ebafbde4c0c0b41.

🤖 Generated with Claude Code

Activity

  1. added
    needs-triage
    agent-ready
    on Oct 10, 2026
  2. github-actions commented on Oct 10, 2026

    @github-actions
    Contributor

    Thanks for the report. I understood this as: run-watch.js creates its three temp dirs (video-extraction-*, video-frames-*, video-sheets-*) before acquisition, and any failure path before the slice records tempSession returns without removing them — leaving the downloaded video/info JSON (and two empty dirs) behind. This contrasts with run-transcript.js, which cleans its work dir in a finally. I confirmed the referenced lines in run-watch.js and the contrasting finally block in run-transcript.js, and the evidence matches.

    Nothing appears missing: the failure scenario, affected lines, and a cheapest-first suggested fix are all included, and the related closed issue (#6048) is correctly noted as covering the close-path cleanup rather than this failure path. I didn't find any open duplicates.

    Automated triage. A maintainer reviews it.

  3. added
    good first issue
    on Oct 10, 2026
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

    agent-readygood first issueneeds-triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions