Closed
Fail closed on broken extension registries during template resolution#4004
Conversation
…ip lower extension tier when a replace base already won Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com>
…ar-file registry Assisted-by: GitHub Copilot (model: Claude Opus 4.8, autonomous) Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code based on review comments
Fail closed on broken extension registries during template resolution
Aug 6, 2026
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.
Addresses both comments in review thread pullrequestreview-4865182104: a dangling extension
.registrysymlink still fails open, and canonical resolution keeps enumerating lower tiers after a higher-priorityreplacelayer has already won.ExtensionRegistry._load()— dangling symlink fail-openPath.exists()follows symlinks, so a dangling.registrysymlink read as an absent registry, after which every on-disk extension directory was scanned as unregistered/enabled.open()would (ENOENTfor a dangling symlink,EISDIRfor a directory).PresetResolver.collect_all_layers()— priority parityreplacebase has already won at a higher tier (project override or a replace-strategy preset). The extension tier is the only lower-tier step that reads the extension registry, so a corrupt/unreadable one can no longer break init/constitution-syncmaterialization that a winning override or preset has already decided.append/prepend/wrap) needs an extension-provided base; lower presets and the core layer remain collected for the diagnostic full chain.Tests
collect_all_layers/resolve_contentremain robust to a broken extension registry when a replace preset wins.