← Back to Pull requests

Refactor node interface & node types #17

Closed
unknown closed this pull request without merging on Oct 15, 2026 03:14 UTC
View on GitHub
unknown unknown commented on Oct 13, 2026 13:05 UTC
Author

Closes #5

Things to note:

From the Node definition:

where fields specific to the node type are inside an attributes field

I think this wording was too restrictive. My understanding is that nodes can have other top-level required fields like collections needing a "nodes" list or path, which is not part of the overall Node interface, multiscales will have other required fields (TBD if still path / nodes or new name). Thus, I cut in this PR that all other metadata would need to go into traits.

The issue said:

Reduce the Collection and Multiscale schema tables to their type-specific fields

We can do that, but I think the repetition may be helpful to avoid confusion. The schema of a collection node still requires a type & id field, even if that is only because it's a type of node. Thus, I have only updated the schemas with the new requirements, not reduced them.

Open questions

How does the reference definition in #4 interact with the node interface? cc @normanrz

Example:

{
  "ome": {
      "version": "0.x",
      "type": "collection",
      "id": "01a13543-f211-74ac-b6d8-da304a733e68",
      "name": "proj_gallery",
      "nodes": [{
          "type": "collection",
          "name": "gallery1",
          "path": {
            "type": "json",
            "path": "../gallery.json"
          }
      }, ...]
  }
}

Does the node in the nodes list:
a) need to have an id and thus follow the node interface
b) need to have a ref of the id of the target node? (not 100% sure I understand the full scope of #4 correctly here

Areas of discussion:

Some of these overlap with what may come from other issues. They are discussion points I see when making the node interface & node types adaptations.

In Node schema:

Names MUST be unique within the enclosing collection.

We should discuss if names actually still must be unique now that we enforce unique IDs and names are optional. => I suggest we track this separately

Parts not covered:


  • Singlescales example updates (to be removed in #13 anyway)

  • Labels & HCS examples (to be removed in #1)
  • Other comments:
    It was hard to restrict this to only #5. It does of the renaming for #6, because we need to refer to traits from the Node definitions. And I added a first few UUID references to write the Node interface (but they should be elaborated on / checked better in #2.

    Diff: 297 lines (+222 / -75) across 3 files Reviewer: jni Review duration: 2289m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 297 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #17"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40% (MEDIUM) · Higher = larger blast radius
    40%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.8% · Safe to merge
    15.8%