Repository navigation
refactor(sync): share one orphan-link rule between prune and the dashboard - #937
Merged
Merged
Conversation
…board The Sync page predicted which orphan links sync would remove with its own copy of prune's rule. The copy had already drifted once (#914), and it still disagreed in two cases: prune treats a link it cannot follow, such as a loop, as broken, while the page only counted a missing destination; and prune keeps a link whose target it cannot read. The decision now lives in sync.OrphanLink. Prune and the dashboard diff both call it, so a later change to the rule reaches both. Prune's results, warnings and dry-run text are unchanged. LinksIntoSource, added for the dashboard's copy, is no longer needed and is removed.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Follow-up to #914. No issue.
Summary
The dashboard's Sync page predicted which orphan links sync removes with its own copy of prune's rule. Codex caught that copy drifting in #914, and a review after the merge found two cases where it still disagreed.
sync.OrphanLink.PruneOrphanLinksWithSkillsand the dashboard diff both call it.sync.LinksIntoSource, exported in fix(sync): never delete or re-point entries skillshare did not create #914 only for the dashboard's copy, is removed.Behavior change (dashboard preview only):
Prune itself is unchanged: same removals, same warning text, same dry-run lines.
Checks
make checkin a devcontainer: exit 0.TestComputeTargetDiff_ListsRecordedLinkThatCannotBeFollowedfails onmain(items = []) and passes here.TestOrphanLinkVerdictcovers the rule's rows: a link into the source or outside it, live or broken, recorded, unrecorded or forced.Not run: UI tests, website build, and the Windows runbook. No UI or docs file changed.
Not covered:
diffstill lists no orphan links in merge mode.doctorsplits broken links withOwnsLink, so a broken external link the manifest records as a copy is reported as "did not create" while prune removes it.--forcewould remove.Checklist
make check) — for code changes