Fixes #30860: return metric facts from semantic_search and stop silently dropping filters - #30876
Fixes #30860: return metric facts from semantic_search and stop silently dropping filters#30876Vishnuujain wants to merge 6 commits into
Conversation
…istent across indexes
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
…t unknown filters
✅ Playwright Results — workflow succeededValidated commit ✅ 1233 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 3 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) 53m 43s ⏱️ Max setup 3m 4s · max shard execution 17m 8s · max shard-job elapsed before upload 20m 35s · reporting 7s 🌐 187.58 requests/attempt · 2.12 app boots/UI scenario · 27.33% common-shard skew Optimization targets still in progress:
🟡 2 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 👍 Approved with suggestions 3 resolved / 4 findingsReturns metric facts from semantic_search and enforces strict filter validation, resolving previous silent drops and duplicate chunk results. Consider replacing the generic RuntimeException in requireResolvedLiveChunkTarget with a domain-specific exception. 💡 Quality: New requireResolvedLiveChunkTarget throws generic RuntimeExceptionThe project Java rules require domain-specific exceptions (e.g. CatalogException) rather than a generic RuntimeException. The newly added requireResolvedLiveChunkTarget wraps probe failures in ✅ 3 resolved✅ Edge Case: unitOfMeasurement filter silently misses OTHER/custom units
✅ Quality: Metric facet filters undocumented in tools.json schema
✅ Quality: FILTER_FIELDS omits primaryEntityId/parentId handled by the builder
🤖 Prompt for agentsOptionsDisplay: 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 #30860
A customer reported that
semantic_searchreturns the right metric but not its Expression or Custom Properties. What this PR changes:metricExpression,metricType,granularityandunitOfMeasurement. Previously a metric summary had no way to tell "Daily Active Users" from "Monthly Active Users", so an agent had to callget_entity_detailsonce per candidate just to shortlist.{"query": ..., "entityType": "metric"}used to run an unfiltered search and return e.g. adatabasein a metric-only search, with no warning.unitOfMeasurementmatches the value shown in results, including custom units.nextCursorno longer skips entities. The cursor advanced by rows returned while the service pages by entity, so multi-chunk entities made page two jump over results.get_asset_contexton a metric now returns its definition, matching whatget_knowledge_contentalready returned for the same entity.extension(custom properties) stays aget_entity_detailscall — it is unbounded user JSON and would push real results out of the response budget.The four metric fields are denormalized onto chunk documents with
CHUNK_DOC_VERSIONbumped 1 → 2, so the existing additive mapping upgrade and backfill pick them up on the next Search Reindex with no re-embedding cost.