Draft: fix: #3627204 Compare pinned composites with their loaded revision on older core
Closes #3627204
A host can pin an older composite revision while the composite has a newer default revision. On Drupal 10.6, translating that host incorrectly reports a change to an untranslatable field: hasTranslationChanges() loads the composite default instead of comparing with the pinned revision.
Set the original comparison entity from the loaded revision on core versions before 11.3, preserving an existing original and skipping new entities. The existing 11.3+ unchanged-revision path and the current branch’s later-delta checks remain intact. This does not bypass validation or save entities.
The failure-first kernel regression checks the unchanged pin, rejection of a genuine shared-field edit, and unchanged stored host/default-composite revisions. It failed on the released baseline before the fix.
Validation:
- Current-branch candidate b3d63bcb: complete composite translation kernel class passes on Drupal 10.6.18/PHP 8.2 and 11.3.18/PHP 8.3 (5 tests, 238 assertions each).
- The same fix against ERR 1.14 passes the class on Drupal 10.6.18/PHP 8.2 and 11.3.18/PHP 8.3 (4 tests, 220 assertions each).
- With that release-based fix and the separate Sentinel #3627189 candidate, all four Sentinel draft/translation HTTP classes pass on Drupal 10.6 (17 tests, 574 assertions), including successful pinned-paragraph translation and preserved default revisions.
- Independent spec and standards reviews found no actionable issues. PHP syntax and diff checks pass. PHPCS adds zero findings compared with this branch’s baseline (11 errors and 7 warnings remain visible).
Hosted pipeline 983311 is complete: default, previous-major and previous-minor PHPUnit jobs and all three Composer jobs pass. Existing allowed-failure reports remain: PHPStan has eight findings in unchanged files, spelling eight findings in five unchanged files, and ESLint six YAML-indentation findings in two unchanged files. Full PHPCS reports 163 errors / 36 warnings; the two changed files match their baseline findings exactly (11 errors / 7 warnings). No warnings were suppressed.
Draft retained for maintainer disposition of these baseline warnings. The code-quality aggregate is not a runtime-test count.