* fix(quality): preserve cursor iteration and option validation
Keep prefetched rows on ManagedCursor so partial loops and explicit fetches share one position, and stop existing iterators after close or retirement. Preserve chunked reads and native SQLite result lifetime on reexecution and errors.
Catch OptionError before ValueError so legacy auto-tag requests receive the actual validation error. Remove the overwritten ViewerJS title option.
Regression tests failed before the fixes for lost rows, reads after close/retirement, and misleading option errors. Focused Python checks pass; cursor checks also pass on Python 3.13 and 3.14. Refs #321.
* fix(quality): make the test doubles legal raises and hashes
The fake queue no longer raises an attribute that starts as None. The
oversized kind records hashes instead of raising from __hash__, which
also catches a hash that production code swallows. Hostile.__bool__
raises the TypeError a truth test may raise.
* fix(quality): drop the extra saveCoverage argument
* refactor(quality): remove assignments that are overwritten before use
* refactor(quality): remove the remaining overwritten test assignments
* refactor(quality): drop imports repeated inside functions
* refactor(quality): give duplicate identity keys one shape
* refactor(quality): name the unused job event loop variable
* refactor(quality): release model gates in finally, not except BaseException
* refactor(quality): end the job runners with an explicit return
* refactor(quality): use the precise unittest asserts
* refactor(quality): import unittest.mock one way in the tests
* fix(quality): say why each empty except is safe, log the broad ones
* refactor(quality): stop binding values the tests never read
* refactor(quality): remove the unused preview aliases and tag page query
* refactor(quality): remove re-exports nothing imports
* refactor(quality): parenthesize deliberate string joins in lists
* refactor(quality): remove unused JavaScript variables and imports
* refactor(quality): use the precise assert in the model status test
* feat(images): move deleted image files to the macOS Trash (#499)
Trash mode on macOS now calls -[NSFileManager trashItemAtURL:resultingItemURL:error:]
through ctypes (no dependency), in utils/trash_macos.py. Before any move it refuses
what it cannot show to be recoverable, already in the review dialog: network
volumes, read-only volumes, iCloud Drive and File Provider folders (cloud-sync),
a trash folder inside an output root (by file identity), and files macOS would
refuse for permission (no-permission). A refused move keeps the file and logs the
NSError; a move macOS reports done but whose place cannot be shown goes under
errors as trash-unconfirmed, keeps its records and stops the job.
The native proof runs in portability.yml's new native-trash job on macos-latest
and macos-15-intel (PM_NATIVE_TRASH=macos). Windows still reports no-trash (#500).
* test(trash): resolve the temp folder and wait for a busy image to be released (#499)
The permission tests keyed their lstat fakes by the unresolved temp path, but the
backend resolves paths (/var -> /private/var on macOS, 8.3 short names on Windows),
so on those runners the fakes never matched (portability run 40954618922; reproduced
on Linux with a symlinked TMPDIR). The native test's detach first proves this
process holds nothing under the mount, then retries the plain detach until macOS
releases a volume it has just written a trash folder to (macos-15-intel), and
still fails after a forced detach.
* test(trash): count a volume that unmounted after a busy detach as detached (#499)
On macos-15-intel a detach that reported "Resource busy" finished afterwards, so
the retry found no such volume (portability run 40957282805). The loop now checks
os.path.ismount before each attempt.