Skip to content

ci: bounded sccache slots, windows Debug compiles only - #4567

Merged
borisbat merged 5 commits into
masterfrom
bbatkin/nightly-cache-and-debug-compile
Nov 12, 2026
Merged

borisbat merged 5 commits into
masterfrom
bbatkin/nightly-cache-and-debug-compile

Conversation

@borisbat

@borisbat borisbat commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior change: the extended checks run on linux, not macOS; the nightly's windows 64 Debug cell compiles and runs no test; every sccache slot of the build matrix is bounded; a sanitizer cell's slow job keeps a cache slot of its own.

Why. In the last full nightly most long lanes spent their time compiling C++ from scratch, not testing. The slots the nightly cells save were gone 16 hours later (Cache not found for tsan, asan, fastmath, mingw, windows Debug, extended windows and linux). build_matrix.yml never set SCCACHE_CACHE_SIZE, so a slot grew to sccache's 10G default: the two windows Release slots were 10.2 GiB each of 39.85 GiB in the repository.

What changes.

  • build_matrix.yml: SCCACHE_CACHE_SIZE is 5000M on windows and 2000M elsewhere, the way extended_checks.yml already bounds its slots.
  • build_matrix.yml: a sanitizer cell's slow job reads and writes sccache-...-<san>-slow@. It compiles the full test_aot (35 minutes under tsan), which is in no other job's objects, and it saved nothing before. tests and backend still share the slot tests writes.
  • ci/ci_matrix.py, build_matrix.yml: windows 64 Debug has phase compile and runs one step, the default build. Its interpreter sweep was 40 minutes of a 74-minute job; windows Release and the posix Debug cells run the sweeps. The raised watchdogs leave that cell with the sweep.
  • tests/CMakeLists.txt: run_tests_aot passes --timing-outliers 30, so the nightly log names the slowest files of the full AOT sweep.
  • ci/test_ci_matrix.py, skills/internal/preflight.md follow.

The sanitizer AOT sweep. Under tsan the full AOT sweep took 22 minutes; the timing report of this PR's first nightly shows 30 files are about 19 of them, and none is AOT code - they compile programs in process or launch daslang children. Top of the list, seconds under tsan / asan / ubsan / none: tests/lsp/uncategorized.das 166 / 89 / 28 / 28, tests/lint/test_stale_nolint.das 149 / 80 / 25 / 23, tests/module_cache/test_module_loading.das 135 / 87 / 27 / 25, tests/lint/test_parallel_equivalence.das 122 / 67 / 20 / 19.

  • tests/CMakeLists.txt: built with a sanitizer, run_tests_aot excludes tests/lsp, tests/lint, tests/module_cache, tests/dastest and tests/mcp. The interpreter sweep of the same cell still runs them.
  • dastest/dastest.das: --exclude with a / in the substring is matched against the whole path, so it names a folder; a substring without one still matches the base name alone.

The site gate. This PR's second nightly went red on macOS: site/REVIEW.das was killed at the gate runner's 600 s cap with no output. In that job the dasLLAMA lint step took 10m30s against 1m42s the run before, so the runner was slow, but the log could not say which sample the gate was compiling or whether it hung - the gate launched each compile with no timeout.

  • site/REVIEW.das: a sample compiles under a 300 s cap, below the runner's; a sample that runs out is a finding with its page and line, and a sample that takes 10 s or more prints its time.
  • utils/internal/review-md/gate.das: the runner prints the time of every gate that takes 10 s or more. The 600 s cap is unchanged.

Runner info. ci/runner_info.sh prints the runner's core count and model, total and available memory, load average and free disk on linux, macOS and windows; build_matrix.yml and extended_checks.yml run it after checkout and again when the job ends.

The extended checks move to linux. The runner info shows why macOS was slow: 3 cores and 7 GB, about 3 GB free at job start, load average 5 to 8 before the job does anything (22 at the end of the failed job); linux is 4 cores and 16 GB. Over the nightlies where both passed, the non-compile steps took 58 minutes on macOS and 31 on linux, and the third nightly of this PR went red on macOS again: the dasLLAMA sample linux compiles in 141 s did not finish in 300 s.

  • ci/ci_matrix.py: per PR the core and modules jobs are linux; the nightly all job runs on linux and windows. No extended check runs on macOS. The linux extended slot is now seeded by every master push.
  • ci/CMakeLists.txt: the dasLLVM vector-math rail, the one check cmake gives to Apple alone, joins run_build, so the darwin build cells run it per PR (Release).
  • extended_checks.yml loses its darwin install branch.

#nightly

Validation, not done

Validation

  • python ci/test_ci_matrix.py: 29 tests pass, with the new pins (the compile-only cell has a step that compiles, both workflows bound their slots, one writer per sanitizer slot).

  • review-md over the changed set (.github/workflows, ci, tests, root): exit 0. Line-length gate: clean.

  • test_aot ... --timing-outliers 40 on windows Release: 14575 tests, 0 failed, the report prints.

  • This PR's first nightly: windows 64 Debug ran Compile alone, 29 minutes against 74.

  • tests/dastest/test_json_output.das: 7 pass, with the new --exclude test (base-name match, a bare folder name excludes nothing, a path match, a path matching nothing).

  • review-md all: 37 gates, 0 red, and it now prints REVIEW.das site/REVIEW.das: 82 s and site: site/dasllama.html:284: sample 1 took 78 s to compile. utils/internal/review-md tests: 25 pass.

Not done

  • The linux per-PR jobs have not run before this push: their 35-minute budget is unmeasured, and the first run after merge compiles cold.
  • Per-PR extended checks now install from the Ubuntu archive and apt.llvm.org; an outage of either reddens them.
  • No test drives the site gate's timeout branch: it needs a compile that does not finish.
  • No workflow run exercised the edits: a pull request run saves no cache slot, and the cells changed here run only in the nightly.
  • The bounds are not measured against a full build's object size per cell; a bound below it shows as a falling hit rate in the job's sccache stats.

The build matrix never set SCCACHE_CACHE_SIZE, so a slot grew to
sccache's 10G default: the two windows Release slots held 10 GiB each
of a 40 GiB repository total, and the slots the nightly cells save once
a day were gone before the next nightly read them - tsan, asan,
fastmath, mingw, windows Debug and two extended cells all compiled
cold. Slots are now bounded, 5000M on windows and 2000M elsewhere.

A sanitizer cell's slow job compiles the full test_aot, which no other
job's objects hold, and it saved nothing; it now reads and writes a
slot of its own.

windows 64 Debug runs the default build and no test: its interpreter
sweep was 40 minutes of a 74-minute job.

The full AOT sweep prints its 30 slowest files, so a nightly log says
where a sanitizer's sweep time goes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 21:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🔵 Needs a closer look

The changes are limited to nightly-only GitHub Actions workflow behavior (phase gating and sccache key/prune semantics), which cannot be exercised in this review environment and therefore require confirmation via an actual scheduled run (including the Windows-64 Debug compile-only signal) before approval.

No open issues 🎉

What changed in this PR

Adjusts nightly CI to reduce cache eviction and wasted compute by bounding sccache usage, isolating sanitizer “slow” cache artifacts, and making Windows x64 Debug nightly compile-only while improving AOT sweep diagnostics.

Changes:

  • Bound sccache slot sizes across the build matrix (Windows 5000M, others 2000M) and give sanitizer “slow” jobs a dedicated cache slot.
  • Convert nightly Windows x64 Debug into a compile-phase job (build only) and update the CI matrix + tests accordingly.
  • Add timing-outlier reporting for the full AOT sweep and update preflight documentation to match the new nightly behavior.
File Description
tests/​CMakeLists.txt Updates the full AOT sweep runner to emit timing outliers so nightly logs surface the slowest test files.
skills/​internal/​preflight.md Refreshes internal preflight documentation to reflect the updated nightly matrix behavior, cache policy, and AOT timing reporting.
ci/​test_ci_matrix.py Adjusts CI-matrix tests/pins to match the new phases and cache-slot behavior in the build matrix.
ci/​ci_matrix.py Updates CI matrix generation to represent the revised nightly Windows Debug behavior and related matrix metadata.
.github/​workflows/​build_matrix.yml Modifies the build-matrix workflow to bound SCCACHE_CACHE_SIZE, adjust sanitizer cache slotting (including a separate “slow” slot), and make Windows x64 Debug nightly compile-only.

Review effort: Balanced

Under tsan the full AOT sweep took 22 minutes, and 30 files were 19 of
them. None is AOT code: they compile programs in process or launch
daslang children (tests/lsp, tests/lint, tests/module_cache,
tests/dastest, tests/mcp), so their time is the compiler's multiplied by
the sanitizer. The same files head the list under asan and with no
sanitizer. The interpreter sweep of the same cell already runs them.

run_tests_aot excludes those five folders when the tree is built with a
sanitizer. dastest --exclude matched the base name only; a substring
with a slash is now matched against the whole path, so it names a
folder.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🟡 Changes recommended

The change still has an unresolved moderate issue in tests/CMakeLists.txt where initializing an exclude list with an empty string can introduce an empty command argument and potentially break the custom command’s argument parsing.

1 open issue

Review effort: Balanced

Comment thread tests/CMakeLists.txt Resolved
The nightly's macOS extended checks went red on site/REVIEW.das killed
at the runner's 600 s cap with no output, so the log could not say
whether a sample's compile hung or the machine was slow, nor which
sample it was. The gate launched each compile with no timeout.

The site gate compiles a sample under a 300 s cap, below the runner's,
and a sample that runs out is a finding naming the page and line; a
sample that takes 10 s or more prints its time. The gate runner prints
the time of every gate that takes 10 s or more.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 00:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🔵 Needs a closer look

A moderate active issue remains in dastest/dastest.das where --exclude normalizes candidate paths but not user patterns, causing inconsistent and potentially incorrect matching on Windows compared to --test-only/--test-list.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity --exclude fails to normalize backslash patterns on Windows

dastest/​dastest.das:644

--exclude normalizes the candidate file path to forward slashes, but it does not normalize the user-provided pattern. On Windows, a user passing a backslash path substring (e.g. tests\\lint\\) will be treated as a base-name match instead of a path match, which is inconsistent with how --test-only/--test-list normalize user input.

1 resolved since last review

Review effort: Balanced

One macOS extended-checks job ran its dasLLAMA steps six times slower
than the run before it, and nothing in the log said what machine the
job had been given or how loaded it was.

ci/runner_info.sh prints the core count and model, total and available
memory, the load average and free disk, on linux, macOS and windows.
build_matrix.yml and extended_checks.yml run it after checkout and once
more when the job ends, so both ends of a slow job are on record.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 01:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🔵 Needs a closer look

The changes primarily affect CI and build cache behavior that is only broadly exercised on scheduled nightly runs, so it’s prudent to wait for a human to confirm the next nightly’s outcomes and cache hit rates before proceeding.

No open issues 🎉

Review effort: Balanced

The hosted macOS runner is 3 cores and 7 GB, about 3 GB of it free when
a job starts, on a host already loaded; the linux runner is 4 cores and
16 GB. Over the nightlies where both passed, macOS took 58 minutes for
the non-compile steps linux did in 31, and twice in a row it went red
on the site gate: the dasLLAMA sample linux compiles in 141 s did not
finish in 300 s there.

Per PR the two role jobs (core, modules) run on linux; the nightly runs
role all on linux and windows. The linux extended slot is now seeded by
every master push, where only the cron wrote it before.

The dasLLVM vector-math rail is the one check cmake gives to Apple
alone. It joins run_build, so the darwin build cells run it per PR.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 12, 2026 02:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

🔵 Needs a closer look

A moderate, undisclosed Windows-specific normalization discrepancy in how --exclude patterns are interpreted versus how file paths are normalized suggests a subtle cross-platform mismatch that warrants human review to assess impact and correctness.

No open issues 🎉

Review effort: Balanced

@borisbat
borisbat merged commit ea08473 into master Nov 12, 2026
64 checks passed
@borisbat
borisbat deleted the bbatkin/nightly-cache-and-debug-compile branch November 12, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants