Skip to content

Commit 7fbaf02

Browse files
authored
Merge branch 'main' into fix/1815-symlink-skip-not-reported
2 parents 0365ef9 + fe85a6b commit 7fbaf02

290 files changed

Lines changed: 1753973 additions & 467679 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitattributes‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ internal/cbm/vendored/grammars/**/scanner.c linguist-generated=true diff=false
1111
# the git hooks are extensionless and need explicit entries. (#1272)
1212
scripts/git-hooks/commit-msg text eol=lf
1313
scripts/hooks/pre-commit text eol=lf
14+
15+
# Chialisp grammar corpus: one case asserts CRLF comment termination, so this
16+
# file must keep its exact bytes on every platform (no eol conversion). (#919)
17+
tools/tree-sitter-chialisp/test/corpus/comments.txt -text

‎.github/workflows/_build.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
9898
- name: Attest release candidate provenance
9999
if: ${{ inputs.attest }}
100-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
100+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
101101
with:
102102
subject-path: |
103103
release-candidates/${{ matrix.goos }}-${{ matrix.goarch }}/candidate-provenance.tsv
@@ -155,7 +155,7 @@ jobs:
155155
156156
- name: Attest release candidate provenance
157157
if: ${{ inputs.attest }}
158-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
158+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
159159
with:
160160
subject-path: |
161161
release-candidates/windows-amd64/candidate-provenance.tsv
@@ -217,7 +217,7 @@ jobs:
217217
218218
- name: Attest release candidate provenance
219219
if: ${{ inputs.attest }}
220-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
220+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
221221
with:
222222
subject-path: |
223223
release-candidates/windows-arm64/candidate-provenance.tsv
@@ -280,7 +280,7 @@ jobs:
280280
281281
- name: Attest release candidate provenance
282282
if: ${{ inputs.attest }}
283-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
283+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
284284
with:
285285
subject-path: |
286286
release-candidates/linux-${{ matrix.arch }}-portable/candidate-provenance.tsv
@@ -432,7 +432,7 @@ jobs:
432432
433433
- name: Attest selected containers and decision evidence
434434
if: ${{ inputs.attest }}
435-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
435+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
436436
with:
437437
subject-path: |
438438
release-containers/**/*.tar.gz

‎.github/workflows/_security.yml‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,25 @@ jobs:
4242
runs-on: ubuntu-latest
4343
timeout-minutes: 240
4444
steps:
45-
- name: Wait for CodeQL on current commit (max 45 min)
45+
- name: Wait for CodeQL on current commit (max 150 min)
4646
env:
4747
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848
run: |
4949
# On pull_request events github.sha is the synthetic merge commit;
5050
# CodeQL runs are recorded against the PR head SHA.
5151
CURRENT_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
5252
echo "Waiting for CodeQL to complete on $CURRENT_SHA..."
53-
for attempt in $(seq 1 90); do
53+
# 300 attempts x 30s = 150 min. The previous budget was 90 x 30s = 45 min,
54+
# which is shorter than CodeQL actually takes on this repository: a measured
55+
# run on PR #1426 (head 7b72652a) completed with conclusion=success after
56+
# 124 min, 7 minutes AFTER this gate had already given up. That marked at
57+
# least five contributor PRs red for a scan that passed. The job's own
58+
# timeout-minutes is 240, so 150 still leaves headroom.
59+
for attempt in $(seq 1 300); do
5460
LATEST=$(gh api "repos/${{ github.repository }}/actions/workflows/codeql.yml/runs?head_sha=$CURRENT_SHA&per_page=1" \
5561
--jq '.workflow_runs[] | "\(.conclusion) \(.status)"' 2>/dev/null | head -1 || echo "")
5662
if [ -z "$LATEST" ]; then
57-
echo " $attempt/90: no run yet..."; sleep 30; continue
63+
echo " $attempt/300: no run yet..."; sleep 30; continue
5864
fi
5965
CONCLUSION=$(echo "$LATEST" | cut -d' ' -f1)
6066
STATUS=$(echo "$LATEST" | cut -d' ' -f2)
@@ -63,7 +69,7 @@ jobs:
6369
elif [ "$STATUS" = "completed" ]; then
6470
echo "BLOCKED: CodeQL $CONCLUSION"; exit 1
6571
fi
66-
echo " $attempt/90: $STATUS..."; sleep 30
72+
echo " $attempt/300: $STATUS..."; sleep 30
6773
done
6874
echo "BLOCKED: CodeQL timeout"; exit 1
6975

‎.github/workflows/_test.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,14 @@ jobs:
311311
steps:
312312
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
313313

314+
# Pinned: the unversioned `llvm` formula tracks Homebrew stable, so the
315+
# leg's compiler changed under us when stable moved 22 -> 23 (a new
316+
# -Wunused-but-set-global under -Werror broke the build on whichever
317+
# runner drew the 23 bottle, and passed on the ones that drew 22). A
318+
# test verdict must be a function of the code, not of the image snapshot;
319+
# moving to a newer major is a deliberate one-line bump here.
314320
- name: Install LSan-capable toolchain
315-
run: brew install llvm ccache
321+
run: brew install llvm@22 ccache
316322

317323
- name: Compiler cache (content-verified, restore)
318324
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
@@ -327,7 +333,7 @@ jobs:
327333
env:
328334
ASAN_OPTIONS: "detect_leaks=1:halt_on_error=1"
329335
run: |
330-
LLVM_PREFIX="$(brew --prefix llvm)"
336+
LLVM_PREFIX="$(brew --prefix llvm@22)"
331337
scripts/test.sh CC="$LLVM_PREFIX/bin/clang" CXX="$LLVM_PREFIX/bin/clang++"
332338
333339
- name: Compiler cache (save)

‎.github/workflows/codeql.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: sudo apt-get update && sudo apt-get install -y zlib1g-dev
3030

3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
32+
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
3333
with:
3434
languages: c-cpp
3535
build-mode: manual
@@ -38,6 +38,6 @@ jobs:
3838
run: scripts/build.sh
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
41+
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
4242
with:
4343
category: "/language:c-cpp"

‎.github/workflows/pages.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ jobs:
4141
with:
4242
path: ./docs
4343
- id: deployment
44-
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
44+
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
run: scripts/ci/append-legacy-alias-checksums.sh checksums.txt
203203

204204
- name: Attest checksum provenance
205-
uses: actions/attest-build-provenance@0f67c3f4856b2e3261c31976d6725780e5e4c373 # v4.1.1
205+
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
206206
with:
207207
subject-path: checksums.txt
208208

@@ -259,7 +259,7 @@ jobs:
259259
git tag -f "$VERSION" "$GITHUB_SHA"
260260
git push origin "$VERSION" --force
261261
262-
- uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v2
262+
- uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
263263
with:
264264
tag_name: ${{ inputs.version }}
265265
draft: true

‎.github/workflows/scorecard.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
publish_results: true
2828

2929
- name: Upload SARIF results
30-
uses: github/codeql-action/upload-sarif@5595ccaf912efad79be6eef63a5619ff05969be3 # v4
30+
uses: github/codeql-action/upload-sarif@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4
3131
with:
3232
sarif_file: results.sarif

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,7 @@ soak-results-query-leak/
8686
# Scorecard as a binary artifact in source). Source only, never the build.
8787
/pkg/go/codebase-memory-mcp
8888
/pkg/go/codebase-memory-mcp.exe
89+
90+
# Nix build symlinks (nix build → ./result, ./result-1, …)
91+
/result
92+
/result-*

‎Makefile.cbm‎

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,35 @@ endif
181181
# ~259 MB of tree-sitter parse tables was mapped executable at runtime while the
182182
# amd64 build of the same source mapped them R only. That is a large ROP gadget
183183
# surface for data that is never executed, and it is invisible to section flags.
184+
#
185+
# -z relro + -z now finish the same job on the OTHER writable-but-shouldn't-be
186+
# region: the GOT. Both are free at runtime here (a static binary resolves
187+
# everything at link time, so there is no lazy binding left to pay for), and
188+
# they are added because the SHIPPED artifact measurably lacked the property --
189+
# not because the linker accepts the flags. Measured on this binary, built the
190+
# way .github/workflows/_build.yml builds the Linux release (STATIC=1, gcc 13.3
191+
# / GNU ld 2.42, Ubuntu 24.04 aarch64); PT_GNU_RELRO ends at 0x11DA0000 in both:
192+
#
193+
# without -z now: .got 0x11d9ec20+0x13c8, .got.plt 0x11d9ffe8+0x40
194+
# -> .got.plt ends at 0x11DA0028, i.e. 40 bytes PAST the
195+
# window: those GOT slots stayed writable for the whole
196+
# process lifetime, in every Linux binary we have shipped
197+
# with -z now: .got.plt folded into .got (0x11d9ec20+0x13c8, ends
198+
# 0x11D9FFE8) -> the whole GOT is inside the window and is
199+
# re-mapped read-only after startup
200+
#
201+
# -z relro is already this toolchain's default and changes nothing here; it is
202+
# named anyway so the property stops depending on one distro's spec file (the
203+
# musl/portable and glibc-floor images are different toolchains, and a default
204+
# is not a guarantee). A1c/A1d in scripts/ci/check-binary-composition.sh assert
205+
# the OUTCOME on the produced binary, because a flag the compiler accepts is
206+
# not evidence that the artifact gained anything -- the same reason A1 exists
207+
# next to the .note.GNU-stack annotation.
184208
ELF_HARDENING_FLAGS :=
185209
ifeq ($(IS_LINUX),yes)
186210
ifneq ($(IS_MINGW),yes)
187-
ELF_HARDENING_FLAGS := -Wl,-z,noexecstack -Wl,-z,separate-code
211+
ELF_HARDENING_FLAGS := -Wl,-z,noexecstack -Wl,-z,separate-code \
212+
-Wl,-z,relro -Wl,-z,now
188213
endif
189214
endif
190215

@@ -354,8 +379,10 @@ PIPELINE_SRCS = \
354379
src/pipeline/pass_similarity.c \
355380
src/pipeline/pass_semantic_edges.c \
356381
src/pipeline/pass_complexity.c \
382+
src/pipeline/pass_importance.c \
357383
src/pipeline/pass_cross_repo.c \
358384
src/pipeline/artifact.c \
385+
src/pipeline/pass_ensemble_routing.c \
359386
src/pipeline/pass_pkgmap.c
360387

361388
# SimHash / MinHash module
@@ -559,7 +586,7 @@ TEST_DISCOVER_SRCS = \
559586

560587
TEST_GRAPH_BUFFER_SRCS = tests/test_graph_buffer.c
561588

562-
TEST_PIPELINE_SRCS = tests/test_registry.c tests/test_pipeline.c tests/test_cross_repo.c tests/test_fqn.c tests/test_route_canon.c tests/test_path_alias.c tests/test_configlink.c tests/test_infrascan.c tests/test_worker_pool.c tests/test_parallel.c tests/test_index_resilience.c tests/test_call_reference_contract.c tests/repro/repro_call_scope_usages.c tests/repro/repro_call_argument_usages.c tests/repro/repro_reference_precision.c tests/repro/repro_lexical_binding_precision.c tests/repro/repro_call_argument_matrix_a.c tests/repro/repro_call_argument_matrix_b.c tests/repro/repro_call_node_behaviors.c tests/repro/repro_language_registry.c tests/repro/repro_call_node_manifest.c tests/repro/repro_lsp_ordered_signatures.c tests/repro/repro_lsp_ordered_local.c tests/repro/repro_ts_overload_return_chains.c tests/repro/repro_harness_cleanup.c tests/repro/repro_runner_filter.c
589+
TEST_PIPELINE_SRCS = tests/test_registry.c tests/test_pipeline.c tests/test_importance.c tests/test_cross_repo.c tests/test_fqn.c tests/test_route_canon.c tests/test_path_alias.c tests/test_configlink.c tests/test_infrascan.c tests/test_worker_pool.c tests/test_parallel.c tests/test_index_resilience.c tests/test_index_format.c tests/test_call_reference_contract.c tests/repro/repro_call_scope_usages.c tests/repro/repro_call_argument_usages.c tests/repro/repro_reference_precision.c tests/repro/repro_lexical_binding_precision.c tests/repro/repro_call_argument_matrix_a.c tests/repro/repro_call_argument_matrix_b.c tests/repro/repro_call_node_behaviors.c tests/repro/repro_language_registry.c tests/repro/repro_call_node_manifest.c tests/repro/repro_lsp_ordered_signatures.c tests/repro/repro_lsp_ordered_local.c tests/repro/repro_ts_overload_return_chains.c tests/repro/repro_harness_cleanup.c tests/repro/repro_runner_filter.c
563590

564591
TEST_WATCHER_SRCS = tests/test_watcher.c
565592

0 commit comments

Comments
 (0)