Skip to content

Update integration test for model exists but is missing map#169

Open
jules-exel wants to merge 1 commit into
mainfrom
fix/scenario-13-adopt-mapping
Open

Update integration test for model exists but is missing map#169
jules-exel wants to merge 1 commit into
mainfrom
fix/scenario-13-adopt-mapping

Conversation

@jules-exel

Copy link
Copy Markdown
Contributor

Problem

The Scenario tests CI job is failing on main (run):

● sync scenario: 13-model-exists-in-target-no-mapping
  expect(received).toHaveLength(expected)
  Expected length: 0
  Received length: 1   // { sourceID: 10 -> targetID: 50, "Post" }

Root cause

Two merges crossed:

  • ff0104d PROD-2211 added map-on-adopt: a custom model that already exists on the target by (referenceName, contentDefinitionTypeID) but has no mapping row is now adopted — the pusher writes the mapping and skips (no saveModel). This fixed the old silent-drop gap (documented as unintended in FINDINGS.md Finding 5).
  • 84fb832 CLI Integration tests added scenario 13, but its fixture still encoded the old silent-drop expectation (0 mappings).

So the fixture, not the code, is stale.

Fix

Update 13-model-exists-in-target-no-mapping/scenario.json to expect the corrected behavior: 1 mapping (10 → 50), still saveModel: 0, and refresh the description. No production code change.

npx jest src/tests/sync/sync-scenarios.test.ts --no-coverage16/16 passing.

🤖 Generated with Claude Code

…ld silent drop

Scenario 13 (model exists in target, no mapping) was authored against the
pre-PROD-2211 silent-drop behavior (0 mappings) and merged after PROD-2211
landed on main, so the scenario job broke: the model pusher now correctly adopts
the existing target model by (referenceName, contentDefinitionTypeID), writes the
mapping (source 10 -> target 50), and skips — with no saveModel call.

Update the fixture to expect the corrected, self-healing behavior. No production
code change; PROD-2211's map-on-adopt is the intended behavior (the old gap was
documented as unintended in FINDINGS.md Finding 5).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jules-exel jules-exel requested a review from DerekAgility June 19, 2026 15:22
@jules-exel jules-exel changed the title test(scenario-13): align fixture with PROD-2211 map-on-adopt behavior Update integration test for model exists but is missing map Jun 19, 2026
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