Skip to content

Close correctness gaps against Renovate and cut scope - #158

Merged
silverwind merged 3 commits into
masterfrom
renovate-parity
Aug 21, 2026
Merged

Close correctness gaps against Renovate and cut scope#158
silverwind merged 3 commits into
masterfrom
renovate-parity

Conversation

@silverwind

Copy link
Copy Markdown
Owner

Audited every mode against the Renovate source and fixed the divergences that produced wrong writes.

Correctness

  • file:/link: npm deps could be replaced by same-named public registry packages
  • Go require updates also rewrote matching exclude/replace lines, and import rewriting hit comments and strings
  • Cargo applied the implicit caret to only the first comparator, and could rewrite outside its target section
  • PEP 440 ~= dropped epochs, local versions produced invalid specifiers
  • Docker digests were dropped entirely, registry detection keyed off path depth
  • SHA-pinned actions advanced semantically instead of refreshing the pinned tag

Scope cuts. These were partial Renovate reimplementations that kept generating bugs: preset resolution, rangeStrategy, requires-python filtering, Docker architecture selection, Dockerfile variable defaults, Yarn catalogs, Go toolchain directives, multi-major probing.

Security

  • Workspace members could escape the repo root and be rewritten
  • A repo .npmrc could redirect the global _auth credential to an attacker host
  • A crate named version was cross-rewritten when any sibling updated
  • The actions writer rewrote uses: inside run: | block scalars

Performance. Writers rescanned the manifest per dependency (Cargo 736ms to 0.8ms at 1500 deps, Go 259ms to 0.8ms, Compose 590ms to 0.8ms). Glob matching backtracked exponentially on config-supplied patterns (1540ms to 0.05ms). Startup no longer eagerly loads the full bundle. npm-1500 warm is ~14% faster.

Net -1196 lines. make build, make lint, make test pass (679 vitest, 678 bun).

Written by Claude.

silverwind and others added 3 commits August 21, 2026 19:16
Audited every mode against the Renovate source and fixed the divergences
that produced wrong writes, most importantly local `file:`/`link:` npm
dependencies being resolvable against the public registry.

Several features were partial reimplementations of Renovate that kept
generating bugs without earning their weight, so they are removed rather
than repaired: preset resolution, rangeStrategy, requires-python
filtering, Docker architecture selection, Dockerfile variable defaults,
Yarn catalogs, Go toolchain directives, and multi-major probing.

Writers rescanned the whole manifest per dependency, and glob matching
could backtrack exponentially on config-supplied patterns. Both are now
single-pass, and startup no longer eagerly loads the full bundle.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>
The unscoped _auth test only set HOME, which Windows does not consult,
so the fake home npmrc was never found and no credential was applied.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>
Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>
@silverwind
silverwind merged commit 4540476 into master Aug 21, 2026
14 checks passed
@silverwind
silverwind deleted the renovate-parity branch August 21, 2026 17:26
silverwind added a commit that referenced this pull request Aug 21, 2026
* Restore behavior lost in #158

#158 turned several "skip this input" paths into throws or silent drops,
and narrowed matchers that were deliberately broad. Dependencies went
missing from runs, some updates were reported but never written, and two
inputs aborted the run outright.

The widest ones: CRLF workflow files yielded zero Docker dependencies,
`exclude: ["*"]` (what a Renovate `enabled: false` maps to) stopped
matching any name containing a slash, nested npm overrides collapsed onto
one key so the wrong entry was written, and a spaced
`[workspace . dependencies]` header aborted everything.

A pnpm workspace default registry also suppressed a more specific scoped
`.npmrc` registry, which sent private package names to the public
registry without their token.

Two expectations in #158 encoded the regressions rather than the intended
behavior, so they are restored with the code.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>

* Give the version-layout fixture a module type

The fixture simulates a real package root but omitted `"type": "module"`,
so Node 24 and 26 emitted MODULE_TYPELESS_PACKAGE_JSON on stderr and the
test's empty-stderr assertion failed. Node 22 does not warn, and a local
`--no-warnings` in NODE_OPTIONS hid it outside CI.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>

---------

Co-authored-by: Claude (Opus 5) <noreply@anthropic.com>
silverwind added a commit that referenced this pull request Aug 22, 2026
#158 routed every sha pin with a trailing comment through a digest-only
refresh, so `uses: x@<sha> # v2.17.0` never moved off v2.17.0 and its
repo's tags were never listed at all. A comment naming a version is a
version consumer again. One naming a branch or other moving ref keeps the
digest-only path, and a version with nothing newer falls back to it, so a
retagged release still updates the sha.

Co-Authored-By: Claude (Opus 5) <noreply@anthropic.com>
silverwind added a commit that referenced this pull request Aug 22, 2026
* update deps (silverwind)
* Keep hot-path reuse behavior-preserving (silverwind)
* Avoid redundant registry and Forge requests (silverwind)
* Take Docker Hub tag digests from the listing (silverwind)
* Stop a run stalling on rate limits and proxy fallbacks (silverwind)
* Restore version bumping for sha-pinned actions (silverwind)
* Cut redundant work from dependency lookup hot paths (silverwind)
* Restore behavior lost in #158 (#159) (silverwind)
* Close correctness gaps against Renovate and cut scope (#158) (silverwind)
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