Skip to content

Add structured DeepCORO result renderers - #453

Merged
JacquesDelfrate merged 2 commits into
mainfrom
fix/deepcoro-deployed-identities
Sep 23, 2026
Merged

JacquesDelfrate merged 2 commits into
mainfrom
fix/deepcoro-deployed-identities

Conversation

@JacquesDelfrate

@JacquesDelfrate JacquesDelfrate commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary:

  • recognize deployed DeepCORO-CLIP and DeepCORO-MACE display identities
  • add a structured DeepCORO-SYNTAX 5.0.0 renderer for modified SYNTAX, territory, severity, and threshold output
  • add a structured DeepCORO-CTO 2.0.0 renderer for J-CTO score, morphology components, selected artery, and per-artery output
  • preserve generic fallbacks for unsupported versions and malformed payloads
  • use fixed localized safety text instead of model-authored diagnosis, warning, or recommendation markup

Validation:

  • 11 focused Jest suites, 199 tests passed
  • TypeScript passed
  • ESLint passed
  • locale JSON, formatting, and diff checks passed

Summary by Sourcery

Support deployed DeepCORO model identities and present validated CTO and SYNTAX results with dedicated, safety-focused renderers.

New Features:

  • Add dedicated result presentation for deployed DeepCORO-CTO v2.0.0 and DeepCORO-SYNTAX v5.0.0 outputs.
  • Recognize deployed DeepCORO-CLIP and DeepCORO-MACE display identities alongside their existing canonical identities.

Bug Fixes:

  • Correct deployed DeepCORO model results that previously fell back to generic rendering because their display names were not recognized.

Enhancements:

  • Validate and sanitize DeepCORO-CTO and DeepCORO-SYNTAX payloads, falling back to generic rendering for unsupported or malformed results.
  • Render fixed safety and research guidance instead of model-authored diagnosis, recommendation, warning, or markup content.

Documentation:

  • Update DeepCORO result presentation contracts to document canonical and deployed identities, supported versions, payloads, and display behavior.

Tests:

  • Expand registry, renderer, drawer, contract, and component coverage for deployed identities, valid payloads, malformed outputs, and safety text.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @JacquesDelfrate, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 4 days and 19 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR fixes deployed DeepCORO result rendering by explicitly recognizing deployed CLIP and MACE display identities alongside existing canonical names, while preserving exact supported-version and payload validation; registry, renderer, drawer, and contract documentation coverage is updated accordingly.

Flow diagram for DeepCORO result renderer selection

flowchart LR
    R[Model execution result] --> I{Recognized model identity?}
    I -->|DeepCoro_CLIP_generic or DeepCORO-CLIP| C{Version 1.0.0 and valid payload?}
    I -->|DeepCORO_MACE or DeepCORO-MACE| M{Version 1.0.0 and valid payload?}
    I -->|Other identity| G[Generic renderer]
    C -->|Yes| CR[DeepCORO-CLIP renderer]
    C -->|No| G
    M -->|Yes| MR[DeepCORO-MACE renderer]
    M -->|No| G
Loading

File-Level Changes

Change Details Files
Extend DeepCORO renderer matching to accept both canonical and deployed display identities while retaining exact version checks.
  • Add supported-name constants for DeepCORO-CLIP and DeepCORO-MACE.
  • Update registry adapters to match any supported identity without changing payload parsing or version validation.
  • Add registry coverage for canonical and deployed names, including rejection of capitalization and unsupported versions.
platform/app/src/components/inference/studyProcessing/modelResults/deepCoroClipContract.ts
platform/app/src/components/inference/studyProcessing/modelResults/deepCoroMaceContract.ts
platform/app/src/components/inference/studyProcessing/modelResults/modelResultRendererRegistry.ts
platform/app/src/components/inference/studyProcessing/modelResults/modelResultRendererRegistry.test.ts
Update renderer and drawer integration coverage to exercise deployed DeepCORO display names.
  • Use deployed display identities in renderer and drawer fixtures while preserving expected dedicated renderer selection.
platform/app/src/components/inference/studyProcessing/modelResults/ModelResultRenderer.test.tsx
platform/app/src/components/inference/studyProcessing/modelResults/ModelExecutionResultDrawer.test.tsx
Document the additional deployed identities in the DeepCORO result contracts.
  • Record canonical and deployed CLIP identities as supported.
  • Document both MACE identities as eligible for dedicated rendering.
platform/app/src/components/inference/studyProcessing/modelResults/DeepCoroClipContract.md
platform/app/src/components/inference/studyProcessing/modelResults/DeepCoroMaceContract.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

cursor[bot]
cursor Bot previously approved these changes Sep 23, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: Low. Approved.

The diff only adds exact display-name aliases (DeepCORO-CLIP, DeepCORO-MACE) next to the existing canonical names in the DeepCORO result renderer matchers. Supported version remains 1.0.0, and the existing payload parsers are unchanged. A name match with an invalid payload still falls through to the generic renderer. Other model adapters, auth, infrastructure, and data models are untouched.

No CODEOWNERS file and no reviewers were already assigned. No additional reviewers requested.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@JacquesDelfrate JacquesDelfrate changed the title Fix deployed DeepCORO model result identities Add structured DeepCORO result renderers Sep 23, 2026
@cursor
cursor Bot requested review from danvincent11 and kabaluyot September 23, 2026 18:21

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: Medium. Prior approval withdrawn.

The earlier Low-risk approval covered only exact display-name aliases for DeepCORO-CLIP and DeepCORO-MACE. Commit e837e880 adds production parsers and result views for DeepCORO-CTO 2.0.0 and DeepCORO-SYNTAX 5.0.0, and registers both on the shared model-result renderer. Users now see J-CTO score, difficulty, selected artery, modified SYNTAX, territory, severity probabilities, and a research threshold for those model identities. Payloads that fail validation still fall through to the generic renderer. There is no auth, infrastructure, or schema change, and there is no CODEOWNERS file.

The approval on 5da51865 was dismissed when this commit landed. This update is not approved.

Reviewers requested: danvincent11 and kabaluyot.

Review focus:

  • CTO parsing requires modelRecommendations.presentable, and the result view never reads it, so a non-presentable payload still shows scores.
  • Diagnosis and recommendation strings are parsed and not rendered. SYNTAX shows the allowlisted band text, and CTO shows the allowlisted difficulty text.
  • Optional ctoArteryWarning text is validated and not shown. The LCx caution is a fixed string whenever the selected artery is LCx.
  • Confirm deployed units: J-CTO in 0–4, SYNTAX and territory in 0–100 points, component and severity probabilities in 0–1.
Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@JacquesDelfrate
JacquesDelfrate merged commit 4dbbdfd into main Sep 23, 2026
8 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.

1 participant