← Back to Pull requests

feat(backend): refuse an ODD that asks for what the backend cannot bring about #111

Closed
unknown closed this pull request without merging on Nov 07, 2026 05:33 UTC
View on GitHub
unknown unknown commented on Nov 07, 2026 05:21 UTC
Author

Part of #35, for #51.

Problem

The default ODD is a subset of tier4/taxonomy. That subset includes concepts that some simulators cannot bring about: CARLA renders no snow and has no temperature.

If an ODD measures such a concept, or a module restricts it ("heavy snow"), the run goes ahead silently. Coverage then counts runs that never rendered the condition, and the module bounds nothing.

Change

  • Backend.unsupported: maps a concept to the reason the backend cannot bring it about or measure it.

  • The check refuses an ODD in two cases, and is applied both when an ODD is read (_wrap, which every loader goes through) and when an OddSampler is built, which catches ODDs built in Python:

  • - the ODD measures an unsupported concept;
    - a module of the ODD restricts an unsupported concept, or a concept defined by one.
  • UnsupportedConceptError is raised for a refused ODD and names each use. It is a ValueError and is exported. Backend.unsupported_uses(odd) lists the uses without raising.

  • A taxonomy can still declare an unsupported concept as long as nothing measures or restricts it, so a shared taxonomy can be read in full.

  • OddAttribute.defined_by (new, in the core and in Python): the concepts a derived categorical is defined by, whether or not they are measured. Before this, a derived attribute whose source was not bound lost that link (derived_from is empty then). Without it, a restriction on snow intensity could not be traced back to the snowfall rate.

  • Docs: docs/python_odd.md, "What a backend cannot bring about".
  • Tests

  • test_an_odd_that_asks_for_what_the_backend_cannot_bring_about_is_refused covers four cases:

  • - a concept that is declared but neither measured nor restricted is read;
    - a measured one is refused;
    - a module on a derived concept whose source is unsupported is refused;
    - a module on a supported concept is read.
  • test_a_sampler_refuses_an_odd_its_backend_cannot_bring_about.

  • Full Python suite: 284 passed. Rust lib: 150 passed.
  • ---
    _Generated by Claude Code_

    Diff: 264 lines (+198 / -66) across 3 files Reviewer: hakuturu583 Review duration: 12m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 264 lines diff across 3 files
    0.39
    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%
    56%
    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.334
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #111"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 39.3% (MEDIUM) · Higher = larger blast radius
    39.3%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 17% · Safe to merge
    17%