* 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
* test(browser): report a slow test reset with every thread's stack
On #291 (run 39904288262, WebKit shard 2/2) one /__test__/reset
{chronological_history} waited 16 s on its worker's server, with nothing
on the server's stderr. The cause did not reproduce: the same worker's
file sequence (library, library editor, tagging lifecycle, visual) at
2 CPUs three times, and WebKit shard 2/2 at 2 CPUs, kept every reset
under 2 s.
A reset still running after 2 s now reports, while it waits, every
thread's stack (faulthandler), the default executor's threads and queue,
the open connections and WAL size, and on Linux each thread's scheduler
state and kernel wait channel. When it ends it reports the total and how
long each executor call queued and ran. The lines carry a
"pm-slow-reset| " prefix and the worker fixture copies them to the job
log, so the next one shows up even in a test that passes.
The report never reads another thread's connection. Reading even
in_transaction on a connection busy in SQLite blocks on its mutex with
the GIL held: a first version of this report froze the whole server
until the 30 s busy timeout. A test holds a real write lock behind a
reset and checks the server keeps answering while it waits.
* test(browser): name each thread in the slow-reset stacks
Before Python 3.14 faulthandler prints thread ids only, so the report
now lists which name each id belongs to. CI on 3.10 to 3.13 failed the
unit test that looks for the blocked thread by name.
* test(browser): keep the slow-reset summary on a coarse clock
On Windows the report timer can fire a few milliseconds short of the
threshold, and the summary was then dropped. A reset that was reported
now always gets its summary. The server test uses the plain reset, which
the Windows jobs can seed, and puts the server stderr in its failure
messages.