Skip to main content

SKY-A106 · AI-code defects

Suspicious dependency version bump

Low

A mirrored bump is a dependency whose version changes from exactly the project's old version to exactly its new one in the same change: the project goes from 2.3.0 to 2.4.0 and so does pydantic-settings. It is the fingerprint of a find-and-replace of a version number. SKY-A106 points at the dependency line so a person can confirm the change was meant.

Languages
Python packaging (pyproject.toml, setup.py, requirements files, uv.lock, poetry.lock)
Turned on by
skylos . --ai-defects (or -a) on a Git checkout with uncommitted changes, or skylos . --ai-defects --diff origin/main for committed ones
Quality gate
counted toward the gate limits (full and diff scans). Counts toward max_ai_defects; LOW, so it never fails the gate on its own. The finding is marked as a signal to review, not a defect.
Finding type
review
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

Why it matters

A coding agent asked to "bump the version to 2.4.0" often replaces every 2.3.0 in the file. The unrelated dependency then moves to a release nobody chose or tested, which may not exist, may break the API, or may pull in a different set of transitive packages.

What Skylos flags

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

pyproject.toml · TOML · changed
[project]name = "acme-billing"Removed: version = "2.3.0"Added: version = "2.4.0"requires-python = ">=3.10"dependencies = [    "httpx>=0.27",Removed:     "pydantic-settings==2.3.0",Added:     "pydantic-settings==2.4.0",]

What Skylos leaves alone

A change: the first version of these files is committed, then the edit below is made without committing, and Skylos reviews it as a diff scan (--diff).

pyproject.toml · TOML · changed
[project]name = "acme-billing"Removed: version = "2.3.0"Added: version = "2.4.0"requires-python = ">=3.10"dependencies = [    "httpx>=0.27",Removed:     "acme-billing-core==2.3.0",Added:     "acme-billing-core==2.4.0",] [tool.uv.sources]acme-billing-core = { workspace = true } [tool.uv.workspace]members = ["core"]
core/pyproject.toml · TOML · changed
[project]name = "acme-billing-core"Removed: version = "2.3.0"Added: version = "2.4.0"requires-python = ">=3.10"dependencies = []

Why Skylos leaves it alone

acme-billing-core is a package of the same repository (its own core/pyproject.toml is part of the change, and [tool.uv.sources] marks it as a workspace member). Packages released together move in lockstep on purpose, so Skylos skips dependencies it knows are the repository's own.

How Skylos decides

  1. Runs with --ai-defects on a Git checkout. Without a diff base it compares the files at the last commit with the files on disk. With one (--diff REF, --diff-base REF, SKYLOS_DIFF_BASE or a pull request base in CI) it compares the merge base with the last commit, so only committed changes count: --diff HEAD compares the last commit with itself and finds nothing. Only files that exist on both sides and changed are read, together with the pyproject.toml and setup.py of their folder and the folders above.
  2. Reads the project's own name and version from [project] or [tool.poetry] in pyproject.toml, or from literal arguments of setup() in setup.py (it never runs setup.py). The project version must have changed and the name must have stayed the same.
  3. Reads dependency pins in that project's pyproject.toml, setup.py, requirements*.txt files and uv.lock or poetry.lock. A dependency whose version went from exactly the old project version to exactly the new one is reported on its line, unless it names a package of the same repository or one with a local source override.
  4. Skips files it cannot parse with certainty: dynamic versions, URL requirements, multi-line values and more than one changed version in the same place. No registry is contacted.

How to fix it

Put the dependency back to the version it had, and change it in its own commit only if you mean to upgrade it, after reading its release notes.

Fix · TOML
[project]name = "acme-billing"version = "2.4.0"requires-python = ">=3.10"dependencies = [    "httpx>=0.27",    "pydantic-settings==2.3.0",]

When it can be wrong

  • A real upgrade that happens to land on the same number as your new release is reported. That is rare, and the finding only asks for a second look.
  • A sibling package released in lockstep is reported when its own manifest is not part of the change and no local source names it.
  • It misses an uncommitted bump in a --diff HEAD scan, because a diff base makes it compare committed snapshots only. Run a plain skylos . --ai-defects before committing, or diff against the base branch after.

Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.

How to silence it

  • [tool.skylos] ignore = ["SKY-A106"] in pyproject.toml turns the rule off for the project.

    TOML
    [tool.skylos]ignore = ["SKY-A106"]

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.