Skip to content

Fixes #37422: Correct persona context rules and access - #37423

Merged
pmbrull merged 11 commits into
mainfrom
fix/persona-context-feedback
Nov 10, 2026
Merged

pmbrull merged 11 commits into
mainfrom
fix/persona-context-feedback

Conversation

@pmbrull

@pmbrull pmbrull commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Describe your changes

Fixes #37422

Keep search rules independent from preloaded context, enforce current caller permissions when rendering member context, and expose rule state and effective persona membership in Context Center. Companion Collate PR: https://github.com/open-metadata/openmetadata-collate/pull/8426.

Type of change

  • Bug fix

High-level design

  • REST and MCP share the same materialization boundary. Bounded, single-flight source caches reuse search pages, enrichment, explicit knowledge and data-product pages. Every member read rechecks permissions and filters a copy; authorization decisions and rendered member documents are never shared.
  • Apply visibility before the asset limit, with a hard budget of 1,000 candidates per preloaded rule shared by root search results and all expanded data-product members. Stop at the budget regardless of catalog size. Keep visible partial results with unknown matched and truncated: true; exact exhaustion preserves the visible count. Engine totals do not terminate pagination. Materialization version 4 rebuilds older cached documents.
  • Filter attached knowledge, related assets, field glossary definitions and typed lineage references as well as selected roots. Profile and quality sections require their corresponding permissions.
  • Preserve lightweight expansion of data-product members: expanding a product does not trigger a full lineage/quality build for each member. Direct asset rules retain requested enrichment.
  • Enabled search rules alone supply search defaults; preload rules contribute documents independently. Validate changed/activated filters before saving. Match generic PUT rules by existing ID first, then canonical rule name, so unrelated edits without IDs do not revalidate unchanged filters.
  • Log and skip invalid saved search scopes in context generation and active-persona MCP searches. Keep healthy scopes and preloads; if none remain, use normal unscoped search. New or changed filters still validate on save.
  • Compute read-only userCount from distinct active users across direct assignments, defaults and team inheritance. Exclude implicit bots; retain explicit bot assignments/defaults. Direct users relationships are unchanged. No migration is required.
  • Add inline validation, per-rule toggles and disabled state. Preserve opaque saved DSL on unrelated edits. Restore Explore's shared no-text behavior; persona links alone add an explicit entity-type quick filter.

Decision record: independent access, preloading and search.

Tests

Use cases covered

Independent search A/preload B; caller access after admin cache warmup; source reuse with fresh authorization and invalidation; denied pages before visible matches, including capped totals; truthful partial-selection counts; lightweight product expansion; unchanged PUT without rule IDs; malformed/invalid filters and disabled-rule recovery; effective-user deduplication and implicit bots; persona-specific Explore type filters.

Unit tests

  • 249 focused Java unit tests pass: AIContextBuilderTest (51), PersonaContextBuilderTest (43), PersonaContextCacheTest (6), PersonaContextSourceCacheTest (5), PersonaContextVisibilityTest (6), PersonaContextMarkdownTest (12), PersonaContextRuleValidationTest (5), PersonaRepositoryTest (11), GetPersonaContextToolTest (8), PersonaSearchScopeTest (8), SearchMetadataToolTest (57), SemanticSearchToolTest (37).
  • 90 UI tests pass across ContextRuleEditor, RuleQueryBuilderField, ContextRuleCard, ContextCenterAIContextPage, ExplorePageV1 and PersonaAIContextUtils. The 19 editor tests also passed in an independent randomized-order run.
  • Regression cases for invalid saved search scopes, unchanged-filter saves, capped search totals and product-member enrichment fail before their fixes and pass afterward.
  • ESLint, import organization, Prettier, Spotless, decision-record and Java ownership checks pass; existing lint warnings remain. Full tsc:check reports only the unchanged missing isLoading prop in CustomPropertiesDetailPage.tsx:135.
  • Coverage percentage was not measured.

Backend integration tests

Earlier verification at c1ccb37ad090b539e553c275e6bd463d908e7d0e: nine focused PersonaAIContextIT live API regressions on PostgreSQL + OpenSearch. Eight passed in the initial run; the invalid-scope fixture passed in a targeted rerun after assigning its caller to the persona. Zero tests were skipped. The fixture correction changed no production code. Cases: independent search/preload, inherited-user deduplication, invalid/missing bodies, denied member REST/MCP after admin cache warmup, member/bot/admin/refresh authorization, generic PUT create/update/rejection, bounded metric-asset loading, invalid legacy scopes through REST/MCP and real scoped search, and default MCP scope application with explicit bypass.

The committed openmetadata-service/src/test/resources/persona-context/verify-user-count.mjs executes the production SQL against isolated fixtures. PostgreSQL and MySQL both pass duplicate direct/team/default membership, multiple teams, deleted users/teams and implicit-bot checks.

Current focused Maven package succeeds with 249 unit tests. The scan-budget follow-up uses direct builder/markdown regressions for bounded search and permission calls; the earlier live API cases were not rerun. Full affected Java coverage remains pending.

Ingestion integration tests

Not applicable: no ingestion changes.

Playwright and manual verification

Two current PersonaAIContext.spec.ts browser regressions pass without retries: explicit entity-type link generation and changing the selected type from Table to GlossaryTerm. They run the current frontend through Vite on localhost:8787 against the existing localhost:8785 review backend; the spec mocks rule preview. These checks verify frontend controls/links, not live search-result filtering.

Earlier combined Docker evidence: 14 Playwright regressions passed for persona table/pagination, read-only/admin permissions, rule CRUD, filter validation, duplicate names, asset limits and toggles. The recording below verifies 3 unique inherited users vs 2 direct assignments, disabled-rule persistence without replacing opaque DSL, name validation, independent preload B/search A, Explore type and home drawer persona choice. Its exact older source revisions are recorded below.

The affected-spec planners were run. Broader affected coverage remains pending, including the planner's full-suite fallback for unmapped paths. This is focused verification, not a merge-readiness claim.

Self-review: independent review of df7efc53f8199bce77270be746b2c40c3ec2de04 against REVIEW.md has no unanswered red findings. The review's capped-total pagination finding was reproduced and fixed; the product-member enrichment comment is covered by a failing-before/passing-after regression. The invalid-scope follow-up removes the upgrade guide and shares validated scope compilation with both MCP search tools. The scan-budget regressions failed before the fix and cover 0/50 visible assets, exact exhaustion at the limit, shared budgets across multiple data products and source-cache page limits.

Known follow-up: View in Explore can drop conditions from API-created filters whose fields the visual builder cannot represent. This PR preserves those filters on unrelated edits and disabling, and shows a warning; preserving them through Explore needs a separate change. UI-created domain filters are covered by the earlier walkthrough.

UI screen recording

persona-context-review.webm

Recorded build: Collate 362de1ba726e3a742f313ba45261560a29b53d1a + OpenMetadata b98a75e3850432d8f4aadf3530d717e713cd831b. Verified WebM, 1920×1080, 30.44 seconds; inspected beginning/middle/end frames. All eight walkthrough assertions passed against real responses.

Startup: isolated persona-context-12 Compose stack on localhost:8785, with separate MySQL/OpenSearch volumes and network. GET :8786/healthcheck passes and /api/v1/system/version reports the recorded Collate revision. Repository sample data was loaded with the ingestion CLI, then synthetic PersonaContextReview, Domain A/B tables and overlapping direct/team/default membership were created through the API. Three sample data-quality acknowledgement transitions failed; they do not affect the verified persona fixtures. The server, database, search and AI platform are left running and healthy.

Checklist

  • Focused unit and API regressions added for changed behavior.
  • Independent review completed and red findings fixed.
  • Durable semantics documented.
  • Schema migration assessed: userCount is computed on read.
  • Full affected coverage completed for merge readiness.

Members could receive a cached document containing assets they could not view. Render member context with caller permissions and isolate preload rules from search defaults.

Validate filters, expose rule toggles, and count inherited users once.
PUT requests receive a temporary UUID before resolving the stored persona. Compare existing rules by persona name so both create and update can validate filtered rules.
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 8 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 8 warning(s) across 3 changed file(s).

Count Rule
6 react-hooks/exhaustive-deps
1 openmetadata-ui-patterns/deprecated-om-tokens
1 openmetadata-imports/no-lower-layer-page-imports
All findings
Location Rule Message
🟡 src/components/ContextCenter/PersonaAIContext/ContextRuleEditor/ContextRuleEditor.component.tsx:294:27 react-hooks/exhaustive-deps The ref value 'previewRequestRef.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:231:7 react-hooks/exhaustive-deps React Hook useCallback has missing dependencies: 'navigate' and 'tabsInfo'. Either include them or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:244:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:270:5 react-hooks/exhaustive-deps React Hook useCallback has a missing dependency: 'navigate'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:308:6 react-hooks/exhaustive-deps React Hook useMemo has a missing dependency: 'tabsInfo'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:642:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'performFetch'. Either include it or remove the dependency array.
🟡 src/pages/ExplorePage/ExplorePageV1.component.tsx:772:3 openmetadata-ui-patterns/deprecated-om-tokens Legacy token "--om-page-height" is deprecated. Use tw: utilities or --tw-* theme variables. Migrate existing references when editing them; do not add new refere
🟡 src/utils/PersonaAIContextUtils.ts:35:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@pmbrull
pmbrull marked this pull request as ready for review November 9, 2026 17:38
@pmbrull
pmbrull requested review from a team as code owners November 9, 2026 17:38
@pmbrull
pmbrull requested review from anuj-kumary and sonika-shah and a balanced review from Copilot November 9, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@pmbrull pmbrull added the 2.1 label Nov 9, 2026
Copilot AI balanced review requested due to automatic review settings November 9, 2026 17:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:36
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@pmbrull

pmbrull commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

Focused verification for source 5d65e74775f658cf18a5162affd01c815b336443 (not full affected coverage).

Java package command:

mvn -B -pl openmetadata-integration-tests,openmetadata-mcp -am package -Ppostgres-opensearch -DsearchType=opensearch '-Dtest=AIContextBuilderTest,PersonaContextBuilderTest,PersonaContextCacheTest,PersonaContextSourceCacheTest,PersonaContextVisibilityTest,PersonaContextMarkdownTest,PersonaContextRuleValidationTest,PersonaRepositoryTest,GetPersonaContextToolTest,PersonaAIContextIT#preloadedRulesLeaveAnIndependentSearchRuleUnchanged+userCountIncludesTeamMembersOnceWithoutChangingDirectAssignments+rejectsMissingBodiesAndInvalidFiltersBeforePersistingEitherMode+cachedAdminContextCannotExposeDeniedAssetsThroughRestOrMcp+enforcesMemberInheritedBotAdminAndRefreshAuthorization+genericPutCreatesAndUpdatesFilteredRulesBeforeRejectingInvalidChanges+metricKnowledgeRuleRendersAssetsFromTheBoundedRelationshipRepository' -Dsurefire.failIfNoSpecifiedTests=false -Djunit.jupiter.execution.parallel.enabled=false -Dmaven.javadoc.skip=true -DskipITs=true

138 unit tests and 7 live PostgreSQL/OpenSearch API tests pass, with zero failures/errors/skips. Unit counts:

Class Tests
AIContextBuilderTest 51
PersonaContextBuilderTest 35
PersonaContextCacheTest 6
PersonaContextSourceCacheTest 4
PersonaContextVisibilityTest 6
PersonaContextMarkdownTest 12
PersonaContextRuleValidationTest 5
PersonaRepositoryTest 11
GetPersonaContextToolTest 8

The capped-total pagination regression failed before the guard was removed. The product-member enrichment regression failed before the parent-rule guard was restored; its direct-asset case verifies enrichment remains available.

UI command, from openmetadata-ui/src/main/resources/ui (unchanged frontend inputs since the final Java-only fix):

yarn test src/utils/PersonaAIContextUtils.test.ts src/pages/ContextCenterPage/ContextCenterAIContextPage/ContextCenterAIContextPage.test.tsx src/components/ContextCenter/PersonaAIContext/ContextRuleEditor/ContextRuleEditor.test.tsx src/components/ContextCenter/PersonaAIContext/ContextRuleEditor/RuleQueryBuilderField.test.tsx src/components/ContextCenter/PersonaAIContext/ContextRuleCard/ContextRuleCard.test.tsx src/pages/ExplorePage/ExplorePageV1.test.tsx --runInBand --silent

90 tests in 6 suites pass. The independent randomized editor run also passed all 19 editor tests. Full tsc:check reports only the existing missing isLoading prop at CustomPropertiesDetailPage.tsx:135.

Browser setup authenticated the users successfully; the two current persona-link regressions then passed without retries:

PLAYWRIGHT_TEST_BASE_URL=http://localhost:8787 PW_PRESEEDED_STATE=true yarn playwright test --project=setup --workers=1 --reporter=list --retries=0
PLAYWRIGHT_TEST_BASE_URL=http://localhost:8787 PW_PRESEEDED_STATE=true PW_TRACE=retain-on-failure yarn playwright test playwright/e2e/Features/PersonaAIContext.spec.ts --project=chromium --no-deps --workers=1 --reporter=list --retries=0 --grep='links View in Explore with an explicit entity-type filter|View in Explore link href reflects the selected entity type'

The browser run used Node 22.23.4, the latest frontend through temporary Vite :8787, and the existing review backend :8785. The spec mocks preview; these cases prove the link/filter controls, not live search-result filtering. The temporary Vite server has been stopped.

The committed count fixture ran the production SQL successfully on PostgreSQL and MySQL:

PERSONA_TEST_DATABASE_CONTAINER=om37283_postgresql node openmetadata-service/src/test/resources/persona-context/verify-user-count.mjs
PERSONA_TEST_DATABASE=mysql PERSONA_TEST_DATABASE_CONTAINER=persona-context-12-mysql-1 node openmetadata-service/src/test/resources/persona-context/verify-user-count.mjs

ESLint/import organization/Prettier, Spotless, decision records, pre-commit checks and the Java ownership check pass, with existing lint warnings. The build emits the pre-existing nonfatal Neo4j javaEnum generation message; packaging and the listed tests still succeed. Coverage percentage was not measured. Full affected Java/Playwright coverage remains pending; no merge-readiness claim.

Independent review of source 5d65e747 and companion pin 9862b253 has no unanswered red findings.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
81.81% (142411/174071) 69.32% (52237/75352) 72.3% (29226/40421)

Copilot AI balanced review requested due to automatic review settings November 10, 2026 06:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Comment on lines +321 to +335
private boolean isValidScopedRule(ContextRule rule) {
try {
Runnable validate = () -> PersonaContextRuleValidation.validate(rule, searchRepository);
if (sourceCache == null) {
validate.run();
} else {
sourceCache.validate(sourceScope, rule, validate);
}
} catch (BadRequestException exception) {
LOG.warn(
"Skipping invalid saved search rule '{}' for persona '{}': {}",
rule.getName(),
persona.getFullyQualifiedName(),
exception.getMessage());
return false;

@gitar-bot gitar-bot Bot Nov 10, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Performance: Invalid saved scopes re-validated against search on every MCP search

PersonaSearchScope.resolve now calls PersonaContextCache.getSearchScope → buildSearchScope → isValidScopedRule on every MCP search_metadata call. PersonaContextSourceCache.validate only caches successes: the Caffeine validations.get(...) loader throws BadRequestException for an invalid filter, and Caffeine does not store a value when the loader throws. So for a persona that keeps a broken legacy rule, each search sends another validate request to the search engine and logs another WARN line. The source cache has a 60s window to stop this, but it never applies to invalid rules, and AGENTS.md says negative results count toward a cache too. Fix: cache the outcome as a boolean, so validate returns false for invalid rules instead of throwing.

Cache invalid outcomes too (PersonaContextSourceCache), and use the boolean in isValidScopedRule:

boolean isValid(Scope scope, ContextRule rule, BooleanSupplier validate) {
  return validations.get(new RuleKey(scope, rule.getName()), ignored -> validate.getAsBoolean());
}
// PersonaContextBuilder.isValidScopedRule: wrap validate in a BooleanSupplier that
// catches BadRequestException, logs once, and returns false; pass it to sourceCache.isValid.

Was this helpful? React with 👍 / 👎

Copilot AI balanced review requested due to automatic review settings November 10, 2026 06:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@pmbrull

pmbrull commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Follow-up verification for c1ccb37ad090b539e553c275e6bd463d908e7d0e.

Removed docs/persona-context-upgrade.md. Invalid saved search rules now log a warning and are omitted from the returned defaults; working scopes and preloaded context remain available. All-invalid scopes use the existing unscoped search behavior. Active-persona MCP searches share the validated scopes and successful-validation source cache without building preloaded documents. Save-time validation remains strict.

The three new context cases reproduced HTTP 503 before the fix. The final regressions cover invalid JSON/object shape and engine-invalid DSL, preservation of healthy scopes/preloads, all-invalid fallback, and live REST/MCP context plus actual scoped search results. Search/context outages and existing MCP fallback remain covered/documented separately.

242 focused unit tests pass on the unchanged production code at 9547df1a. Eight of the nine live PostgreSQL/OpenSearch API cases passed in that run. The new legacy-search case used an admin who was not assigned to the test persona, correctly triggering the existing default-persona fallback; commit c1ccb37a fixes only that fixture by assigning a new user and using its token. The corrected case passes in the targeted rerun. No tests were skipped.

Unit class Tests
AIContextBuilderTest 51
PersonaContextBuilderTest 37
PersonaContextCacheTest 6
PersonaContextSourceCacheTest 4
PersonaContextVisibilityTest 6
PersonaContextMarkdownTest 12
PersonaContextRuleValidationTest 5
PersonaRepositoryTest 11
GetPersonaContextToolTest 8
PersonaSearchScopeTest 8
SearchMetadataToolTest 57
SemanticSearchToolTest 37

PersonaAIContextIT: invalid saved scopes through REST/MCP/search; default MCP scopes and bypass; independent preload/search; inherited count; missing/invalid request bodies; denied member REST/MCP after admin warmup; member/bot/admin/refresh authorization; generic PUT create/update/rejection; bounded metric-asset loading.

mvn -B -pl openmetadata-integration-tests,openmetadata-mcp -am package -Ppostgres-opensearch -DsearchType=opensearch '-Dtest=AIContextBuilderTest,PersonaContextBuilderTest,PersonaContextCacheTest,PersonaContextSourceCacheTest,PersonaContextVisibilityTest,PersonaContextMarkdownTest,PersonaContextRuleValidationTest,PersonaRepositoryTest,GetPersonaContextToolTest,PersonaSearchScopeTest,SearchMetadataToolTest,SemanticSearchToolTest,PersonaAIContextIT#invalidSavedSearchScopesAreSkippedWhileContextRemainsAvailable+mcpSearchAppliesPersonaScopeByDefaultAndCanExplicitlyBypassIt+preloadedRulesLeaveAnIndependentSearchRuleUnchanged+userCountIncludesTeamMembersOnceWithoutChangingDirectAssignments+rejectsMissingBodiesAndInvalidFiltersBeforePersistingEitherMode+cachedAdminContextCannotExposeDeniedAssetsThroughRestOrMcp+enforcesMemberInheritedBotAdminAndRefreshAuthorization+genericPutCreatesAndUpdatesFilteredRulesBeforeRejectingInvalidChanges+metricKnowledgeRuleRendersAssetsFromTheBoundedRelationshipRepository' -Dsurefire.failIfNoSpecifiedTests=false -Djunit.jupiter.execution.parallel.enabled=false -Dmaven.javadoc.skip=true -DskipITs=true

Spotless, pre-commit decision-record checks, Java ownership and diff checks pass. Independent review of source c1ccb37a and companion pin 32ff3a21 has no unanswered red findings; its MCP caller gap was fixed before publication.

The prior 90 upstream UI tests, 49 Collate UI tests, two browser link checks and PostgreSQL/MySQL count fixtures are reused because their inputs are unchanged. The recording remains labeled with its earlier source revisions. Full affected coverage and coverage percentage were not measured; the existing unrelated TypeScript error remains documented. This is focused PR verification.

Targeted verification after the test-only correction:

mvn -B -pl openmetadata-integration-tests,openmetadata-mcp -am package -Ppostgres-opensearch -DsearchType=opensearch -Dtest=PersonaAIContextIT#invalidSavedSearchScopesAreSkippedWhileContextRemainsAvailable -Dsurefire.failIfNoSpecifiedTests=false -Djunit.jupiter.execution.parallel.enabled=false -Dmaven.javadoc.skip=true -DskipITs=true

Copilot AI balanced review requested due to automatic review settings November 10, 2026 09:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gitar-bot

gitar-bot Bot commented Nov 10, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 2 closed / 3 findings

🔴 High risk · Per-caller permission checks now filter persona assets and related context; an authorization gap could expose metadata or observability details to members.

Persona context rule validation, source caching, access enforcement, and Explore filter handling are reworked across REST and MCP, resolving the unchanged-filter revalidation and data-product member enrichment issues.

  • Open suggestion: invalid saved search scopes are re-validated against search on every MCP search_metadata call in PersonaContextSourceCache.validate, because failed validations are never cached. Caching the negative result as a boolean would stop the repeated search requests and WARN logs in PersonaContextBuilder.java, PersonaContextCache.java, and PersonaSearchScope.java.
💡 Performance: Invalid saved scopes re-validated against search on every MCP search

📄 openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextBuilder.java:321-335 📄 openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextCache.java:124-126 📄 openmetadata-mcp/src/main/java/org/openmetadata/mcp/tools/PersonaSearchScope.java:43

PersonaSearchScope.resolve now calls PersonaContextCache.getSearchScope → buildSearchScope → isValidScopedRule on every MCP search_metadata call. PersonaContextSourceCache.validate only caches successes: the Caffeine validations.get(...) loader throws BadRequestException for an invalid filter, and Caffeine does not store a value when the loader throws. So for a persona that keeps a broken legacy rule, each search sends another validate request to the search engine and logs another WARN line. The source cache has a 60s window to stop this, but it never applies to invalid rules, and AGENTS.md says negative results count toward a cache too. Fix: cache the outcome as a boolean, so validate returns false for invalid rules instead of throwing.

Cache invalid outcomes too (PersonaContextSourceCache), and use the boolean in isValidScopedRule
boolean isValid(Scope scope, ContextRule rule, BooleanSupplier validate) {
  return validations.get(new RuleKey(scope, rule.getName()), ignored -> validate.getAsBoolean());
}
// PersonaContextBuilder.isValidScopedRule: wrap validate in a BooleanSupplier that
// catches BadRequestException, logs once, and returns false; pass it to sourceCache.isValid.
✅ 2 closed
✅ Edge Case: Editor re-validates unchanged filters on every enabled-rule save

📄 openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/PersonaAIContext/ContextRuleEditor/ContextRuleEditor.component.tsx:308-322 📄 docs/decisions/2026-11-09-persona-context-keeps-access-preloading-and-search-independent.md:30-33
validateFilter only skips the preview call when the rule is being disabled and its filter is unchanged (data.enabled !== false || !unchangedFilter). For any other save of an enabled rule (a description, section or maxAssets edit), the editor still calls previewPersonaAIContextRule. That call runs engine-side _validate plus a full preview search, and it happens even when queryFilter is empty.

The new ADR says "Unchanged filters are not revalidated when disabling a rule or changing unrelated settings", and PersonaRepository.requiresRuleValidation follows that. The UI does not. If search returns 503, or a legacy stored filter is invalid, an admin cannot save an unrelated edit from the drawer, even though the backend would accept it.

Fix: skip the preview whenever the filter and entity type are unchanged and the rule is not being re-enabled, and also skip it when the filter is empty.

✅ Performance: Data product members now each trigger a full AIContextBuilder build

📄 openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextBuilder.java:209-223 📄 openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextBuilder.java:285-296 📄 openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextBuilder.java:632 📄 openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextBuilder.java:646-660
Members of a data product are only expanded when the rule is fullyRendered (PersonaContextBuilder.java:285-286). For those rules, selectedSections(rule) returns ASSET_CONTEXT_SECTIONS, which includes LINEAGE and DATA_QUALITY. enrichSelection passes every selected entity, members included, to enrichSelected(rule.rule(), entity) together with the data product's own rule. The guard at lines 652-654 only skips the data product itself and knowledge types, not its table or dashboard members. Each member therefore gets its own new AIContextBuilder(...).build(), which runs a lineage fetch, a DQ resolution and a knowledge load. The old code avoided this on purpose with buildAssetSelection(memberRule, document, false).

With the default maxAssets of 200, one build now runs about 200 full asset-context builds. The source cache doesn't absorb this for member reads, because SelectionKey contains the caller's visible selection. Different users therefore miss the cache, and every refresh or invalidation also misses it.

Fix: enrich expanded members with the member rule's sections, or skip heavy sections for them as before. One way is to mark members on SelectedEntity, or to keep their origin rule, and check that in enrichSelected.

🤖 Prompt for agents
Code Review: Persona context rule validation, source caching, access enforcement, and Explore filter handling are reworked across REST and MCP, resolving the unchanged-filter revalidation and data-product member enrichment issues.
  
  - Open suggestion: invalid saved search scopes are re-validated against search on every MCP `search_metadata` call in `PersonaContextSourceCache.validate`, because failed validations are never cached. Caching the negative result as a boolean would stop the repeated search requests and WARN logs in `PersonaContextBuilder.java`, `PersonaContextCache.java`, and `PersonaSearchScope.java`.

1. 💡 Performance: Invalid saved scopes re-validated against search on every MCP search
   Files: openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextBuilder.java:321-335, openmetadata-service/src/main/java/org/openmetadata/service/aicontext/PersonaContextCache.java:124-126, openmetadata-mcp/src/main/java/org/openmetadata/mcp/tools/PersonaSearchScope.java:43

   `PersonaSearchScope.resolve` now calls `PersonaContextCache.getSearchScope` → `buildSearchScope` → `isValidScopedRule` on every MCP `search_metadata` call. `PersonaContextSourceCache.validate` only caches successes: the Caffeine `validations.get(...)` loader throws `BadRequestException` for an invalid filter, and Caffeine does not store a value when the loader throws. So for a persona that keeps a broken legacy rule, each search sends another validate request to the search engine and logs another WARN line. The source cache has a 60s window to stop this, but it never applies to invalid rules, and AGENTS.md says negative results count toward a cache too. Fix: cache the outcome as a boolean, so `validate` returns false for invalid rules instead of throwing.

   Fix (Cache invalid outcomes too (PersonaContextSourceCache), and use the boolean in isValidScopedRule):
   boolean isValid(Scope scope, ContextRule rule, BooleanSupplier validate) {
     return validations.get(new RuleKey(scope, rule.getName()), ignored -> validate.getAsBoolean());
   }
   // PersonaContextBuilder.isValidScopedRule: wrap validate in a BooleanSupplier that
   // catches BadRequestException, logs once, and returns false; pass it to sourceCache.isValid.

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

@pmbrull

pmbrull commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

Scan-budget verification for df7efc53f8199bce77270be746b2c40c3ec2de04.

Each preloaded rule shares a 1,000-candidate budget across root search and data-product expansion. Partial scans keep visible results with unknown matched count and truncated=true. Exact exhaustion retains the exact visible count. Product source-cache keys include the requested page limit, and materialization version4 rebuilds older documents.

The first four scan-budget regression cases failed before the fix: root searches requested a page past candidate1,000, and product reads requested more than the remaining shared budget. Final coverage adds exact-boundary exhaustion and cache-limit separation.

249 focused unit tests pass with zero failures/errors/skips; package BUILD SUCCESS.

Class Tests
AIContextBuilderTest 51
PersonaContextBuilderTest 43
PersonaContextCacheTest 6
PersonaContextSourceCacheTest 5
PersonaContextVisibilityTest 6
PersonaContextMarkdownTest 12
PersonaContextRuleValidationTest 5
PersonaRepositoryTest 11
GetPersonaContextToolTest 8
PersonaSearchScopeTest 8
SearchMetadataToolTest 57
SemanticSearchToolTest 37
mvn -B -pl openmetadata-mcp -am package -DsearchType=opensearch '-Dtest=AIContextBuilderTest,PersonaContextBuilderTest,PersonaContextCacheTest,PersonaContextSourceCacheTest,PersonaContextVisibilityTest,PersonaContextMarkdownTest,PersonaContextRuleValidationTest,PersonaRepositoryTest,GetPersonaContextToolTest,PersonaSearchScopeTest,SearchMetadataToolTest,SemanticSearchToolTest' -Dsurefire.failIfNoSpecifiedTests=false -Djunit.jupiter.execution.parallel.enabled=false -Dmaven.javadoc.skip=true -DskipITs=true

Spotless, decision-record/pre-commit checks, Java ownership and diff checks pass. Independent review of source df7efc53 and companion pin 6719d153 has no new red findings.

No new API/UI/schema shape is introduced. The earlier nine API cases, UI/browser checks and SQL fixtures remain recorded at their tested revisions; they were not rerun for this bounded-scan follow-up. Full affected coverage and a production latency benchmark were not run; no speedup or merge-readiness claim.

@sonarqubecloud

Copy link
Copy Markdown

@pmbrull
pmbrull merged commit 320f44b into main Nov 10, 2026
75 of 78 checks passed
@pmbrull
pmbrull deleted the fix/persona-context-feedback branch November 10, 2026 10:07
anuj-kumary added a commit that referenced this pull request Nov 11, 2026
* Fixes #36030: Ontology bulk authoring jobs panel hides active jobs beyond the 20 most recent (#36043)

* Fixes #36030: Ontology bulk authoring jobs panel hides active jobs beyond the 20 most recent

* Fixes #36030 review: clear pending flag when job appears; rework background-submission test

* Address review: bind glossaryId as UUID, keep job list limit at 20, drop pending-submission polling

- OntologyBulkResource binds glossaryId as UUID so malformed or upper-case ids are
  rejected/normalised instead of silently returning an empty list; SDK overload takes UUID.
- The server-side glossary filter fixes #36030 on its own, so the client limit stays at 20.
- Remove noteBackgroundSubmission: schedule() inserts with autocommit and reads back the
  row before responding, so the post-submit refresh always sees the new job.

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: Anujkumar Yadav <[email protected]>

* chore(deps): bump the npm-minor-patch group in /openmetadata-ui/src/main/resources/ui with 18 updates (#37399)

* chore(deps): bump the npm-minor-patch group

Bumps the npm-minor-patch group in /openmetadata-ui/src/main/resources/ui with 22 updates:

| Package | From | To |
| --- | --- | --- |
| [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.106.0` | `5.106.1` |
| [@tiptap/extension-link](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-link) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-placeholder](https://github.com/ueberdosis/tiptap/tree/HEAD/packages-deprecated/extension-placeholder) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-table](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-table) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-table-cell](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-table-cell) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-table-header](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-table-header) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-table-row](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-table-row) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-task-item](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-task-item) | `3.32.2` | `3.33.0` |
| [@tiptap/extension-task-list](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-task-list) | `3.32.2` | `3.33.0` |
| [@tiptap/pm](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/pm) | `3.32.2` | `3.33.0` |
| [@tiptap/react](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/react) | `3.32.2` | `3.33.0` |
| [@tiptap/starter-kit](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/starter-kit) | `3.32.2` | `3.33.0` |
| [@tiptap/suggestion](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/suggestion) | `3.32.2` | `3.33.0` |
| [antlr4](https://github.com/antlr/antlr4) | `4.9.2` | `4.13.2` |
| [@types/antlr4](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/antlr4) | `4.7.2` | `4.12.0` |
| [turndown](https://github.com/mixmark-io/turndown) | `7.2.4` | `7.2.5` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.57.0` | `1.65.0` |
| [@swc/core](https://github.com/swc-project/swc/tree/HEAD/packages/core) | `1.16.21` | `1.16.22` |
| [@tailwindcss/node](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-node) | `4.3.3` | `4.3.4` |
| [eslint-plugin-playwright](https://github.com/mskelton/eslint-plugin-playwright) | `2.12.1` | `2.12.2` |
| [less](https://github.com/less/less.js) | `4.1.3` | `4.9.1` |
| [rollup-plugin-visualizer](https://github.com/btd/rollup-plugin-visualizer) | `7.1.1` | `7.1.2` |


Updates `@tanstack/react-query` from 5.106.0 to 5.106.1
- [Release notes](https://github.com/TanStack/query/releases)
- [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md)
- [Commits](https://github.com/TanStack/query/commits/@tanstack/[email protected]/packages/react-query)

Updates `@tiptap/extension-link` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages/extension-link/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-link)

Updates `@tiptap/extension-placeholder` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages-deprecated/extension-placeholder/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages-deprecated/extension-placeholder)

Updates `@tiptap/extension-table` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages/extension-table/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-table)

Updates `@tiptap/extension-table-cell` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-table-cell)

Updates `@tiptap/extension-table-header` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-table-header)

Updates `@tiptap/extension-table-row` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-table-row)

Updates `@tiptap/extension-task-item` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-task-item)

Updates `@tiptap/extension-task-list` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/extension-task-list)

Updates `@tiptap/pm` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages/pm/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/pm)

Updates `@tiptap/react` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages/react/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/react)

Updates `@tiptap/starter-kit` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages/starter-kit/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/starter-kit)

Updates `@tiptap/suggestion` from 3.32.2 to 3.33.0
- [Release notes](https://github.com/ueberdosis/tiptap/releases)
- [Changelog](https://github.com/ueberdosis/tiptap/blob/v3.33.0/packages/suggestion/CHANGELOG.md)
- [Commits](https://github.com/ueberdosis/tiptap/commits/v3.33.0/packages/suggestion)

Updates `antlr4` from 4.9.2 to 4.13.2
- [Release notes](https://github.com/antlr/antlr4/releases)
- [Changelog](https://github.com/antlr/antlr4/blob/dev/CHANGES.txt)
- [Commits](https://github.com/antlr/antlr4/compare/4.9.2...4.13.2)

Updates `@types/antlr4` from 4.7.2 to 4.12.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/antlr4)

Updates `turndown` from 7.2.4 to 7.2.5
- [Release notes](https://github.com/mixmark-io/turndown/releases)
- [Commits](https://github.com/mixmark-io/turndown/compare/v7.2.4...v7.2.5)

Updates `@playwright/test` from 1.57.0 to 1.65.0
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.57.0...v1.65.0)

Updates `@swc/core` from 1.16.21 to 1.16.22
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/commits/v1.16.22/packages/core)

Updates `@tailwindcss/node` from 4.3.3 to 4.3.4
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.3.4/packages/@tailwindcss-node)

Updates `@types/antlr4` from 4.7.2 to 4.12.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/antlr4)

Updates `eslint-plugin-playwright` from 2.12.1 to 2.12.2
- [Release notes](https://github.com/mskelton/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/mskelton/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mskelton/eslint-plugin-playwright/compare/v2.12.1...v2.12.2)

Updates `less` from 4.1.3 to 4.9.1
- [Release notes](https://github.com/less/less.js/releases)
- [Changelog](https://github.com/less/less.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/less/less.js/compare/v4.1.3...v4.9.1)

Updates `rollup-plugin-visualizer` from 7.1.1 to 7.1.2
- [Changelog](https://github.com/btd/rollup-plugin-visualizer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/btd/rollup-plugin-visualizer/compare/v7.1.1...v7.1.2)

---
updated-dependencies:
- dependency-name: "@tanstack/react-query"
  dependency-version: 5.106.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-link"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-placeholder"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-table"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-table-cell"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-table-header"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-table-row"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-task-item"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/extension-task-list"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/pm"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/react"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/starter-kit"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@tiptap/suggestion"
  dependency-version: 3.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: antlr4
  dependency-version: 4.13.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@types/antlr4"
  dependency-version: 4.12.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: turndown
  dependency-version: 7.2.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: "@playwright/test"
  dependency-version: 1.65.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: "@swc/core"
  dependency-version: 1.16.22
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: "@tailwindcss/node"
  dependency-version: 4.3.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: "@types/antlr4"
  dependency-version: 4.12.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: eslint-plugin-playwright
  dependency-version: 2.12.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
- dependency-name: less
  dependency-version: 4.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-minor-patch
- dependency-name: rollup-plugin-visualizer
  dependency-version: 7.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-minor-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore(deps): drop antlr4, less and @playwright/test from the npm group

antlr4 4.13 removes the antlr4/src/antlr4/tree deep import Fqn.ts and
EntityLink.ts use, and cannot run parsers from the pinned 4.9.2 CLI.
less 4.9 fails on rgb(from var(...)) under math: always. Playwright 1.65
does not match the v1.57.0-jammy image the CI browser jobs run in.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anujkumar Yadav <[email protected]>

* Fixes #37302: exclude whole-phase wrapper ops from watchdog hang detection (#37318)

* fix(ingestion): exclude whole-phase wrapper ops from watchdog hang detection

* fix(ingestion): preserve per-record watchdog hang detection

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
Co-authored-by: Pablo Takara <[email protected]>
Co-authored-by: IceS2 <[email protected]>

* Fixes 7370: Compile Oracle table-diff sampling with supported SQL (#37074)

* Fix Oracle table-diff sampling SQL compilation

* tests: defer application imports in pytest plugin

* fix(sigma): find dashboard owners whose Sigma email has capitals (#37412)

OpenMetadata stores user emails in lowercase and get_reference_by_email
matches email.keyword exactly, so a Sigma owner email with any capital
letter found no user and the dashboard got no owner. Lowercase it before
the lookup, as Looker and PowerBI do.

A failed /members read also logged a second, misleading warning
("'NoneType' object has no attribute 'email'"); now only the failed
read is logged.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): accept optional API fields and stop repeated Sigma reads (#37340)

* fix(sigma): make optional response fields optional in models

Sigma's spec marks `total` on the workbook, page, element and query
listings, `isArchived` on a workbook, and a query's `name` as optional.
When one was missing, validation failed and the client returned no
workbooks, elements or queries.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): stop repeated Sigma workbook, member and file reads

The workbook list was requested twice per listing, and every workbook
and lineage edge fetched its owner and table file again. Request the
list once and reuse successful /members and /files reads in bounded
caches; a failed read stays retryable.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): fetch elements once, link charts to their element, apply chart and data model filters (#37341)

* fix(sigma): fetch each workbook's elements once

The chart and data model stages each listed the workbook's pages and
elements. Fetch them once with the workbook details and share them
between both stages.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): link charts to their element and stop copying the workbook description

Sigma's element listings carry no description or URL. Charts now link to
their own element with Sigma's documented `?:nodeId=<elementId>`
parameter and no longer repeat the workbook description.

Element link format matches the Sigma UI (checked on a trial org; no
API access).

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): filter untitled elements by their display name

Sigma marks an element's name optional. The chart filter checked the
raw name, so any include or exclude pattern dropped every untitled
element. The filter, the filter report and the chart now share one
display name, `Element <elementId>` when the element has no name.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): apply dataModelFilterPattern to Sigma data models

Workbook elements excluded by the pattern no longer become data
models, get no table lineage and cost no element lineage or file
lookups. The pattern matches the data model's display name.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* Fixes #37365: filter NativeOntologyPartialImportIT axiom listing by ontologyId (#37366)

* fix(sigma): link only unambiguous lineage tables, ingest Sigma Data Models (#37296)

* fix(sigma): make optional response fields optional in models

Sigma's spec marks `total` on the workbook, page, element and query
listings, `isArchived` on a workbook, and a query's `name` as optional.
When one was missing, validation failed and the client returned no
workbooks, elements or queries.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* fix(sigma): stop duplicate and repeated Sigma API calls

Fetch each workbook's elements once and share them between the chart
and data model stages, request the workbook list once, and reuse
successful /members and /files reads in bounded caches.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* test(sigma): answer faked Sigma HTTP per page and with error statuses

The faked Sigma HTTP in the connector tests becomes a `routes` fixture
that tests can change. A `page` query parameter is part of the route
key, so paginated reads can be tested, and an int route answers with
that HTTP status, so failed reads can be tested.

* fix(sigma): skip stale deletes after a failed Sigma read

A failed read of the workbook list, a workbook, or a workbook's pages
or elements left live entities out of the run, and the markDeleted
passes then soft-deleted them. A failed workbook read now skips all
three passes; a failed page or element read skips the chart and data
model passes. The dashboard pass still runs, as its workbook was read.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* fix(sigma): link a lineage table only when exactly one matches

Table lookups took the first search hit and searched every database
service when no dbServicePrefixes were set, so a table that exists in
several services, or several databases, was linked to whichever came
back first. Both the SQL and the fallback path now resolve through the
shared table binding resolver across the configured prefixes and link
a table only when exactly one matches. Without dbServicePrefixes no
table is linked. The SQL path now also honours the database and schema
a prefix names.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* fix(sigma): read lineage tables keyed in element dependencies

The fallback lineage skipped every edge that starts at a
`dependencies` key, and Sigma keys an element's upstream tables there,
so it found no table for elements shaped like Sigma's documented
example. Table and dataset dependency nodes are now read as well;
edges that do not start at a key are handled as before, and sheet
nodes are still skipped.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).
Accepted unknown: whether a `dependencies` nodeId is accepted by
/v2/files/{inodeId}; edge ids already use that call today.

* feat(sigma): read connection types from Sigma

The SQL lineage path parses every element query without knowing which
warehouse Sigma runs it on. The client can now tell a connection's
type (snowflake, bigQuery, ...) from one paginated read of
/v2/connections per run, kept in a bounded cache. The next commit uses
it to pick the SQL dialect.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).
Accepted unknown: the spec lists no type string for Snowflake or
Databricks connections; Sigma's doc examples show "snowflake".

* feat(sigma): parse workbook SQL in the dialect of its Sigma connection

Element SQL was parsed in the dialect of the db service prefix's
service type, or ANSI. When that service is typed differently from the
warehouse Sigma runs the SQL on, dialect-specific SQL lost its tables
(BigQuery's SELECT * EXCEPT finds none under Snowflake). When every
lineage row of a workbook uses one Sigma connection of a known type,
its SQL is now parsed in that warehouse's dialect; otherwise as before.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).
Accepted unknown: the spec lists no type string for Snowflake or
Databricks connections; Sigma's doc examples show "snowflake".

* feat(sigma): ingest Sigma Data Models as data models

Sigma Data Models, the curated sources workbooks are built on, were not
ingested at all. Each one is now a SigmaDataModel data model with one
table column per data model element holding that element's columns,
the shape PowerBI uses for a dataset. The data model filter pattern
applies to them. A data model whose elements cannot be read is kept as
it is, and a failed data model listing skips the stale data model
pass, so neither drops what Sigma still has.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* feat(sigma): set the Sigma data model owner from ownerId

Sigma Data Models have an owner (ownerId), but the new data models
carried none. The owner is now resolved through Sigma's member email,
as for workbooks. DataHub uses the creator (createdBy) instead; the
spec's owner field is the one that tracks ownership changes.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* feat(sigma): link Sigma Data Models to the workbook elements reading them

A workbook element built on a Sigma Data Model had no lineage from it.
The workbook lineage rows give the link: an element row lists the data
model's id among its root sources (dataSourceIds), as Sigma's lineage
example shows. Only exact id matches make an edge. The lineage read is
shared with the workbook dialect lookup, once per workbook. DataHub
parses element-lineage node ids instead, a format the spec does not
define.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* style(sigma): log lazily in the new Sigma log calls

Seven log calls added earlier on this branch used f-strings, which the
ruff suppression check rejects as new G004 debt. They take %-style
arguments instead. The four G004 baseline entries for Sigma f-strings
that this branch removed are pruned, so the check passes.

* perf(sigma): resolve each table reference once per run

The lineage stage runs once per dbServicePrefixes entry, and every
run searched all the prefixes, so a reference cost P² searches.
Keep each reference's cross-prefix answer in a bounded LRU cache
and pick the caller's prefix from it.

* docs(decisions): record the Sigma stale-pass skip rule

* fix(sigma): keep stored data and whole lineage when a Sigma read fails

- A workbook whose pages or elements cannot be read is no longer sent with
  empty charts and data models, nor is its lineage: the server would replace
  what it holds with none. It is left as stored and kept as seen, as PowerBI
  does with a report whose pages cannot be read.
- An element's lineage edges are sent only once all its tables are looked up,
  and a failed table search fails that reference for every prefix in the run:
  under overrideLineage a partial set replaces the element's whole lineage.
  For the same reason, no data model link is sent into an element whose
  lineage failed, and a failed data model lookup skips that element's links.
- With no dbServicePrefixes the lineage stage makes no Sigma calls, as no
  table can be linked.
- Connection types are read per connection id into the bounded cache, so a
  type evicted from it is read again instead of being lost.
- A stale pass skipped because a read failed is reported as a failure in the
  run status when the pass is turned on.

* revert(sigma): run the stale passes after a failed Sigma read

- The dashboard, chart and data model stale passes run in every run, as
  for other dashboard connectors, even when a Sigma read failed. A skipped
  pass is no longer reported in the run status, as no pass is skipped.
- A workbook whose pages or elements cannot be read is sent with the
  elements that were read, and its lineage is sent: a failed element page
  is logged and skipped, as before.
- The decision record for the skip
  (2026-11-07-a-sigma-run-that-cannot-read-everything-skips-the-stale-passes-it-cannot-confirm)
  is removed, with the tests of the skip.

* revert(sigma): send each lineage edge as it is found

- An element's lineage edges are sent one by one again, as each table is
  found, instead of only once every table of the element is looked up.
- A failed table search is logged and that table skipped, as before; it is
  no longer cached as a failure for the rest of the run.
- Sigma Data Models are linked to the elements reading them without
  skipping an element whose lineage or data model lookup failed.

Failed-read handling is left to the framework rather than kept in the
Sigma connector, as for the stale passes.

* refactor(sigma): read page elements through the shared pager

- get_page_elements reads every page through _read_all, as the other
  Sigma listings do, instead of its own page loop; a failed page still
  keeps the elements read before it.
- _workbook_lineage caches the read on the workbook in three lines.
- Connection drops connectionId: the type is read per connection id, so
  the field was never used.
- get_chart_details returns None again for a workbook without pages, as
  on main; the caller already treats None as no elements.

* fix(sigma): link Sigma columns to the warehouse columns they show (#37339)

* fix(sigma): link Sigma columns to the warehouse columns they show

Sigma lineage carried no column links: the SQL path sent table edges
only, and the fallback compared names exactly while Sigma labels
warehouse columns for reading (DEAL_SOURCE_NAME shows as "Deal Source
Name"). Both paths link a Sigma label to the column whose name matches
once case and separators are ignored, with Tableau's
normalize_column_name, moved to metadata.utils.helpers to be shared.
A label is linked only when every source table of the element was
found and exactly one of their columns matches. A failed table lookup
is reported for that table and no longer drops the element's other
edges.

Verified against Sigma's API docs (downloaded 2026-11-06) and DataHub
1329d8f73c; not live-verified (no Sigma instance).

* test(sigma): use placeholder table and column names in the lineage tests

The column lineage tests and the docstring now use generic warehouse names (CUSTOMERS, ORDERS) instead of names taken from a real report.

* fix(sigma): link no fallback columns when a lineage source could not be read

The fallback dropped a source whose /files read failed, or that was not a table, and then counted only the sources left. A label unique among those was linked, although the dropped source could hold the column. get_lineage_details now also says whether every source was read as a table; when one was not, the element keeps its table edges but links no columns.

* feat(sigma): record Sigma workbook created and updated dates in lifeCycle (#37298)

* fix(sigma): make optional response fields optional in models

Sigma's spec marks `total` on the workbook, page, element and query
listings, `isArchived` on a workbook, and a query's `name` as optional.
When one was missing, validation failed and the client returned no
workbooks, elements or queries.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* test(sigma): add a faked Sigma HTTP fixture to the connector tests

The connector tests get a SigmaSource with its real client, whose HTTP
is answered from Sigma-spec-shaped routes that a test can change. A
`page` query parameter is part of the route key, and an int route
answers with that HTTP status.

* feat(sigma): record workbook created and updated dates in lifeCycle

Sigma returns createdAt and updatedAt for every workbook; the connector
parsed createdAt as plain text and dropped both. The workbook dashboard
now carries them as lifeCycle created and updated, as Hex does.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* Fixes 36478: Regenerate bot tokens after a JWT signing key change (#37343)

* Regenerate bot tokens with a shared class that skips current tokens and checks the server JWKS

* Document JWT signing key rotation as a hard cut with a decision record

* Cover bot-token regeneration idempotence and the JWKS key check in OpsRegenerateBotTokensIT

* Report a failed bot by its error type only and share the deploy defaults

Bot results can reach an HTTP caller, and a database error message can carry the stored user
JSON, so a failed bot names the exception type and points at the server log. The redeploy after
regeneration and deploy-pipelines now read their chunk size and per-pipeline deadline from one
pair of constants.

* Write the IT's stale bot token through the user DAO so it runs on Postgres

The raw UPDATE bound a string to the json column, which Postgres stores as jsonb. The DAO holds
the MySQL and Postgres forms of that write. The guide now states what the IT asserts: a
regenerated token works on its first request.

* Prove one regeneration run replaces every stale bot token signed by an old key

The stale token is now signed by a freshly generated key under a retired kid, the state a key
rotation leaves behind, so the server rejects it on its signature. One run replaces two stale
bots, both new tokens work on first use, and the current ingestion-bot keeps working.

* Decode JWK numbers as unsigned so a compliant JWKS matches the key

* Skip bots whose token was revoked instead of minting them a new one

* Audit each bot token regeneration and verify a new token before saving it

- An external secrets manager deletes a revoked token's secret and stores null in its place.
  readToken now returns that null instead of failing, so the bot is skipped as revoked.
- Saving through updateIfCurrent records no change event, which the old command's save did.
  Each regenerated bot now records a masked ENTITY_UPDATED event, so the audit log and event
  subscriptions see it.
- The JWKS check compares only the public key. Each new token is now verified under it before it
  is saved, so a private key from another pair stores nothing and the bot is reported FAILED.

* Name the operator in the regeneration change event and mask it like the user repository does

- createUserChangeEvent takes the actor the audit log records. A sign-in passes the user, and the
  regenerator passes updatedBy (admin), as a REST write does. The event named the bot before.
- The event masks profile webhook secrets through ProfileWebhookSecrets.masked, as
  UserRepository.forChangeEvent does for the repository's own events.
- The IT asserts the actor, that the event has no authentication mechanism, and that neither the
  token nor its stored form appears in it. The saved entity holds the token encrypted, so a check
  for the plaintext alone could not fail.

* Add --all to regenerate-bot-tokens and say what a plain run replaces

The help line still said the command regenerates all bot JWT tokens, but a
run now replaces only the tokens the configured key does not sign. On main
every run replaced every token, which an operator may rely on after a token
leaked or to give every bot a new expiry. --all does that again. A revoked
bot stays revoked either way.

UserUtilTest pins that a user change event masks profile webhook secrets.

* Keep replacing every bot token by default and add --skip-current for re-runs

A plain regenerate-bot-tokens run replaces every non-revoked bot token, as it
did before this branch, so it still serves a leaked token, a new expiry and a
cluster name change. --skip-current leaves tokens the configured key already
signs unchanged, for re-running a key rotation. BotTokenRegenerator callers
name the scope explicitly.

* Keep a leaked token out of --skip-current re-runs and restore the staleness bound

After a changed-concurrently failure the runbook re-runs with --skip-current
only during a key rotation, since that flag keeps a leaked token that still
verifies. The replaced-token check waits maxStaleness plus one second again,
as the per-server verifier promises for the ops CLI. --skip-current is now
shown to replace a stale token, every exit-2 cause is named, and the decision
record states the redeploy.

* fix(jwt): address signing-key rotation review

* Record that a rotation stops every server before any starts with the new key

The runbook forbids a rolling restart because a restarted server can fetch a
load-balanced peer's old key through publicKeyUrls and keep it for 24 hours.
The decision record now states the same rule and that operators check each
server's JWKS, since regenerate-bot-tokens reads only one.

* fix(ui): readable toast when a save patches a stale entity (#37421)

A JSON patch built from a stale copy targets a member the server no longer
has, and the 400 message embeds the whole entity JSON. Show a refresh hint
instead.

* Fixes #29494: NPE in ServiceEntityResource.unmask when request has no connection (#32920)

* Fixes #29494: NPE in ServiceEntityResource.unmask when request has no connection

unmask() guarded against originalService.getConnection() == null but not
against service.getConnection() == null (the incoming request). A PUT with no
connection field (idempotent ensure-service-exists) threw NullPointerException
when the service already existed. Added the missing null check.

* Apply spotless formatting

* Adds integration test reproducing the unmask NPE on connection-less PUT

Per review feedback (harshach): put_updateWithoutConnection_preservesExistingConnection_200
drives a raw PUT /v1/services/databaseServices with no connection field
against a service that already has one, hitting ServiceEntityResource.unmask()
directly. Fails with a 500 (NPE) without the null-check fix; asserts a 200
and that the pre-existing connection is left untouched.

Also adds put_updateWithoutConnection_whenNoExistingConnection_200 as a
smoke check on the neighboring branch (no connection on either side),
which was already guarded before this fix.

---------

Co-authored-by: Михаил Иванов <[email protected]>
Co-authored-by: Mikhail Ivanov <[email protected]>
Co-authored-by: Mohit Yadav <[email protected]>

* Fixes #37266: Make every template helper example render against a real event (#37268)

* Fixes #37266: Make every template helper example render against a real event

* Assert the exact output of the math and filter helper examples

* fix(alerts): let an alert be edited while a webhook secret waits to be entered again (#37269)

* Fix the Data Insights run-record undercount so that per-step and job-l (#36770)

* Fix the Data Insights run-record undercount so that per-step and job-lev

taskr run 0147.
Per-service and per-day step keys are now unique in the cost-analysis and web-analytics workflows, a new `WorkflowStatsBatchAggregationTest` passes, and the planned spotless check passes.

* Fix Data Insights step totals across services and days

* Fix profiler and data quality source column names (#37326)

* feat(sigma): set the Sigma workbook latestVersion as a dashboard custom property (#37300)

* fix(sigma): make optional response fields optional in models

Sigma's spec marks `total` on the workbook, page, element and query
listings, `isArchived` on a workbook, and a query's `name` as optional.
When one was missing, validation failed and the client returned no
workbooks, elements or queries.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* test(sigma): add a faked Sigma HTTP fixture to the connector tests

The connector tests get a SigmaSource with its real client, whose HTTP
is answered from Sigma-spec-shaped routes that a test can change. A
`page` query parameter is part of the route key, and an int route
answers with that HTTP status.

* feat(sigma): set the workbook latestVersion as a dashboard property

Sigma's workbook detail carries latestVersion, the most recently
published version, which changes on every publish. It is patched onto
the dashboard extension after the dashboard exists, behind
includeCustomProperties, and registered once per run, as decided in
ADR:2026-11-02-run-changing-dashboard-custom-properties-are-patched-after-the-dashboard
The property is a number: the spec types it double and Sigma's docs
show 1.1. DataHub reads it as int and emits it as free text.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).

* docs(decisions): record the Sigma latestVersion custom property

* fix(sigma): write latestVersion only when nothing changed since the read

A latestVersion patch built from a dashboard read with no custom
properties replaced the whole extension, so a property a user set
after the read was lost. The create-or-update PUT also overwrote the
description and display name of a latestVersion property an
administrator registered after Sigma's check.

Both writes now carry the version Sigma read as If-Match and, on 412,
are retried after a fresh read, up to MAX_OPTIMISTIC_LOCK_RETRIES.
Sigma patches the value itself, as a PatchRequest carries no If-Match,
and adds the definition with a PATCH of the dashboard type.

Checked against a local OpenMetadata server: a stale If-Match gets 412
and leaves the entity unchanged; the current one gets 200.

* Revert "fix(sigma): write latestVersion only when nothing changed since the read"

This reverts commit 452c8afb904cb56d2a9622c900b99ab663d1cb5f.

* ci: retrigger checks skipped by the pull_request_target brownout

* feat(sigma): set the dashboard project to the Sigma workbook workspace (#37297)

* fix(sigma): make optional response fields optional in models

Sigma's spec marks `total` on the workbook, page, element and query
listings, `isArchived` on a workbook, and a query's `name` as optional.
When one was missing, validation failed and the client returned no
workbooks, elements or queries.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* test(sigma): add a faked Sigma HTTP fixture to the connector tests

The connector tests get a SigmaSource with its real client, whose HTTP
is answered from Sigma-spec-shaped routes that a test can change. A
`page` query parameter is part of the route key, and an int route
answers with that HTTP status.

* feat(sigma): set the dashboard project to the workbook workspace

Sigma dashboards had no project, so they could not be grouped or
filtered by workspace. The project is the first segment of the
workbook path, where Sigma puts the workspace before its folders.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).
Accepted unknown: the spec does not describe the workbook path; the
"/" separator and the workspace as its first segment come from
Sigma's doc examples and DataHub's reading of the same field.

* test(sigma): check projectFilterPattern filters by workspace

With no project on Sigma dashboards, any projectFilterPattern dropped
every dashboard. The workspace project from the previous commit fixes
that; this test pins it for an include and an exclude pattern, and the
connector doc says what the pattern matches.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).
Accepted unknown: the workspace is the first "/" segment of the
workbook path (doc examples and DataHub, no spec description).

* docs(decisions): record the Sigma dashboard project rule

---------

Co-authored-by: Pablo Takara <[email protected]>

* Fixes 33493: Align ODCS import/export with v3.1.0 (#36877)

* Make ODCS import/export conform to the published ODCS v3.1.0 schema so s

taskr run 0170.

* Fix ODCS SLA integer overflow and record format decisions

* Make ODCS import/export conform to the published ODCS v3.1.0 schema so s

taskr run 0170.

* Assert ODCS custom properties using parsed YAML

* Isolate ODCS backfill in existing migration entry-point fixture

* fix(odcs): preserve unmapped import metadata generically

* fix(odcs): export native contracts with standard fields and custom properties

* fix(odcs): keep native property deletions across round trips

* fix(odcs): report unsupported array item rules

* Use schema-backed versioned ODCS export mappers

* Validate native length handling and use conforming ODCS fixtures

* Correct export fixture indentation after text-block normalization

* Explain pinned-schema validation after ODCS metadata restoration

* Centralize ODCS schema provenance and license attribution

* Support published historical ODCS export versions

* Verify required ODCS schema corruption diagnostics

* Centralize build-time schema preparation for model generation

* Add ODCS export version selector

* Test imports and schema builds of generated ODCS Python models

* Fix historical ODCS exports after metadata restoration

* Keep schema preparation in generator-owned workspaces

* Fix ODCS quality preservation and exact SLA validation

* Anchor ODCS import baselines before entity name resolution

* Keep legacy ODCS quality normalization atomic

* Trigger CI

---------

Co-authored-by: Sriharsha Chintalapani <[email protected]>

* feat(sigma): tag dashboards with the Sigma workbook certification badge (#37299)

* fix(sigma): make optional response fields optional in models

Sigma's spec marks `total` on the workbook, page, element and query
listings, `isArchived` on a workbook, and a query's `name` as optional.
When one was missing, validation failed and the client returned no
workbooks, elements or queries.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub; not live-verified (no Sigma instance).

* test(sigma): add a faked Sigma HTTP fixture to the connector tests

The connector tests get a SigmaSource with its real client, whose HTTP
is answered from Sigma-spec-shaped routes that a test can change. A
`page` query parameter is part of the route key, and an int route
answers with that HTTP status.

* feat(sigma): tag dashboards with the workbook certification badge

Sigma's certification badge (Endorsed, Warning, Deprecated) marks
whether a workbook can be trusted, and the connector dropped it. When
tags are on, each workbook's /v2/files entry is read once and its badge
is added to the dashboard as a tag in a SigmaBadge classification, as
Hex does with its project status. A workbook without a badge, or whose
read fails, is ingested without one.

Verified against Sigma's OpenAPI spec (downloaded 2026-11-06) and
DataHub 1329d8f73c; not live-verified (no Sigma instance).
Accepted unknown: Sigma's docs show no /v2/files row for a workbook;
reading it by workbook id rests on the spec's "use the workbookId as
the inodeId" and DataHub's fixtures.

* style(sigma): log the failed badge read lazily

The badge read's warning used an f-string, which the ruff suppression
check rejects as new G004 debt. It takes %-style arguments instead.

* docs(decisions): record the SigmaBadge tag classification

---------

Co-authored-by: Pablo Takara <[email protected]>

* Fixes 32241: Finish sampling before reporting classification model failures (#37082)

* fix: finish sampling before failing unavailable classification models

* test: exercise effective classification success thresholds

* fix: preserve per-column inference memory error handling

* Refactor classification model loading and address Sonar findings

* Fixes 37463: Keep column custom property values in the Explore right panel (#37464)

* fix(ui): load column custom properties from the API in the Explore side panel

The panel re-seeded a tableColumn from the Explore search hit on every
remount, so a value saved there showed 'No value yet' until the page was
refreshed and Elasticsearch had reindexed. Fetch the column (tags,
extension) via GET /columns/name/{fqn} and overlay it on the search hit.

* fix(ui): ignore stale panel fetches and load columns of deleted tables

A late response for a previously selected entity no longer overwrites the
panel, and the column fetch passes include=all so a soft-deleted parent
table does not 404.

* chore(playwright): auto-refresh impact-map.generated.json

* style(ui): organise imports in EntitySummaryPanel

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(sigma): preserve pagination tokens and SQL column provenance (#37451)

* fix(sigma): preserve pagination tokens and SQL column provenance

* fix(sigma): omit ambiguous wildcard column mappings

* fix(sigma): keep pivot tables as data elements

is_data_element accepted only the "table" and "visualization" element
types, so a pivot table ({"type": "pivot-table", "vizualizationType":
"pivot"}) lost its chart, its data model and its lineage. On main it
kept all three through its vizualizationType, and with markDeletedCharts
and markDeletedDataModels on by default an upgrade would have deleted
the existing pivot charts and data models.

Sigma's spec says the element lineage endpoint takes "a data element,
such as a table, pivot table, or visualization" and errors only on UI or
control elements (GET /v2/workbooks/{workbookId}/lineage/elements/
{elementId}), and Sigma's docs list pivot tables as data elements
(Intro to Element Types). "pivot-table" is the element kind Sigma's
workbook specification uses for a pivot table.

Not live-verified (no Sigma instance).

* fix(sigma): omit SQL columns more than one table could hold

The SQL parser gives an unqualified column a path from every table the
query reads, so SELECT CUSTOMER_ID FROM CUSTOMERS c JOIN ORDERS o ...
linked "Customer Id" from both tables, and an unqualified column was
linked from the one resolved table even when a table missing from
OpenMetadata could hold it. That is a guess, which REVIEW.md "Lineage
does not guess" rules out.

An output is now omitted when the same source column name reaches it
from more than one table that could hold that column: a table that has
it, is missing from OpenMetadata, or has no known columns. This is the
rule _expand_sql_wildcards already applies to * outputs. An unqualified
column that only one resolved table has, and every qualified column,
keep their lineage.

The parsed paths cannot tell an unqualified column from an expression
over the same column of two tables, such as CONCAT(c.ID, o.ID), so that
expression is withheld too; the test records it.

Not live-verified (no Sigma instance).

---------

Co-authored-by: Akash Verma <[email protected]>

* refactor(ci): diagnose failures in the dequeue job (#37391)

* refactor(ci): diagnose dequeue from GitHub data

* fix(ci): recognise curl's bare HTTP status in dequeue diagnosis

curl -f reports "The requested URL returned error: 504" without naming
HTTP, so a failed curl download was reported as a possible PR
regression instead of a dependency download failure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: run dequeue diagnosis tests on pull requests

The report runs main's copy under pull_request_target, so tests inside it
never ran on the PR that changed the script, and a failing test there
skipped the comment and Slack alert. Run them in a path-filtered
pull_request workflow instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* refactor(ci): explain each run's first failed job in the dequeue report

Report each workflow run by its first failed job: gates and summaries
need the jobs they check, so they finish later and are listed with the
rest. Cancelled jobs are never the cause, and nothing is compared with
main, whose runs can fail for reasons queue runs do not share.

The shared script now renders the whole comment and Slack payload from
the queue commit's check runs, including the Playwright summary's
failed tests, passed in with --failed-tests. The workflow resolves the
event, collects those test names, runs the script and posts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(ci): preserve dequeue alerts after read errors

* chore(ci): remove dequeue tooling tests

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

* ci: configure nightly ingestion unit test workers (#37468)

* chore(ui): remove dead version-diff helpers from EntityVersionUtilsPure (#37443)

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>

* Fixes #37288: Notify Downstream reaches downstream owners on alerts for data assets (#37289)

* Fixes #37422: Correct persona context rules and access (#37423)

* fix(persona): separate scope and enforce access

Members could receive a cached document containing assets they could not view. Render member context with caller permissions and isolate preload rules from search defaults.

Validate filters, expose rule toggles, and count inherited users once.

* fix(persona): validate filters during upserts

PUT requests receive a temporary UUID before resolving the stored persona. Compare existing rules by persona name so both create and update can validate filtered rules.

* fix(persona): preserve filters during rule edits

* fix(persona): skip unchanged filter validation

* fix(persona): cache sources and enforce visibility

* test(persona): verify typed Explore filters

* fix(persona): page beyond capped search totals

* fix(persona): keep product members lightweight

* fix(persona): skip invalid saved search scopes

* test(persona): assign the scope regression caller

* fix(persona): bound candidate scans per rule

* ci: run PR code on pull_request only and retire the safe to test label (#35426)

* ci: fork-gate maven-sonar-build's ~/.m2 cache save and JSON-encode eslint_has_findings

maven-sonar-build runs on pull_request_target and builds the PR head, but
its combined actions/cache@v6 saved ~/.m2 post-job with no fork guard, so a
fork run wrote into main's cache scope. Split it into an ungated restore and
a fork-gated save keyed on the restore's cache-primary-key, matching the
other Maven caches fixed in #32436 and #32468.

ui-checkstyle's privileged comment job interpolated eslint_has_findings raw
inside a quoted JS string. That output is written by the PR's own
scripts/eslint-pr-report.js, so wrap it in toJSON like the two outputs next
to it.

* ci: run PR code on pull_request only and retire the safe to test label

Every workflow that checks out or runs PR code now triggers on
pull_request instead of pull_request_target, so fork PRs run with a
read-only token and no secrets instead of behind the "safe to test"
label. Steps that need a secret or a write token (Sonar PR analysis,
bot comments, the Collate dispatches, the generated-source auto-commits)
run for same-repo PRs only; bot comment content also goes to the job
summary and an error annotation so fork PRs still see it.

pull_request_target stays only on workflows that never check out PR
code. The knowledge-graph workflow drops 44 connector secrets that no
RDF spec reads, the label gates, fork cache guards and dead PR-event
branches go, and the label leaves team-labeler and teams.yml.

* ci: keep the cli_e2e_v2 guard and skip Collate dispatches on Dependabot PRs

The unit-test job checks out the PR head, which can predate the cli_e2e_v2
suite, so the hashFiles guard still matters on pull_request. Dependabot PRs
are same-repo but get no secrets, so the Collate dispatches skip them.

* ci: request a random reviewer from each team labelled on a PR

When a PR opens ready for review, or a draft is marked ready, the Team
Label job asks one random member of each team labelled on the PR
(excluding the author and anyone already requested or reviewing) for a
review, on top of the CODEOWNERS requests, so reviews keep spreading
across each team. teams.yml is read from the default branch, never from
the PR.

* ci: sync teams.yml with the Slack ingestion, backend and UI groups

Adds Khairajani and stout-yeoman to ingestion, shah-harshit to UI and
akashverma0786 to devops. Drops ayush-shah, aniketkatkar97, shahsank3t,
siddhant1 and sureshms, who are not in the matching Slack groups;
aniketkatkar97 and siddhant1 are no longer repository collaborators, so
review requests to them would fail.

* ci: gate Dependabot like forks and run the fork-skipped Collate checks in the queue

Dependabot runs get a read-only token and no secrets even on a same-repo
branch, so every secret or write step now also skips them: Sonar scans and
retries, PR comments, the jest coverage comment, and the COLLATE_PAT
auto-commits, which treat Dependabot like a fork.

Fork and Dependabot PRs skip the PR-time Collate build and the
data-access-request e2e, so the merge queue now runs both for them: the
Collate build also covers their UI-only changes, in Collate's PR mode, and
the data-access-request workflow gains a merge_group trigger.

A type-generation dispatch for a fork PR no longer checks out the fork's
code in a job that has COLLATE_PAT. The decision record drops the cache
write claim (pull_request_target already gets read-only cache access),
notes the queue's latest-push trust gap, and covers patch branches.

* ci: remove the team labeler and teams.yml

Both existed to apply the safe to test label and team labels; GitHub team
settings now handle reviewer assignment, so nothing reads them anymore.

* docs(adr): the merge queue runs only approved commits

Amend ADR:2026-10-14-pr-code-never-runs-on-pull-request-target (v2): with
the safe to test label gone, require_last_push_approval on merge-rules is
what keeps an unapproved fork push out of the merge queue. Records why a
workflow gate or dismiss_stale_reviews_on_push cannot replace it, and the
measured re-approval cost.

* docs: require secret-free PR CI reviews

Require reviewers to trace indirect credentials and reject privileged paths reachable from PR jobs.

* ci: keep all PR jobs credential-free

Remove same-repository secret and write-token exceptions from PR execution. Defer credential-backed checks to trusted contexts and enforce the boundary through reusable-workflow validation and regression tests.

* ci: harden PR credential validation

Handle case-insensitive GitHub expressions, quoted delimiters, and indexed conditions without allowing a PR job to hide credential access. Retain the read permissions required to detect changed PR files.

* ci: fix Airflow Sonar settings path

The scanner resolves explicit project.settings paths from the workspace, so retain the module prefix. Cover settings-file discovery with a regression test.

* ci: keep manual generation checkouts scoped

Remove PR and branch inputs that could execute unreviewed code under the default branch cache scope. Manual runs use the event SHA; PR runs retain their head SHA and isolated cache scope.

* build(ingestion): refresh installed zlib packages (#37487)

* Fixes #37452: Find reworded and waiting duplicate facts across documents, and let a person's decision cover every document (#37453)

* Find reworded duplicate facts without vector search

Without vector search the duplicate check glued a fact's question and
answer into one all-terms query, which no single field ever matches, so
every fact from another document, even a verbatim one, was stored again.

The check now asks the search client for a ranked cross-field query (any
30% of the terms, question, answer, title and summary), reads 20 hits and
keeps the first five that may be reused. The judge decides equivalence,
so a different memory type no longer rules a candidate out. The exact
text shortcut, the replaced-number rule and the org-wide anchor rule are
unchanged, as is the Context Center search box query.

* Let a person's memory decision cover every document that states the fact

A file's fact that another document already states, in any stage, now
links to that memory and takes its decision: a fact awaiting review
keeps waiting and a rejected fact stays rejected. A value whose number
conflicts with a memory a person decided (a retired stage or a
correction) starts Unprocessed under every provider, by the rule
re-extraction already holds such values with; numbers that differ never
merge.

The duplicate check asks the memory index for every stage and admits
corrections still linked to their document. Reuse of an identical file
links every memory of the earlier file that is not soft-deleted instead
of requiring all of them Approved. A waiting memory lists to the owners
of every document it is linked to, and approving from one document
leaves pending what another linked document leaves for a decision.

* Hold values that conflict with a decision in another document

Vector search admits Approved memories only, so with it on the duplicate
check also asks the memory index for every fact; the eligible candidates
of the two rankings alternate, each memory once, and the first five are
compared. Memories awaiting review and decided ones now reach the check
when semantic search is on, as in Collate.

A value whose number differs from a memory a person decided (rejected or
otherwise retired, or corrected) waits for review under every provider
when the two ask look-alike questions, as re-extraction pairs them, or
when re-extraction would hold it beside that memory. Approving from a
document re-reads the index for decided memories that hold a pending
value and leaves it for an admin, as a hold among the document's own
memories is left.

* Read a pending memory's documents from its source links

A plain listing decided which documents a waiting memory belonged to
from fields it also returned, so a reader of a file received every
linked document, a restricted copy's name included. The listing now
reads the source links of the page's pending extracted memories in one
batch and returns only the fields the caller asked for, plus those the
visibility guard reads; approval reads its linked documents the same
way.

A value is held beside another document's decision only when
re-extraction would pair the two as one question, so a question for
another year is another fact. Approval's decision check asks the memory
index alone, and only for a pending value that states a number, since a
hold needs a replaced number.

* Hold the figure an edit-modal correction replaced in other documents

The edit modal saves a correction's text as both question and answer,
so another document's original figure matched it by topic only and was
created in its derived stage. A decided correction now holds such a
value across documents too, as re-extraction does, unless the two
questions name different numbers: another year is still another fact.

* Let the AI provider supply the duplicate judge

The duplicate check took its judge from the built-in LLM client
directly, so a distribution that does its memory work elsewhere had no
way to supply its own. AiProvider.duplicateJudge() now supplies it and
defaults to that same client, so OSS judges as before.

A finder without a judge links identical facts only and takes a
rewording for a new fact. The approval check's lookup has no judge, so
asking it for a match no longer fails on a reworded fact.

* Unwrap the duplicate judge where the file engine is built

The finder held the provider's judge as an Optional field and took it
as a parameter. The file engine now unwraps it once: it builds a judged
finder from the provider's judge, or an exact-only one without it, as
the approval check's lookup is. The finder keeps a non-null strategy,
so no path reaches a missing judge.

An integration case pins the seam Collate relies on: under a provider
with no judge, the built-in client is never asked, another file's
rewording becomes a new memory and a verbatim fact still links.

* Name only documents everyone may read on the memories they link

A restricted copy linked to a memory joined its related entities, so its
name reached the memory, its listings and its version history, and the
original's owner approving the memory as themselves was refused for a file
they could not read; so was a conflict-review decision on it.

A linked document that not everyone may read is now linked by its source
edge alone. A memory's source is its anchor among the documents linked to
it, else one everyone may read, and a restricted one only when no other
states it, on the detail and list paths alike (MemorySourceDisclosure).
The link's write is conditional on the memory as read and retried on a
fresh read, so a decision written meanwhile is never reverted.

* Read only the ids the similarity lookup uses

The duplicate check reads a hit's id, or a chunk's parent id, yet the
memory index lookup returned each hit's whole document, which carries an
embedding of tens of kilobytes once semantic search is on. Both engines
now request those two fields alone.

* Hold a value only for a decision in another document

The cross-document hold compared a value with every decided memory,
those of its own document included, so a figure an admin rejected in a
document kept its other figure from that document's owner. A decision in
a document the value is linked to is now left to that document's own
rule, in the duplicate check and in approval alike.

A person's memory now counts as a candidate and a decision only when its
source is a file or an article, and the memory index filter keeps the
rest out of the 20 ranked places: the value's scope, and for a person's
memory the file the index names as its source. The index now takes that
file from the source each write carries, as a reindex does.

The records also state what approval costs per pending value, that a
person's own note citing a document is a decision, and that a rejected
fact stays rejected only when the duplicate check finds it.

* Answer 503 when the memory index cannot check other documents

Approval previews and approvals read the memory search index for other
documents' decisions, and the duplicate check reads it before it creates
a fact. When the index could not be read the check threw an
IllegalStateException, which REST answered as a 500. It now throws a
typed 503 a client may retry; extraction still fails the run instead of
creating an unchecked duplicate. The record states the dependency.

* Describe cross-document holds in the approval API

The preview and approve descriptions listed only the h…
ShaileshParmar11 added a commit that referenced this pull request Nov 23, 2026
Fixes the four flaky tests in the 2.0 nightly #199 Playwright runs:

- LargeGlossaryPerformance drag and drop: wait for both rows to stop moving
  before dragTo (waitForStableBox, from main 7860a3f / #32631).
- MetricBulkImportExportEdit async export: accept an auto-opened tray and
  retry the launcher click (clickUntilVisible, from main 31835ec / #34914).
- PersonaAIContext entity-type picks: retry through the expanded trigger
  (selectOptionWithRetry, from main 451b972 / #34119 and 320f44b / #37423).
- TableConstraint composite tooltip: scope the tooltip locator by name so a
  leftover tooltip cannot make the role match ambiguous.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.1 Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persona context rules, access and inherited user counts need correction

3 participants