Skip to content

PROD-2315: fix "type 0" wording leak in cross-kind model collision message - #202

Open
5PK wants to merge 1 commit into
mainfrom
fix/prod-2315-model-kind-name-wording
Open

PROD-2315: fix "type 0" wording leak in cross-kind model collision message#202
5PK wants to merge 1 commit into
mainfrom
fix/prod-2315-model-kind-name-wording

Conversation

@5PK

@5PK 5PK commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • PROD-2315 is marked Done, but the collision message still leaked internal jargon: modelKindName() in src/lib/pushers/model-pusher.ts only mapped contentDefinitionTypeID === 1 (SDK enum SingleItem) to "content", so 0 (List — the type most real container-backed content models actually have) fell through to the generic `type ${t}` label.
  • This wasn't a rare edge case: in the 2026-07-29 validation sweep, 6 of 7 real collision fixtures rendered as "is a type 0 model"; only the one fixture that happened to be SingleItem-typed rendered correctly as "content".
  • Fix: treat both 0 (List) and 1 (SingleItem) as "content" — both are content models, only 2 (Component) is the other kind.
  • Added a regression test using contentDefinitionTypeID: 0 — the existing PROD-2315 tests only ever used 1 for 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 failureDetails and the sync continues, per PROD-2310's "count and report, don't abort" design) is unchanged.

Test plan

  • npx tsc --noEmit clean
  • npx jest — 105/105 suites, 1892/1892 tests passing (1 new regression test added)
  • Live-verified against 832a35c9-u2e57774f-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

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant