fix(server): offer gql only in GQL mode and stop hardcoding skill versions in tests
What does this MR do and why?
Shows the gql format option to callers in GQL mode only. Skill tests also stop hardcoding the skill version, so a version bump no longer edits four test assertions.
Related Issues
- https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/work_items/1263
- GitLab side gate: gitlab-org/gitlab!258504
- Backend GQL format: !2661 (merged)
Testing
orbit-server tools tests pass (38), gRPC service tests pass (56), clippy reports zero warnings. The renamed registry test only_gql_query_commands_advertise_gql_format fails against the code before this change, confirming the fix.
| Mode | Before | After |
|---|---|---|
| JSON mode | llm, raw, gql |
llm, raw |
| GQL mode | llm, raw, gql |
llm, raw, gql |
Skill tests pass with the skill version temporarily bumped and the tests unchanged.
Performance Analysis
- This merge request does not introduce any performance regression. If a performance regression is expected, explain why.
Agent context: long-form analysis, file-by-file walkthroughs, profiler output, alternatives considered
Format change: crates/orbit-server/src/tools/registry.rs.
params::query_parameters now places the gql enum variant and its description exclusively inside the Frontend::Gql match arm. The Frontend::JsonDsl arm continues to call the shared params::format() helper, which advertises only llm and raw.
The GQL-mode description also drops the phrase "requires GitLab support" because GQL mode already implies that prerequisite.
The test only_query_commands_advertise_gql_format was renamed to only_gql_query_commands_advertise_gql_format and now asserts that gql appears in the advertised formats only for Frontend::Gql query_graph calls, not for Frontend::JsonDsl ones.
No change to the gRPC execution path: the server still accepts a gql format request in either mode. Rejection of flag-off gql requests happens on the GitLab Rails side, as gated by the MR linked above.
The orbit-cli help text for gql is a separate surface and is intentionally unchanged.
Skill test cleanup: crates/orbit-server/src/skills/mod.rs compares the listed version with the version parsed from the embedded SKILL.md frontmatter, and crates/orbit-server/src/grpc/service/tests/skills.rs compares the gRPC responses with the skill catalog for the requested mode. The GQL selection check still fails if a GQL request returns the JSON skill, and gql_callers_get_the_gql_manifest still asserts that the GQL version is the JSON version plus +gql.