Photo versions follow-ups: name-link starvation, stranded annotations, empty aiedits dirs, minor gaps #194

Closed
opened 2026-10-30 18:06:54 +00:00 by cameron · 0 comments
Owner

Lower-priority findings from the cross-repo review of photo versions (#191 / PR #193). The must-fix items are handled on the PR itself. None of these risks originals.

  1. Name-link candidate starvation. unlinked_name_candidates (database/version_dao.rs ~704) uses ORDER BY id LIMIT 500 with patterns like %.edit.%. Rows that match but have no resolvable original come back every tick, so 500 of them would permanently starve later candidates. Page by an id > last_seen cursor, or record tried candidates.
  2. Stranded annotations, and an unscoped canonical path.
    • A favorite or tag set on a version's own path before it was linked can't be removed or read afterwards, because reads and writes now canonicalise to the original. Migrate or merge annotations from the version path into the original at link time.
    • canonical_rel_path (version_dao.rs ~268) matches v.rel_path = ? across all libraries. Scope it by library.
  3. aiedits/ folders that hold only hidden versions still appear in non-recursive dirs and open empty. Hide a dir when everything under it is a hidden version, or leave it with a count.
  4. Minor:
    • PUT /image/versions/display doesn't invalidate precomputed reels, so they keep the old display file.
    • A manual date set on a version path returns success, then reverts on the next metadata sync. Canonicalise it to the original, as tags do.
    • link_versions --reviewed checks the version hash but not the TSV's original_hash.
Lower-priority findings from the cross-repo review of photo versions (#191 / PR #193). The must-fix items are handled on the PR itself. None of these risks originals. 1. **Name-link candidate starvation.** `unlinked_name_candidates` (`database/version_dao.rs` ~704) uses `ORDER BY id LIMIT 500` with patterns like `%.edit.%`. Rows that match but have no resolvable original come back every tick, so 500 of them would permanently starve later candidates. Page by an `id > last_seen` cursor, or record tried candidates. 2. **Stranded annotations, and an unscoped canonical path.** - A favorite or tag set on a version's own path *before* it was linked can't be removed or read afterwards, because reads and writes now canonicalise to the original. Migrate or merge annotations from the version path into the original at link time. - `canonical_rel_path` (version_dao.rs ~268) matches `v.rel_path = ?` across all libraries. Scope it by library. 3. **`aiedits/` folders that hold only hidden versions** still appear in non-recursive `dirs` and open empty. Hide a dir when everything under it is a hidden version, or leave it with a count. 4. **Minor:** - `PUT /image/versions/display` doesn't invalidate precomputed reels, so they keep the old display file. - A manual date set on a version path returns success, then reverts on the next metadata sync. Canonicalise it to the original, as tags do. - `link_versions --reviewed` checks the version hash but not the TSV's `original_hash`.
cameron added the needs-triage label 2026-10-30 18:06:54 +00:00
cameron referenced this issue from a commit 2026-10-30 23:29:29 +00:00
Sign in to join this conversation.