Skip to content

fix(downgrade): register unregistered [sources] pins before resolving - #65

Closed
seabbs-bot wants to merge 2 commits into
mainfrom
fix/downgrade-sources-registry
Closed

fix(downgrade): register unregistered [sources] pins before resolving#65
seabbs-bot wants to merge 2 commits into
mainfrom
fix/downgrade-sources-registry

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

Closes #30.

What

downgrade.yml gains a Bootstrap registry for unregistered [sources] deps
step between setup-julia and julia-downgrade-compat.

Pkg reads [sources] only from the active project. A step that collects
dependencies without resolving the pins therefore cannot see a dependency
pinned by git url/rev and absent from General, and the job dies with

could not find manifest entry for package with uuid …

A registry is depot-level, so registering the pins makes them resolve by name
in every environment on the runner. The step calls
EpiAwarePackageTools.Benchmarks.bootstrap_sources_registry
(src/benchmarks.jl:700), which is the same helper the kit's benchmark.yaml
and benchmark-history.yaml templates already use.

Ordering

julia-actions/cache@v3 moves ahead of the downgrade step, which is a
deviation from the action's own example. The bootstrap writes the scratch
registry into the depot, and julia-actions/cache caches registries, so a
restore landing after the bootstrap would overwrite it.

The rm -rf runs before the [sources] guard on purpose: a caller that has
since dropped its pin must not be left with a restored registry still carrying
the name, which fails the depot with a hash mismatch.
bootstrap_sources_registry removes the registry unconditionally itself, but
only on the path where a [sources] table exists.

Scope

No live failure remains to reproduce. None of the org's Julia packages carries
a root [sources] table any more, and the interim opt-out is gone —
ConvolvedDistributions.jl/.github/workflows/test.yaml runs downgrade-compat
with no if: false. This is worth landing anyway because the kit still ships
an unregistered_sources mode (src/scaffold.jl:4081 _detect_unregistered_sources),
so a newly scaffolded package can reintroduce the failure.

Validation

python3 -c "import yaml; yaml.safe_load(open('.github/workflows/downgrade.yml'))"
passes.

This was opened by a bot. Please ping @seabbs for any questions.

Pkg reads `[sources]` only from the active project, so dependency
collection cannot see a dependency pinned by git url/rev and absent
from General. Registering those pins into a depot-level scratch
registry makes them resolve by name in every environment on the runner.

The depot cache restore moves ahead of the bootstrap so it cannot
overwrite the registry the bootstrap writes.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>

@seabbs-review-bot seabbs-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR reorders julia-actions/cache ahead of julia-downgrade-compat and inserts a step that registers unregistered [sources] git pins into a scratch depot-level registry before dependency resolution, matching an established pattern already used in benchmark.yml and benchmark-history.yml. The ordering rationale and registry-staleness handling are sound, but the new step diverges from its two siblings by hardcoding the EpiAware org instead of reusing the org input pattern, and it's now the third verbatim copy of the same ~20-line block.

Automated first pass by seabbs-review-bot (Claude sonnet), triggered by: first pass. Not a human review. Comment @seabbs-review-bot to ask for another pass: @seabbs any time, the author's agent once it has pushed changes. Add the no-review label to opt this PR out. Ping @seabbs with any questions.

Comment thread .github/workflows/downgrade.yml Outdated
Pkg.add([
Pkg.PackageSpec(name = "LocalRegistry"),
Pkg.PackageSpec(
url = "https://github.com/EpiAware/EpiAwarePackageTools.jl",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue This hardcodes https://github.com/EpiAware/EpiAwarePackageTools.jl, but the same step in benchmark.yml (lines 79-81) and benchmark-history.yml (lines 96-97) builds the URL from an org workflow input (default: EpiAware) instead. Add a matching org input to this workflow's inputs: block and use url = "https://github.com/${{ inputs.org }}" * "/EpiAwarePackageTools.jl" here, so downgrade.yml behaves consistently with the other two reusable workflows that already support pointing at a different org/fork.

# its revision moves. It is dropped before the guard as well, so a
# caller that has since dropped its pin is not left with a registry
# still carrying the name, which fails the depot with a hash mismatch.
- name: Bootstrap registry for unregistered [sources] deps

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion This step is now duplicated near-verbatim across three workflows (benchmark.yml, benchmark-history.yml, and this one). The duplication already caused the org-hardcoding drift in the previous comment. Worth factoring into a composite action (e.g. .github/actions/bootstrap-sources-registry) that takes org as an input, so all three call sites stay in sync by construction.

@seabbs-review-bot seabbs-review-bot Bot added the llm-reviewed Reviewed by seabbs-review-bot label Aug 24, 2026
@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

Merge-order note: #65 and #66 both edit .github/workflows/downgrade.yml and conflict textually. git merge between the two branches reports CONFLICT (content) in that file.

The overlap is only in the julia-actions/julia-downgrade-compat@v2 block — #65 moves julia-actions/cache@v3 above it and inserts a step, #66 adds a projects: line inside its with:. Whichever merges second needs a rebase; the resolution is to keep both changes.

This was opened by a bot. Please ping @seabbs for any questions.

benchmark.yml and benchmark-history.yml both build the kit's URL from an
`org` input defaulting to EpiAware. This step hardcoded the org, so a
fork calling it would install EpiAware's kit rather than its own.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@seabbs

seabbs commented Aug 25, 2026

Copy link
Copy Markdown
Member

I'm not clear why we need this we don't want a source pin for epiawarepackage tools anywhere?

@seabbs seabbs closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-reviewed Reviewed by seabbs-review-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

downgrade.yml: resolve unregistered [sources] deps before dependency collection

2 participants