Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
ci: write the shard manifest before any suite runs; warn on absent upload
Martin Vogelc1425d2e27c4
diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.ymlindex 3c9c23ddf..713f1af3b 100644--- a/.github/workflows/_test.yml+++ b/.github/workflows/_test.yml@@ -154,7 +154,12 @@ jobs:with:name: shard-manifest-${{ matrix.os }}-${{ matrix.cc }}-${{ strategy.job-index }}path: build/c/test-logs/shard-manifest.txt- if-no-files-found: error+ # The harness writes the manifest BEFORE any suite runs, so a+ # missing file here means the job died before the harness started+ # (contract step / build) — that failure is already the job's red;+ # warn instead of stacking a second error on top of it. The+ # shard-completeness job still gates the cross-shard union.+ if-no-files-found: warn- name: Compiler cache (save)if: always() && (matrix.shard == null || startsWith(matrix.shard, '1/'))@@ -330,7 +335,12 @@ jobs:with:name: shard-manifest-${{ matrix.os }}-${{ matrix.msystem }}-${{ strategy.job-index }}path: build/c/test-logs/shard-manifest.txt- if-no-files-found: error+ # The harness writes the manifest BEFORE any suite runs, so a+ # missing file here means the job died before the harness started+ # (contract step / build) — that failure is already the job's red;+ # warn instead of stacking a second error on top of it. The+ # shard-completeness job still gates the cross-shard union.+ if-no-files-found: warn# Shard 1 (or the unsharded job) saves the compiler cache; every shard# builds the identical runner, so one cache carries the full object set.diff --git a/scripts/run-tests-parallel.sh b/scripts/run-tests-parallel.shindex 263f40e63..3c0466eb1 100644--- a/scripts/run-tests-parallel.sh+++ b/scripts/run-tests-parallel.sh@@ -195,6 +195,22 @@ shard_filter < "$SER_FILE" > "$SER_FILE.shard" && mv "$SER_FILE.shard" "$SER_FILSHARD_EXPECT="$LOGDIR/suites-shard.txt"cat "$PAR_FILE" "$SER_FILE" > "$SHARD_EXPECT"NSHARD=$(wc -l < "$SHARD_EXPECT" | tr -d ' ')++# Machine-checkable manifest for CI's cross-shard completeness job: it+# proves at runtime that the shards of one leg agree on N and on the full+# suite list, and that the union of their slices IS that list — the guard+# against a mis-plumbed CBM_TEST_SHARD (two jobs running the same slice+# passes every per-shard check but silently drops a slice; only a+# cross-shard view catches it). Written BEFORE any suite runs: the slice is+# fully determined here, and a red run's manifest is exactly as load-bearing+# as a green one's — CI uploads it if: always().+{+ echo "leg=${CBM_TEST_LEG:-local}"+ echo "shard=${SHARD_INDEX}/${SHARD_TOTAL}"+ echo "list_sha256=$(sort "$SUITES_FILE" | { sha256sum 2>/dev/null || shasum -a 256; } | awk '{print $1}')"+ echo "--- slice ---"+ cat "$SHARD_EXPECT"+} > "$LOGDIR/shard-manifest.txt"echo "=== parallel test run: $NSHARD of $NSUITES suites (shard ${SHARD_INDEX}/${SHARD_TOTAL}, $(wc -l < "$SER_FILE" | tr -d ' ') serial-tail), $JOBS jobs ==="# Per-suite wall-clock ceilings make a wedged child fail loudly. The@@ -255,20 +271,6 @@ stamp_windows_build_dir pre-tailrun_wave "$FLEX_FILE" "${CBM_TAIL_JOBS:-2}"run_wave "$EXCL_FILE" 1-# Machine-checkable manifest for CI's cross-shard completeness job: it-# proves at runtime that the shards of one leg agree on N and on the full-# suite list, and that the union of their slices IS that list — the guard-# against a mis-plumbed CBM_TEST_SHARD (two jobs running the same slice-# passes every per-shard check but silently drops a slice; only a-# cross-shard view catches it).-{- echo "leg=${CBM_TEST_LEG:-local}"- echo "shard=${SHARD_INDEX}/${SHARD_TOTAL}"- echo "list_sha256=$(sort "$SUITES_FILE" | { sha256sum 2>/dev/null || shasum -a 256; } | awk '{print $1}')"- echo "--- slice ---"- cat "$SHARD_EXPECT"-} > "$LOGDIR/shard-manifest.txt"-# ── Union guard: every suite in this shard's slice produced exactly one# result. The slice is deterministic, so N green shard jobs = full coverage;# a shard that ran anything more, less, or twice fails here. ──