Skip to content

feat: fast-track and auto-merge reference data, such as CA root bundles - #8

Merged
sweepies merged 5 commits into
mainfrom
feat/reference-data
Oct 22, 2026
Merged

sweepies merged 5 commits into
mainfrom
feat/reference-data

Conversation

@sweepies

@sweepies sweepies commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

After the eMudhra intermediate CA compromise, clients that bundle their own trust store stay exposed until that dependency updates. This makes those updates fast by default.

  • New dependency kind reference-data, added on top of a dependency's own kind for packages that ship data rather than code: CA roots (certifi, webpki-roots, webpki-root-certs, golang.org/x/crypto/x509roots/fallback, composer/ca-bundle), time zone data (tzdata, pytz, chrono-tz, tzinfo-data) and the public suffix list (publicsuffixlist, psl, tldts, public_suffix).
  • The schema's rules now starts with a built-in rule: for reference-data, waitHours = 0, no windows, group = "" (its own PR) and merge = true. Checks, required reviews and branch protection still gate the merge. Repository rules apply after it and can change it; assigning a new rules Listing drops it.
  • The kinds selector and the report's metadata.kinds include the extra kind.
  • Docs: a reference data section in the configuration guide, notes in auto-merge, release age, getting started and the README, and a departure.

Not covered: root certificates inside container images (OS packages; the Count only sees the image digest), and prs limits, which can still hold a reference data PR.

🤖 Generated with Claude Code


Devin Review

Packages that ship data rather than code (certifi, webpki-roots, Go's
x509roots/fallback, tzdata, the public suffix list and others) also have
the kind reference-data. The schema's first rule gives their updates no
release-age wait and no schedule window, their own PR, and auto-merge once
checks pass, so a trust store picks up a CA distrust quickly. Checks,
reviews and branch protection still gate the merge, and a repository rule
can change it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@deepsource-io

deepsource-io Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in df9ebd3...3c615d8 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 ↗

Important

Some issues found as part of this review are outside of the diff in this pull request and aren't shown in the inline review comments due to GitHub's API limitations. You can see those issues on the DeepSource dashboard.

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 22, 2026 1:47a.m. Review ↗
JavaScript Oct 22, 2026 1:47a.m. Review ↗
Shell Oct 22, 2026 1:47a.m. Review ↗
Secrets Oct 22, 2026 1:47a.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.

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 2 potential issues.

Devin Review

Comment thread PatchulaConfig.pkl Resolved
Comment thread PatchulaConfig.pkl
Comment on lines +144 to +155
rules: Listing<Rule> = new {
new Rule {
note = "Reference data: no wait, no window, its own PR, merged once checks pass."
select { kinds = new Listing { "reference-data" } }
apply {
waitHours = 0
windows = new Listing {}
group = ""
merge = true
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 Info: Schema change refreshes cached policy

The config cache key includes the bundled schema hash, so unchanged repositories reload the new rule after upgrade.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread crates/update/tests/write.rs Outdated
/// merge without waiting on unrelated pins.
#[test]
fn reference_data_pins_get_their_own_branch() {
let (mut config, mut repo, _, _) = setup("22.0.0", false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

More than one patterns in this `let` are matched by the wildcard


Successive wildcard patterns (_) add noise to code, use the rest pattern (..) instead.

…rom its upgrade

Sharing the dependency's upgrade branch put two targets on one line, so
both were skipped as overlapping edits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Devin Review

Comment thread crates/update/src/plan.rs Outdated
Comment on lines +147 to +151
} else if update.update_type == "pin" && reference_data {
(
serde_json::json!(["pin", word(&dep.source), dep.package]).to_string(),
format!("pin-{}", package_slug(&dep.package)),
)

@devin-ai-integration devin-ai-integration Bot Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Reference data pins ignore configured groups

When a rule assigns a group, reference_data pins still get separate package branches. The pin branch takes precedence over update.group, so those updates never join their configured group.

Learn more

A rule can assign a nonempty group to override the default separate-PR policy for reference data. Evaluator::effective carries that override into update.group. Planning selects the pin-specific branch before checking that field, so every reference data pin ignores the configured group. A reference data pin can consequently stay outside a manually curated group while the package's version updates follow the rule.

Example: A rule groups psl and tldts as suffix-data. Their pin proposals go to pin-psl and pin-tldts, rather than joining the suffix-data branch.

Recommended fix: Check a nonempty update.group before selecting the reference-data pin branch, while preserving the shared-pins behavior for non-reference dependencies. Add a planning test with a reference-data pin carrying an explicit group.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

…of groups

Reference data pins keep their own branch even under a group, like other
pins, so a pin and the grouped upgrade never edit one line together.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread crates/update/src/plan.rs Outdated
let manager = if package_names[&package].len() > 1 {
format!("{}-", manager_slug(dep))
} else {
String::new()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Empty call to `new()`


The new() function is used to initialise an object with specific data.
If no arguments are passed, the behaviour is identical to default().

Comment thread crates/update/src/plan.rs Outdated
Comment on lines +520 to +522
line.split_once(".x-")
.map(|(major, _)| format!("{major}.x"))
.unwrap_or_else(|| line.clone())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Called `.map().unwrap_or_else()` on a `Option` value, use `.map_or_else(, )`


Chains of the form .map(..).unwrap_or(..) can be simplified to use .map_or(..). These shorthands
are available on Result as well as Option. Replace:

  • .map(<f>).unwrap_or(<g>) with .map_or(<g>, <f>)
  • .map(<f>).unwrap_or_else(<g>) with .map_or_else(<g>, <f>)

@sweepies
sweepies merged commit bbd09d0 into main Oct 22, 2026
12 checks passed
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