-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmise.toml
More file actions
376 lines (298 loc) · 14.6 KB
/
mise.toml
File metadata and controls
376 lines (298 loc) · 14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
[settings]
experimental = true
[hooks]
postinstall = "if [ -z \"$CI\" ]; then lefthook install --force; fi"
[env]
# GDK root directory. Override with an absolute path, e.g: export GDK_ROOT=$HOME/workspace/gdk
# GDK_DIR is also accepted as an alias for GDK_ROOT.
# Do not use ~ (tilde is not expanded in variable values).
GDK_ROOT_RESOLVED = "{{env.GDK_ROOT | default(value=env.GDK_DIR | default(value=env.HOME ~ '/gitlab/gdk'))}}"
# Path to Siphon repository for proto compilation (siphon-proto crate)
# Clone from: https://gitlab.com/gitlab-org/analytics-section/siphon
SIPHON_PROTO_ROOT = "{{env.GDK_ROOT | default(value=env.GDK_DIR | default(value=env.HOME ~ '/gitlab/gdk'))}}/siphon"
# Auto-download prebuilt DuckDB shared library on first build (cached in target/).
DUCKDB_DOWNLOAD_LIB = "{{env.DUCKDB_DOWNLOAD_LIB | default(value='1')}}"
[tools]
"rust" = { version = "1.95.0", components = "rustfmt,clippy", targets = "aarch64-unknown-linux-gnu,x86_64-unknown-linux-gnu" }
"cargo:cargo-nextest" = "0.9.123"
"cargo:cargo-edit" = "0.13.8"
"cargo:cargo-audit" = "0.22.0"
"cargo:cargo-deny" = "0.19.0"
"cargo:cargo-geiger" = "0.13.0"
"cargo:cargo-cyclonedx" = "0.5.7"
"cargo:cargo-zigbuild" = "0.21.5"
"cargo:ast-grep" = "0.42.0"
"cargo:https://gitlab.com/gitlab-org/rust/gitlab-xtasks" = "tag:v1.5.0"
"cargo:cargo-bolero" = "0.13.4"
"sccache" = "0.13.0"
"zig" = "0.15.2"
clickhouse = "25.12"
duckdb = "1.5.1"
uv = "0.9.28"
node = "24"
markdownlint-cli2 = "0.22.1"
lychee = "0.23"
vale = "3.14.1"
lefthook = "2.1.3"
protoc = "34.1"
jq = "1.7"
yq = "4.52.5"
hyperfine = "1.20.0"
"aqua:gitleaks/gitleaks" = "8.30.1"
"github:google/go-jsonnet" = "0.22.0"
[tasks."hooks:install"]
run = ["lefthook install", "cp scripts/hooks/post-checkout $(git rev-parse --git-common-dir)/hooks/post-checkout"]
description = "Install git hooks (lefthook + worktree support)"
[tasks."fuzz:compile"]
run = "cargo +nightly bolero test fuzz_compile -p gkg-fuzz"
description = "Fuzz the query compiler (compile JSON → SQL pipeline)"
[tasks."fuzz:compile-structured"]
run = "cargo +nightly bolero test fuzz_compile_structured -p gkg-fuzz"
description = "Fuzz the query compiler with structured JSON query generation"
[tasks."fuzz:ruby"]
run = "cargo +nightly bolero test fuzz_ruby -p gkg-fuzz"
description = "Fuzz the Ruby code parser"
[tasks."fuzz:python"]
run = "cargo +nightly bolero test fuzz_python -p gkg-fuzz"
description = "Fuzz the Python code parser"
[tasks."fuzz:typescript"]
run = "cargo +nightly bolero test fuzz_typescript -p gkg-fuzz"
description = "Fuzz the TypeScript/JavaScript code parser"
[tasks."fuzz:java"]
run = "cargo +nightly bolero test fuzz_java -p gkg-fuzz"
description = "Fuzz the Java code parser"
[tasks."fuzz:kotlin"]
run = "cargo +nightly bolero test fuzz_kotlin -p gkg-fuzz"
description = "Fuzz the Kotlin code parser"
[tasks."fuzz:csharp"]
run = "cargo +nightly bolero test fuzz_csharp -p gkg-fuzz"
description = "Fuzz the C# code parser"
[tasks."fuzz:rust-parser"]
run = "cargo +nightly bolero test fuzz_rust_parser -p gkg-fuzz"
description = "Fuzz the Rust code parser"
[tasks."fuzz:indexer-messages"]
run = "cargo +nightly bolero test fuzz_indexer_messages -p gkg-fuzz"
description = "Fuzz indexer message deserialization"
[tasks.build]
run = "cargo build --release"
description = "Build the crates"
[tasks."build:cli"]
run = "cargo build --bin orbit --release --features duckdb-client/bundled"
description = "Build the CLI"
[tasks.test]
run = "./scripts/run-unit-tests.sh"
description = "Run unit + non-Docker integration tests (auto-discovers test targets)"
[tasks."test:fast"]
run = "CARGO_PROFILE_TEST_DEBUG=0 CARGO_PROFILE_TEST_SPLIT_DEBUGINFO=unpacked ./scripts/run-unit-tests.sh"
description = "Run unit + non-Docker integration tests with reduced debug info"
[tasks."test:local"]
run = "cargo nextest run --test local"
description = "Run local integration tests — compiler + querying pipeline (no Docker)"
[tasks."test:integration:codegraph"]
run = "cargo nextest run -p integration-tests-codegraph --no-capture"
description = "Run code-graph v2 validator tests — YAML Cypher suites (no Docker)"
[tasks."test:cli"]
run = "cargo build -p orbit-local && cargo nextest run --test cli --no-fail-fast"
description = "Run CLI integration tests — concurrency, worktrees (no Docker)"
[tasks."test:integration"]
run = "cargo nextest run --all-features --test containers --no-fail-fast --retries 0"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run integration tests (requires Docker and `mise colima:start`)"
[tasks."test:integration:server"]
run = "cargo nextest run --all-features --test containers -j 4 --no-fail-fast --retries 0 -E 'test(data_correctness) | test(hydration_integration) | test(redaction_integration) | test(graph_formatter)'"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run server integration tests (data correctness, hydration, redaction, graph formatter)"
[tasks."test:integration:data"]
run = "cargo nextest run --all-features --test containers --no-fail-fast --retries 0 --no-capture -E 'test(data_correctness)'"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run data correctness integration tests"
[tasks."test:integration:indexer"]
run = "cargo nextest run --all-features --test containers --no-fail-fast --retries 0 -E 'test(indexer::)'"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run indexer integration tests (schema migration, engine, NATS, namespace deletion)"
[tasks."test:integration:indexer:code"]
run = "cargo nextest run -p integration-tests --retries 0 -E 'test(code_indexing_task)'"
env = { DOCKER_HOST = "unix://{{env.HOME}}/.colima/gkg/docker.sock" }
description = "Run indexer integration tests (code indexing)"
[tasks.clean]
run = ["cargo clean", "rm -rf lib/*/"]
description = "Clean the crates"
[tasks."lint:fmt"]
run = "cargo fmt --all -- --check"
description = "Check Rust formatting"
[tasks."lint:code"]
run = [
"cargo clippy --workspace --exclude duckdb-client --all-targets --all-features -- -D warnings",
"cargo clippy -p duckdb-client --all-targets -- -D warnings",
]
description = "Run clippy lint checks"
[tasks."lint:code:fix"]
run = [
"cargo fmt",
"cargo clippy --workspace --exclude duckdb-client --all-targets --all-features --fix --allow-dirty -- -D warnings",
"cargo clippy -p duckdb-client --all-targets --fix --allow-dirty -- -D warnings",
"cargo fmt",
]
description = "Run clippy lint checks and fix applicable issues"
[tasks."fix:newlines"]
run = "gitlab-xtasks lint verify-newlines --file-extensions rs,md,yml,yaml,toml,astro,js,ts,json,mdx,vue,rb,css,mjs --directory . --fix"
description = "Fix newlines formatting in the codebase"
[tasks."local:index:repo"]
run = 'cargo run --release --bin orbit -- index ${usage_repo_path?} --stats'
description = "Index a local repository"
usage = 'arg "<repo_path>"'
[tasks."diff:branch"]
run = "git diff --unified=0 origin/${usage_base:-main}...HEAD $(xargs < .gitdiffignore) > git_diff_full.txt"
description = "Diff current branch against an origin branch (default: main)"
usage = 'arg "[base]" default="main" help="Branch on origin to diff against"'
[tasks."query:profile"]
run = 'cargo run -p query-profiler -- "$@"'
description = "Profile a GKG query against ClickHouse (use -- to pass args)"
[tasks."query:diff"]
run = 'python3 scripts/devtools/diff-profiler-results.py "$@"'
description = "Compare query-profiler result files (use -- to pass args)"
[tasks."perf:gtime"]
run = "./scripts/devtools/gtime.sh"
[tasks."perf:rss"]
run = './scripts/devtools/average_rss.sh ${usage_repo_path?} ${usage_interval:-0.025}'
description = "Measure average RSS memory usage during indexing"
usage = '''
arg "<repo_path>"
arg "[interval]" default="0.025" help="Sampling interval in seconds"
'''
[tasks."bench:download-repos"]
run = "gitlab-xtasks benchmark download-repos --config code-indexing-benchmark.yaml"
description = "Download benchmark repositories"
[tasks."bench:run"]
depends = ["bench:download-repos"]
run = "cargo build --bin orbit --release --features duckdb-client/bundled && gitlab-xtasks benchmark hyperfine --config code-indexing-benchmark.yaml --architecture local"
description = "Run code indexing benchmark"
[tasks."bench:v2"]
depends = ["bench:download-repos"]
run = """
cargo build --bin orbit --release --features duckdb-client/bundled
for repo in output/repos/*/; do
name=$(basename "$repo")
echo "=== Indexing $name with v2 ==="
./target/release/orbit index "$repo" --stats 2>&1 || echo "FAILED: $name"
done
"""
description = "Run v2 pipeline against all downloaded benchmark repos"
[tasks."bench:list-repos"]
run = "gitlab-xtasks benchmark list-repos --config code-indexing-benchmark.yaml"
description = "List benchmark repositories"
[tasks."bench:list-groups"]
run = "gitlab-xtasks benchmark list-groups --config code-indexing-benchmark.yaml"
description = "List benchmark repo groups"
[tasks."proto:go"]
run = "scripts/proto-go.sh generate"
description = "Generate Go protobuf/gRPC stubs for Workhorse integration"
[tasks."proto:go:check"]
run = "scripts/proto-go.sh check"
description = "Verify Go proto stubs are up to date"
[tasks."proto:ruby"]
run = '''
mkdir -p crates/gkg-server/proto/ruby
protoc --ruby_out=crates/gkg-server/proto/ruby \
--grpc_out=crates/gkg-server/proto/ruby \
--plugin=protoc-gen-grpc=$(which grpc_ruby_plugin) \
-I crates/gkg-server/proto \
crates/gkg-server/proto/gkg.proto
echo "Ruby proto files generated in crates/gkg-server/proto/ruby/"
'''
description = "Generate Ruby protobuf files for Rails client"
[tasks."proto:build-gem"]
run = '''
BUNDLE_GEMFILE=tools/protogem/Gemfile bundle install --quiet
ruby tools/protogem/build-proto-gem
'''
description = "Build gitlab-gkg-proto Ruby gem from proto definitions"
[tasks."proto:publish-gem"]
depends = ["proto:build-gem"]
run = 'gem push _build/gitlab-gkg-proto-*.gem'
description = "Publish gitlab-gkg-proto gem to RubyGems.org"
[tasks."server:start"]
run = 'GKG_GITLAB__JWT__VERIFYING_KEY=${GKG_GITLAB__JWT__VERIFYING_KEY:-$(cat $GDK_ROOT_RESOLVED/gitlab/.gitlab_knowledge_graph_secret 2>/dev/null || cat $GDK_ROOT_RESOLVED/gitlab/.gitlab_shell_secret 2>/dev/null || echo "development-secret-at-least-32-bytes")} cargo run -p gkg-server'
description = "Start the GKG server (webserver mode)"
[tasks."server:dispatch"]
run = './scripts/run-dispatcher.sh'
description = "Start the GKG server (dispatch-indexing mode)"
[tasks.dev]
run = [
"mise run dev:check",
"mise run dev:web ::: dev:indexer ::: dev:dispatcher",
]
description = "Start a local GKG environment (webserver + indexer + dispatcher) connected to GDK services"
[tasks.gdk]
run = "mise run dev"
description = "Alias for the local GKG environment connected to GDK services"
[tasks."dev:check"]
run = "./scripts/gkg-native-dev.sh check"
description = "Verify GDK-connected local development prerequisites"
[tasks."dev:status"]
run = "./scripts/gkg-native-dev.sh env"
description = "Show the derived GDK-backed environment for local development"
[tasks."dev:restart"]
run = "mise run dev"
description = "Restart the local GKG environment"
[tasks."dev:stop"]
run = "echo 'Use Ctrl+C in the running mise session to stop all dev processes'"
description = "Explain how to stop the local GKG environment"
[tasks."dev:setup"]
run = "./scripts/gkg-native-dev.sh setup"
description = "Create the graph database and apply config/graph.sql to ClickHouse"
[tasks."dev:web"]
run = "GKG_BIND_ADDRESS=127.0.0.1:${GKG_SERVER_PORT:-8090} GKG_GRPC_BIND_ADDRESS=127.0.0.1:${GKG_SERVER_GRPC_PORT:-50054} GKG_METRICS__PROMETHEUS__ENABLED=${GKG_ENABLE_METRICS:-false} GKG_METRICS__PROMETHEUS__PORT=${GKG_METRICS_PORT:-9100} ./scripts/gkg-native-dev.sh webserver"
description = "Start a local GKG webserver connected to GDK services"
[tasks."dev:indexer"]
run = "GKG_INDEXER_HEALTH_BIND_ADDRESS=127.0.0.1:${GKG_INDEXER_PORT:-4202} GKG_NATS__CONSUMER_NAME=${GKG_INDEXER_CONSUMER:-gkg-indexer-dev} GKG_METRICS__PROMETHEUS__ENABLED=${GKG_ENABLE_METRICS:-false} GKG_METRICS__PROMETHEUS__PORT=${GKG_INDEXER_METRICS_PORT:-9200} ./scripts/gkg-native-dev.sh indexer"
description = "Start a local GKG indexer connected to GDK services"
[tasks."dev:dispatcher"]
run = "./scripts/gkg-native-dev.sh dispatcher"
description = "Start a local GKG dispatch-indexing process connected to GDK services"
[tasks."dev:healthcheck"]
run = "./scripts/gkg-native-dev.sh healthcheck"
description = "Start the local GKG health-check process"
[tasks."dev:env"]
run = "./scripts/gkg-native-dev.sh env"
description = "Print the derived local GKG environment"
[tasks."ontology:validate"]
run = "find config/ontology -name '*.yaml' ! -name 'reference.yaml' | xargs uvx check-jsonschema --verbose --schemafile config/schemas/ontology.schema.json"
description = "Validate ontology YAML files against JSON schema"
[tasks."schema:generate"]
run = "cargo xtask schema -o config/schemas/config.schema.json"
description = "Generate JSON Schema for the server configuration"
[tasks."metrics:catalog"]
run = "cargo xtask metrics-catalog"
description = "Regenerate crates/gkg-observability/orbit-dashboards/gkg-metrics.json"
[tasks."metrics:catalog:check"]
run = "cargo xtask metrics-catalog --check"
description = "Fail if the committed metrics catalog is out of date"
[tasks."dashboards"]
run = "cargo xtask dashboards"
description = "Regenerate dashboards/orbit/*.dashboard.json from jsonnet sources"
[tasks."dashboards:check"]
run = "cargo xtask dashboards --check"
description = "Fail if the committed dashboards are out of date"
[tasks."schema:generate:ddl"]
run = """
cargo run --bin orbit -- debug ddl 2>/dev/null > config/graph.sql.tmp && mv config/graph.sql.tmp config/graph.sql
cargo run --bin orbit -- debug ddl-local 2>/dev/null > config/graph_local.sql.tmp && mv config/graph_local.sql.tmp config/graph_local.sql
"""
description = "Regenerate config/graph.sql (ClickHouse) and config/graph_local.sql (DuckDB) from ontology"
[tasks."lint:markdown"]
run = "markdownlint-cli2 README.md 'docs/**/*.md'"
description = "Run markdownlint on all markdown files"
[tasks."lint:vale"]
run = "vale --minAlertLevel error README.md docs"
description = "Run Vale prose linting on markdown files"
[tasks."lint:links"]
run = "lychee --offline --include-fragments --exclude-path output --exclude-path .claude --exclude-path .opencode '**/*.md'"
description = "Check for broken links in markdown files"
[tasks."lint:docs"]
depends = ["lint:markdown", "lint:vale", "lint:links"]
run = "echo 'All doc linters passed'"
description = "Run all documentation linters"
[tasks."skill:sync:orbit"]
run = "cp docs/source/remote/queries/query-language.md skills/orbit/references/query_language.md"
description = "Sync upstream docs into the Orbit agent skill (skills/orbit/references/)"