Skip to content

fix: clearer refusals, real parsers and fewer requests for unusual repository setups - #190

Merged
sweepies merged 14 commits into
mainfrom
fix/tradeoffs
Nov 5, 2026
Merged

sweepies merged 14 commits into
mainfrom
fix/tradeoffs

Conversation

@sweepies

@sweepies sweepies commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follow-ups from the audit of trade-offs made for unusual repository practices. They make lookup failures clearer and extraction cheaper. No loosening of the fail-closed registry rules survived review. The loosenings (Gradle content filters, narrower NuGet config scoping, parsed pip/npm settings for mise) each went through review rounds. Every round found inputs that the real tool resolves from a private source while the Count judged them public, so all of them were reverted to main's rules.

  • Gradle and Maven repositories (gradle.rs, origins.rs, lib.rs): main's rule stands. Any repository besides Maven Central, Google's, the Gradle Plugin Portal or jcenter, however it is filtered, fails every lookup of the build.
    • New: one warning per build names the file and the redacted repository address, instead of a silent failure on each dependency.
    • New: mavenCentral { … }-style bodies and repositories.all/add/addAll also fail closed.
    • Why the content-filter loosening was dropped: three review rounds found fail-open paths, and it would not have helped Spring Boot, its motivating case. Spring Boot's buildSrc sets repository URLs from a variable (maven.setUrl(url)), so its lookups fail either way. A test pins Spring Boot's Shibboleth shape failing with the warning.
  • NuGet (nuget.rs): main's rule stands. Every nested nuget.config joins the sources of a shared MSBuild file or a tool manifest.
    • Why the inert exclusion was dropped: excluding configs with no projects or with Arcade-style ImportDirectoryPackagesProps=false missed several restores that read them. These were shared files inside the opted-out folder, dotnet tool restore, an explicit import after the opt-out, solutions outside files/exclude, and file-based apps. Arcade's real eng/common/internal file imports through its SDK, so it was not provable anyway.
    • Kept: project detection now matches any *proj extension and directory.packages.props case-insensitively, plus .slnf.
  • mise package tools (mise.rs): uv.toml, pyproject.toml and Cargo configuration are read with the same parsers the pypi and cargo managers use, so lookalike Cargo index hosts and registry.index fail. Two checks stay at main's rules:
    • pip.conf/pip.ini always fail. pip accepts -- key prefixes, lone \r lines and Unicode case folding.
    • Any mention of registry in an .npmrc/.yarnrc.yml fails. npm accepts quoted keys and lone \r lines.
    • Also: wrappers and minimum_release_age are recognised as harmless keys.
  • Committed ${VAR} registries in .npmrc/.yarnrc.yml get one warning naming the file. An unparseable .yarnrc.yml fails its lookups.
  • Include rounds (engine, manager): files still named after 16 rounds produce "include chain deeper than 16 rounds starting at …". The old message wrongly said the Count does not read them.
  • Local non-UTF-8 files: the local walker refuses them as the GitHub path does, and tells I/O errors apart from encoding errors.
  • MANIFEST_LIMIT notice: when the delivery check is skipped past 300 YAML manifests, the report says so.
  • Performance, no behaviour change:
    • one repository metadata GET per repository instead of one per obsolete PR;
    • Cargo manifests and configs, and Go workspace modules, parsed once per extraction.
  • Corpus: Kafka's real api-checker/ included build and wrapper.gradle, so its includeBuild and apply from resolve.

Not done

  • write.rs tree-fetch skip: the recursive tree fetch on an unchanged base is what repairs leftover files and modes. Skipping it failed rechecks_repair_leftover_files_and_modes_even_when_planned_blobs_match and forced_batch_recheck_has_no_mutations_and_one_shared_viewer_read.

Verification (on the boat VM)

  • cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test -p patchula-manager, mise run test:unit, mise run test:tools: green
  • mise run corpus:snapshot: tests/corpus-extraction.tsv unchanged

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 5, 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 459cdcc Commit Preview URL

Branch Preview URL
Nov 05 2026, 03:31 AM

sweepies and others added 5 commits November 5, 2026 02:23
- Gradle: an empty or unreadable content filter claims everything, all
  content/filter blocks union their claims, and a URL assigned twice,
  conditionally or by anything but one literal makes the repository
  unusable unless every assignment names the same public URL.
  exclusiveContent's forRepository stays public only as a lone
  mavenCentral(), google() or gradlePluginPortal() call; anything else
  is parsed as an ordinary repository declaration.
- NuGet: a closer Directory.Packages.props only stops the parent
  governing when it holds no Import; opting out takes an unconditional
  literal false in the project or the nearest Directory.Build.props
  with nothing later setting it back; every extension ending in proj
  counts as a project, and a solution at or below a nuget.config ties
  it to a governed project anywhere.
- mise package backends: pip index keys match case-insensitively with
  - or _ and = or :, a .yarnrc.yml that does not parse fails its
  lookups, and Cargo indexes are compared by exact host and URL with
  registry.index flagged; a .cargo config governs its parent's folder.
- A local selected file that cannot be read refuses with the I/O
  error's own cause rather than the non-UTF-8 message.
…forms

The Gradle content-filter and NuGet central-props loosenings tried to
model Gradle and MSBuild evaluation; review found fail-open paths. Each
now accepts only the exact forms it was written for and fails closed as
before everywhere else.

Gradle: a repository URL counts only as a single literal that is the
whole argument or right-hand side — maven("…"), maven(url = "…"),
url = uri("…"), setUrl("…") — so an Elvis, a conditional, a
concatenation or an identifier makes it claim everything. Content
filters bound only as direct children of the repository block: a
content(action) call, a filter block nested in another closure, or a
filter outside exclusiveContent claims everything. mavenCentral{},
google{}, gradlePluginPortal{} and jcenter{} with a body,
artifactUrls/setArtifactUrls, and repositories.all/repositories.add
make the build's repositories unusable.

NuGet: the only opt-out from central package management is an
unconditional literal ImportDirectoryPackagesProps=false in the single
nearest Directory.Build.props — ManagePackageVersionsCentrally and
project-file settings can be overridden, so they no longer count. A
nuget.config at or above the folder of a .sln/.slnx/.slnf naming a
governed project joins the central sources wherever it sits, and
Directory.Packages.props is collected case-insensitively.

pip: configparser continues a key's value onto indented lines, so every
line of an index-url/extra-index-url value is checked, and a file pip
would reject makes its packages private.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…le filter loosening

Gradle goes back to failing every lookup when a build names a repository
besides the public ones: three review rounds kept finding fail-open
paths in the content-filter loosening, and it could not have helped its
motivating case anyway — Spring Boot's buildSrc assigns repository
addresses from a variable, so its lookups fail closed regardless. The
once-per-build warning naming the file and the redacted repository
address stays, as does Spring Boot's Shibboleth shape failing with it.

NuGet joins every nuget.config to a shared MSBuild file's sources again,
excluding only configs proven inert: no project file and no .sln/.slnx/
.slnf at or below them, or every project there opted out of central
package management by its single nearest Directory.Build.props holding
an unconditional literal ImportDirectoryPackagesProps false with every
import after it proven clean. Aspire's real file imports Sdk.props
through the Arcade SDK outside the repository, so it is not proven and
that config still joins.

An index-url or extra-index-url value containing whitespace is private —
pip splits it into several URLs.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…rules

The inert-config exclusion and mise's parsed pip and npm settings were
judged public where the real tools would read a private source:
- an opted-out folder's own shared files
- tool manifests
- imports after the opt-out
- solutions the Count does not select
- pip's `--` keys and lone `\r` lines
- npm's quoted keys

Every nested nuget.config counts again, any pip configuration fails a
mise pypi tool, and any registry mention in an .npmrc or .yarnrc.yml
fails a mise npm tool.
@sweepies
sweepies merged commit f01b367 into main Nov 5, 2026
12 checks passed
@sweepies
sweepies deleted the fix/tradeoffs branch November 5, 2026 03:38
@sweepies sweepies mentioned this pull request Nov 6, 2026
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