← Back to Pull requests

schema: declare the options of storage_opt #998

Closed
unknown closed this pull request without merging on Nov 16, 2026 14:25 UTC
View on GitHub
unknown unknown commented on Nov 14, 2026 17:23 UTC
Author

What this PR does, in one sentence

Declares the options of storage_opt in the schema, so that a runtime screening a Compose file against the attributes the specification declares no longer reports storage_opt: {size: 1G} as unsupported.

Context

storage_opt is the only mapping of the schema that says nothing about its keys: it is declared as {"type": "object"}, while driver_opts, logging.options, sysctls or labels declare a pattern for them. schema.AttributePaths() builds the inventory of the specification from those declarations, so it listed services..storage_opt and nothing below it. A runtime that builds its supported attributes from that inventory, as Docker Compose does, warned about each option, on a service, on a pre_start hook and on a job, although the example of the specification itself is storage_opt: {size: 1G} and Compose passes the option to the engine (docker/compose#14505).

What the PR brings

  • storage_opt declares a pattern for its keys, with a string, a number or null as value, like logging.options. That is what the loader accepts today (a number is kept as text, a missing value as an empty one), so no file that loads now is rejected; a boolean, a list or a mapping under an option was already refused when decoding, and is now refused by the schema with the path of the option.

  • The inventory now holds services..storage_opt., services..pre_start.[].storage_opt. and jobs..storage_opt.*, and the options of storage_opt are no longer reported by WithSupportedAttributes.

  • A test walks the schema and fails on any mapping that declares neither keys nor a pattern for them, or that accepts any key through a boolean additionalProperties, which the inventory cannot see either: storage_opt was the only such mapping, and the next one will be caught when it is written rather than when a runtime reports it.
  • The schema of compose-spec follows from this one through its automated synchronization. Docker Compose will get the fix with its next compose-go bump.

    🤖 Generated with Claude Code

    Diff: 271 lines (+203 / -68) across 3 files Reviewer: glours Review duration: 2702m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 271 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%
    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.335
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #998"
    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: 39.5% (MEDIUM) · Higher = larger blast radius
    39.5%
    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.6% · Safe to merge
    15.6%