-
Notifications
You must be signed in to change notification settings - Fork 1
393 lines (375 loc) · 20.6 KB
/
Copy pathscip-nightly.yml
File metadata and controls
393 lines (375 loc) · 20.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
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
name: SCIP overlay (nightly)
# Runs the real-external-indexer integration tests that `ci.yml` deliberately
# skips on every push/PR (`#[ignore]`d — they need a heavy binary installed
# and are too slow/flaky to gate merges on). See the 8-language plan doc's
# P0.5: docs/superskills/plans/2026-07-07-eight-lang-formal-tier.md
#
# One job per provider, deliberately NOT a single monolithic job — audited
# 2026-07-15 after discovering the previous single-job shape meant one
# provider's install failure (scip-php, blocked by a Composer security
# advisory since 2026-07-09) skipped `cargo test -- --ignored` entirely, so
# scip-go/scip-java/scip-dotnet got zero fresh CI evidence too even on days
# their own installs succeeded (`git log`/`gh run view` on this file's
# history confirms Rust is the only provider with a real green run in this
# workflow's history, 2026-07-08). Splitting into independent jobs means a
# broken provider only ever costs that provider's own signal.
on:
schedule:
- cron: "0 3 * * *" # 03:00 UTC daily
workflow_dispatch: {}
jobs:
# `go`/`node`/`npm`/JDK/Maven/Gradle/.NET SDK/PHP+Composer are all
# preinstalled on the `ubuntu-latest` runner image
# (github.com/actions/runner-images) — no `actions/setup-*` step needed for
# any of them, so nothing new to SHA-pin per job beyond what was already
# pinned below.
scip-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: rust-analyzer
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-rust
- name: Run real-indexer integration test (rust-analyzer scip)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
overlay_upgrades_a_real_edge_on_the_fixture
# `calm-cli/tests/scip_overlay_cli.rs` mirrors the test above but drives
# the real `calm` binary as a subprocess (`calm index --project-root`),
# so it also exercises the CLI's own overlay wiring instead of calling
# `run_overlay` directly. Needs the same rust-analyzer install as the
# job above, so it piggybacks this job rather than getting its own —
# never previously wired into this workflow despite existing in source
# (audited 2026-07-28: `.github/workflows/scip-nightly.yml` only ran
# `-p calm-core`, so this CLI-level regression guard had zero real CI
# runs behind it).
- name: Run real-indexer integration test (calm-cli, rust-analyzer scip)
run: |
cargo test -p calm-cli --features scip-overlay -- --ignored \
calm_index_cli_upgrades_a_real_edge_on_the_fixture
# B2 (benchmarks/b2_call_graph_quality) -- self-repo Rust call-graph
# precision/recall against a rust-analyzer SCIP oracle. Self-contained (no
# external corpus clone, pure-stdlib Python script) so unlike B7 it's
# cheap enough to gate nightly rather than staying manual-only -- see
# scripts/check-b2-thresholds.sh for the floors and why they were picked.
# Piggybacks this job's own rust-analyzer install (same reasoning as the
# calm-cli step in scip-rust above) rather than getting a separate one.
b2-call-graph-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: rust-analyzer
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: b2-call-graph-quality
- name: Build calm-cli with scip-overlay (needed for the hidden scip-dump subcommand)
run: cargo build --release -p calm-cli --features scip-overlay
- name: Run B2 benchmark (self-repo)
run: python3 benchmarks/b2_call_graph_quality/run_benchmark.py
- name: Check B2 results against regression floors
run: scripts/check-b2-thresholds.sh
scip-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-go
- name: Install scip-go
run: |
set -euo pipefail
# Release metadata verified 2026-07-31 through GitHub's API.
# Keep URL, tag, and digest together: do not substitute `latest`.
SCIP_GO_VERSION=v0.2.7
SCIP_GO_SHA256=5bfe39016ca04f5b3b1cce41d1b63ea120a7d7e93b55407bfb17a6b02d18135a
SCIP_GO_ARCHIVE="$RUNNER_TEMP/scip-go-linux-amd64.tar.gz"
curl -sSfL -o "$SCIP_GO_ARCHIVE" \
"https://github.com/scip-code/scip-go/releases/download/${SCIP_GO_VERSION}/scip-go-linux-amd64.tar.gz"
echo "${SCIP_GO_SHA256} ${SCIP_GO_ARCHIVE}" | sha256sum --check --status -
tar -xzf "$SCIP_GO_ARCHIVE" -C "$RUNNER_TEMP"
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Record pinned scip-go version
run: scip-go --version
- name: Run real-indexer integration tests (scip-go)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
go_overlay_upgrades_a_real_edge_on_the_multi_lang_fixture \
go_workspace_overlay_upgrades_edges_in_both_member_modules
# `scip-python` runs through `npx` on demand (see `runner.rs`'s
# `python_resolve_binary`) and needs no separate install step — only
# network access to the npm registry, which this runner already has.
scip-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-python
# This job's runner starts cold every night (no npm/npx cache step exists
# here, unlike Cargo above) -- a first-ever `npx --yes @sourcegraph/
# scip-python` has to resolve+download the package and its own dependency
# tree from the npm registry, which routinely takes well over 3s. The
# in-test availability probe (`probe_succeeds`/`PROBE_TIMEOUT` in
# `crates/calm-core/src/scip/runner.rs`) budgets only 3s, calibrated
# against an already-warm cache -- on a cold runner it was timing out,
# silently reporting "no python indexer found" (logged at `info!`, below
# the test's default `warn` filter) and failing the test every night
# since 2026-07-22 (bisected to 15aebba, which added the timeout). This
# unbounded warm-up absorbs that one-time cold resolve before the timed
# in-test probe ever runs, without loosening the timeout itself (which is
# fine for its intended warm-cache case).
- name: Warm npx cache for scip-python
run: npx --yes @sourcegraph/scip-python --version
- name: Run real-indexer integration test (scip-python via npx)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
python_overlay_upgrades_a_real_edge_on_the_multi_lang_fixture
# `scip-typescript` (covers JS+TS) also runs through `npx` on demand (see
# `runner.rs`'s `js_resolve_binary`) — same no-install-step shape as Python.
scip-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-js
# Same cold-runner/timed-probe race as scip-python above (both share
# `probe_succeeds`/`PROBE_TIMEOUT`, added in the same commit) -- absorb
# the one-time cold npx resolve here, unbounded, before the in-test 3s
# probe runs.
- name: Warm npx cache for scip-typescript
run: npx --yes @sourcegraph/scip-typescript --version
- name: Run real-indexer integration test (scip-typescript via npx)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
js_overlay_upgrades_a_real_edge_on_the_multi_lang_fixture
scip-java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-java
# `scip-java` has no standalone-binary release the way `scip-go`/
# rust-analyzer do; its docs recommend `cs bootstrap` (coursier) or the
# `sourcegraph/scip-java` Docker image, neither of which is preinstalled
# here either. This step instead does what `cs bootstrap` does under
# the hood — resolve the `com.sourcegraph:scip-java_2.13` Maven Central
# artifact's full runtime classpath via Maven (already on `PATH`, needs
# no `coursier` install of its own) and wrap it in a launcher script —
# verified for real in the session that added this step (see the
# 8-language plan's P2.2). Bump SCIP_JAVA_VERSION when a newer release
# is verified the same way.
- name: Install scip-java
run: |
set -euo pipefail
SCIP_JAVA_VERSION=0.10.4
BOOTSTRAP_DIR="$RUNNER_TEMP/scip-java-bootstrap"
mkdir -p "$BOOTSTRAP_DIR"
curl -sSfL -o "$BOOTSTRAP_DIR/scip-java.jar" \
"https://repo1.maven.org/maven2/com/sourcegraph/scip-java_2.13/${SCIP_JAVA_VERSION}/scip-java_2.13-${SCIP_JAVA_VERSION}.jar"
cat > "$BOOTSTRAP_DIR/pom.xml" <<EOF
<project xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>local</groupId>
<artifactId>scip-java-bootstrap</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>com.sourcegraph</groupId>
<artifactId>scip-java_2.13</artifactId>
<version>${SCIP_JAVA_VERSION}</version>
</dependency>
</dependencies>
</project>
EOF
mvn -q -B -f "$BOOTSTRAP_DIR/pom.xml" dependency:build-classpath \
-Dmdep.outputFile="$BOOTSTRAP_DIR/cp.txt"
mkdir -p "$HOME/.local/bin"
cat > "$HOME/.local/bin/scip-java" <<EOF
#!/usr/bin/env bash
exec java -cp "$BOOTSTRAP_DIR/scip-java.jar:\$(cat "$BOOTSTRAP_DIR/cp.txt")" \
com.sourcegraph.scip_java.ScipJava "\$@"
EOF
chmod +x "$HOME/.local/bin/scip-java"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run real-indexer integration test (scip-java)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
java_overlay_upgrades_a_real_edge_on_the_multi_lang_fixture
# Kotlin (`kotlin_overlay_upgrades_ambiguous_smart_cast_calls_on_the_
# multi_lang_fixture`) piggybacks this same `scip-java` provider but
# additionally needs a Gradle new enough for the Kotlin Gradle plugin
# (`kotlin("jvm") version "1.9.22"` needs Gradle 8.x; this runner image's
# system `gradle`, like the sandbox that wrote the test, may be too
# old) — deliberately not wired into this job yet. Add a
# `gradle/actions/setup-gradle` step + the test's own name to the
# filter above once that's verified for real on a runner, rather than
# guessing the version requirement is satisfied.
scip-csharp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-csharp
# `scip-dotnet` is a real NuGet-published `dotnet tool`, confirmed by
# installing and running it for real in the session that added this
# step (see the 8-language plan's P2.3) — no bespoke Maven-style
# bootstrap needed the way `scip-java` above is.
- name: Install scip-dotnet
run: |
set -euo pipefail
dotnet tool install --global scip-dotnet
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
- name: Run real-indexer integration test (scip-dotnet)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
csharp_overlay_upgrades_a_real_edge_on_the_multi_lang_fixture
scip-php:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-php
# NOT installed via `composer global/project require` — that pulls
# Packagist's `v0.0.2` (2023-04-23, the only tagged release, confirmed
# via `repo.packagist.org/p2/davidrjenni/scip-php.json`), which has two
# real, independent problems verified 2026-07-15:
#
# 1. Composer 2.9's `audit.block-insecure` refuses it outright: v0.0.2
# requires `google/protobuf ^3.22`, entirely covered by advisory
# PKSA-tcfz-w4fm-hhk9 (= GHSA-p2gh-cfq4-4wjc = CVE-2026-6409, a
# protobuf-decode DoS, fixed upstream in protobuf >=4.33.6).
# 2. Even bypassing that (tried both `composer global require` and the
# README's own documented `composer require --dev` + `vendor/bin/
# scip-php` — both fail identically): v0.0.2 crashes with
# `RuntimeException: Invalid scip-php vendor directory`, a known bug
# (github.com/davidrjenni/scip-php#235, 3 independent users hit it)
# already fixed upstream by PR #797 (merged 2026-03-28) — but that
# fix has never been cut into a Packagist release or rebuilt into
# the `davidrjenni/scip-php` Docker Hub image either (confirmed live
# — pulled `:latest`, its bundled `Composer.php` still has no `$cwd`
# fallback, i.e. still pre-#797). Reported upstream:
# github.com/davidrjenni/scip-php/issues/862, asking for a release —
# not yet acted on as of this comment.
#
# Both problems disappear at once by installing straight from `main`
# at a pinned commit instead of from Packagist: `main`'s own
# `composer.json` already requires `google/protobuf ^5.34` (nowhere
# near the advisory range — problem 1 gone, no `policy.advisories.
# ignore-id` needed at all) and it carries PR #797's fix (problem 2
# gone). Verified end-to-end 2026-07-15 on a plain `ubuntu:24.04`
# container (same distro `ubuntu-latest` runners use): clone, `composer
# install --no-dev`, run against a real fixture, real `Helper#greet()`
# occurrence in the resulting `.scip` file, zero advisory prompts.
# Pinned to an exact commit (not floating `main`) for the same reason
# every Action below is SHA-pinned — reproducible, and immune to a
# future upstream commit breaking this job in some unrelated way.
# Bump `SCIP_PHP_COMMIT` by hand once upstream cuts a real release
# (then switch this back to a normal Packagist install).
- name: Install scip-php (from source, pinned past-#797 commit — see comment above)
run: |
set -euo pipefail
SCIP_PHP_COMMIT=71a5b117ec4c5dd2af302e363410e604e5df309e
git clone https://github.com/davidrjenni/scip-php "$RUNNER_TEMP/scip-php-src"
git -C "$RUNNER_TEMP/scip-php-src" checkout --quiet "$SCIP_PHP_COMMIT"
composer install --no-interaction --no-dev --working-dir="$RUNNER_TEMP/scip-php-src"
mkdir -p "$HOME/.local/bin"
cat > "$HOME/.local/bin/scip-php" <<EOF
#!/usr/bin/env bash
exec php "$RUNNER_TEMP/scip-php-src/bin/scip-php" "\$@"
EOF
chmod +x "$HOME/.local/bin/scip-php"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run real-indexer integration test (scip-php)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
php_overlay_upgrades_a_real_edge_on_the_multi_lang_fixture
scip-ruby:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-ruby
# `scip-ruby` (Sourcegraph's fork of Sorbet) publishes a `gem install
# scip-ruby`, but its installed `bin/scip-ruby` is a thin RubyGems
# wrapper that hard-requires `BUNDLE_GEMFILE` and refuses to run
# standalone (`ruby_resolve_binary`'s doc comment in `runner.rs`) — so
# `php_resolve_binary`-style PATH lookup only works against the
# README's other install method, a raw platform binary. Added here for
# the first time (2026-07-15) — never previously wired into this
# workflow despite the provider shipping 2026-07-11 — verified for
# real before writing this step: this exact URL 200s and the binary
# runs standalone (`scip-ruby --version`) on an unrestricted runner.
# Only x86_64 Linux / arm64 macOS have prebuilt binaries; this job's
# `ubuntu-latest` runner is x86_64 Linux.
- name: Install scip-ruby
run: |
set -euo pipefail
SCIP_RUBY_VERSION=scip-ruby-v0.4.7
SCIP_RUBY_SHA256=a068c7c3b2042b9eac563ce77ce35dcaca666b418530b1db9f932a3dbc7175dd
curl -sSfL -o "$RUNNER_TEMP/scip-ruby" \
"https://github.com/sourcegraph/scip-ruby/releases/download/${SCIP_RUBY_VERSION}/scip-ruby-x86_64-linux"
echo "${SCIP_RUBY_SHA256} $RUNNER_TEMP/scip-ruby" | sha256sum --check --status -
chmod +x "$RUNNER_TEMP/scip-ruby"
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Record pinned scip-ruby version
run: scip-ruby --version
- name: Run real-indexer integration test (scip-ruby)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
ruby_overlay_upgrades_ambiguous_case_when_calls_on_the_multi_lang_fixture
scip-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
with:
key: scip-clang
# `provider::CLANG` had never been live-verified anywhere before
# 2026-07-15 — the session that scaffolded it hit a hard sandbox
# egress block on GitHub Releases and had no Bazel to build from
# source. Verified for real before adding this step: a genuine
# `ubuntu-latest` runner has unrestricted internet access (unlike that
# sandbox), this URL 200s, `--compdb-path`/`--index-output-path`/`-j`
# match `clang_build_command` exactly, and it indexes the checked-in
# `multi_lang_workspace/c` fixture correctly (see the new
# `clang_overlay_upgrades_a_real_edge_on_the_c_fixture` test's own doc
# comment in `scip/mod.rs` for a real bug found along the way:
# `scip-clang` requires an absolute `directory` in
# `compile_commands.json`, which that test works around in a tempdir
# copy rather than the checked-in fixture itself). Only x86_64 Linux /
# arm64 macOS have prebuilt binaries, matching `clang_platform_
# supported`'s own gate in `runner.rs`.
- name: Install scip-clang
run: |
set -euo pipefail
SCIP_CLANG_VERSION=v0.4.0
SCIP_CLANG_SHA256=06fd18c576f979a726c651594644ec4a35db4f471f2160b3f72eb89fa6001784
curl -sSfL -o "$RUNNER_TEMP/scip-clang" \
"https://github.com/sourcegraph/scip-clang/releases/download/${SCIP_CLANG_VERSION}/scip-clang-x86_64-linux"
echo "${SCIP_CLANG_SHA256} $RUNNER_TEMP/scip-clang" | sha256sum --check --status -
chmod +x "$RUNNER_TEMP/scip-clang"
echo "$RUNNER_TEMP" >> "$GITHUB_PATH"
- name: Record pinned scip-clang version
run: scip-clang --version
- name: Run real-indexer integration test (scip-clang)
run: |
cargo test -p calm-core --features scip-overlay -- --ignored \
clang_overlay_upgrades_a_real_edge_on_the_c_fixture