Fix shard 12 integration test failure: regenerate stale object metadata snapshot from #22594 (#22768)

# Context

Since #22594 merged (July 9, 16:59 CET), `server-integration-test (12)`
fails deterministically on every main-based branch. The failure is easy
to misread as flakiness because nx truncates the failed task's replayed
output before jest's `FAIL`/summary lines reach the CI log; the visible
`timelineActivity` FK-violation errors are pre-existing noise also
present in green runs.

Note: the flakiness PRs merged yesterday morning (#22699, #22701,
#22702) are not the cause. The failure window starts with #22594.

# Root cause

#22594 moved `searchVector` provisioning out of the
reserved-system-fields path into its own side-effect handler, registered
after `ObjectSystemFieldsOnCreateSideEffectHandlerService` in
`metadata-side-effect-handlers.module.ts`. The `searchVector` field
entry therefore now appears after `updatedAt`/`updatedBy` in the
create-object validation report. The snapshot for
`failing-create-one-object-metadata-v2.integration-spec.ts` was
rewritten in #22594 but kept the old `position -> searchVector ->
updatedAt` ordering, so 15 of the 19 tests fail on a snapshot mismatch.

Reproduced locally on latest main: 15/19 fail, diff is exactly the three
reordered name lines.

# Fix

Regenerated the snapshot with `jest -u` against a freshly reset
database. Suite is 19/19 green afterwards. The sibling snapshot suites
in the same directory (`failing-update-one-object-metadata`,
`failing-update-one-standard-object-metadata`,
`successful-update-one-standard-object-metadata`) were re-run and pass
unchanged.

Pure block move: only the `searchVector`/`updatedAt`/`updatedBy` name
lines relocate, 15 occurrences each (45+/45-), one file, no product
code.

# Related

- #22757 is an earlier draft with the same snapshot regeneration.
- #22758 fixes the same suite by replacing the snapshot with per-case
contract assertions (plus an msw catch-all). If that one merges first,
this PR becomes unnecessary.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01NPSkHDBHNQw4c1iJzFTxoA)_

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/22768?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->

Co-authored-by: Martin <martin@twenty.com>
This commit is contained in:
martmull
2026-07-10 09:58:42 +02:00
committed by GitHub
parent 25d7758049
commit d430e38a9a
@@ -108,23 +108,6 @@ exports[`Object metadata creation should fail v2 when labelPlural contains only
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -159,6 +142,23 @@ exports[`Object metadata creation should fail v2 when labelPlural contains only
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -789,23 +789,6 @@ exports[`Object metadata creation should fail v2 when labelPlural exceeds maximu
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -840,6 +823,23 @@ exports[`Object metadata creation should fail v2 when labelPlural exceeds maximu
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -1481,23 +1481,6 @@ exports[`Object metadata creation should fail v2 when labelSingular contains onl
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -1532,6 +1515,23 @@ exports[`Object metadata creation should fail v2 when labelSingular contains onl
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -2162,23 +2162,6 @@ exports[`Object metadata creation should fail v2 when labelSingular exceeds maxi
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -2213,6 +2196,23 @@ exports[`Object metadata creation should fail v2 when labelSingular exceeds maxi
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -2854,23 +2854,6 @@ exports[`Object metadata creation should fail v2 when name exceeds maximum lengt
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -2905,6 +2888,23 @@ exports[`Object metadata creation should fail v2 when name exceeds maximum lengt
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -3559,23 +3559,6 @@ exports[`Object metadata creation should fail v2 when namePlural has invalid cha
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -3610,6 +3593,23 @@ exports[`Object metadata creation should fail v2 when namePlural has invalid cha
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -4240,23 +4240,6 @@ exports[`Object metadata creation should fail v2 when namePlural is a reserved k
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -4291,6 +4274,23 @@ exports[`Object metadata creation should fail v2 when namePlural is a reserved k
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -4932,23 +4932,6 @@ exports[`Object metadata creation should fail v2 when namePlural is not camelCas
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -4983,6 +4966,23 @@ exports[`Object metadata creation should fail v2 when namePlural is not camelCas
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -5613,23 +5613,6 @@ exports[`Object metadata creation should fail v2 when nameSingular contains only
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -5664,6 +5647,23 @@ exports[`Object metadata creation should fail v2 when nameSingular contains only
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -6318,23 +6318,6 @@ exports[`Object metadata creation should fail v2 when nameSingular contains only
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -6369,6 +6352,23 @@ exports[`Object metadata creation should fail v2 when nameSingular contains only
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -7005,23 +7005,6 @@ exports[`Object metadata creation should fail v2 when nameSingular has invalid c
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -7056,6 +7039,23 @@ exports[`Object metadata creation should fail v2 when nameSingular has invalid c
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -7710,23 +7710,6 @@ exports[`Object metadata creation should fail v2 when nameSingular is a reserved
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -7761,6 +7744,23 @@ exports[`Object metadata creation should fail v2 when nameSingular is a reserved
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -8402,23 +8402,6 @@ exports[`Object metadata creation should fail v2 when nameSingular is not camelC
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -8453,6 +8436,23 @@ exports[`Object metadata creation should fail v2 when nameSingular is not camelC
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -9107,23 +9107,6 @@ exports[`Object metadata creation should fail v2 when names are identical 1`] =
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -9158,6 +9141,23 @@ exports[`Object metadata creation should fail v2 when names are identical 1`] =
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -9788,23 +9788,6 @@ exports[`Object metadata creation should fail v2 when names with whitespaces res
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{
@@ -9839,6 +9822,23 @@ exports[`Object metadata creation should fail v2 when names with whitespaces res
"status": "fail",
"type": "create",
},
{
"errors": [
{
"code": "OBJECT_METADATA_NOT_FOUND",
"message": "Object metadata not found",
"userFriendlyMessage": "Field to create related object not found",
},
],
"flatEntityMinimalInformation": {
"name": "searchVector",
"objectMetadataUniversalIdentifier": Any<String>,
"universalIdentifier": Any<String>,
},
"metadataName": "fieldMetadata",
"status": "fail",
"type": "create",
},
{
"errors": [
{