Framework semantic default

Poetry add optional dependency validation error optional without extra poetry add --optional

Automation that adds an optional dependency now exits with a validation error.

PoetryPython packagingFramework semantic defaultpoetry2

Agent Quick Fix

Repair against the current Poetry contract, then keep the change narrow and source-backed.

Product: Poetry
Current-contract area: poetry add --optional without an extra fails
Likely root cause: Automation that adds an optional dependency now exits with a validation error.
Repair direction: Verifier checks behavior across multiple requests/build modes, not merely compilation. Check reproducibility from a clean environment and artifact contents where relevant.

Symptom

Automation that adds an optional dependency now exits with a validation error.

Why This Happens

Local code often type-checks under both old and new framework semantics; the failure depends on the installed framework version and current runtime defaults.

Common Wrong Fixes

  • Changing local code without checking the current external contract.
  • Retrying the same install, build, or API call with no version/source change.
  • Applying a broad unsafe bypass when a narrow compatibility fix is available.

Codex Search Keywords

These are the search terms observed in a neutral Codex validation run for this failure shape.

Poetry add optional dependency validation error optional without extra poetry add --optional
site:python-poetry.org/docs/cli/ poetry add optional extras
Poetry dependency specification extras optional dependencies documentation
https://python-poetry.org/docs/cli/
'optional-dependencies' in https://python-poetry.org/docs/pyproject/
https://python-poetry.org/docs/1.8/cli/

Source Trail