[CTX-0026] fix(registry): bind cached metadata to repository identity + validate recorded gitlinks - #58
Merged
Conversation
… + validate recorded gitlinks Fixes #50 (PLUG-REG-003): bind cached metadata to repository identity - Add repository_source field to IndexMetadata to track the source repository - Invalidate cached metadata when repository URL changes (normalized comparison) - Preserve metadata for equivalent URL spellings (e.g., .git suffix variations) - Update sync-metadata.ts to store repository_source and check it for equality Fixes #52 (PLUG-REG-005): validate recorded gitlinks instead of checkout revisions - Change readSubmodulePins() to use 'git ls-tree HEAD plugins' instead of 'git submodule status' - This reads the gitlinks recorded in the parent commit rather than checkout status - Prevents local checkout drift from replacing the reviewed SHA in validation Tests: - Add test for metadata invalidation when repository changes - Add test for metadata preservation with equivalent URL spellings - Update all existing tests to include repository_source field
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.
Priority: P2 | Area: package, plugins | Labels: fix, P2, area:package, area:plugins | Milestone: v0.1.0 | RFC: OQ-053 | Task: CTX-0026
Closes #50
Closes #52
Summary
Implements two registry validation improvements:
[PLUG-REG-003] fix(registry): bind cached metadata to repository identity #50 (PLUG-REG-003): Bind cached metadata to repository identity
repository_sourcefield toIndexMetadatato track the source repository[PLUG-REG-005] fix(registry): validate recorded gitlinks instead of checkout revisions #52 (PLUG-REG-005): Validate recorded gitlinks instead of checkout revisions
readSubmodulePins()to usegit ls-tree HEAD pluginsinstead ofgit submodule statusTesting
repository_sourcefieldjust check)