Skip to content

Fix memory author and application bot display names - #35787

Merged
pmbrull merged 8 commits into
mainfrom
pmbrull/bot-display-name-land
Oct 21, 2026
Merged

pmbrull merged 8 commits into
mainfrom
pmbrull/bot-display-name-land

Conversation

@pmbrull

@pmbrull pmbrull commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Describe your changes

Memory cards currently render the raw updatedBy identifier, so application authors appear as names such as MemoryReconciliationApplicationBot even when their bot user has a display name. Read the author label from the existing avatar profile cache, update it when the profile loads, and fall back to the raw identifier when no display name is available.

Also give newly created application Bot entities the application's display name, matching the existing bot User creation path.

Companion: https://github.com/open-metadata/openmetadata-collate/pull/7581 sets the reconciliation app's seed label to Memory Reconciliation Agent.

No linked issue, as requested by the author.

Type of change

  • Bug fix

High-level design

MemoryRow subscribes to the author's cached display-name string in the existing application store. ProfilePicture continues to fetch/cache the profile by username, and the row falls back to updatedBy until that data is available. Bot creation copies App.displayName into the new Bot without changing identifiers or adding another fetch/cache.

The Playwright impact map now owns AppRepository under the application suites and includes the bot profile suite. Existing bots and installed apps are not migrated; existing development databases retain old labels until those records are updated or the app is reinstalled.

Tests

Use cases covered

  • Cached human and bot display names appear in memory rows.
  • Raw author names remain visible before a profile loads and when its display name is missing or empty.
  • The label updates when the avatar profile cache fills.
  • Application bots and their users retain the app display name with and without impersonation.
  • A browser regression creates a memory as a user whose display name differs from their username and checks its rendered author label.

Unit tests

  • Jest: MemoriesView.test.tsx — 23 passed. Three new display-name assertions failed before the UI fix. Whole-component line coverage: 89.02%; the added cache selector executes in the suite.
  • Java: the make java_affected unit command passed 255 tests, 0 failures/errors/skips. It selects AppRepositoryStorageStrippingTest, AppResourceRetryQueueTest, AppSchedulerTest, DistributedJobParticipantTest, McpUsageResourceTest, MigrationUtilTest, OmAppJobListenerTest, and SearchIndexAppTest; the migration name expands to multiple packages. No mock-based bot-creation unit test was added: the regression asserts persisted API responses in AppsResourceIT.
Java unit classes run locally (26 classes)
  • org.openmetadata.service.resources.mcp.McpUsageResourceTest: 15 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.resources.apps.AppResourceRetryQueueTest: 6 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.apps.scheduler.AppSchedulerTest: 24 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.apps.scheduler.OmAppJobListenerTest: 17 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.apps.bundles.searchIndex.SearchIndexAppTest: 12 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.apps.bundles.searchIndex.distributed.DistributedJobParticipantTest: 18 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.jdbi3.AppRepositoryStorageStrippingTest: 3 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1126.MigrationUtilTest: 6 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1129.MigrationUtilTest: 17 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1120.MigrationUtilTest: 5 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1105.MigrationUtilTest: 6 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v159.MigrationUtilTest: 7 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1133.MigrationUtilTest: 8 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v160.MigrationUtilTest: 11 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1104.MigrationUtilTest: 3 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v11210.MigrationUtilTest: 3 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v210.MigrationUtilTest: 4 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v200.MigrationUtilTest: 17 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v206.MigrationUtilTest: 2 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1125.MigrationUtilTest: 10 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1114.MigrationUtilTest: 7 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1112.MigrationUtilTest: 13 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v131.MigrationUtilTest: 4 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1130.MigrationUtilTest: 7 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1131.MigrationUtilTest: 23 tests, 0 failures, 0 errors, 0 skips.
  • org.openmetadata.service.migration.utils.v1100.MigrationUtilTest: 7 tests, 0 failures, 0 errors, 0 skips.

Backend integration tests

AppsResourceIT#test_appBotRole_withoutImpersonation and #test_appBotRole_withImpersonation assert the Bot reference, persisted Bot, and bot User display names. Both CI lanes required by the local impact plan passed on commit afc6f78b0c6842fa269d6334dca6897be7f01423. The later fixture repair changes only the Playwright spec:

Both integration runs above passed on afc6f78b0c6842fa269d6334dca6897be7f01423; the subsequent merge and Playwright fixture repair do not change the Java implementation or integration regressions.

Ingestion integration tests

Not applicable — no ingestion changes.

Playwright (UI) tests

  • Added ContextCenterMemories.spec.ts / row shows the creator display name.

  • The merge-queue run exposed a fixture permission error: the seeded Data Consumer cannot create context memories, so setup returned 403 before the display-name assertion.

  • Commit 80d2f4cfa22 uses the existing isolated-user fixture with admin privileges and checks the authenticated creator's distinct display name. It retains the 201 create assertion, rendered author-label assertion, and fixture cleanup.

  • Local Chromium against this branch's Vite UI and backend revision ed29cf56c524d00c89e82ba6e05eec7e3c169014: 1 passed without retries, followed by 10/10 passed with --repeat-each=10 --workers=4 --retries=0 (2.2 minutes).

  • The other three Memory Row Card Metadata tests passed without retries (3/3, 30.0 seconds); the independent review also reran Jest (23/23 passed).

  • Full Playwright lint passed with 0 errors (198 existing warnings); exact organize-imports → ESLint → Prettier sequence and pre-commit checks passed.

  • yarn tsc:playwright reports 115 existing diagnostics, identical file/line/code signatures when this spec is replaced in the compiler host with its pre-fix version; no added or removed diagnostics.

  • Updated merge-queue validation is pending after this test-only fix.

  • The next merge-queue run exposed an existing Updated By sort test expecting the raw username. Commit 941ff95746a updates that assertion to the author display name, filters to two uniquely scoped fixture memories, and verifies they reverse from recent-update order to username order. The fixture display name sorts in the opposite direction from its username, so sorting by the wrong field fails. Removed one obsolete positional-locator suppression.

  • This failure reproduced locally before the test repair. The corrected Chromium regression passed once without retries. A four-worker repeat attempt hit the existing 60-second beforeAll timeout while polling document processing, before memory fixtures or the assertion ran (10 setup failures). A neighboring run likewise stopped in document setup; the separate creator-display-name regression passed. With a local-only --timeout=180000, 10 selected memory checks passed (2.8 minutes): eight permission-matrix cases, the creator-display-name regression, and the corrected sort regression. The sorting regression then passed 10/10 repetitions with --workers=4 --retries=0 --timeout=180000 (4.9 minutes). Committed timeouts and the 15-second assertion budget remain unchanged.

  • Follow-up 09c9297a802 lowers the guardrail test’s exact positional-locator total from 542 to 541 to match the removed suppression. Reproduced the count mismatch, then ran yarn test:eslint-rules: 191 passed, 0 failed. Generated rule-table check, Prettier, and full Playwright lint also passed.

Formatting and static checks

  • Exact UI organize-imports → ESLint → Prettier sequence passed for changed source and Playwright files.
  • mvn spotless:apply and mvn spotless:check passed; pre-commit checks and the Java impact-map pre-push check passed.
  • Final mvn -B package -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -DskipTests -DskipITs passed, including compilation of the final integration regression fixtures.
  • Full yarn tsc:check fails with 567 diagnostics outside the changed files. Every reported location/code also appears when the two changed UI files are replaced with their origin/main contents in the compiler host. No diagnostics point to either changed UI source/test file. No baseline errors were changed in this PR.

Manual test steps

No separate manual browser session has been completed. To reproduce:

  1. Install an application with a display name and inspect its Bot and bot User via the APIs.
  2. Create a memory as a user/bot whose display name differs from its username, then open Context Center → Memories.
  3. Verify that the row shows the display name after the profile loads; verify the raw-name fallback for a user without a display name.

UI screen recording

Not applicable — standalone display-name bug fix.

Checklist

  • Read the contribution and review guidance.
  • Added regression coverage and listed actual local results above.
  • Fresh review against REVIEW.md on 09c9297a802b79edd6ca3ddd95dd207d5a959f32: no findings. Verified the sort-order reversal, opposing username/display-name order, unique cohort, unchanged neighboring permission conditions, and exact suppression total 541.
  • Schema/migration check: existing fields only; no schema generation or data migration required for the scoped fresh-install fix.
  • Decision check: self-evident bug fix; no new contract, default, limit, or ordering.
  • Updated merge-queue browser validation passes after the fixture repair.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the latest change correctly matches the recorded suppression counts.

Summary

Memory rows show cached author display names and fall back to updatedBy. Newly created application bots inherit the application's display name.

  • Memory rows show cached author display names.
  • New application Bots show their app’s display name.

Reviews (5) · Last reviewed commit: "test: ratchet positional locator count" · Reviewed by Greptile

Use the avatar profile cache so memory rows resolve author labels as profiles load. Give newly created application bots the same display name as their application and bot user.
@pmbrull pmbrull added the skip-pr-checks Bypass PR metadata validation check label Oct 20, 2026
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 20, 2026
@pmbrull
pmbrull enabled auto-merge October 20, 2026 10:10
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 78%
78.81% (125965/159822) 64.88% (43739/67410) 68.11% (25174/36958)

@pmbrull
pmbrull removed this pull request from the merge queue due to a manual request Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-10-20T15:56:46Z)

No required check failed — the entry may have timed out, or been dequeued while a required check was still pending.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 963 → 963
- 0 added, 0 removed, 1 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/isolatedUser.ts

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@pmbrull
pmbrull enabled auto-merge October 20, 2026 15:57
@pmbrull
pmbrull added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-20T20:33:56Z)

Blocked the queue: playwright-summary

Failed Playwright tests:

  • Features/ContextCenterPermission.spec.ts › selecting "Updated By" actually reorders rows by updatedBy

@pmbrull
pmbrull enabled auto-merge October 21, 2026 04:22
@gitar-bot

gitar-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Using cached display names in memory rows and assigning app names to Bots could misattribute authors if profile labels are stale or incorrect.

Memory cards now show author display names from the cached profile, falling back to the raw updatedBy identifier, and new application Bots inherit the app's display name. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

@pmbrull
pmbrull added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-21T05:49:52Z)

Blocked the queue: playwright-summary

@pmbrull
pmbrull added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit d3db7d4 Oct 21, 2026
97 of 98 checks passed
@pmbrull
pmbrull deleted the pmbrull/bot-display-name-land branch October 21, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants