feat(analytics): add authorHuman filter for MR analytics
What does this MR do and why?
Adds an authorHuman filter to the merge request analytics source. The DAP impact dashboard can then compare Duo-created merge requests with a human baseline: createdByDuo = false and authorHuman = true.
authorHuman maps to the authorHuman: [Boolean!] argument that gitlab!262410 (merged) adds to the mergeRequests aggregation engine. That argument is true when the merge request has an author whose user type is human. Bots, service accounts and every other non-human type are looked up from a ClickHouse dictionary. Merge requests with no author count as not human.
- Filter only. The engine has no
author_humandimension, soauthorHumancan't be used indimensionsorsort. Tests check both are rejected. !=works.authorHuman != truecompiles toauthorHuman: [false], through the same boolean flipcreatedByDuouses, so noauthorHumanNotargument is generated.- Use it only on the non-Duo side. Flows that run remotely open merge requests as a service account, so
authorHuman = trueon acreatedByDuo = truequery would drop most Duo-created merge requests.
Release order: merge gitlab!262410 (merged) first. Until it is on gitlab master, the graphql-validate job here fails with Unknown argument authorHuman, because it validates against master's schema. GitLab should only bump to a GLQL release with this change after gitlab!262410 (merged) is deployed.
Example Usage
Non-Duo, human cycle time (the dashboard baseline)
mode: analytics
query: type = MergeRequest and createdByDuo = false and authorHuman = true and merged >= "2026-09-15" and merged <= "2026-10-15"
metrics: timeToMergeQuantile(0.5) as "Median", timeToMergeQuantile(0.75) as "p75", throughputCountGenerated GraphQL
Compiled with glql::compile and the context {"group": "gitlab-org", "mode": "analytics", ...}. Executing it against gitlab.com has to wait until gitlab!262410 (merged) is deployed.
query GLQL($before: String, $after: String, $limit: Int) {
group(fullPath: "gitlab-org") {
analytics {
mergeRequests(createdByDuo: [false], authorHuman: [true], metricMergedAtFrom: "2026-09-15 00:00", metricMergedAtTo: "2026-10-15 23:59") {
aggregated(before: $before, after: $after, first: $limit) {
count
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
nodes {
timeToMerge {
timeToMergeQuantile_quantile_0_d5: quantile(quantile: 0.5)
}
timeToMerge {
timeToMergeQuantile_quantile_0_d75: quantile(quantile: 0.75)
}
throughputCount
}
}
}
}
}
}How to set up and validate locally
- Run
cargo test --test merge_request_analytics_tests author_human. - Compile the query above with
glql::compile(orGlql.compilefromglql_rb) and check that the output containsauthorHuman: [true].