Skip to content

ci: resolve a self-naming preset from the checkout, not the published copy - #9

Merged
tannevaled merged 1 commit into
mainfrom
ci/restep5-preset-from-checkout
Sep 1, 2026
Merged

ci: resolve a self-naming preset from the checkout, not the published copy#9
tannevaled merged 1 commit into
mainfrom
ci/restep5-preset-from-checkout

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Step 5 of this check, "Every extends preset resolves", asked the wrong source.

It fetched the preset from raw.githubusercontent.com/<org>/.github/HEAD/default.json — the published copy. When the pull request under test is that preset repository, the authoritative copy is the one in the checkout, and the published one is stale by exactly the change under review. So a first landing in a new organisation reported MISSING while default.json sat in the tree, added by the very commit being checked.

This resolves a preset naming this repository from the checked-out tree, and fetches every other preset from the published copy as before. The two paths are not duplication: for this repository the tree is the truth and main is stale; for every other repository the tree knows nothing and the published copy is the only truth there is.

The failure stays sharp. Absent from the tree and absent from the remote is still MISSING — the renamed-preset case the step exists to catch. Only "present in one of them" passes.

One trap the tree path has and the remote path did not. Every <org>/.github holds both the preset (default.json) and the stub that consumes it (renovate.json, {"extends": ["github>ORG/.github"]}). Renovate falls back from the first to the second, so a tree that had lost default.json would resolve the preset to the stub that names it — a file extending itself — and the step would call that ok while Renovate chokes on the recursion. That would convert a loud failure into a quiet wrong answer in exactly the case the step was written to catch. A candidate whose own top-level extends names this repository is therefore skipped: it is the consumer, not the preset.

Nothing else changes. Steps 1 to 4 are untouched, and the two measured blind spots of renovate-config-validator remain documented in the file.

Prepared [2026-09-01 09:38:39 CEST]. All five steps were run locally against this repository before this branch was pushed, with GITHUB_REPOSITORY set so the new self-resolving path is the one actually exercised, and the self-test was verified to fail on a known-bad config.

@tannevaled
tannevaled merged commit f127013 into main Sep 1, 2026
1 check passed
@tannevaled
tannevaled deleted the ci/restep5-preset-from-checkout branch September 1, 2026 15:09
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