Repository navigation
feat(lookup): group a Pkl package with its repository's other dependencies - #360
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 15be858 | Commit Preview URL Branch Preview URL |
Nov 22 2026, 09:38 PM |
…ncies A Pkl package and the other dependencies its GitHub repository ships (the hk mise tool and hk's Pkl package; the pkl-go Go module and pkl.golang) now share the group `owner/repo` when nothing set a group for them, on the branch `patchula/jdx-hk`. The repository comes only from declarations, for public dependencies: Pkl package URIs, github.com Go module paths, mise tools without options whose registry backends name one repository (or `go:github.com/...`), and github-releases/github-tags packages. A group forms only when a repository declares both a Pkl package and another dependency of that repository, and a dependency joins only when a partner on the other side is active, has no group set and shares its commitPrefix. An explicit group, `""` included, always wins, and security.apply keeps advisory fixes in their own PR. The dogfood hk rule is removed in favour of the built-in group.
sweepies
force-pushed
the
feat/pkl-repo-groups
branch
from
November 22, 2026 21:03
2142044 to
352d71e
Compare
… pins The planner puts minors, patches and digests on one branch, so a group decided per update kind could still hold that branch for conflicting commit prefixes, or move a member between branches from patch to minor. Groups are now keyed by track (majors, or minors/patches/digests): a dependency is a member only when it is a candidate for every kind on the track, and the group forms only when both sides have members that all share one commit prefix. Pins never group. A mise tool the Count refuses to look up names no repository, and the derived owner/repo goes through the same validation as the other sources; explicit github:/ubi: backends must name exactly owner/repo. Report-only dependencies (Copier) are no partners. catalog-controls now versions the mise sources the grouping reads.
Merged
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.
What changed
A Pkl package now shares a PR with the other dependencies its GitHub repository ships. Examples: the
hkmise tool with hk's Pkl package, or thegithub.com/apple/pkl-goGo module withpkl.golang. Their updates get the groupowner/repo(jdx/hk) onpatchula/jdx-hk/patchula/major-jdx-hk. Titles collapse as before (update hk to 2.11.0).crates/lookup/src/repository.rs:declared_repository(&Dependency)reads a lowercasedowner/repofrom the declaration only:pkl:PklPackage::parsego: agithub.com/<owner>/<repo>prefix (no vanity fetch)mise: a tool without options whose compiled-in registry backends name exactly one repository, or an explicitgo:github.com/<owner>/<repo>/…tool such aspkl-gen-gogithub-releases/github-tags:owner/repoNoneGroupsholds the static membership table, built from extraction.Evaluator::new(config, Context { locked_workflows, dependencies }): the evaluator now receives the repository's extracted dependencies. Both real callers pass them (engine lookup andplan/batch_plan); tests keepDefault::default().Effective::applykeepsSome(""), so an explicit "no group" can be told apart from "unset".proposal()still drops""fromUpdate.group.effective()= rules (ruled()), then, if no group is set, the built-in repository group.crates/updategrouping code is unchanged; the group shows up inUpdate.grouplike any other group.Dogfood: the
hkrule inpatchula.pklis removed. Its openpatchula/hkPR will close andpatchula/jdx-hkwill open once.Docs:
PatchulaConfig.pklPolicyandgroupdocs,guide/managers.md(new Pkl subsection),guide/pull-requests.mdbranch table,guide/configuration.md,renovate/compatibility.mdpkl row,renovate/departures.md(new entry and the explicit-defaults line).State versions: extract/files 22, config/config-files 19, catalog/catalog-controls 23 (plan.rs, config, PatchulaConfig.pkl). changelog 12, because
github_segment(made private in refactor(manager): simplify the role taxonomy, proposal facts and registry readers #355) is exported again frompkl_package.rsfor the owner/repo check.Membership
Repository R forms a group only when the repository declares at least one
pkl-source dependency of R and at least one non-pkldependency of R. So pkl-pantry packages alone stay separate, and so do a Go module and its mise tool without a Pkl package. For a given update kind, a dependency joins only when both of these hold:""included);commitPrefix.So
group = ""on either side is a complete off switch, and the default never triggers the "conflicting commitPrefix" hold. Pins never group (existing plan rule). Majors go to themajor-branch. A user group literally namedjdx/hkshares the branch; the docs give that as the way to add something to the group.Security properties and how they hold
policy.groupisNoneafter defaults and rules.Some("")now survivesapply, sodefaults.group = "", a rule'sgroup = ""and the reference-data rule all keep a dependency out.security.applyis layered by its callers (secure(), the fix paths) aftereffective(), so itsgroup = ""overrides the fallback. Test:an_advisory_fix_keeps_its_own_pull_request.declared_repositoryreturnsNoneunlessdep.id().is_public(), and it only parses the declaration text or the compiled-in mise registry snapshot. It reads no npm/PyPI/crates metadata, no Go vanity page, no image labels, no miserelease_url, and notnotes::source_repository. A registry-qualifiedpkldependency (for example from a custom extractor'sregistry) that claimsjdx/hkdoes not join (tests at both levels). A mise tool with options (which could point anywhere) does not join.Tests
crates/lookup/src/repository.rs: table test fordeclared_repository, plus registry-qualified dependencies naming nothing.crates/lookup/tests/repository_groups.rscovers:pkl-gen-goviago:""on either side frees bothdefaults.groupempty and non-empty winsjdx/hkjoinscommitPrefixdoes not joincrates/update/src/plan/planning.rs: hk mise tool + hk Pkl package give one plan onpatchula/jdx-hktitledchore(deps): update hk to 2.11.0.mise run corpus:snapshotleaves both TSVs unchanged (the corpus evaluates single dependencies with no repository context).Deviations from the design
dependenciesargument,Evaluator::new's second parameter became aContextstruct (locked_workflows+dependencies). This keeps the ~110 test call sites onDefault::default().pkl-gen-goas a misego:github.com/apple/pkl-go/cmd/pkl-gen-gotool is supported; the design left it optional.Update.groupset at lookup).Follow-ups
patchula/hkand openspatchula/jdx-hkonce.After review
An adversarial review found six defects; all are fixed in 15be858.
patchula/jdx-hkandpatchula/hk-2.xfrom patch to minor. Groups are now keyed by (repository, track), where the track is majors, or minors+patches+digests.Update::Pingets no built-in group. Tests: a miselatestpin and an unpinnedgithub-tagsaction digest pin next to hk's Pkl package.mise_repository:patchula_mise::checknames no repository. Such a tool is never looked up, and its options may have been dropped while reading it.github_segmentvalidation as the other sources.github:/ubi:backends must name exactlyowner/repo.github:jdx/hk/sub@1,go:…/pkl-gen-go@1,github:jdx/..,github:jdx/hk?x=1,github:jdx/hk/sub,ubi:jdx/hk/suband-hk.catalog-controlsis the only code-versioned state whose stored keys depend on branch identity. Its sources now also listcrates/mise/src/andcrates/mise/registry.json;crates/config/src/(pkl_package) andcrates/lookup/src/(repository.rs) were already there. Rehashed. All bumped rows stay one above main.Edits::ReportOnly, i.e. Copier) are never candidates, so they count as no partner.## Pkl;reference/report.mdUpdate.groupmentions the built-in group;renovate/migrating.mdnote the exception to "one PR per update".crates/updatenow enables lookup'stestingfeature in dev-dependencies for the planning tests. Clippy is clean across the workspace; the lookup, update, engine, config and mise tests pass, as do parity and the docs build.