fix(insights): attribute AI-bot-applied tags and tier as Generated - #30595
fix(insights): attribute AI-bot-applied tags and tier as Generated#30595Shreyansh100704 wants to merge 3 commits into
Conversation
❌ PR checklist incompleteThis 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 |
✅ Playwright Results — workflow succeededValidated commit ✅ 1012 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 5 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 59m 38s ⏱️ Max setup 3m 0s · max shard execution 16m 10s · max shard-job elapsed before upload 29m 41s · reporting 6s 🌐 189.31 requests/attempt · 2.22 app boots/UI scenario · 18.40% common-shard skew Optimization targets still in progress:
🟡 1 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedAttributes AI-bot-applied tags and tiers as Generated in data insights by checking appliedBy identity instead of labelType. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
Describe your changes:
Fixes open-metadata/ai-platform#935
I made tags and tier applied by AI bots (automations, ask-collate) count toward the
Generated with Collate AIdata-insight, because they were being mis-attributed as manual work. The insight buckets tier/tag byTagLabel.labelType, which is Manual for agent-applied tags, so AI-applied tiers/tags never appeared. This is a different mechanism from description attribution, which already keys on applier identity (AI_BOTS) — so the earlier AI_BOTS fix helped descriptions but not tier/tag. I brought tier/tag attribution up to parity: inSearchIndexUtils.processTagAndTierSources, attribute by identity (TagLabel.appliedBy ∈ AI_BOTS → Generated) instead of labelType. appliedBy is already stamped server-side per tag, so no agent or schema changes are needed.Type of change:
High-level design:
N/A — small change (2 files: one helper method + its unit test).
Tests:
Use cases covered
appliedBy(historical rows) falls back to its labelType.Unit tests
openmetadata-service/src/test/java/org/openmetadata/service/search/SearchIndexUtilsTest.java— newtestAiBotAppliedTagsCountAsGenerated(bot tag + tier →Generated buckets, human tag stays Manual; fails without the fix). ExistingtestDescriptionAndTagSourceProcessingcovers the null-appliedBy fallback.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes [open-metadata/ai-platform#935](https://github.com/open-metadata/ai-platform/issues/935): Classify AI Generated tags/tiers correctlyFixes [open-metadata/ai-platform#935](https://github.com/open-metadata/ai-platform/issues/935)above.Greptile Summary
This PR updates search insight attribution for tags and tiers applied by recognized AI bots.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/ai-generate..." | Re-trigger Greptile