Repository navigation
Conversation
…eps structurally, fail closed on non-registry npm specs - YAML edits keep a value plain only when YAML (1.2, and the 1.1 spellings Go and Ruby parsers still use) reads it back as the same string; `tag: 1.9` now becomes `tag: "1.10"`, not the float 1.1. - Kustomize newTag, helmCharts version, Flux ref.tag and Helm values tag read a plain number as its source text (`1.10`, `2.0`). The separate YamlName syntax is gone: every YAML scalar reads numbers as written; a GitLab component version, the tail of a larger scalar, is an inner token. - GitHub Actions uses:/image:/container: values are located through yaml_locations, parsed once per file, so a matching line inside a run: script is never edited; the span still runs to the end of the line to keep the version comment. - npm: only a version, range, dist-tag or npm:name@version alias is a registry spec; every other scheme, the owner/repo shorthand, paths and tarballs are left alone. - Dockerfile heredocs open only at a whole unquoted shell word, as BuildKit reads them; here-strings and quoted markers open none. - Go pseudo-versions record their commit in all three forms. - package-lock.json packages count as registry packages only when resolved on the public registry or on the .npmrc registry for them. - Lockfile duplicate and direct-declaration checks use indexes instead of rescanning.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 71fedbc | Commit Preview URL Branch Preview URL |
Nov 15 2026, 11:03 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from the manager-crate scan, all in
crates/manager.What changes and why
edit.rs). An unquoted value was replaced with an unquoted new value whenever it parsed as a number, sotag: 1.9becametag: 1.10, which Helm reads as1.1. Invariant: a new plain scalar stays plain only when YAML reads it back as the same string. The check uses serde_yaml_ng (YAML 1.2) plus the YAML 1.1 spellings Go and Ruby parsers still type (yes/on,010,1_000,1:20, floats). Anything else is double-quoted.version: 2→"3"is also quoted, because Helm renders large integer tags as floats (2.0240101e+07).yaml.rs). KustomizenewTag,helmCharts[].version, Fluxref.tagand Helm valuestagwent through float → text, so1.10became1.1and2.0became2. A plain number is now read as its located source text.edit::scalardoes the same for every YAML scalar, so the separateSyntax::YamlNameis removed (hard cutover). A GitLab component version is the tail of a larger scalar, so it is nowSyntax::InnerTokenand never quoted on its own; a whole GitLabref:follows the YAML rule (ref: "1.10").actions.rs).uses:/image:/container:were found with a line regex that could match a line insiderun: |. They now come fromyaml_locations, with the span extended to the end of the line to keep the version comment. Flow-style values still error, as before: a pin comment added inside{…}would swallow the closing bracket.yaml_locationsis parsed once per workflow file (aWorkflowstruct carries it), not once per setup-tool step.npm.rs). This now fails closed: only a version, range, dist-tag ornpm:name@versionalias is a registry spec. Every otherscheme:(includinggitlab:,bitbucket:,gist:and unknown ones such asjsr:), theowner/reposhorthand, paths and.tgz/.tarfiles are left alone. This is a structural rule rather than a list of forge prefixes, so a new prefix cannot slip through. The corpus caught a real case: next.js's"ci-info": "watson/ci-info#<sha>"was being looked up on public npm.LOCAL_SCHEMESis now private topublic.rs.images.rs). This follows BuildKit's rule: the instruction is split into shell words with quotes kept, and a heredoc is a whole word[fd]<<[-]NAMEwhose name holds no further<; a quoted name is unquoted.<<<word,"<<EOF"and\<<EOFopen no heredoc, so laterFROMlines are read.go.rs). The commit digest now comes from Go's own pseudo-version pattern (module.IsPseudoVersion), sov1.2.4-0.<ts>-<hash>,v1.0.0-rc.1.0.<ts>-<hash>and+incompatibleforms get it too. A dated-looking prerelease that is not a pseudo-version does not.locked.rs). Anyhttps://resolved URL used to count as registry. Now a package counts only when its resolved URL is on the public npm registry, or under the registry its.npmrcnames for it, or when its settings are unreadable (its lookup then fails rather than guessing).npm::publicis reused.locked.rs, npm and aube). Duplicate checks use aBTreeSet. The direct-declaration check, which also scanned every dependency per lock entry, now uses an index built once (Direct); Cargo uses it too.Snapshots and state versions
tests/corpus-extraction.tsv: drops theci-infoowner/repo#shaentry (item 5).tests/corpus-proposals.tsv: the same row, and 8-0.pseudo-versions in prometheus'sgo.modgo frompin:todigest:, the same as thev0.0.0-form already was (item 7).crates/manager/src/is hashed into extract, files, config, config-files, catalog and catalog-controls. These are bumped intests/state-versions.tsvwith their new hashes.Tests
edit.rs:yaml_values_are_quoted_unless_they_read_back_as_the_same_string(Helm values, kustomize tag and chart version, a YAML 1.1 bool), andaction_edits_skip_matching_lines_inside_run_scripts.gitlab_numeric_refs_keep_their_textnow expectsref: "1.10".wave2.rs:numeric_yaml_tags_and_versions_keep_their_text,dockerfile_here_strings_and_quoted_markers_open_no_heredoc, an fd-and-quoted heredoc case, and all pseudo-version forms ingo_pseudo_versions_retain_observed_identity.extract.rs:only_registry_specifiers_are_registry_versions(forge prefixes, shorthand, paths, tarballs, unknown schemes, barenpm:alias) andlockfile_packages_resolved_off_their_registry_are_not_listed(tarball, other path on the private host, mirror, duplicates).cargo test -p patchula-manager(all pass),cargo clippy -p patchula-manager --all-targets -D warnings, andcargo test -p patchula-engine -p patchula-update -p patchula-lookup(all pass, state parity included).Docs
guide/managers.md(YAML read/quote rule, npm specs, Actions structural location, Go pseudo-versions, Dockerfile heredocs) andguide/security.md(which lockfile packages count as registry packages).Dropped
Nothing was dropped. Every scanner claim checked out against the code.
Follow-ups
actions.rs(runner_scope/runners) still finds labels by text within the job'sruns-onsubtree. It could move toyaml_locationstoo.