feat(ossie/ai): synonym resolution + custom_extensions passthrough (#1408, #1409) - #1415
Merged
Merged
Conversation
…1408, #1409) Wires the OSI ai_context.synonyms and custom_extensions[] blocks through the DTO layer, the AI schema view, and the query validator so agents can refer to entities by synonym and consumer-side tooling can carry vendor annotations without dropping them. ## saiku#1408 — synonyms - OssieModelDto gains fieldAliases / metricAliases / datasetAliases maps. OssieDiscoverService populates them via the library's bi.saiku.ossie.OssieSynonymIndex — dogfooding the ossie-core helper we shipped in spiculedata/ossie#4. - OssieAiSchemaProjector copies the alias maps to the AI schema view so they surface on GET /ai/ossie/schema. - OssieAiValidator resolves synonyms before rejecting names on POST /ai/ossie/query: - Dataset synonyms rewrite ref.dataset in place; downstream code sees the canonical name only. - Metric synonyms rewrite ref.metric similarly. - Field synonyms only rewrite when the alias resolves to a field on the SAME dataset the caller asked for — cross-dataset synonyms (ambiguous by design) get rejected instead of silently misrouting. ## saiku#1409 — custom_extensions - New CustomExtensionDto in org.saiku.service.ossie — thin wire model carrying vendor_name + parsed JSON data. - OssieModelDto.Field / Dataset / Metric gain customExtensions lists; discover service parses each extension's opaque data string into a JsonNode once so consumers walk it structurally. - 'visibility: internal' filter: any extension whose parsed data declares visibility=internal is dropped at the discover-service boundary. That's the standard escape hatch for tooling-private metadata (Saiku's own annotations, dbt's tool-only bookkeeping) that shouldn't reach an agent-facing view. - OssieAiSchema.Field / Dataset / Metric gain customExtensions passthrough; projector copies straight across. ## Verification - Full reactor tests: BUILD SUCCESS - saiku-service: 769/769 (was 760; +9 new tests) - OssieAiValidatorTest: +4 synonym-resolution cases (metric alias rewrite, dataset alias rewrite, field alias rewrite when dataset matches, field alias IGNORED when cross-dataset) - OssieAiSchemaProjectorTest: +3 (alias maps carry through, custom extensions carry through on field, on dataset + metric) - OssieDiscoverServiceTest: +2 (synonym aliases populated from ai_context, visibility:internal extensions filtered) - saiku-sql: SaikuOssieConnectionTest still 2/2 - Zero behavioural regressions on existing tests ## Docs docs/AI-OSSIE-API.md gains two new subsections under Step 2: - "AI-context synonyms (#1408)" — shows fieldAliases/metricAliases/ datasetAliases shape + describes the request-rewriting behaviour + documents the cross-dataset ambiguity guard - "Custom extensions passthrough (#1409)" — shows the customExtensions shape + the visibility:internal filter with a YAML example
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires the OSI ai_context.synonyms and custom_extensions[] blocks
through the DTO layer, the AI schema view, and the query validator so
agents can refer to entities by synonym and consumer-side tooling can
carry vendor annotations without dropping them.
saiku#1408 — synonyms
maps. OssieDiscoverService populates them via the library's
bi.saiku.ossie.OssieSynonymIndex — dogfooding the ossie-core helper
we shipped in feat: OssieSynonymIndex + strict-version-check ossie#4.
so they surface on GET /ai/ossie/schema.
POST /ai/ossie/query:
the canonical name only.
the SAME dataset the caller asked for — cross-dataset synonyms
(ambiguous by design) get rejected instead of silently misrouting.
saiku#1409 — custom_extensions
carrying vendor_name + parsed JSON data.
discover service parses each extension's opaque data string into a
JsonNode once so consumers walk it structurally.
declares visibility=internal is dropped at the discover-service
boundary. That's the standard escape hatch for tooling-private
metadata (Saiku's own annotations, dbt's tool-only bookkeeping)
that shouldn't reach an agent-facing view.
passthrough; projector copies straight across.
Verification
rewrite, dataset alias rewrite, field alias rewrite when dataset
matches, field alias IGNORED when cross-dataset)
extensions carry through on field, on dataset + metric)
ai_context, visibility:internal extensions filtered)
Docs
docs/AI-OSSIE-API.md gains two new subsections under Step 2:
datasetAliases shape + describes the request-rewriting behaviour +
documents the cross-dataset ambiguity guard
shape + the visibility:internal filter with a YAML example