BUG: Replacing a video at the same path retains stale AI analysis

オープン
#1,754 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@swastiksharma45 がすでに取り組んでいます。

2026年11月21日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend, databases

調査の方向性

No files are named; start from the folder-sync path that upserts video records by filesystem path, then trace how processing flags, keyframes, frame embeddings, tags and face data are keyed to the video id. Reproduce by adding a video, letting processing finish, replacing the file at the same path and triggering sync. Done means the replacement is reset to unprocessed, stale analysis is cleared or regenerated, the thumbnail refreshes, and a regression test covers same-path replacement.

索引モデルが issue の本文から書いたものです。

説明

bug enhancement possible-duplicate
Is there an existing issue for this?
  • I have searched the existing issues
What happened?

When an existing video is replaced with different content at the same filesystem path, PictoPy may retain AI-generated metadata and processing state associated with the original video.

The synchronization logic appears to update the existing database record without fully invalidating the old video analysis. As a result, the replacement video may retain old keyframes, embeddings, tags, face-related data, or processing flags, potentially preventing the new content from being processed correctly.

Steps to Reproduce

  1. Add a video to PictoPy.
  2. Allow video keyframe extraction and AI processing to complete.
  3. Record the existing video's AI tags and processing state.
  4. Replace the video file with a completely different video while keeping the same filename and filesystem path.
  5. Trigger folder synchronization.
  6. Inspect the updated video record, keyframes, embeddings, tags, and processing state.
  7. Verify whether the replacement video receives fresh AI processing.

Expected Behavior

When PictoPy detects that video content has changed:

  • Previous content-dependent AI analysis should not remain associated with the replacement video.
  • Relevant processing flags should be reset.
  • Old keyframes and frame embeddings should be invalidated or regenerated.
  • Old video tags and semantic metadata should be cleared or updated.
  • Face-related analysis should be refreshed where applicable.
  • The replacement video should be scheduled for fresh AI processing.
  • The generated thumbnail should represent the replacement content.

Actual Behavior

The database upsert appears to preserve the existing video identity and processing state when a video with the same path already exists.

If the previous video has already been tagged or processed, its existing processing flags and associated AI data may remain after the content is replaced.

This may prevent the replacement video from entering normal processing queues while old keyframes, tags, embeddings, or other analysis remain associated with the existing video record.

Consequently, video gallery metadata and AI-powered search may continue to reflect the previous content rather than the replacement video.

Impact

  • Stale AI tags may remain attached to replaced videos.
  • Keyframes may represent the previous video.
  • Frame embeddings may represent outdated content.
  • Semantic search may return results based on the original video.
  • Face-related video analysis may be stale.
  • Replacement videos may be skipped by processing queues if their old flags indicate that processing is complete.

Suggested Fix

When a same-path video replacement is detected:

  • Invalidate content-dependent AI analysis.
  • Reset video processing flags so the replacement is reprocessed.
  • Remove or regenerate old keyframes and their associated embeddings.
  • Clear or regenerate old video tags and semantic metadata.
  • Refresh face-related analysis where applicable.
  • Regenerate the thumbnail.
  • Add regression tests for replacing a previously processed video with different content at the same path.
Record
  • I agree to follow this project's Code of Conduct
主要言語
Python
スター
322
フォーク
793
平均マージ
6日 10時間
マージ済み PR(30日)
20

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AOSSIE-Org/PictoPy のほかの issue

AOSSIE-Org/PictoPy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。