# agentic-coverage-excludes.txt — paths skipped in the coverage agentic pass
#
# `tools/coverage/run-coverage.sh` reads this file and appends one
# `-exclude-prefix` flag to the agentic slang-test invocation for each
# entry. The agentic pass under coverage instrumentation can SIGSEGV
# inside slang-test on certain tests; the orchestrator dies and takes
# the tail of the suite down with it, so we exclude those tests up
# front to keep the rest of the suite running and producing coverage.
#
# This file is NOT consulted by nightly-slang-test.yml — those
# tests still run in the nightly against the uninstrumented binary,
# where they bucket as `failed(expected)` via expected-failures.txt
# where appropriate. The exclude is purely a coverage-stability hack.
#
# Format
# ------
# One path per line. Lines starting with `#` and blank lines are
# ignored. Comments after `#` on a path line are also stripped. Each
# entry is passed verbatim to slang-test's `-exclude-prefix` flag,
# which is a path-prefix filter — listing a directory excludes
# everything under it.
#
# Each entry SHOULD be accompanied by a `#` comment block above it
# documenting the symptom and how it was identified (CI run URL +
# the last-printed test before the crash), so a future maintainer
# can verify whether the underlying issue is still present.
#
# Reading a crash out of a coverage run
# -------------------------------------
# The agentic pass runs sequentially and in-process (`-server-count 1`,
# no `-use-test-server`), so a compiler SIGSEGV is a slang-test SIGSEGV.
# slang-test walks the suite in sorted path order and prints each result
# as it finishes, which makes the crashing test the one that comes
# immediately AFTER the last `passed test:`/`failed... test:` line before
# the `Segmentation fault`/`Bus error` message — it never gets to print
# its own result. Take that next path, add it here, and record the run
# URL plus the last-printed test in the comment block.
#
# Staleness signal
# ----------------
# `regenerate.py lint` checks that every path below still resolves on
# disk, so an entry orphaned by a regeneration round that renames or
# moves its test now fails the lint in nightly-slang-test.yml instead of
# silently excluding nothing. That catches the rename direction only.
#
# In the other direction, `-exclude-prefix` has no "passing tests that
# are expected to fail" reporter, so entries here can still rot silently
# once the underlying crash is fixed. To audit the list periodically:
#   1. Compile slang with coverage instrumentation locally.
#   2. Remove an entry below and run
#      `./tools/coverage/run-coverage.sh --with-agentic-tests`
#      (or trigger the coverage workflow on a branch with the
#      entry removed).
#   3. If the run completes without a SIGSEGV in slang-test, the
#      underlying crash has been fixed — drop the entry for real.
# A green nightly-slang-test.yml run on the same test is a
# necessary but NOT sufficient condition. Two things differ there:
# the binary is uninstrumented, and the test runs in a subprocess
# test server, so a fault is reported as a failure rather than taking
# the orchestrator with it. The exact failure mode varies per entry —
# see each entry's own comment block for its symptom and how (or
# whether) it also surfaces in the nightly.

# Local coverage reproducer (RelWithDebInfo + -fprofile-instr-generate,
# sequential -server-count 1): SIGSEGV in slang-test immediately after
# ir-reference/misc/string-hash-fold-emitted-constant.slang.6 passes —
# i.e. on the next test, string-hash-stable-value-cpu.slang. That test
# is a `//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu` case; the
# in-process CPU host-callable execution segfaults the slang-test
# process, so unlike a normal failure the expected-failures.txt entry
# (`... (cpu)`) cannot catch it — the whole orchestrator dies and the
# tail of the suite (design/* after misc, coverage/autodiff, …) never
# runs and produces no coverage. The compiler itself is fine
# (`slangc -target ...` compiles it); this is a harness/host-callable
# in-process crash, so nightly-slang-test.yml (subprocess/test-server)
# still buckets it as failed(expected) via expected-failures.txt.
docs/generated/tests/design/ir-reference/misc/string-hash-stable-value-cpu.slang

# HLSL-prelude state leak (NOT a crash). These four tests assert that emitted
# HLSL contains the standard prelude's NVAPI guard
# (`#ifdef SLANG_HLSL_ENABLE_NVAPI` / `#include "nvHLSLExtns.h"`). All four pass
# in isolation and fail here, because a preceding
# `//TEST:COMPARE_COMPUTE(...):-cpu` test poisons the session they share so the
# NEXT `-target hlsl` compile omits the HLSL prelude entirely (reproduced: a
# single `-cpu` compute test before an nvapi test drops the guard; a non-cpu
# HLSL-emit test before it does not). Because many `-cpu` tests exist throughout
# the suite there is no single "leaker" to exclude, and the tests themselves are
# correct, so they are excluded rather than weakened.
#
# The leak is not specific to the coverage pass being in-process. These tests
# fail on nightly-slang-test.yml as well, because the test server is equally
# long-lived and reuses one GlobalSession across the tests it handles: the three
# `target-pipelines/hlsl` tests failed on run 31294644845, and the `06-emit`
# one, which passed there, failed on run 31361305751. Which of them is hit
# depends on whether a `-cpu` test happened to run before it on the same server,
# so the victim set moves between runs. All four are listed in
# expected-failures.txt for the nightly; slang-test keeps expected failures out
# of its exit code, and an entry that passes is reported in the step summary
# rather than failing the job, so a moving victim set is safe to list.
# First identified locally 2026-07-09; nightly behaviour confirmed 2026-08-10.
#
# Path note: the first entry used to read
# `.../06-emit/preludes-included-by-c-and-cuda.slang`. The 2026-08-04
# regeneration round renamed it to `preludes-included-by-cuda-cpp-and-hlsl.slang`
# (the bundle grew an HLSL directive), orphaning the entry.
docs/generated/tests/design/pipeline/06-emit/preludes-included-by-cuda-cpp-and-hlsl.slang
docs/generated/tests/design/target-pipelines/hlsl/nvapi-guard-present-without-nv-intrinsic.slang
docs/generated/tests/design/target-pipelines/hlsl/nvapi-guard-with-wave-intrinsic.slang
docs/generated/tests/design/target-pipelines/hlsl/prelude-nvapi-include-conditional.slang
