← Back to Pull requests

Generalize the ABI provider into a generic "reserved provider", v2 #90

Merged
mgorny merged 2 files (182 lines) on Sep 28, 2026 13:28 UTC
View on GitHub
mgorny mgorny commented on Sep 23, 2026 09:08 UTC
Author

Same as #89, except that the identifier is explicitly given to builtin key, rather than reusing the namespace. IMO that's even more consistent design, and makes the builtin key meaningful rather than incidental.

Diff: 182 lines (+125 / -57) across 2 files Reviewer: konsti-openai Review duration: 7460m
All Vouch review confidence checks passed
Residual risk 0.10 = Change Risk (0.36) × (1 − Review Confidence (0.73)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 182 lines diff across 2 files
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.47 · 5 substantive comment(s)
0.47
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
72%
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.312
Real PR Conversation Timeline
14 items
konsti-openai konsti-openai commented on code on Sep 23, 2026 09:11 UTC
Code Review
peps/pep-9999/variant-schema-0.2.0.json:1
@@ -37,6 +37,10 @@
           "type": "object",
           "description": "Provider information",
           "properties": {
+            "builtin": {
+              "description": "Whether the provider is a builtin reserved provider",
+              "type": "boolean"

This should become a string too

read-the-docs-community[bot] read-the-docs-community[bot] commented on Sep 23, 2026 09:14 UTC
Bot

<!-- readthedocs-1176979 -->

Documentation build overview

📚 wheelnext-peps | 🛠️ Build #34799820 | 📁 Comparing 733cc9e46c6c42028dcb1394aa3972e2a4b890ae against latest (344e58976964e61bc206c38cc3e81742b599b5f4)

<kbd> &nbsp; 🔍 Preview build &nbsp; </kbd>

<details>
<summary>51 files changed · <code>+</code> 6 added · <code>±</code> 45 modified</summary>
<br>

+ Added

  • pep-0845/index.html

  • pep-0846/index.html

  • pep-0847/index.html

  • pep-9999/index.html

  • pep-0825/appendix-metadata-consistency/index.html

  • pep-9999/appendix-variant-json-schema/index.html
  • ± Modified

  • index.html

  • numerical/index.html

  • pep-0000/index.html

  • pep-0426/index.html

  • pep-0501/index.html

  • pep-0534/index.html

  • pep-0545/index.html

  • pep-0585/index.html

  • pep-0604/index.html

  • pep-0654/index.html

  • and 35 more...
  • </details>

    konsti-openai konsti-openai approved these changes on Sep 23, 2026 09:14 UTC
    Approved Reviewer

    Approved these changes.

    mgorny mgorny commented on code on Sep 23, 2026 10:30 UTC
    Code Review
    peps/pep-9999/variant-schema-0.2.0.json:1
    @@ -37,6 +37,10 @@
               "type": "object",
               "description": "Provider information",
               "properties": {
    +            "builtin": {
    +              "description": "Whether the provider is a builtin reserved provider",
    +              "type": "boolean"

    Right. Also added an enum to check the value.

    DEKHTIARJonathan DEKHTIARJonathan commented on Sep 24, 2026 20:19 UTC
    Contributor

    Question/Feedback

    can you explain why doing this

    "abi": {
       "builtin": "abi_dependency"
    }
    

    instead of this:

    "abi_dependency": {
       "builtin": true
    }
    

    I get that it allows to name abi_dependency to be "whatever you want" - but I really don't see why doing that ... It's just feels unnecessarily "heavy".

    Or that conceptually the namespace and name of the package are not necessarily 1:1 - but I also remember Ralf saying some time ago that we should try to force ecosystem consistency when possible. This seems one of these cases where we should enforce abi_dependency namespace for everybody.

    mgorny mgorny commented on Sep 25, 2026 05:32 UTC
    Author

    1. It's more consistent with how namespaces aren't hardcoded or significant for other kinds of providers.
    2. It lets people create new builtin providers without risking namespace collisions with other providers.
    3. It avoids adding a field whose only valid value is true. (Given that we say only one of the three keys can be specified.)

    It's not a big deal, it just felt more solid as a proposal. Makes this look less like an afterthought.

    DEKHTIARJonathan DEKHTIARJonathan commented on Sep 25, 2026 10:08 UTC
    Contributor

    OK ... Feels a little more difficult to read but fair enough ...

    DEKHTIARJonathan DEKHTIARJonathan commented on code on Sep 25, 2026 10:44 UTC
    Code Review
    peps/pep-9999.rst:1
    @@ -129,24 +136,29 @@ namespace:
        and MAY provide a way to disable one. If a provider is disabled, the
        list of compatible features is empty. Otherwise, proceed to step 3.
     
    -3. The tool MUST read the ``static-properties`` key from the `provider
    +3. The tool MUST read the ``builtin`` key from the `provider
    +   information`_ dictionary. If it is present, the tool MUST use the
    +   internal provider implementation if supported, or assume that no

       internal provider implementation if supported, otherwise assume that no
    

    DEKHTIARJonathan DEKHTIARJonathan commented on code on Sep 25, 2026 10:44 UTC
    Code Review
    peps/pep-9999.rst:1
    @@ -129,24 +136,29 @@ namespace:
        and MAY provide a way to disable one. If a provider is disabled, the
        list of compatible features is empty. Otherwise, proceed to step 3.
     
    -3. The tool MUST read the ``static-properties`` key from the `provider
    +3. The tool MUST read the ``builtin`` key from the `provider
    +   information`_ dictionary. If it is present, the tool MUST use the
    +   internal provider implementation if supported, or assume that no
    +   features are compatible if not. Otherwise, proceed to step 4.

       features are compatible. Otherwise, proceed to step 4.
    

    DEKHTIARJonathan DEKHTIARJonathan commented on code on Sep 25, 2026 10:51 UTC
    Code Review
    peps/pep-9999.rst:1
    @@ -567,24 +593,43 @@ an underscore (``_``) character to avoid incidental conflicts with
     future extensions.
     
     
    -ABI Dependency Variant Provider (Optional)
    --------------------------------------------
    +Builtin providers
    +-----------------
    +
    +Some compatibility checks require integration with a tool's internals,
    +such as its dependency resolver, that the plugin API does not expose.
    +Builtin providers handle these checks directly within the tool. They
    +are defined in PEPs, and their identifiers are used in the ``builtin``
    +key in the `provider information`_ dictionary.
    +
    +All builtin providers are OPTIONAL. Tools that choose to implement them
    +MUST follow the PEP implementing them. Tools that do not recognize a

    Specifically because we say that "Tools that choose to implement them
    MUST follow the PEP implementing them." I would recommend kicking everything after this paragraph out the PEP.

    Especially that now we don't need to reserve a name like we used to have before your builtin idea.

    DEKHTIARJonathan DEKHTIARJonathan requested changes on Sep 25, 2026 10:51 UTC
    Changes Requested Reviewer

    Requested changes.

    mgorny mgorny commented on code on Sep 25, 2026 13:50 UTC
    Code Review
    peps/pep-9999.rst:1
    @@ -129,24 +136,29 @@ namespace:
        and MAY provide a way to disable one. If a provider is disabled, the
        list of compatible features is empty. Otherwise, proceed to step 3.
     
    -3. The tool MUST read the ``static-properties`` key from the `provider
    +3. The tool MUST read the ``builtin`` key from the `provider
    +   information`_ dictionary. If it is present, the tool MUST use the
    +   internal provider implementation if supported, or assume that no

    There's already a "otherwise" below.

    rgommers rgommers commented on Sep 28, 2026 15:59 UTC
    Contributor

    I caught up with these builtin changes only now - for the record, I like the generalization, 👍🏼 from me.

    Reviewers
    Assignees
    mgorny mgorny
    Labels
    risk: low confidence: 72.6% 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: 35.6% (MEDIUM) · Higher = larger blast radius
    35.6%
    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: 72.6% · Lower = rushed or shallow review
    72.6%
    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: 9.8% · Safe to merge
    9.8%
    Repository