Skip to content

fix: UPS-RS task requester - restore data loss, study guard, watch channel lifecycle, cancel reason, poll deadline - #980

Merged
nroduit merged 1 commit into
nroduit:5.0from
clicker71:fix/aiw-ups-rs-requester
Nov 28, 2026
Merged

nroduit merged 1 commit into
nroduit:5.0from
clicker71:fix/aiw-ups-rs-requester

Conversation

@clicker71

Copy link
Copy Markdown

Fixes for the UPS-RS task requester found while exercising it against a
DICOMweb origin end to end:

  • Preference page: Restore no longer wipes the server document. The page
    saves in closeAdditionalWindow(), which the preference dialog calls on
    Apply and on Close (there is no Cancel in Weasis); resetToDefaultValues()
    used to empty the list, so "Restore" then closing the dialog persisted an
    empty document and deleted every server. Restore now reloads the saved
    document.
  • run(): a workitem of a different study no longer suppresses the Create.
    The origin is required to apply the ReferencedRequestSequence.StudyInstanceUID
    matching key (PS3.4 Table CC.2.5-3), but the requestor now checks every
    request item client-side as well.
  • watch(): the returned handle is typed CompletableFuture<WebSocket> and
    the command closes the channel and silences the listener after the first
    report or the timeout (PS3.18 section 11.13). The close and the report
    append are mutually exclusive, extracted into a small WatchGate so the
    race is testable.
  • cancel: --reason is forwarded on the loaded-study path, as it already
    was for an explicit URL.
  • watch --poll: the polling sleep is capped to the remaining timeout, so a
    long --poll cannot oversleep a short --timeout.

Each fix carries a test that fails when the fix is reverted.

…annel lifecycle, cancel reason, poll deadline
@nroduit
nroduit merged commit c798508 into nroduit:5.0 Nov 28, 2026
nroduit added a commit that referenced this pull request Nov 28, 2026
Follow-up of the pull requests #980, #981 and #982 on the AI tasks.

- A parameter name or a coded value of ups:run --param is code or
  scheme:code; without a scheme it takes the one of the task instead
  of a designator built into the plugin
- Command API 2.42 for the --param option, skill snapshots regenerated
- Format the plugin module (spotless)
- Document the parameters and the scheme of a catalog entry in
  ai-tasks.md
- Tester notes: API 2.42, what ran against a live UPS-RS server

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants