PROD-2315: fix "type 0" wording leak in cross-kind model collision message - #202
Open
5PK wants to merge 1 commit into
Open
PROD-2315: fix "type 0" wording leak in cross-kind model collision message#2025PK wants to merge 1 commit into
5PK wants to merge 1 commit into
Conversation
…ssage
modelKindName() only mapped contentDefinitionTypeID 1 (SingleItem) to
"content", leaving 0 (List) to fall through to the internal `type ${t}`
label. List-backed content models (0) are the common case for real
container-backed models, so this fired on most real collisions - 6 of 7
fixtures in the 2026-07-29 sweep hit "type 0"; only the one SingleItem
fixture rendered correctly.
Treat both 0 and 1 as "content". Adds a regression test using
contentDefinitionTypeID 0 (the existing PROD-2315 tests only ever used 1,
which is exactly why this slipped through the original fix).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
modelKindName()insrc/lib/pushers/model-pusher.tsonly mappedcontentDefinitionTypeID === 1(SDK enumSingleItem) to"content", so0(List— the type most real container-backed content models actually have) fell through to the generic`type ${t}`label."is a type 0 model"; only the one fixture that happened to beSingleItem-typed rendered correctly as"content".0(List) and1(SingleItem) as"content"— both are content models, only2(Component) is the other kind.contentDefinitionTypeID: 0— the existing PROD-2315 tests only ever used1for the content side, which is exactly why this slipped through unnoticed.No behavior change to collision detection — only the failure message wording. The soft-fail/continue behavior (collision is recorded in
failureDetailsand the sync continues, per PROD-2310's "count and report, don't abort" design) is unchanged.Test plan
npx tsc --noEmitcleannpx jest— 105/105 suites, 1892/1892 tests passing (1 new regression test added)832a35c9-u→2e57774f-u's real collision fixtures: all 7 now say"is a content model"/"content model with that reference name", zero"type 0"occurrences🤖 Generated with Claude Code