Skip to content

feat!: per-ecosystem version defaults, lock-only in-range updates, safer PR defaults - #110

Merged
sweepies merged 9 commits into
mainfrom
feat/defaults-0.6.1
Oct 31, 2026
Merged

sweepies merged 9 commits into
mainfrom
feat/defaults-0.6.1

Conversation

@sweepies

@sweepies sweepies commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

A defaults audit. Five commits, one per item. It changes defaults, so it is feat!.

1. Per-ecosystem version defaults and lock-only in-range updates

  • Lock-only updates. Under preserve, a release a direct dependency's range already allows now becomes a lockfile-only update when a lockfile is committed. The manifest is not edited. The update starts from the locked version, not the range floor, and the lock job moves just that package to the target. tokio = "1" locked at 1.39.0 now gets 1.40.0 (cargo update -p [email protected] --precise 1.40.0).
    • Cargo: cargo update -p <crate>@<locked> --precise <target>.
    • uv.lock: uv lock --upgrade-package <pkg>==<target>.
    • composer.lock: composer update <pkg> --with <pkg>:<target>.
    • Gemfile.lock and poetry.lock: these tools cannot be told a version. The Count pins the declaration to the target for one resolution, restores the manifest, and resolves again. The lock keeps the target and records the original constraint, and the manifest in the PR is untouched.
    • After the tool runs, the new lock must record the target or nothing is published.
    • Without a committed lockfile an in-range release is still not an update. Out-of-range releases shift the declaration as before.
    • The PR title, branch and commit read like any other update (chore(deps): update tokio to 1.40.0, patchula/tokio-1.x). waitHours, windows, grouping and permitted apply as normal.
    • In the report, such an update has newValue: null with a newVersion.
  • Default. A built-in rule in the schema, after the reference-data rule, sets versions = "preserve" for cargo, pyproject, bundler and composer, with a note giving the reason: one version per package plus a lockfile, and a pin can clash with another requirement on the same package. The two rules set different fields, so their order does not matter, and both come before the user's rules. requirements, npm and Bun stay exact. Assigning a new Listing to rules drops both built-in rules, which is documented.
  • npm and Bun get no lock-only updates even if you opt into preserve: there is no command to move one package to a version without a manifest edit, so an in-range release stays a no-op there. This is documented.

2. Security fixes use fix(deps):

security.apply sets commitPrefix = "fix(deps):", so release tooling that ignores chore ships them. It covers package fixes, lockfile-only transitive fixes and image rebuilds that fix an advisory. A branch that holds a fix and an occurrence of the same package that did not need it takes the fix's prefix, where before it would have been skipped for conflicting prefixes.

3. prs.concurrent defaults to 10

A first run on a neglected repository no longer opens every PR. null lifts the limit. Security PRs are exempt from both limits (verified in pull_requests.rs and already tested), and they still count toward concurrent. Held updates are on the dashboard with the limit and a "create it now" box; a test now covers it.

4. prs.dashboard defaults to true

prs { dashboard = false } turns it off. The repository's own patchula.pkl is now just amends "PatchulaConfig.pkl" plus its comment, and a test pins that. prs { dashboard = true } is gone from the examples, README, skill and guides where it was only there to turn the dashboard on.

5. Smaller issues

  • widen is now implemented for Composer and Poetry (a || alternative: ^1.2 || ^3.0) and for Maven and NuGet intervals ([1.0,2.0) becomes [1.0,3.1]). Bundler, Docker, Go and loose versions cannot express it and keep preserve behaviour. guide/versioning.md has a per-ecosystem table, including that for PEP 440 and Terraform widen only raises an upper bound.
  • Precision. PEP 440 and Terraform ranges shifted under preserve keep the declared precision (~=2.28 becomes ~=3.1, not ~=3.1.4). A bound the shortened version cannot satisfy takes the full version.
  • Unrewritable constraints. A constraint that cannot be rewritten without guessing (Composer ^1 | ^2 needing 3, Bundler ">= 1, < 2" needing 2) used to fail the whole evaluation as a warning (it was never a lookupFailure). It is now a notice with a reason. It is listed on the dashboard under "Newer versions not proposed". The dependency's other updates go ahead. reference/report.md is updated; the report schemaVersion stays 3, and reason is an optional field.

Checks run locally

Workspace tests (--skip lockfiles::tests::real_), the real lockfile tool tests, clippy -D warnings, cargo fmt --check, mise run docs:build, mise run corpus:snapshot (no diff). Not run: the full mise run ci.

View guided diff Turn on auto-fix

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
count-patchula 14174b3 Commit Preview URL

Branch Preview URL
Oct 31 2026, 01:57 AM

@deepsource-io

deepsource-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 0bb3abf...e9f4b9d on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 31, 2026 2:05a.m. Review ↗
JavaScript Oct 31, 2026 2:05a.m. Review ↗
Shell Oct 31, 2026 2:05a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@context7

context7 Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Docs7 for sweepies/count-patchula

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit e9f4b9d

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 48 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/versioning/src/lib.rs Resolved
Comment thread crates/versioning/src/lib.rs Resolved
Comment thread crates/config/tests/config.rs Resolved
Comment thread crates/lookup/tests/policy.rs Resolved
@sweepies
sweepies force-pushed the feat/defaults-0.6.1 branch from 3ad1c19 to bf8d4bc Compare October 31, 2026 00:34
…ove the lock for in-range releases

Under preserve, a release a direct dependency's range already allows now
becomes a lockfile-only update when a committed lockfile holds the version:
no manifest edit, and the lock job moves just that package to the target.
Cargo, uv and Composer are told the exact version; Poetry and Bundler cannot
be, so the declaration is pinned for one resolution, restored, and resolved
again. Without a lockfile an in-range release stays a no-op.

A built-in rule in the schema sets versions = preserve for cargo, pyproject,
bundler and composer, which keep one version per package in a lockfile.
requirements and npm/bun stay exact.
Release tooling such as release-please cuts no release for a chore, so a
merged security fix never shipped. security.apply now sets
commitPrefix = "fix(deps):", which covers package fixes, lockfile-only
fixes to transitive packages and image rebuilds that fix an advisory. A
branch that holds a fix and an occurrence that did not need it takes the
fix's prefix instead of failing on conflicting prefixes.
prs.concurrent defaulted to unlimited, so a first run on a repository with
many outdated dependencies opened every PR at once. It now defaults to 10;
null still lifts the limit. Security fixes are exempt from both limits, as
before, and the dashboard lists the held updates with their reason and a
box to open each now.
prs.dashboard defaulted to false, and getting started told every user to
turn it on. It now defaults to true, so the held-back updates, security
findings and warnings are somewhere visible without any setting;
prs { dashboard = false } turns it off. The repository's own patchula.pkl
sets nothing beyond amends: the dashboard, the PR limit and preserved Cargo
ranges all come from the schema. Examples, the README, the agent skill and
the guides drop the setting where it was only there to turn the dashboard on.
…d precision, report unrewritable constraints as notices

widen now extends Composer and Poetry constraints with a || alternative and
a Maven or NuGet interval with the target as its inclusive upper bound.
Bundler, Docker, Go and loose versions cannot express it and keep their
preserve behaviour, documented per ecosystem in the versioning guide.

A PEP 440 or Terraform range shifted under preserve keeps the precision it
was declared with (~=2.28 becomes ~=3.1, not ~=3.1.4).

A constraint the Count cannot rewrite without guessing was an evaluation
error, so the whole dependency reported a warning. The lookup worked, so it
is now a notice with a reason, listed on the dashboard, and the dependency's
other updates go ahead.
- report: bump schemaVersion to 4 for the notice reason field
- manager: resolve a Cargo dependency through its own lock edge, not another
  locked instance of the crate
- update: no lock-only Cargo job without a committed Cargo.lock; compare lock
  versions ignoring build metadata when batching
- lookup: try older rewritable releases when a track's newest cannot be
  rewritten; derive a baseline for Maven and NuGet intervals
- versioning: validate widened Maven intervals; carry PEP 440 epochs in Poetry
  bounds and widened alternatives
- cli: keep reasoned notices in apply output and name their file in the TUI
- tests: exercise the stated cases; docs: scope limits, ecosystems and
  lock-only wording precisely
@sweepies
sweepies force-pushed the feat/defaults-0.6.1 branch from bf8d4bc to 4e19576 Compare October 31, 2026 01:25

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 25 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/manager/src/cargo.rs Resolved
Comment thread crates/manager/src/cargo.rs Resolved
… members and crates.io edges

- A virtual workspace root takes the dependency edges of its members (the
  members and exclude globs, matched against the manifests in the scan), not
  of every source-less lock entry, so a path dependency outside the workspace
  cannot supply the version.
- A dependency edge keeps its source: `name version (source)` matches only
  the crates.io entry it names, so a git dependency on the same crate at the
  same version is not the registry dependency's locked version.
- The corpus snapshot loses the locked version of rust/uv's root manifest:
  the corpus holds the root alone, not the members whose edges name them.
- docs: say exactly what a security fix skips and what still counts.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/manager/src/cargo.rs Resolved
A `members` pattern with many stars and a literal that cannot match made the
hand-written matcher backtrack over every split, so a repository could stall
a scan. Members are now matched with globset (literal separators, so `*`
stops at `/` and `**` crosses directories, as Cargo reads them), which
compiles to an automaton.

docs: a root with its own [package] always counts that package's
dependencies; perHour keeps counting a PR after it merges or closes, so only
concurrent slots free at once.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/manager/src/cargo.rs Resolved
Cargo reads members with the glob crate, whose ** matches the directory
it follows too, so crates/** makes crates/Cargo.toml a member. globset's
needs one more component, so that directory is also matched on its own.
@sweepies
sweepies merged commit f45661b into main Oct 31, 2026
16 checks passed
@sweepies
sweepies deleted the feat/defaults-0.6.1 branch October 31, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant