Repository navigation
Sync a link to an item deleted from the source as blank - #257
Merged
Merged
Conversation
When an item links to another that is deleted from the source (and --syncDeletes removes its copy and mapping), the link can never resolve, so the unresolved-reference guard (PROD-2309) blocked the linking item for good: it could not be updated again, even with --overwrite. The v1.3.0 beta tag's live test hit it when a deleted cycle item's partner needed an update. A link to a content ID with no mapping and no file in the source pull (which writes every live item and removes deleted ones) is now blanked, using stripContentReferences, and the item is sent with a warning naming the dropped link. A link to an item that exists but isn't mapped yet still fails, and nothing is treated as deleted when no source content was pulled. The source pull's file list is read once per processor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A link to an item that no longer exists on its side and has no mapping now drops out of the compared reference list, so it equals an empty link (the sync sends such a link blank) as well as the same kind of link on the other side. Before, an empty link on one side and a link to a deleted item on the other were reported as a mismatch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jules-exel
approved these changes
Nov 3, 2026
Merged
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.
Found by the gated release run for
v1.3.0-beta.0(run 41526720826). The test failed, so nothing was published.Problem
When an item links to another item that is deleted from the source,
--syncDeletesremoves the target copy and its mapping. The link can then never resolve, so the unresolved-reference guard (PROD-2309) blocked the linking item for good: it couldn't be updated again, even with--overwrite. In the run, round 4 deleted one item of a reference cycle, then edited its partner on the target. The--overwriteresolve refused to push the partner with "Unresolved content reference(s) not present in the target mapping".Fix
content-batch-processor.ts): a link to a content ID that has no mapping and no file in the source pull is sent blank (stripContentReferences, from the cycle work), with a warning naming the dropped link. A pull writes a file for every live item and removes deleted ones, so a missing file means the item is gone from the source. The source pull's file list is read once per processor.canonicalize.ts,verify-context.ts): a link to an item that no longer exists on its side (and has no mapping) drops out of the compared reference list. It now equals an empty link (what the sync sends) as well as the same kind of link on the other side.Tests
content-batch-processor.test.ts:check-content.test.ts: a link to a deleted target item equals an empty link (fails without the fix).tsc, ESLint and the build pass.325990446, beta tier, fresh dev instances) passed every check in all 5 rounds.After this merges,
v1.3.0-beta.0gets re-pointed at the new main commit to re-run the gated publish.🤖 Generated with Claude Code