Skip to content

feat: deliver end-to-end research imaging workbench - #176

Merged
Liohtml merged 2 commits into
mainfrom
feat/research-workbench
Sep 22, 2026
Merged

Liohtml merged 2 commits into
mainfrom
feat/research-workbench

Conversation

@Liohtml

@Liohtml Liohtml commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Summary

The browser wizard previously ended at a 501 Not Implemented response. This PR connects it to a complete local research workflow: upload DICOM data, select a study, run an analysis in the background, inspect slices and findings, review results, and download reports.

It also fixes data-processing issues that could mix series, misorder slices, omit later series from vision analysis, or discard processing warnings. The implementation is a coordinated workbench upgrade spanning the pipeline, API, UI, provider integrations and deployment documentation.

Fixes #157. Related: #61, #25, #57, #58, #18, #54.

Changes

  • Explicitly close viewer memory maps before deletion/shutdown, copy slices under the store lock, and keep failed deletions visible for retry.
  • Add authenticated upload/inspection APIs, restricted server paths, bounded background jobs, progress, cooperative cancellation, persistent results and memory-mapped viewer images, report downloads and explicit data deletion.
  • Improve the four-language browser workflow, mobile layout, keyboard accessibility, error recovery, reload/reconnect behavior, image-reference navigation and finding edits with before/after audit history.
  • Group DICOM by study/series UIDs; support individual images and DICOMDIR; sort using geometry and expose data-quality warnings. Fix ResNet evaluation mode/batching, signal metric semantics, balanced vision image selection and preservation of warnings.
  • Add conservative metadata de-identification, identifier cleanup, optional local OCR/manual masks, and explicit cloud consent plus pixel-review confirmation. Show operator-configured cost estimates and enforce requested estimated-spend limits.
  • Add configured loopback vision inference, provider SDK installation extras and the current Google Gen AI SDK.
  • Add analysis provenance, lexical reference-report comparison, preliminary FHIR R4/DICOM Basic Text SR exports and saved-report evaluation with baseline regression checks.
  • Extend provider-install/browser CI, Docker dependency updates and persistent storage configuration; update CodeQL pins to 4.38.0 and document operation, retention and research limitations.
  • Preserve the exact vendored htmx bytes in pre-commit formatting so its Subresource Integrity hash remains valid.

Testing

  • Python suite: 338 passed, 1 skipped; coverage 92.10%, above the unchanged 85% minimum.
  • New pipeline, privacy, provider, evaluation, export and web integration tests.
  • Real Chromium user journeys on desktop and mobile using synthetic DICOM: upload, study selection, local job, viewer, downloads, API-key access, refresh/reconnect and deletion. Deterministic browser mocks cover additional cancellation, network-failure and finding-review states; backend integration tests separately cover actual cancellation and review persistence.
  • Ruff lint and formatting, Mypy, Bandit, JavaScript syntax and YAML parsing.
  • All pre-commit hooks pass.
  • Isolated cloud SDK installation/import smoke test, without external inference calls.

The optional real-Torch batch-invariance test was skipped locally because Torch is absent. Docker image builds, hosted CI, live cloud/local vision-model inference and clinical evaluation were not run locally.

Additional Notes

  • This remains a single-process, single-user research workbench, not a validated medical device. An API key does not provide tenant isolation or professional identity verification.
  • Browser local mode uses statistics without model downloads and generates no diagnostic findings. Vision inference requires separately configured models/providers.
  • Cloud analysis now requires explicit pixel-review confirmation (--pixels-reviewed in the CLI) in addition to transmission consent. Metadata scrubbing/OCR do not guarantee anonymous pixels or free text.
  • Cost estimates are operator-supplied and are not hard provider billing caps. Report comparison is lexical; exports remain preliminary/unverified and need receiving-system validation.
  • Original uploads, normalized images, reports and review history persist in MEDCHECK_STATE_DIR; users must explicitly delete retained data. Completed results survive restart; interrupted jobs must be rerun.

See docs/workbench.md, docs/evaluation.md and CHANGELOG.md for usage, configuration and limitations.

Summary by CodeRabbit

  • New Features

    • Added a complete browser workbench for DICOM/ZIP upload, study selection, queued analysis, progress tracking, cancellation, resumption, and deletion.
    • Added slice viewing, quality warnings, finding review and audit history, image references, and downloadable JSON, HTML, PDF, FHIR, and DICOM-SR reports.
    • Added de-identification, OCR/manual pixel redaction, reference-report comparison, and local loopback vision-server support.
    • Added DICOMDIR and single-file imports, study selection, evaluation tooling, and configurable storage and processing limits.
  • Bug Fixes

    • Improved DICOM ordering, decoding, validation, report safety, provider detection, and persistence across restarts.
  • Documentation

    • Updated setup, workbench, model, evaluation, intended-use, and limitations guidance.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7149bbe5-23a7-4ce5-ad15-7591480a75b6

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Liohtml
Liohtml merged commit 7134ce3 into main Sep 22, 2026
19 checks passed
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.

feat: wire the analysis pipeline into the web wizard & POST /api/analyze

1 participant