Provide explicit cancellation for analysis and consistent Stop behavior across server tasks #8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closing a browser is navigation, not cancellation. Preview/import already have a stop request, but analysis lacks an equivalent user control. All server tasks need a clear cancellation lifecycle.
Acceptance criteria:
Starting implementation together with #4 and #7 after reading #14 and all current comments. Scope: owner-authorized, idempotent stop requests for queued/running analysis, preview and import; stage-specific confirmation; Stopping until worker/process cleanup is confirmed; preserve accepted ZIPs; keep already imported assets and never automatically replay interrupted imports. Validation will cover cancellation, authorization and completion races. No active server task will be interrupted for deployment.
Finding: analysis cancellation previously lacked a control and the runner client waited for cleanup only on cancelled imports. Implementation adds an owner-scoped, durable analysis stop flag and atomic queued-work fencing; runner termination now requires container-removal confirmation for all task kinds. Import terminal state is deferred until proxy/log/staging cleanup. Cleanup uncertainty reports Interrupted rather than Stopped. Docker socket access is denied in this session, and native SQLite tests currently lack a C compiler; these are validation limitations, not deployment authorization.
Implemented and published for review in commit
e980c3778a76c66c280234e29a3c324f5e7ae56c, branchcodex/issues-4-7-8-activity, PR #17: #17 . The working tree is clean. This supersedes the earlier tooling/validation limitations.VALIDATION
STATE / LIMITS / HANDOFF
Source is committed and pushed for review; not merged, release-image-published or deployed. Forgejo run https://git.sharedroot.net/jchapman/Immich-Bridge/actions/runs/5 is waiting for the AMD64/ARM64 source jobs, with dependent gates blocked. No native release CI pass or native ARM64 execution is claimed. Real large-library performance and deployed pilot behavior remain unverified.
Review #17. It is stacked on #16, which itself follows #15; after those merge, retarget #17 to main and verify the diff and required gates. Coordinate an idle installation of app, runner and processor together, then run an owner pilot preview and check the task lifecycle before closing this issue. Do not interrupt active uploads/tasks for deployment. No automatic import replay, rollback or unsupported mid-import resume is promised.
ISSUE #8 CHANGES
New owner-scoped analysis status/Stop endpoints persist cancellation and atomically fence queued worker claims. Running analysis checks the saved stop flag and cancels its processor. Preview/import retain owner authorization and gain the same confirmation/panel lifecycle. Repeated and late requests are safe; successful completion can win a late Stop.
Stopping remains visible until worker exit, processor container removal, log/proxy handling and temporary staging cleanup are confirmed. Terminal runner events are sent only after container removal; unhealthy or unreachable cleanup is Interrupted with an administrator recovery action, never falsely Stopped. A cancellation before submission does not contact the runner or wait for unrelated work. Cleanup failures are checked rather than silently discarded.
Accepted ZIPs and safe completed analysis remain available. Analysis/preview can be explicitly restarted; assets already committed to Immich remain without rollback, and interrupted imports never replay automatically. Tests cover foreign-owner denial, queued/running Stop, preserved inputs, held-open cleanup, repeated/late requests, cleanup uncertainty and completion races for preview and write imports. See docs/results.md and docs/testing.md.
Integration handoff: PR #17 is merged into main in
8230741. The final combined source passed local backend/vet/race, UI/browser, container/isolation/HTTPS, source/image policy and secret checks. Detailed merge/conflict evidence and limitations: #14 (comment). Native Forgejo AMD64/ARM64 release validation remains queued; no release images or deployment are claimed. This issue remains open for its pilot checkpoint. Verify the deployed owner Stop lifecycle and cleanup confirmation while retaining accepted ZIPs and already imported assets. No active upload/task or pilot service was interrupted.Final development handoff: PR #17 is merged into main in
8230741, preserving feature commit(s)e980c37.Owner-scoped Stop covers queued/running analysis, preview and import. Queued analysis is fenced before claim; running tasks remain Stopping until worker exit and cleanup are confirmed. Repeated/late requests are safe, completion can win, cleanup uncertainty is Interrupted, and ZIPs/already imported assets remain without automatic replay.
Validation: Owner-isolation, queued/running cancellation, completion-race and runner race tests passed, alongside actual Docker cleanup and browser confirmation/Stopping checks. The combined application also passed backend/vet/race, UI lint/build, container/HTTPS, source/image policies and secret checks; integration evidence.
Documentation is updated on main through PR #21, merge
5ed7191: feature guide, merged scope/evidence, and remaining pilot checks. All nine documentation/policy tests and link/anchor/workflow checks passed.Closing at the owner's explicit request after merge, local validation and documentation review. This supersedes the earlier request to keep this development issue open through deployment. Native Forgejo AMD64/ARM64 release gates, coordinated idle installation and applicable real-provider/owner pilot checks remain in the release checklist and coordination issue #14. No deployment, native ARM64 pass, real-library capacity result or gate waiver is claimed. PR #19 and scanning remain on hold.