ci: resolve a self-naming preset from the checkout, not the published copy - #9
Merged
Merged
Conversation
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.
Step 5 of this check, "Every
extendspreset 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 reportedMISSINGwhiledefault.jsonsat 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
mainis 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>/.githubholds 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 lostdefault.jsonwould resolve the preset to the stub that names it — a file extending itself — and the step would call thatokwhile 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-levelextendsnames 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-validatorremain 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_REPOSITORYset so the new self-resolving path is the one actually exercised, and the self-test was verified to fail on a known-bad config.